:root {
  --bg: #090b10;
  --bg-elev: #0d1117;
  --surface: #121821;
  --surface-soft: #161d27;
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.14);
  --text: #edf2f7;
  --muted: #98a3b3;
  --accent: #2fbf71;
  --accent-bright: #79e3aa;
  --accent-dim: rgba(47, 191, 113, 0.12);
  --accent-glow: rgba(47, 191, 113, 0.18);
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --danger: #f87171;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --topbar-h: 60px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at top left, rgba(47, 191, 113, 0.12), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(88, 101, 242, 0.08), transparent 24%),
    linear-gradient(180deg, #0a0d12 0%, #090b10 38%, #080a0f 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.05), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 24%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

body > * {
  position: relative;
  z-index: 1;
}

/* Barre supérieure : fixe pour tout le monde (invité, membre, admin) */
.topbar.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: block;
  padding: 0;
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  max-height: var(--topbar-h);
  background: rgba(9, 11, 16, 0.92);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.topbar.topbar-admin {
  border-bottom-color: rgba(100, 108, 255, 0.22);
  background: linear-gradient(180deg, rgba(14, 16, 24, 0.96), rgba(9, 11, 16, 0.94));
}

/* Espace sous la barre fixe (catalogue, landing, admin) */
body.page-shell {
  padding-top: var(--topbar-h);
}

/* Pages admin : contenu sur toute la largeur utile de l’écran */
body.page-admin .detail-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: min(1720px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 2.5vw, 2.25rem);
  padding-right: clamp(1rem, 2.5vw, 2.25rem);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: 100%;
  width: 100%;
  max-width: min(1760px, 100%);
  margin: 0 auto;
  padding: 0 max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
}

.site-header__inner .brand-lockup {
  flex-shrink: 0;
}

.site-header__spacer {
  flex: 1;
  min-width: 0;
}

.site-header__nav {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 10px,
    #000 calc(100% - 10px),
    transparent
  );
  mask-size: 100% 100%;
  padding: 0.15rem 0;
}

.site-header__nav::-webkit-scrollbar {
  display: none;
}

.site-header__nav .site-header__nav-link {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.45rem 0.72rem;
  font-size: 0.8125rem;
}

.site-header__tools {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.site-header__login {
  padding: 0.5rem 0.95rem;
  font-size: 0.8125rem;
}

.site-header__logout {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
}

@media (max-width: 520px) {
  .site-header__username {
    display: none;
  }
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.admin-dashboard-page .admin-resource-section,
.admin-dashboard-page .admin-catalog-section {
  margin-top: 1.75rem;
}

.admin-dashboard-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.admin-dashboard-card:hover {
  border-color: rgba(100, 108, 255, 0.5);
  background: rgba(100, 108, 255, 0.09);
  transform: translateY(-2px);
}

.admin-dashboard-card-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.admin-dashboard-card-title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-dashboard-card-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-lockup:hover {
  color: #fff;
}

.brand-lockup:hover .brand-logo {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.brand-accent {
  color: var(--accent-bright);
}

.topbar-trailing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

a.topbar-discord-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  border: 1px solid rgba(88, 101, 242, 0.45);
  background: rgba(88, 101, 242, 0.12);
  color: #a8b0ff;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

a.topbar-discord-link:hover {
  background: rgba(88, 101, 242, 0.24);
  color: #fff;
  border-color: rgba(129, 140, 248, 0.7);
  transform: translateY(-1px);
}

.topbar-discord-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.userbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.avatar {
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.username {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-admin {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(237, 66, 69, 0.2);
  border: 1px solid rgba(237, 66, 69, 0.45);
  color: #ff9a9c;
  flex-shrink: 0;
}

.topbar-reports-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.55);
  color: #fff;
  vertical-align: middle;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.58rem 1.05rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-lg {
  padding: 0.95rem 1.6rem;
  font-size: 1rem;
  border-radius: var(--radius);
}

.btn-discord {
  background: linear-gradient(180deg, #35cb7a 0%, #25a95f 100%);
  color: #07110c;
  border-color: rgba(121, 227, 170, 0.28);
  box-shadow: 0 14px 28px rgba(15, 69, 41, 0.28);
}

.btn-discord:hover {
  background: linear-gradient(180deg, #45d486 0%, #2ab465 100%);
  color: #07110c;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 69, 41, 0.34);
}

.btn-discord-outline {
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-discord-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.btn-primary {
  background: linear-gradient(180deg, #2cb968 0%, #1f8e51 100%);
  color: #f7fffb;
  box-shadow: 0 12px 28px rgba(15, 69, 41, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.flash {
  margin: 1rem 1.35rem 0;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.flash-error {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.flash-success {
  background: rgba(47, 191, 113, 0.12);
  border-color: rgba(121, 227, 170, 0.35);
  color: #d7f7e3;
}

/* —— Landing page —— */
.page-landing {
  width: 100%;
  max-width: min(1760px, calc(100vw - 1.75rem));
  margin: 0 auto;
  padding: 0 clamp(1rem, 2vw, 2rem) 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(1.75rem, 3vw, 3rem);
  align-items: stretch;
  padding: 2.25rem 0 2rem;
}

.hero-copy {
  padding: 1.1rem 0;
}

.hero-kicker {
  margin: 0 0 0.9rem;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.82rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d7f7e3;
  background: rgba(47, 191, 113, 0.1);
  border: 1px solid rgba(121, 227, 170, 0.16);
  margin: 0 0 1rem;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 191, 113, 0.12);
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: min(52ch, 100%);
  font-size: clamp(2.5rem, 5.2vw, 4.35rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.hero .lead {
  max-width: min(52ch, 100%);
  margin: 0 0 1.6rem;
  font-size: 1.08rem;
  color: var(--muted);
}

.hero-caption {
  margin: 1rem 0 0;
  max-width: min(52ch, 100%);
  font-size: 0.92rem;
  color: #c4ccd7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 0.9rem;
  margin: 1.6rem 0 0;
}

.hero-stat {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(13, 17, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #f5fbff;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-stat-label {
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-stats-note {
  max-width: min(52ch, 100%);
  margin: 0.9rem 0 0;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.admin-leak-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.admin-input,
.admin-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.admin-input:focus,
.admin-textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-textarea {
  resize: vertical;
  min-height: 6rem;
}

select.admin-select {
  min-height: 3.1rem;
  padding: 0.8rem 2.85rem 0.8rem 1.05rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  cursor: pointer;
  color: var(--text);
  color-scheme: dark;
  background-color: rgba(18, 24, 33, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2398a3b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1.15rem;
}

select.admin-select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(22, 29, 39, 0.95);
}

select.admin-select:focus {
  border-color: rgba(121, 227, 170, 0.45);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

select.admin-select option {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.65rem 0.85rem;
  background-color: #121821;
  color: #edf2f7;
}

select.admin-select option:first-of-type {
  color: var(--muted);
  font-weight: 500;
}

.admin-progress {
  margin-bottom: 0.5rem;
}

.admin-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.admin-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.admin-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width 0.2s ease;
}

.admin-page code {
  font-size: 0.88em;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 7.5rem;
  padding: 1.1rem 1rem;
  border-radius: 16px;
  border: 2px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.admin-dropzone:hover,
.admin-dropzone:focus-within {
  border-color: rgba(121, 227, 170, 0.35);
  background: rgba(47, 191, 113, 0.06);
  color: #c4ccd7;
}

.admin-dropzone.is-dragover {
  border-color: var(--accent-bright);
  background: rgba(47, 191, 113, 0.1);
  color: var(--text);
}

.admin-dropzone.is-filled {
  border-style: solid;
  border-color: rgba(121, 227, 170, 0.28);
  color: var(--accent-bright);
}

.admin-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.admin-dropzone-title {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

.admin-dropzone-hint {
  font-size: 0.82rem;
  max-width: 28ch;
}

.admin-dropzone-filename {
  font-size: 0.8rem;
  color: var(--text);
  word-break: break-all;
  max-width: 100%;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.hero-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}

.hero-preview-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.hero-brand-mark {
  display: block;
  width: min(320px, 52vw);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: clamp(24px, 6vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 24px 56px rgba(0, 0, 0, 0.5),
    0 10px 28px rgba(47, 191, 113, 0.14);
  background: rgba(10, 14, 18, 0.55);
}

.hero-preview::before {
  content: "";
  position: absolute;
  inset: 2rem 1rem auto auto;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 191, 113, 0.18), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}

.preview-shell {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: clip;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #14161c;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.22),
    0 28px 56px rgba(0, 0, 0, 0.48),
    0 12px 24px rgba(0, 0, 0, 0.28);
}

/* macOS-style title bar (dark chrome) */
.preview-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 0.65rem;
  min-height: 3.25rem;
  padding: 0.55rem 0.85rem 0.5rem;
  background: linear-gradient(180deg, #2c2e33 0%, #25262c 55%, #202126 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.preview-traffic {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: start;
  padding-left: 0.15rem;
}

.preview-traffic-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 0.5px solid rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 1px rgba(0, 0, 0, 0.35);
}

.preview-traffic-close {
  background: linear-gradient(180deg, #ff8578 0%, #ff5f57 45%, #e0443e 100%);
}

.preview-traffic-min {
  background: linear-gradient(180deg, #ffe187 0%, #ffbd2e 45%, #dea123 100%);
}

.preview-traffic-zoom {
  background: linear-gradient(180deg, #5ee88a 0%, #28ca42 40%, #1ea836 100%);
}

.preview-title {
  grid-column: 2;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(235, 238, 245, 0.72);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  text-align: center;
  white-space: nowrap;
}

.preview-titlebar-end {
  grid-column: 3;
  justify-self: end;
  width: 3.25rem;
  height: 12px;
}

.preview-body {
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
  align-items: start;
  background: linear-gradient(180deg, #181a20 0%, #12141a 100%);
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.85rem 0.75rem 0.95rem;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.18);
}

.preview-sidebar-label {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.preview-nav-item {
  display: block;
  margin-bottom: 0.35rem;
  padding: 0.62rem 0.72rem;
  border-radius: 12px;
  color: #c2ccd8;
  font-size: 0.8rem;
  background: transparent;
}

.preview-nav-item-active {
  background: rgba(47, 191, 113, 0.12);
  color: #f3fff7;
  border: 1px solid rgba(121, 227, 170, 0.16);
}

.preview-main {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.62rem;
  padding: 0.75rem 0.9rem 0.8rem;
  min-height: 0;
}

.preview-search {
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(152, 163, 179, 0.95);
  font-size: 0.84rem;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
}

.preview-meta span,
.landing-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd4de;
  font-size: 0.78rem;
}

.preview-cards {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: auto auto;
  gap: 0.58rem;
  align-content: start;
}

.preview-card {
  padding: 0.78rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 0;
}

.preview-card-featured {
  grid-row: 1 / span 2;
  background:
    linear-gradient(135deg, rgba(47, 191, 113, 0.12), rgba(47, 191, 113, 0.03)),
    rgba(255, 255, 255, 0.03);
}

.preview-card-tag {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
}

.preview-card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.28;
}

.preview-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.landing-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 2rem;
}

.landing-section {
  margin-bottom: 2rem;
}

.section-head {
  max-width: min(900px, 100%);
  margin: 0 0 1.25rem;
}

.section-kicker {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.section-head h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.section-head-compact {
  max-width: min(760px, 100%);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1rem;
}

.feature-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.16s;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.feature-index {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.steps-section {
  margin-bottom: 2.5rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  counter-reset: step;
}

.step {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(18, 24, 33, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem 1.2rem 3.6rem;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  left: 1.15rem;
  top: 1.15rem;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(47, 191, 113, 0.12);
  border: 1px solid rgba(121, 227, 170, 0.16);
  color: #d8f6e5;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.site-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.6rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(12, 16, 22, 0.8);
  border-radius: 22px;
}

.site-footer-brand {
  max-width: min(520px, 100%);
}

.site-footer-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
}

.site-footer a {
  color: #dbe7f1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer-copy {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.site-footer-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .hero .lead,
  .hero-caption,
  .hero-stats-note,
  .section-head {
    max-width: none;
  }

  .preview-body {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .preview-shell {
    max-width: none;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .page-landing {
    padding: 0 1rem 3rem;
  }

  .hero {
    gap: 1.3rem;
    padding: 1.4rem 0 1.6rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.25rem, 10vw, 3.1rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .preview-body {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .preview-title {
    white-space: normal;
    line-height: 1.25;
  }

  .preview-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.8rem;
  }

  .preview-main {
    grid-template-rows: auto auto auto;
  }

  .preview-cards {
    grid-template-columns: 1fr;
  }

  .preview-card-featured {
    grid-row: auto;
  }

  .preview-shell {
    min-height: 0;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

.muted {
  color: var(--muted);
}

/* —— Hub (catalogue connecté) —— */
.layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 0.85rem;
  min-height: calc(100vh - var(--topbar-h));
  width: 100%;
  max-width: none;
  margin: 0;
  /* Même retrait horizontal que la topbar, bord gauche écran le plus proche possible */
  padding-left: max(1.4rem, env(safe-area-inset-left));
  padding-right: max(1.4rem, env(safe-area-inset-right));
  box-sizing: border-box;
  align-items: start;
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    position: relative;
    top: auto;
    max-height: min(52vh, 22rem);
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .sidebar-inner {
    gap: 0.75rem;
  }

  .sidebar-title,
  .sidebar-kicker,
  .sidebar-meta,
  .sidebar-chip-row,
  .sidebar-section-head {
    width: 100%;
  }

  .hub {
    padding: 1rem 1rem 2rem;
  }

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

  .hub-toolbar-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .hub-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hub-results-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .search-wrap {
    max-width: none;
  }
}

.sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + 1rem);
  align-self: start;
  /* Permet de faire défiler les catégories quand la liste dépasse la fenêtre */
  max-height: calc(100vh - var(--topbar-h) - 2.5rem);
  max-height: calc(100dvh - var(--topbar-h) - 2.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  background: linear-gradient(180deg, rgba(10, 16, 13, 0.95), rgba(10, 14, 12, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-right: 1px solid var(--border);
  border-radius: 18px;
  margin: 1.2rem 0 1.2rem 0;
  padding: 1rem 0.95rem 1.1rem 0.85rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
}

.sidebar-head {
  margin-bottom: 1.1rem;
  padding: 0.2rem 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-bright);
}

.sidebar-title {
  font-size: 1.2rem;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.45rem;
  font-weight: 800;
}

.sidebar-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.sidebar-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.sidebar-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

a.sidebar-chip-admin {
  text-decoration: none;
  color: inherit;
  border-color: rgba(237, 66, 69, 0.35);
  background: rgba(237, 66, 69, 0.08);
}

a.sidebar-chip-admin:hover {
  border-color: rgba(237, 66, 69, 0.5);
  background: rgba(237, 66, 69, 0.12);
}

.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.sidebar-section-title {
  margin: 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.sidebar-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--accent-bright);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.16);
}

.cat-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  padding: 0.8rem 0.85rem;
  margin-bottom: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.16s, color 0.16s, border-color 0.16s, transform 0.14s, box-shadow 0.16s;
}

.cat-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.cat-btn-active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.07));
  border-color: rgba(52, 211, 153, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cat-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--accent-bright);
  font-size: 0.78rem;
  font-weight: 700;
}

.cat-btn-label {
  flex: 1;
  min-width: 0;
}

.cat-btn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.hub {
  padding: 1.2rem 0.85rem 2.8rem 0.35rem;
  max-width: none;
}

.hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.11), transparent 32%),
    rgba(11, 16, 14, 0.88);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
}

.hub-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-bright);
}

.hub-hero h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hub-copy {
  margin: 0;
  max-width: 60ch;
  font-size: 0.95rem;
  color: var(--muted);
}

.hub-hero-side {
  display: grid;
  gap: 0.75rem;
  justify-items: end;
}

.hub-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.16);
  color: var(--text);
  font-size: 0.8rem;
  white-space: nowrap;
}

.hub-hero-badge-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.45);
}

.hub-hero-note {
  margin: 0;
  max-width: 18rem;
  text-align: right;
  font-size: 0.82rem;
  color: var(--muted);
}

.hub-toolbar-panel {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 18px;
  background: rgba(12, 17, 15, 0.82);
}

.hub-toolbar-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 0.95rem;
}

.hub-toolbar-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.hub-toolbar-title {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.hub-toolbar {
  margin-bottom: 1rem;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 860px;
  min-height: 60px;
  padding: 0 0.9rem 0 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    rgba(18, 24, 21, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 14px 32px rgba(0, 0, 0, 0.2);
}

.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  margin-right: 0.35rem;
  color: var(--accent-bright);
  font-size: 1rem;
}

.search-input {
  width: 100%;
  max-width: none;
  padding: 0.95rem 0.25rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  box-shadow: none;
}

.search-input::placeholder {
  color: rgba(138, 169, 154, 0.82);
}

.search-input:focus {
  outline: none;
}

.search-wrap:focus-within {
  border-color: rgba(52, 211, 153, 0.22);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.08), 0 14px 32px rgba(0, 0, 0, 0.2);
}

.search-reset {
  margin-left: 0.65rem;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.search-reset:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

.results-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.hub-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.hub-stat-card {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  min-height: 108px;
}

.hub-stat-label {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.hub-stat-value {
  margin: 0 0 0.25rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hub-stat-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.hub-results {
  padding: 0.25rem 0;
}

.hub-results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hub-results-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.hub-results-title {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.hub-results-note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.15rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: border-color 0.2s, transform 0.18s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  text-decoration: none;
  color: inherit;
}

.card-link:hover .card-title {
  color: var(--accent-bright);
}

.card-fav {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 4;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-bright);
  background: rgba(7, 13, 10, 0.82);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.12s;
  font-family: inherit;
}

.card-fav:hover {
  color: var(--accent-bright);
  border-color: rgba(52, 211, 153, 0.5);
  transform: scale(1.06);
}

.card-fav[aria-pressed="true"] {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

.card-fav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cat-btn-favorites.cat-btn-active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.detail-fav-row {
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.fav-detail-btn[aria-pressed="true"] {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.card-img {
  aspect-ratio: 16 / 9;
  background: #050a08;
  overflow: hidden;
}

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

.card-body {
  padding: 1rem 1.1rem 1.15rem;
}

.card-cat {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  margin: 0 0 0.3rem;
  font-weight: 700;
}

.card-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.detail-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.35rem 1.35rem 3rem;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--accent-bright);
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.detail-preview img {
  width: 100%;
  display: block;
  background: #050a08;
}

.detail-body {
  padding: 1.35rem 1.5rem 1.75rem;
}

.detail-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.detail-body h1 {
  margin: 0 0 0.85rem;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.detail-desc {
  color: var(--muted);
  margin: 0 0 1.1rem;
  font-size: 1rem;
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-list li {
  font-size: 0.78rem;
  padding: 0.28rem 0.55rem;
  background: var(--accent-dim);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 6px;
  color: var(--accent-bright);
}

/* Toasts (nouvelles ressources) */
.toast-stack {
  position: fixed;
  bottom: 1.1rem;
  right: 1.1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: rgba(17, 28, 23, 0.96);
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(34, 197, 94, 0.12);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text);
  opacity: 0;
  transform: translateX(120%);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.toast-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(52, 211, 153, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--accent-bright);
  font-weight: 800;
}

.toast-msg {
  flex: 1;
  min-width: 0;
}

.toast-msg strong {
  color: var(--accent-bright);
  font-weight: 700;
}

.toast-close {
  flex-shrink: 0;
  margin: -0.2rem -0.35rem -0.2rem 0;
  padding: 0.2rem 0.45rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
}

.toast-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 480px) {
  .toast-stack {
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
  }

  .toast {
    transform: translateY(120%);
  }

  .toast.toast-show {
    transform: translateY(0);
  }
}

/* Leak preview modal (hub) */
.leak-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.leak-modal[hidden] {
  display: none;
}

.leak-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.leak-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.38) rgba(255, 255, 255, 0.08);
  padding: 1.35rem 1.4rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-bright);
  background: var(--surface);
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(47, 191, 113, 0.08);
}

.leak-modal-dialog::-webkit-scrollbar {
  width: 11px;
}

.leak-modal-dialog::-webkit-scrollbar-track {
  margin: 10px 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.leak-modal-dialog::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.leak-modal-dialog::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.48);
  background-clip: padding-box;
}

.leak-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 5;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(9, 11, 16, 0.75);
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.leak-modal-close:hover {
  color: var(--text);
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.06);
}

.leak-modal-title {
  margin: 0 2.5rem 0.35rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  padding-right: 0.25rem;
}

.leak-modal-cat {
  margin: 0 0 1rem;
  font-size: 0.84rem;
}

.leak-modal-video-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 16 / 9;
}

.leak-modal-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.leak-modal-preview-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.leak-modal-preview-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.leak-modal-msg {
  margin: 0.85rem 0 0;
}

.leak-modal-admin {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.leak-modal-admin-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #8e99a4);
}

.leak-modal-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.leak-modal-edit-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.leak-modal-edit-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #8e99a4);
}

.leak-modal-edit-form {
  gap: 0.75rem;
}

.leak-modal-edit-form .admin-textarea {
  min-height: 4.5rem;
}

.leak-modal-edit-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.leak-modal-admin-delete {
  color: #f0a4a4;
}

.leak-modal-admin-delete:hover {
  color: #ffc9c9;
}

.leak-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.leak-modal-report-toggle {
  margin-left: auto;
}

.leak-modal-report-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.leak-modal-report-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #8e99a4);
}

.leak-modal-report-hint {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}

.leak-modal-report-textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
  background: rgba(9, 11, 16, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  resize: vertical;
  min-height: 4.5rem;
}

.leak-modal-report-textarea:focus {
  outline: none;
  border-color: rgba(100, 108, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(100, 108, 255, 0.15);
}

.leak-modal-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-open-leak {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.card-open-leak:hover .card-title {
  color: var(--accent-bright);
}

.card-open-leak:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

body.leak-modal-open {
  overflow: hidden;
}


/* ── Scraper S4NA admin section ── */

.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted, #8e99a4);
  cursor: pointer;
}

.admin-checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent, #646cff);
  cursor: pointer;
}

.scraper-progress {
  margin-top: 1rem;
}

.scraper-progress-bar-anim {
  animation: scraper-indeterminate 1.8s ease-in-out infinite;
  width: 40% !important;
}

@keyframes scraper-indeterminate {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(150%); }
  100% { transform: translateX(-100%); }
}

.scraper-results {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.scraper-results h4 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary, #f0f2f5);
}

.scraper-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.scraper-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.75rem 0.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.scraper-stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent-bright, #a5b4fc);
}

.scraper-stat-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #8e99a4);
}

.scraper-log {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted, #8e99a4);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
}

/* —— Admin : liste des leaks (modifier / supprimer) —— */

.admin-leaks-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

.admin-leaks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-leaks-table th,
.admin-leaks-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-leaks-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.admin-leaks-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-leaks-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.admin-leaks-title {
  font-weight: 600;
  max-width: 18rem;
}

.admin-leaks-id {
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-leaks-actions-col {
  width: 1%;
  white-space: nowrap;
}

.admin-leaks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-report-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.admin-report-badge-pending {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fcd34d;
}

.admin-report-badge-ok {
  background: rgba(47, 191, 113, 0.12);
  border: 1px solid rgba(121, 227, 170, 0.35);
  color: #a7f3d0;
}

.admin-report-reason {
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: 22rem;
}

.admin-report-open-leak {
  margin-left: 0.35rem;
  font-size: 0.8rem;
}

.admin-edit-panel {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-edit-panel-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
