/* ================================================================
   REVISION LOADER — components.css
   Tous les composants réutilisables : boutons, inputs,
   badges, tags, modales, toasts, custom select, lightbox
   ================================================================ */

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: var(--r); border: none;
  font-family: 'Inter', sans-serif; font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: all var(--t); white-space: nowrap;
  line-height: 1; letter-spacing: .1px;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn:active { transform: scale(.97); }

.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dim); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-outline   { background: transparent; color: var(--text-2); border: 1px solid var(--border-2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost     { background: transparent; color: var(--text-3); border: 1px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--border-3); color: var(--text-2); }
.btn-danger    { background: rgba(239,68,68,.1); color: var(--red); border: 1px solid rgba(239,68,68,.2); }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-gold      { background: rgba(234,179,8,.08); color: var(--yellow); border: 1px solid rgba(234,179,8,.2); }
.btn-gold:hover { background: rgba(234,179,8,.16); }
.btn-sm  { padding: 6px 11px; font-size: .74rem; }
.btn-xs  { padding: 4px 8px;  font-size: .68rem; }
.btn-icon {
  width: 30px; height: 30px; padding: 0; justify-content: center;
  border-radius: var(--r-sm); background: transparent;
  color: var(--text-3); border: 1px solid var(--border-2);
  cursor: pointer; display: inline-flex; align-items: center; transition: all var(--t);
}
.btn-icon svg { width: 13px; height: 13px; }
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.danger:hover { border-color: var(--red); color: var(--red); background: rgba(239,68,68,.07); }

/* ── INPUTS ──────────────────────────────────────────────────── */
.input {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--r); padding: 9px 12px;
  color: var(--text); font-family: 'Inter', sans-serif; font-size: .83rem;
  outline: none; transition: border-color var(--t), box-shadow var(--t); width: 100%;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input::placeholder { color: var(--text-3); }
[data-theme="light"] .input { background: var(--bg-1); }
.label { font-size: .66rem; font-weight: 600; color: var(--text-3); letter-spacing: .8px; text-transform: uppercase; margin-bottom: 5px; display: block; }
.field { display: flex; flex-direction: column; }
textarea.input { resize: vertical; min-height: 68px; }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon > svg:first-child { position: absolute; left: 10px; width: 14px; height: 14px; color: var(--text-3); pointer-events: none; flex-shrink: 0; }
.input-with-icon input { padding-left: 33px; padding-right: 36px; flex: 1; min-width: 0; }

/* Checkbox styled */
.checkbox-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .8rem; color: var(--text-2); }
.checkbox-row input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

/* ── Remember me — toggle pill ──────────────────────────────── */
.remember-row {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
  font-size: .8rem; color: var(--text-2); font-weight: 500;
}
.remember-toggle { position: relative; flex-shrink: 0; }
.remember-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.remember-track {
  display: block; width: 38px; height: 22px;
  background: var(--bg-4); border: 1.5px solid var(--border-2);
  border-radius: 99px; transition: background .2s, border-color .2s;
  cursor: pointer; position: relative;
}
.remember-track::before {
  content: ''; position: absolute;
  width: 15px; height: 15px; left: 2.5px; top: 50%;
  transform: translateY(-50%);
  background: var(--text-3); border-radius: 50%;
  transition: transform .22s cubic-bezier(.34,1.5,.64,1), background .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.remember-toggle input:checked + .remember-track {
  background: var(--accent); border-color: var(--accent);
}
.remember-toggle input:checked + .remember-track::before {
  transform: translateY(-50%) translateX(16px); background: #fff;
}
.remember-toggle input:focus-visible + .remember-track {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ── BADGES & TAGS ───────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 99px;
  font-size: .6rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
}
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px; font-size: .62rem; font-weight: 500;
  background: var(--bg-4); color: var(--text-2); border: 1px solid var(--border-2); white-space: nowrap;
  transition: all var(--t);
}
.tag-rm button { background: none; border: none; color: inherit; cursor: pointer; padding: 0; line-height: 1; opacity: .5; margin-left: 2px; }
.tag-rm button:hover { opacity: 1; color: var(--red); }
.tag-active { background: var(--accent-subtle); color: var(--accent); border-color: rgba(99,102,241,.3); cursor: pointer; }
.tag-active:hover { background: rgba(99,102,241,.15); }
.tag-suggest { cursor: pointer; }
.tag-suggest:hover { background: var(--accent-subtle); color: var(--accent); border-color: rgba(99,102,241,.3); }

/* Status dot */
.st-dot-wrap { position: relative; display: inline-block; }
.st-dot { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all var(--t); }
.st-dot:hover, .st-dot.active { border-color: rgba(255,255,255,.5); transform: scale(1.15); }
[data-theme="light"] .st-dot.active { border-color: rgba(0,0,0,.3); }
.st-indicator { position: absolute; bottom: 0; right: 0; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--bg-2); z-index: 2; }

/* ── AVATAR ──────────────────────────────────────────────────── */
.av {
  border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  color: #fff; flex-shrink: 0; border: 2px solid transparent;
}
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.av.admin-glow { border-color: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.av-xl {
  width: 80px; height: 80px; font-size: 2rem;
  border: 3px solid var(--border-2); cursor: pointer; position: relative;
}
.av-xl:hover { border-color: var(--accent); }
.av-xl .av-edit-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--t);
}
.av-xl:hover .av-edit-overlay { opacity: 1; }
.av-xl .av-edit-overlay svg { width: 18px; height: 18px; color: #fff; }
.av-sm { width: 32px; height: 32px; font-size: .85rem; }
.av-xs { width: 26px; height: 26px; font-size: .7rem; flex-shrink: 0; }

/* ── CUSTOM SELECT ───────────────────────────────────────────── */
.cs-wrap { position: relative; width: 100%; }
.cs-btn {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--r);
  cursor: pointer; font-size: .81rem; color: var(--text-2);
  transition: all var(--t); user-select: none; width: 100%;
}
.cs-btn:hover, .cs-btn.open { border-color: var(--accent); color: var(--text); }
.cs-btn-lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-chev { width: 10px; height: 10px; flex-shrink: 0; transition: transform var(--t); margin-left: auto; }
.cs-btn.open .cs-chev { transform: rotate(180deg); }
.cs-btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.cs-dropdown {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: 0 12px 40px rgba(0,0,0,.45), 0 0 20px var(--accent-glow);
  z-index: 400; overflow: hidden; animation: csIn .13s ease; min-width: 200px;
}
[data-theme="light"] .cs-dropdown { box-shadow: 0 8px 32px rgba(0,0,0,.15); }
@keyframes csIn { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
.cs-search { padding: 8px 10px; border-bottom: 1px solid var(--border-2); }
.cs-search input { background: var(--bg-3); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 6px 10px; color: var(--text); font-family: 'Inter', sans-serif; font-size: .76rem; outline: none; width: 100%; }
.cs-search input:focus { border-color: var(--accent); }
.cs-list { max-height: 230px; overflow-y: auto; padding: 4px; }
.cs-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: .8rem; color: var(--text-2); transition: all .1s; }
.cs-opt:hover { background: var(--bg-3); color: var(--text); }
.cs-opt.sel { background: var(--accent-subtle); color: var(--accent); }
.cs-opt-none { color: var(--text-3) !important; }
.cs-empty { padding: 12px; text-align: center; font-size: .74rem; color: var(--text-3); }

/* ── MODALS ──────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); z-index: 700;
  align-items: flex-start; justify-content: center;
  padding: 16px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
[data-theme="light"] .modal-overlay { background: rgba(0,0,0,.45); }
.modal {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 24px 24px 20px;
  width: 100%; margin: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.65);
  animation: slideUp .22s cubic-bezier(.34,1.4,.64,1);
}
[data-theme="light"] .modal { box-shadow: 0 8px 40px rgba(0,0,0,.15); }
@keyframes slideUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.modal-sm  { max-width: 380px; }
.modal-md  { max-width: 500px; }
.modal-lg  { max-width: 680px; }
.modal-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; font-weight: 700; letter-spacing: .2px; }
.modal-x { background: none; border: none; color: var(--text-3); cursor: pointer; padding: 3px; transition: color var(--t); }
.modal-x:hover { color: var(--text); }
.modal-x svg { width: 17px; height: 17px; }
.modal-ftr { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-2); }
.modal-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width:480px) { .modal-grid2 { grid-template-columns: 1fr; } }

/* ── TOGGLE SWITCH ───────────────────────────────────────────── */
.toggle { position: relative; width: 34px; height: 19px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track { position: absolute; inset: 0; background: var(--bg-4); border-radius: 99px; transition: .2s; cursor: pointer; }
.toggle-track::before { content: ''; position: absolute; width: 13px; height: 13px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::before { transform: translateX(15px); }

/* ── PERM GRID (admin roles) ─────────────────────────────────── */
.perm-edit-grid { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.perm-edit-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg-2); }
.perm-edit-lbl { font-size: .78rem; color: var(--text); }
.perm-group-label { font-size: .62rem; font-weight: 700; color: var(--text-3); letter-spacing: .8px; text-transform: uppercase; padding: 6px 10px 2px; }

/* ── ALERT TOAST (centré en haut, jaune) ─────────────────────── */
.alert-toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(0);
  background: rgba(20,18,5,.96); border: 1px solid var(--yellow);
  border-radius: var(--r-lg); padding: 12px 18px 14px;
  min-width: 270px; max-width: 380px; z-index: 1200;
  box-shadow: 0 8px 36px rgba(0,0,0,.6), 0 0 18px rgba(234,179,8,.15);
  backdrop-filter: blur(14px); font-size: .8rem; color: var(--yellow);
  animation: alertIn .28s cubic-bezier(.34,1.56,.64,1);
}
[data-theme="light"] .alert-toast { background: rgba(255,250,220,.98); color: #7c5a00; border-color: #d97706; }
.alert-toast.out { animation: alertOut .4s ease forwards; }
@keyframes alertIn  { from { opacity:0; transform:translateX(-50%) translateY(-18px) scale(.95); } to { opacity:1; transform:translateX(-50%) translateY(0) scale(1); } }
@keyframes alertOut { from { opacity:1; transform:translateX(-50%) translateY(0) scale(1); filter:blur(0); } to { opacity:0; transform:translateX(-50%) translateY(-12px) scale(.97); filter:blur(4px); } }
.alert-msg { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.alert-msg svg { width: 15px; height: 15px; flex-shrink: 0; }
.alert-timeline { height: 2px; background: rgba(234,179,8,.2); border-radius: 99px; overflow: hidden; }
.alert-fill { height: 100%; background: var(--yellow); border-radius: 99px; width: 100%; transform-origin: right; animation: tlShrink 2s linear forwards; }
[data-theme="light"] .alert-fill { background: #d97706; }
@keyframes tlShrink { from { width:100%; } to { width:0%; } }

/* ── BOTTOM TOAST (succès/erreur) ────────────────────────────── */
.toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 5px; z-index: 900; }
.toast { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--r); padding: 10px 14px; font-size: .76rem; color: var(--text); box-shadow: 0 4px 16px rgba(0,0,0,.4); animation: toastIn .22s ease; max-width: 260px; }
.toast.success { border-color: rgba(34,197,94,.35); }
.toast.error   { border-color: rgba(239,68,68,.4); color: #fca5a5; }
.toast.info    { border-color: rgba(99,102,241,.35); }
@keyframes toastIn { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }

/* ── LIGHTBOX ────────────────────────────────────────────────── */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0); z-index: 800; align-items: center; justify-content: center; padding: 0; }
.lightbox.open { display: flex; }
.lb-inner { position: relative; max-width: 94vw; max-height: 94vh; }
.lb-inner img { max-width: 88vw; max-height: 85vh; border-radius: var(--r); display: block; }
.lb-inner iframe { width: min(880px,88vw); height: 82vh; border: none; border-radius: var(--r); display: block; }
.lb-close { top: -34px; right: 0; background: none; border: none; color: rgba(255,255,255,.5); cursor: pointer; font-size: .82rem; font-family: 'Inter',sans-serif; }
.lb-close:hover { color: #fff; }

/* ── UPLOAD MODAL ────────────────────────────────────────────── */
.up-big-preview { border-radius: var(--r); overflow: hidden; margin-bottom: 14px; background: var(--bg-2); border: 1px solid var(--border-2); }
.up-big-preview img { width: 100%; max-height: 190px; object-fit: contain; display: block; background: var(--bg-3); }
.up-bp-doc { display: flex; flex-direction: column; align-items: center; padding: 22px 16px; gap: 6px; }
.up-bp-doc svg { width: 36px; height: 36px; color: var(--accent); opacity: .7; }
.up-bp-ext { font-family: 'Space Grotesk',sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--accent); letter-spacing: 2px; }
.up-bp-fname { font-size: .8rem; font-weight: 500; color: var(--text); text-align: center; word-break: break-all; }
.up-bp-meta { font-size: .67rem; color: var(--text-3); }
.up-file-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; max-height: 120px; overflow-y: auto; }
.up-file-row { display: flex; align-items: center; gap: 9px; background: var(--bg-2); border-radius: var(--r-sm); padding: 8px 11px; }
.up-file-preview { width: 34px; height: 34px; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-3); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.up-file-preview img { width: 100%; height: 100%; object-fit: cover; }
.up-file-name { font-size: .77rem; font-weight: 500; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-file-size { font-size: .65rem; color: var(--text-3); flex-shrink: 0; }
.tag-inp-row { display: flex; gap: 7px; }
.tag-pool { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; min-height: 22px; }
.cat-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media(max-width:480px) { .cat-grid-2 { grid-template-columns: 1fr; } }

@media (max-width: 480px) {
  #admin-page { overflow-x: hidden; max-width: 100vw; }
  .adm-hdr { padding: 10px 14px; }
  .adm-body { padding: 16px 14px 48px; overflow-x: hidden; max-width: 100vw; }
  .adm-tabs {
    padding: 0 8px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100vw;
    box-sizing: border-box;
    flex-wrap: nowrap;
  }
  .adm-tabs::-webkit-scrollbar { display: none; }
  .adm-tab { padding: 10px 10px; font-size: .72rem; flex-shrink: 0; }

  .stat-cards { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .stat-bar-row { font-size: .72rem; }
  .top-tags { flex-wrap: wrap; gap: 5px; }

  .user-cards { grid-template-columns: 1fr !important; }
  .cat-cards  { grid-template-columns: 1fr !important; }
  .role-cards { grid-template-columns: 1fr !important; }
  .log-table  { font-size: .7rem; }
  .log-table td, .log-table th { padding: 6px 8px; }
}

/* ── PROFILE MODAL ───────────────────────────────────────────── */
.profile-av-area { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; }
.status-dots-row { display: flex; align-items: center; gap: 8px; }
.status-dots { display: flex; gap: 6px; }




/* ══════════════════════════════════════════════════════════════
   TRENDING — À LA UNE  · Fortnite-inspired × RevizLoader DA
   ══════════════════════════════════════════════════════════════ */

@keyframes trendingShine {
  0%   { background-position: 0% center; }
  50% { background-position: 100% center; }
  100%   { background-position: 0% center; }
}
@keyframes trendingPulse {
  0%,100% { opacity:1; transform:scale(1); box-shadow: 0 0 0 0 rgba(99,102,241,.7); }
  50%      { opacity:.6; transform:scale(.7); box-shadow: 0 0 0 5px rgba(99,102,241,0); }
}
@keyframes tcardIn {
  from { opacity:0; transform:translateY(14px) scale(.94) rotateX(4deg); }
  to   { opacity:1; transform:translateY(0)    scale(1)   rotateX(0); }
}
@keyframes trendingGlow {
  0%,100% { opacity:.5; }
  50%      { opacity:1; }
}
@keyframes trendingBarFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Wrapper : FIT-CONTENT, pas full-width ── */
.trending-section {
  display: inline-block; /* shrink to content */
  max-width: 100%;
  margin-bottom: 28px;
  position: relative;
  border-radius: 18px;
  padding: 2px; /* border gradient trick */
  background: linear-gradient(135deg, #6366f1, #8b5cf6 30%, #ec4899 60%, #f59e0b);
  background-size: 200% 200%;
  animation: trendingBarFlow 4s linear infinite;
  /* Glow extérieur */
  filter: drop-shadow(0 0 18px rgba(99,102,241,.18)) drop-shadow(0 4px 12px rgba(0,0,0,.12));
}
/* Mode clair : glow réduit */
[data-theme="light"] .trending-section {
  filter: drop-shadow(0 0 8px rgba(99,102,241,.10)) drop-shadow(0 2px 8px rgba(0,0,0,.07));
}

/* Inner : fond opaque par-dessus le border gradient */
.trending-inner {
  border-radius: 16px;
  background: var(--bg-1);
  padding: 14px 16px 15px;
  position: relative;
  overflow: hidden;
}

/* Halo d'ambiance derrière les cartes */
.trending-inner::before {
  content: '';
  position: absolute;
  top: -30%; right: -10%;
  width: 320px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(99,102,241,.08) 0%, transparent 70%);
  pointer-events: none;
}
.trending-inner::after {
  content: '';
  position: absolute;
  bottom: -20%; left: 5%;
  width: 200px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(236,72,153,.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Header (titre en haut, toujours) ── */
.trending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}
.trending-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.trending-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: transparent;
  background: linear-gradient(90deg, #a78bfa, #f472b6, #fbbf24);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: trendingShine 4s ease infinite;
}
.trending-label-dot {
  width: 6px; height: 6px; flex-shrink: 0;
  border-radius: 50%;
  background: #6366f1;
  animation: trendingPulse 2s ease infinite;
}
.trending-subtitle {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-2);
}
/* Séparateur vertical entre label et subtitle */
.trending-title-sep {
  width: 1px; height: 14px;
  background: var(--border-3);
  flex-shrink: 0;
}
.trending-mode-badge {
  font-size: .56rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  border: 1px solid var(--border-3);
  color: var(--text-3);
  background: var(--bg-2);
  white-space: nowrap;
  letter-spacing: .3px;
}

/* ── Track ── */
.trending-track-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.trending-track {
  display: flex;
  gap: 10px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 8px;
}
.trending-track::-webkit-scrollbar { display: none; }

/* Nav */
.trending-nav {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-3);
  background: var(--bg-2);
  color: var(--text-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .16s cubic-bezier(.34,1.5,.64,1);
  position: relative;
  z-index: 3;
}
.trending-nav:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.18);
  box-shadow: 0 0 14px var(--accent-glow);
}
.trending-nav svg { width: 11px; height: 11px; flex-shrink: 0; }

/* ── Cards ── */
.trending-card {
  flex-shrink: 0;
  width: 155px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform .22s cubic-bezier(.34,1.4,.64,1), box-shadow .22s;
  animation: tcardIn .36s cubic-bezier(.22,1,.36,1) both;
  perspective: 600px;
}
.trending-card:nth-child(1) { animation-delay:.04s; }
.trending-card:nth-child(2) { animation-delay:.09s; }
.trending-card:nth-child(3) { animation-delay:.14s; }
.trending-card:nth-child(4) { animation-delay:.19s; }

.trending-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow:
    0 14px 32px rgba(0,0,0,.18),
    0 0 0 1px var(--accent),
    0 0 20px rgba(99,102,241,.15);
    z-index: 51221;
}
/* Reflet holographique au hover */
.trending-card::before {
  content: '';
  position: absolute; inset: 0; z-index: 4;
  border-radius: inherit;
  background: linear-gradient(105deg,
    transparent 40%,
    rgba(255,255,255,.06) 50%,
    transparent 60%);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.trending-card:hover::before { opacity: 1; }

/* ── Thumb ── */
.trending-card-thumb {
  width: 100%; height: 100px;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.trending-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .32s ease;
  display: block;
}
.trending-card:hover .trending-card-thumb img { transform: scale(1.08); z-index: 0;}

.trending-tc-icon {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--text-3);
}
.trending-tc-icon svg { width: 24px; height: 24px; opacity: .38; }
.trending-tc-ext {
  font-size: .48rem; font-weight: 900; letter-spacing: 1.2px;
  background: var(--accent); color: #fff;
  padding: 1px 6px; border-radius: 3px;
  text-transform: uppercase;
}

/* Overlay vignette */
.trending-card-thumb-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,.45) 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

/* Badge À LA UNE — style Fortnite pill */
.trending-badge-row {
  position: absolute; top: 6px; left: 6px; z-index: 2;
}
.trending-badge {
  display: flex; align-items: center; gap: 3px;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: .47rem; font-weight: 900;
  letter-spacing: .8px; text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  box-shadow: 0 2px 8px rgba(245,158,11,.35);
}
.trending-badge svg { width: 7px; height: 7px; flex-shrink: 0; }

/* Rank — coin inférieur droit */
.trending-rank {
  position: absolute; bottom: 5px; right: 5px; z-index: 10;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .54rem; font-weight: 900;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.25);
}
.trending-rank.rank-1 {
  background: linear-gradient(135deg,#f59e0b,#d97706);
  box-shadow: 0 0 10px rgba(245,158,11,.55), 0 0 20px rgba(245,158,11,.2);
  border-color: rgba(245,158,11,.5);
}
.trending-rank.rank-2 {
  background: linear-gradient(135deg,#e2e8f0,#94a3b8);
  box-shadow: 0 0 8px rgba(148,163,184,.4);
  border-color: rgba(226,232,240,.4);
}
.trending-rank.rank-3 {
  background: linear-gradient(135deg,#fbbf24,#92400e);
  box-shadow: 0 0 8px rgba(205,127,50,.35);
}

/* ── Card info ── */
.trending-card-info { padding: 8px 10px 10px; }
.trending-card-name {
  font-size: .68rem; font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px; line-height: 1.3;
}
.trending-card-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
}
.trending-card-uploader {
  display: flex; align-items: center; gap: 4px;
  font-size: .57rem; color: var(--text-3);
  min-width: 0; overflow: hidden;
}
.trending-card-uploader span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trending-av-mini {
  width: 16px; height: 16px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  font-size: .4rem; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.trending-av-mini img { width: 100%; height: 100%; object-fit: cover; }
.trending-card-likes {
  display: flex; align-items: center; gap: 3px;
  font-size: .6rem; font-weight: 800;
  color: #ef4444; flex-shrink: 0;
}
.trending-card-likes svg { width: 9px; height: 9px; fill: #ef4444; }


/* ── Trending Zone : wrapper desktop ── */
.trending-zone {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

/* Sur mobile : empiler, masquer le panneau stats */
@media (max-width: 779px) {
  .trending-zone { flex-direction: column; gap: 0; }
  .trending-stats-panel { display: none; }
  .trending-section { display: block; width: 100%; }
  
  /* ← C'est ici le fix */
  .trending-track {
    
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    touch-action: pan-x;
  }
  .trending-track::-webkit-scrollbar { display: none; }
  .trending-card {
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* Sur desktop : trending shrink, stats prend le reste */
@media (min-width: 780px) {
  .trending-section {
    display: block !important; /* override inline-block */
    flex-shrink: 0;
    min-width: 0;
  }
  .trending-track {
    overflow-x: visible;
  }
  .trending-stats-panel {
    flex: 1;
    min-width: 0;
    align-self: stretch;
  }
}

/* ── Panneau Stats Live ── */
@keyframes tspIn {
  from { opacity:0; transform: translateX(10px); }
  to   { opacity:1; transform: translateX(0); }
}
@keyframes tspCountUp {
  from { opacity:0; transform: translateY(4px); }
  to   { opacity:1; transform: translateY(0); }
}
@keyframes skelShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.trending-stats-panel {
  border-radius: 18px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(236,72,153,.2), rgba(245,158,11,.15));
  position: relative;
  animation: tspIn .4s ease both;
  animation-delay: .15s;
  opacity: 0;
}
.trending-stats-panel::before {
  /* Glow ambiance */
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(236,72,153,.05));
  filter: blur(8px);
  z-index: -1;
}

/* Inner opaque */
.tsp-inner-wrap {
  border-radius: 16px;
  background: var(--bg-1);
  height: 100%;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* Halo déco */
.tsp-inner-wrap::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(99,102,241,.06) 0%, transparent 70%);
  pointer-events: none;
}

/* Header */
.tsp-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}
.tsp-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,.7);
  animation: trendingPulse 2s ease infinite;
  flex-shrink: 0;
}
.tsp-title {
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Grid stats */
.tsp-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}

/* Skeleton */
.skeleton-row {
  border-radius: 10px;
  height: 100%;
  min-height: 52px;
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: skelShimmer 1.4s ease infinite;
}

/* Stat card */
.tsp-stat {
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
  animation: tspCountUp .3s ease both;
}
.tsp-stat:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
/* Accent line en haut */
.tsp-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 10px 10px 0 0;
  opacity: .7;
}
.tsp-stat.c-violet::before { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.tsp-stat.c-pink::before   { background: linear-gradient(90deg, #ec4899, #f43f5e); }
.tsp-stat.c-green::before  { background: linear-gradient(90deg, #22c55e, #10b981); }
.tsp-stat.c-amber::before  { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.tsp-stat-val {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}
.tsp-stat.c-violet .tsp-stat-val { color: #818cf8; }
.tsp-stat.c-pink   .tsp-stat-val { color: #f472b6; }
.tsp-stat.c-green  .tsp-stat-val { color: #4ade80; }
.tsp-stat.c-amber  .tsp-stat-val { color: #fbbf24; }

.tsp-stat-label {
  font-size: .58rem;
  font-weight: 600;
  color: var(--text-3);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tsp-stat-sub {
  font-size: .52rem;
  color: var(--text-3);
  opacity: .65;
  margin-top: 1px;
}


/* ── Trending zone : layout desktop côte à côte ── */
.trending-zone {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 28px;
}

/* Sur mobile : colonne, stats masquées */
@media (max-width: 779px) {
  .trending-zone { flex-direction: column; gap: 10px; }
  .trending-stats-panel { display: none; }
  /* Sur mobile le trending prend toute la largeur */
  .trending-section { display: block; width: 100%; }
}

/* Sur desktop : trending shrink, stats prend le reste */
@media (min-width: 780px) {
  .trending-section { flex-shrink: 0; display: inline-flex; flex-direction: column; }
  .trending-stats-panel {
    flex: 1;
    min-width: 0;
    border-radius: 18px;
    border: 1px solid var(--border-2);
    background: var(--bg-1);
    overflow: hidden;
    position: relative;
  }
  /* Halo ambiance */
  .trending-stats-panel::before {
    content: '';
    position: absolute;
    top: -40%; right: -20%;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(99,102,241,.07) 0%, transparent 70%);
    pointer-events: none;
  }
  .trending-stats-panel::after {
    content: '';
    position: absolute;
    bottom: -30%; left: 0%;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(236,72,153,.05) 0%, transparent 70%);
    pointer-events: none;
  }
}

/* ── Inner du panneau stats ── */
.tsp-inner {
  padding: 16px 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

/* Header "LIVE" */
.tsp-header {
  display: flex;
  align-items: center;
  gap: 7px;
}
.tsp-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.5);
  animation: tspLivePulse 2s ease infinite;
}
@keyframes tspLivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.tsp-live-label {
  font-size: .55rem;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #22c55e;
}
.tsp-live-sep {
  flex: 1;
  height: 1px;
  background: var(--border-2);
}
.tsp-live-time {
  font-size: .55rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* KPIs */
.tsp-kpi-row {
  display: flex;
  align-items: center;
  gap: 0;
}
.tsp-kpi {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
}
.tsp-kpi-val {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text), var(--text-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tsp-kpi-val.accent { background: linear-gradient(135deg, #6366f1, #8b5cf6); -webkit-background-clip: text; background-clip: text; }
.tsp-kpi-val.pink   { background: linear-gradient(135deg, #ec4899, #f43f5e); -webkit-background-clip: text; background-clip: text; }
.tsp-kpi-val.green  { background: linear-gradient(135deg, #10b981, #22c55e); -webkit-background-clip: text; background-clip: text; }
.tsp-kpi-lbl {
  font-size: .57rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-top: 3px;
}
.tsp-kpi-sep {
  width: 1px;
  height: 32px;
  background: var(--border-2);
  flex-shrink: 0;
}

/* Divider */
.tsp-divider {
  height: 1px;
  background: var(--border-2);
}

/* Tags section */
.tsp-tags-title {
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
}
.tsp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tsp-tag {
  font-size: .6rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  background: var(--bg-2);
  cursor: pointer;
  transition: all .14s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.tsp-tag::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(99,102,241,.12), rgba(236,72,153,.08));
  opacity: 0;
  transition: opacity .14s;
}
.tsp-tag:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.tsp-tag:hover::before { opacity: 1; }
.tsp-tag-count {
  font-size: .5rem;
  opacity: .6;
  margin-left: 3px;
}

/* Barre mini activité */
.tsp-activity {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 28px;
  margin-top: auto;
}
.tsp-activity-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  opacity: .25;
  transition: height .4s ease, opacity .2s;
  min-height: 2px;
}
.tsp-activity-bar.active { opacity: .7; }
.tsp-activity-label {
  font-size: .5rem;
  color: var(--text-3);
  margin-top: 3px;
  text-align: center;
}


/* ══════════════════════════════════════════════════════════════
   PREMIUM FEATURES CSS
   ══════════════════════════════════════════════════════════════ */

/* ── Custom Cursor ── */
#custom-cursor { position: fixed; top:0; left:0; pointer-events:none; z-index:99999; }
@media (max-width: 900px) { #custom-cursor { display: none !important; } }
.cc-dot {
  position: fixed; top:-4px; left:-4px;
  width:8px; height:8px; border-radius:50%;
  background: var(--accent);
  will-change: transform;
  transition: width .12s, height .12s, top .12s, left .12s, background .15s;
}
.cc-ring {
  position: fixed; top:-18px; left:-18px;
  width:36px; height:36px; border-radius:50%;
  border: 1.5px solid rgba(99,102,241,.5);
  will-change: transform;
  transition: width .2s, height .2s, top .2s, left .2s, border-color .15s, opacity .15s;
}
#custom-cursor.hovering .cc-dot { width:12px; height:12px; top:-6px; left:-6px; background:#8b5cf6; }
#custom-cursor.hovering .cc-ring { width:48px; height:48px; top:-24px; left:-24px; border-color: rgba(139,92,246,.7); }
#custom-cursor.pressed  .cc-dot  { width:6px; height:6px; top:-3px; left:-3px; }
#custom-cursor.offscreen .cc-dot, #custom-cursor.offscreen .cc-ring { opacity:0; }

/* ── Command Palette ── */
@keyframes cmdIn {
  from { opacity:0; transform: translateY(-12px) scale(.96); }
  to   { opacity:1; transform: translateY(0)     scale(1); }
}
#cmd-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.6); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: flex-start; justify-content: center;
  padding-top: clamp(60px, 12vh, 120px);
}
#cmd-overlay.open { display: flex; animation: lbFadeIn .15s ease; }
.cmd-modal {
  width: min(620px, 94vw);
  background: var(--bg-1);
  border: 1px solid var(--border-3);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(99,102,241,.15);
  animation: cmdIn .2s cubic-bezier(.22,1,.36,1);
}
.cmd-search-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-2);
}
.cmd-search-icon { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; }
.cmd-input {
  flex: 1; border: none; background: transparent;
  font-size: .9rem; color: var(--text); outline: none;
  font-family: inherit;
}
.cmd-input::placeholder { color: var(--text-3); }
.cmd-esc-badge {
  font-size: .6rem; padding: 2px 7px;
  border: 1px solid var(--border-2);
  border-radius: 5px; color: var(--text-3);
  background: var(--bg-2);
}
.cmd-results { max-height: 360px; overflow-y: auto; padding: 6px; }
.cmd-results::-webkit-scrollbar { width: 4px; }
.cmd-results::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
.cmd-group-label {
  font-size: .55rem; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-3);
  padding: 8px 10px 4px;
}
.cmd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  transition: background .1s;
}
.cmd-item.selected, .cmd-item:hover { background: var(--bg-3); }
.cmd-item-icon { font-size: 1rem; flex-shrink: 0; width: 22px; text-align: center; }
.cmd-item-body { flex: 1; min-width: 0; }
.cmd-item-label { font-size: .78rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-item-sub { font-size: .62rem; color: var(--text-3); margin-top: 1px; }
.cmd-item-arrow { width: 14px; height: 14px; color: var(--text-3); flex-shrink: 0; opacity: 0; transition: opacity .1s; }
.cmd-item.selected .cmd-item-arrow, .cmd-item:hover .cmd-item-arrow { opacity: 1; }
.cmd-empty { padding: 24px; text-align: center; font-size: .78rem; color: var(--text-3); }
.cmd-footer {
  display: flex; gap: 14px; padding: 8px 14px;
  border-top: 1px solid var(--border-2);
  font-size: .6rem; color: var(--text-3);
}
.cmd-footer kbd {
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: 4px; padding: 1px 5px; font-size: .58rem;
  margin-right: 3px;
}
.cmd-k-hint {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  cursor: pointer;
}
.cmd-k-hint kbd {
  font-size: .58rem; padding: 2px 7px;
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: 5px; color: var(--text-3);
  transition: all .12s;
}
.cmd-k-hint:hover kbd { border-color: var(--accent); color: var(--accent); }
.search-wrap { position: relative; }

/* ── Confetti ── */
@keyframes confettiOut {
  0%   { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 80px)) rotate(var(--rot)) scale(0); opacity: 0; }
}
.confetti-particle {
  position: fixed; pointer-events: none; z-index: 99999;
  animation: confettiOut 3.5s cubic-bezier(.2,.8,.3,1) forwards;
}

/* ── Badge Nouveau ── */
.badge-new {
  position: absolute; top: 8px; right: 8px;
  background: linear-gradient(135deg, #10b981, #22c55e);
  color: #fff; font-size: .48rem; font-weight: 900;
  letter-spacing: .8px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 20px;
  box-shadow: 0 0 10px rgba(16,185,129,.4);
  animation: badgeIn .3s cubic-bezier(.34,1.5,.64,1);
  overflow-x: hidden;
  pointer-events: none; z-index: 0;
}
@keyframes badgeIn {
  from { transform: scale(0); opacity:0; }
  to   { transform: scale(1); opacity:1; }
}

/* ── Réactions emoji ── */
.reaction-picker {
  display: flex; gap: 4px; padding: 6px 8px;
  background: var(--bg-1); border: 1px solid var(--border-3);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  animation: cmdIn .15s ease;
}
.reaction-btn {
  font-size: 1.1rem; background: none; border: none; cursor: pointer;
  padding: 4px 6px; border-radius: 8px; transition: transform .1s;
  line-height: 1;
}
.reaction-btn:hover { transform: scale(1.3); background: var(--bg-3); }
@keyframes reactionPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}
.reaction-pop { animation: reactionPop .3s ease; }
.fiche-reactions-row {
  display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px;
}
.fiche-reaction {
  display: flex; align-items: center; gap: 3px;
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: 20px; padding: 2px 7px;
  font-size: .65rem; cursor: pointer; transition: all .12s;
}
.fiche-reaction:hover { border-color: var(--accent); background: var(--accent-subtle); }
.fiche-reaction span { font-size: .6rem; color: var(--text-3); font-weight: 600; }

/* ── Toast v2 enrichis ── */
@keyframes toastIn  { from { opacity:0; transform:translateX(20px) scale(.95); } to { opacity:1; transform:translateX(0) scale(1); } }
@keyframes toastBar { from { width:100%; } to { width:0%; } }
.toast.toast-v2 {
  background: var(--bg-1) !important;
  border: 1px solid var(--border-3) !important;
  border-radius: 12px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.2), 0 0 0 1px var(--border) !important;
  min-width: 220px;
  animation: toastIn .25s cubic-bezier(.34,1.3,.64,1) !important;
}
.toast-v2-body {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
}
.toast-v2-icon {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 900;
}
.toast.success .toast-v2-icon { background: rgba(16,185,129,.15); color: #10b981; }
.toast.error   .toast-v2-icon { background: rgba(239,68,68,.15);  color: #ef4444; }
.toast.info    .toast-v2-icon { background: rgba(99,102,241,.15); color: #6366f1; }
.toast.toast-v2:not(.success):not(.error):not(.info) .toast-v2-icon { background: var(--bg-3); color: var(--text-3); }
.toast-v2-msg { font-size: .76rem; font-weight: 500; color: var(--text); flex: 1; }
.toast-v2-bar { height: 2px; background: var(--bg-3); }
.toast-v2-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #6366f1, #ec4899);
  animation: toastBar linear forwards;
  transform-origin: left;
}
.toast.success .toast-v2-fill { background: #10b981; }
.toast.error   .toast-v2-fill { background: #ef4444; }

/* ── Welcome card ── */
@keyframes wcIn {
  from { opacity:0; transform:translateY(30px) scale(.95); }
  to   { opacity:1; transform:translateY(0)    scale(1); }
}
#welcome-card {
  display: none; position: fixed; bottom: 24px; right: 24px;
  z-index: 9000; width: min(380px, calc(100vw - 32px));
}
#welcome-card.visible { display: block; animation: wcIn .4s cubic-bezier(.22,1,.36,1); }
.wc-inner {
  background: var(--bg-1);
  border: 1px solid var(--border-3);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25), 0 0 0 1px rgba(99,102,241,.1);
  position: relative;
  overflow: hidden;
}
.wc-inner::before {
  content: '';
  position: absolute; top:0; left:0; right:0; height:2px;
  background: linear-gradient(90deg, #6366f1, #ec4899, #f59e0b);
}
.wc-close {
  position: absolute; top: 12px; right: 12px;
  background: var(--bg-3); border: none; border-radius: 6px;
  width: 26px; height: 26px; cursor: pointer; color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.wc-close:hover { background: var(--bg-4); color: var(--text); }
.wc-close svg { width: 12px; height: 12px; }
.wc-emoji { font-size: 2rem; margin-bottom: 8px; }
.wc-title { font-size: .95rem; font-weight: 800; color: var(--text); margin-bottom: 3px; }
.wc-subtitle { font-size: .72rem; color: var(--text-3); margin-bottom: 18px; }
.wc-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.wc-step { display: flex; align-items: flex-start; gap: 12px; }
.wc-step-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; font-size: .65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.wc-step-title { font-size: .76rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.wc-step-desc { font-size: .65rem; color: var(--text-3); line-height: 1.4; }
.wc-step-desc kbd {
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: 4px; padding: 1px 5px; font-size: .6rem;
}
.wc-cta {
  width: 100%; padding: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border: none; border-radius: 10px;
  font-size: .76rem; font-weight: 700; cursor: pointer;
  transition: all .15s;
}
.wc-cta:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,.35); }


/* ══════════════════════════════════════════════════════════════
   RAFFINEMENTS VISUELS PREMIUM 2026
   ══════════════════════════════════════════════════════════════ */

/* ── Fiche card : hover glow ambiance ── */
@keyframes cardGlow {
  0%,100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%      { box-shadow: 0 0 16px 2px var(--accent-glow); }
}
.fiche-card {
  transition: transform .2s cubic-bezier(.34,1.2,.64,1), box-shadow .2s, border-color .15s !important;
}
.fiche-card:hover {
  transform: translateY(-4px) !important;
  outline: 1px solid var(--accent) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.18) !important;
  border-color: transparent !important;
}
/* ── Skeleton loaders plus beaux ── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: var(--bg-2);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border-2);
}
.skel-thumb, .skel-line {
  background: linear-gradient(
    90deg,
    var(--bg-3) 25%,
    var(--bg-4) 50%,
    var(--bg-3) 75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.4s ease infinite;
}

/* ── Nav sidebar : hover pill amélioré ── */
.nav-item, .nav-subitem {
  border-radius: 8px;
  transition: background .13s, color .13s, transform .1s;
}
.nav-item:hover, .nav-subitem:hover {
  transform: translateX(2px);
}
.nav-item.active, .nav-subitem.active {
  background: var(--accent-subtle) !important;
  color: var(--accent) !important;
  box-shadow: inset 2px 0 0 var(--accent);
}

/* ── Scrollbar plus fine et colorée ── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-thumb {
  background: var(--border-3);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Input focus glow ── */
.input:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* ── Buttons : micro bounce ── */
@keyframes btnBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(.94); }
  70%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.btn:active { animation: btnBounce .25s ease; }

/* ── Like button pop ── */
@keyframes likePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4) rotate(-8deg); }
  70%  { transform: scale(.9)  rotate(4deg); }
  100% { transform: scale(1)   rotate(0); }
}
.fsc-btn.pop { animation: likePop .35s cubic-bezier(.34,1.5,.64,1); }

/* ── Page title : gradient texte ── */
.page-title span {
  background: linear-gradient(135deg, var(--accent), #a78bfa, #ec4899);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: titleShine 4s linear infinite;
}
@keyframes titleShine {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ── Top progress bar ── */
#top-progress.loading {
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
  background-size: 200% 100%;
  animation: progressFlow .8s linear infinite;
}
@keyframes progressFlow {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* ── Sidebar : fond ambiance minuit ── */
[data-theme="midnight"] #sidebar {
  background: linear-gradient(180deg, #0a0a15 0%, #080810 100%);
  border-right: 1px solid rgba(167,139,250,.12);
}
[data-theme="midnight"] #sidebar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 200px;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,58,237,.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Modal overlay backdrop blur ── */
.modal-overlay {
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

/* ── Avatar ring hover ── */
.av {
  transition: box-shadow .15s !important;
}
.av:hover {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent) !important;
}

/* ── Fiche tag : hover cliquable ── */
.fiche-tag {
  transition: all .12s;
  cursor: pointer;
}
.fiche-tag:hover {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ── Thème midnight : accent violet profond pour les cards ── */
[data-theme="midnight"] .fiche-card {
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%);
  border-color: rgba(167,139,250,.1);
}
[data-theme="midnight"] .fiche-card:hover {
  border-color: rgba(167,139,250,.3);
  box-shadow: 0 8px 28px rgba(124,58,237,.15), 0 0 0 1px rgba(167,139,250,.2);
}

/* ── Search input : pill arrondie ── */
.search-wrap {
  border-radius: 50px !important;
  overflow: hidden;
}
.search-wrap .input {
  border-radius: 50px !important;
}

/* ── Bouton thème 3 états : animation ── */
#theme-btn {
  transition: transform .2s cubic-bezier(.34,1.5,.64,1) !important;
}
#theme-btn:active { transform: rotate(360deg) scale(.9) !important; }


/* ══════════════════════════════════════════════════════════════
   THEME PICKER + SCROLL REVEAL + AMBIENT + PROGRESS V2
   ══════════════════════════════════════════════════════════════ */

/* ── Theme Picker popup ── */
@keyframes tpIn {
  from { opacity:0; transform: translateY(8px) scale(.96); }
  to   { opacity:1; transform: translateY(0)   scale(1); }
}
#theme-picker {
  display: none;
  position: fixed;
  bottom: 70px; left: 16px;
  z-index: 8000;
  width: 240px;
  background: var(--bg-1);
  border: 1px solid var(--border-3);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.35), 0 0 0 1px var(--border);
}
#theme-picker.open {
  display: block;
  animation: tpIn .2s cubic-bezier(.22,1,.36,1);
}
.tp-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.tp-title {
  font-size: .65rem; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-3);
}
.tp-close {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--bg-3); border: none; cursor: pointer;
  color: var(--text-3); display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.tp-close:hover { background: var(--bg-4); color: var(--text); }
.tp-close svg { width: 10px; height: 10px; }
.tp-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.tp-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: 1.5px solid var(--border-2);
  border-radius: 10px; padding: 8px 4px;
  cursor: pointer; transition: all .16s;
  position: relative;
}
.tp-swatch:hover { border-color: var(--accent); transform: translateY(-2px); }
.tp-swatch.active { border-color: var(--accent); background: var(--accent-subtle); }
.tp-swatch-preview {
  width: 40px; height: 28px; border-radius: 6px;
  overflow: hidden; position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.tp-swatch-bg  { position: absolute; inset: 0; }
.tp-swatch-acc {
  position: absolute; bottom: 4px; right: 4px;
  width: 12px; height: 12px; border-radius: 50%;
}
.tp-swatch-txt {
  position: absolute; top: 5px; left: 5px;
  width: 18px; height: 3px; border-radius: 2px; opacity: .7;
}
.tp-swatch-label {
  font-size: .55rem; font-weight: 700; color: var(--text-2);
  letter-spacing: .3px;
}
.tp-swatch-check {
  position: absolute; top: 4px; right: 4px;
  width: 14px; height: 14px;
  background: var(--accent); border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  color: #fff;
}
.tp-swatch-check svg { width: 9px; height: 9px; }
.tp-swatch.active .tp-swatch-check { display: flex; }

/* ── Scroll Reveal ── */
.sr-init {
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transition: opacity .4s cubic-bezier(.22,1,.36,1), transform .4s cubic-bezier(.22,1,.36,1);
}
.sr-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Ambient Glow ── */
.fiche-card.has-ambient:hover {
  box-shadow:
    0 8px 28px rgba(var(--ambient-r),var(--ambient-g),var(--ambient-b),.25),
    0 0 0 1px var(--accent);
}

/* ── Top progress v2 arc-en-ciel ── */
.top-progress-v2.loading {
  background: linear-gradient(90deg,
    #6366f1 0%, #8b5cf6 20%, #ec4899 40%,
    #f59e0b 60%, #10b981 80%, #6366f1 100%) !important;
  background-size: 200% 100% !important;
  animation: trendingBarFlow 1.2s linear infinite !important;
}

