/* ============================================================
   Styles du dashboard (par-dessus Tabler)
   ============================================================ */
:root {
  --dash-accent: #5865f2;
  --dash-accent-2: #9b59b6;
  --dash-gold: #f5c542;
  --dash-silver: #c0c7d1;
  --dash-bronze: #d08a4d;
}

body { font-feature-settings: "cv03", "cv04", "cv11"; }

/* --- Barre latérale --- */
/* clip (et pas hidden) : sinon le bandeau collé en haut ne tient pas */
.page { overflow-x: clip; }
.brand { display: flex; align-items: center; gap: .75rem; text-align: left; min-width: 0; }
.brand-icon { background-size: cover; background-position: center; font-size: 1.25rem; border-radius: 50%; flex-shrink: 0; }
.brand-text { min-width: 0; }
.brand-name { font-weight: 700; font-size: 1rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Grand écran : menu en colonne avec "Se déconnecter" en bas (sur téléphone, Tabler le replie derrière ☰) */
@media (min-width: 992px) {
  .navbar-vertical .navbar-collapse { display: flex !important; flex-direction: column; }
}
.navbar-vertical .nav-item.active .nav-link {
  background: linear-gradient(90deg, rgba(88, 101, 242, .25), transparent);
  color: #fff;
  border-radius: 6px;
}
.navbar-vertical .nav-item.active .nav-link-icon { color: var(--dash-accent); }

/* --- En-tête --- */
.date-input { width: 150px; color-scheme: dark; }
#period-buttons .btn.active { background: var(--dash-accent); border-color: var(--dash-accent); color: #fff; }

/* Bandeau collé en haut de l'écran quand on défile */
.sticky-bar {
  position: sticky; top: 0; z-index: 1020;
  margin: 0; padding-top: 1rem; padding-bottom: 1rem;
  background: rgba(21, 26, 38, .88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease;
}
/* Seulement une ombre quand on a défilé : surtout ne pas changer la hauteur du bandeau
   (sinon la page raccourcit, le défilement remonte, le bandeau regrandit… et l'écran tremble) */
.sticky-bar.scrolled {
  border-bottom-color: var(--tblr-border-color);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}

/* Bouton ⟳ */
.refresh-btn { padding-left: .55rem; padding-right: .55rem; }
.refresh-btn.spinning .ti { animation: dash-spin .8s linear infinite; }
@keyframes dash-spin { to { transform: rotate(360deg); } }

/* --- Transition entre onglets --- */
.tab-content:not([hidden]) { animation: dash-fade .35s ease both; }
@keyframes dash-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* --- Cartes de chiffres --- */
.stat-card { overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card .stat-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .sparkline { margin: .5rem -1rem -1rem; height: 48px; }
.delta { font-size: .75rem; font-weight: 600; white-space: nowrap; }

/* --- Graphiques --- */
.chart-lg { min-height: 320px; }
.chart-md { min-height: 260px; }
.calendar-chart { height: 170px; }

/* --- Podium --- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: .75rem; margin-bottom: 1rem; }
.podium-step { text-align: center; padding: 1rem .5rem .75rem; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); animation: dash-rise .6s ease both; min-width: 0; }
.podium-step.p1 { padding-top: 1.5rem; border-color: rgba(245, 197, 66, .45); background: linear-gradient(180deg, rgba(245, 197, 66, .12), rgba(255, 255, 255, .02)); animation-delay: .1s; }
.podium-step.p2 { border-color: rgba(192, 199, 209, .35); animation-delay: .2s; }
.podium-step.p3 { border-color: rgba(208, 138, 77, .35); animation-delay: .3s; }
.podium-step .avatar { margin-bottom: .5rem; }
.podium-step.p1 .avatar { box-shadow: 0 0 0 3px var(--dash-gold); }
.podium-step.p2 .avatar { box-shadow: 0 0 0 3px var(--dash-silver); }
.podium-step.p3 .avatar { box-shadow: 0 0 0 3px var(--dash-bronze); }
.podium-medal { font-size: 1.5rem; line-height: 1; margin-bottom: .35rem; }
.podium-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-value { font-size: 1.1rem; font-weight: 700; }
@keyframes dash-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* --- Classements --- */
.rank-row { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--tblr-border-color); }
.rank-row:last-child { border-bottom: none; }
.rank-pos { min-width: 1.75rem; flex: none; white-space: nowrap; text-align: right; color: var(--tblr-secondary); font-variant-numeric: tabular-nums; }
.rank-who { flex: 1; min-width: 0; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-row .progress { height: 4px; margin-top: .3rem; }
.rank-row .progress-bar { transition: width .8s ease; }

/* --- Uptime --- */
.days-strip { display: flex; gap: 2px; flex-wrap: wrap; max-width: 540px; }
.days-strip span { width: 8px; height: 22px; border-radius: 2px; background: rgba(255, 255, 255, .08); transition: transform .15s; }
.days-strip span:hover { transform: scaleY(1.25); }
.u-good { background: #2fb344 !important; }
.u-mid { background: #f5c542 !important; }
.u-warn { background: #f76707 !important; }
.u-bad { background: #d63939 !important; }

/* --- Chargement (squelettes) --- */
.skeleton-card { height: 118px; }
.skeleton-chart { height: 320px; }

/* --- Connexion --- */
.login-bg {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(88, 101, 242, .25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(155, 89, 182, .2), transparent 40%),
    var(--tblr-body-bg);
}
.login-card { animation: dash-rise .5s ease both; }
.login-logo {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center;
  font-size: 2rem; color: #fff; background: linear-gradient(135deg, var(--dash-accent), var(--dash-accent-2));
  box-shadow: 0 10px 30px rgba(88, 101, 242, .4);
}
.login-error { min-height: 1.5em; }

@media (max-width: 767px) {
  .podium { gap: .4rem; }
  .podium-step { padding: .75rem .25rem .5rem; }
  .date-input { width: 130px; }
}

/* Noms cliquables (ouvrent Discord ou le site) */
.entity-link { color: inherit; text-decoration: none; }
.entity-link:hover { color: var(--tblr-primary); text-decoration: underline; text-underline-offset: 3px; }

/* Fils d'un salon (dépliables sous « Top salons ») */
.thread-toggle {
  margin-left: .5rem; padding: 0 .4rem; border: 0; border-radius: 4px; background: rgba(255,255,255,.06);
  color: var(--tblr-secondary); font-size: .75rem; line-height: 1.4rem; cursor: pointer; vertical-align: middle;
}
.thread-toggle:hover { background: rgba(255,255,255,.12); color: var(--tblr-body-color); }
.thread-toggle .ti { display: inline-block; transition: transform .2s ease; }
.thread-toggle.open .ti { transform: rotate(90deg); }
.thread-list { padding: .25rem 0 .5rem 3.2rem; border-bottom: 1px solid var(--tblr-border-color); }
.thread-list[hidden] { display: none; }
.thread-row { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; }
.thread-branch { color: var(--tblr-secondary); flex-shrink: 0; }
.thread-row .rank-name { font-size: .875rem; }
.thread-row .progress { height: 3px; margin-top: .25rem; }
.thread-more { margin-top: .25rem; }

/* Compte à rebours de la mise à jour automatique */
.live-timer { padding-left: 1.1rem; font-size: .75rem; opacity: .75; font-variant-numeric: tabular-nums; }

/* Onglet Vérification : entonnoir */
.funnel { display: flex; flex-direction: column; gap: 1.1rem; }
.funnel-track { height: 10px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; }
.funnel-bar { height: 100%; border-radius: 6px; transition: width .8s ease; }
.stuck-chip { font-weight: 500; }

/* Période courte : une tuile par jour */
.calendar-chart.day-tiles {
  height: auto; display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.day-tile {
  border-radius: 8px; padding: .5rem .6rem; min-height: 58px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #e6e9ef; border: 1px solid rgba(255,255,255,.04);
  transition: transform .15s ease;
}
.day-tile:hover { transform: translateY(-2px); }
.day-tile.light { color: #151a26; }
.day-tile.empty { background: transparent; border-style: dashed; color: var(--tblr-secondary); }
.day-tile-date { font-size: .72rem; opacity: .85; text-transform: capitalize; white-space: nowrap; }
.day-tile-value { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.calendar-chart.day-tiles.compact { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 4px; }
.day-tiles.compact .day-tile { min-height: 44px; padding: .35rem .45rem; }
.day-tiles.compact .day-tile-value { font-size: .95rem; }
.day-tiles.compact .day-tile-date { font-size: .66rem; }

/* Onglet Modération : tableau de l'équipe + journal */
.team-table td, .team-table th { white-space: nowrap; }
.team-table .team-auto td { background: rgba(255,255,255,.02); }
.journal { display: flex; flex-direction: column; max-height: 520px; overflow-y: auto; }
.journal-row { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem 0; border-bottom: 1px solid var(--tblr-border-color); }
.journal-row:last-child { border-bottom: none; }
.journal-time { width: 80px; flex-shrink: 0; padding-top: .1rem; }
.journal-icon { width: 1.3rem; flex-shrink: 0; text-align: center; }
.journal-text { min-width: 0; }
.journal-reason { border-left: 2px solid var(--tblr-border-color); padding-left: .5rem; margin-top: .15rem; overflow-wrap: anywhere; }


/* ============================================================
   THÈME COLORÉ (couleur par onglet, fond animé, verre dépoli…)
   Placé en dernier : il remplace les styles plus haut quand il y a conflit.
   ============================================================ */
:root {
  --bg: #0b0e17;
  --card: rgba(22, 27, 41, .72);
  --card-border: rgba(255, 255, 255, .07);
  --text-dim: #8e9ab0;
  --gold: linear-gradient(135deg, #fff1a8, #f5c542 40%, #b8860b);
  --silver: linear-gradient(135deg, #ffffff, #c0c7d1 45%, #7d8794);
  --bronze: linear-gradient(135deg, #ffd2a6, #d08a4d 45%, #8a4f22);
  --accent: #7c5cff; --accent-2: #ff5ca8;
}
/* Couleurs de chaque onglet */
body[data-tab="overview"]     { --accent: #7c5cff; --accent-2: #ff5ca8; }
body[data-tab="messages"]     { --accent: #3b82f6; --accent-2: #22d3ee; }
body[data-tab="members"]      { --accent: #22c55e; --accent-2: #a3e635; }
body[data-tab="verification"] { --accent: #f97316; --accent-2: #facc15; }
body[data-tab="voice"]        { --accent: #06b6d4; --accent-2: #818cf8; }
body[data-tab="moderation"]   { --accent: #ef4444; --accent-2: #a855f7; }
body[data-tab="invites"]      { --accent: #ec4899; --accent-2: #8b5cf6; }
body[data-tab="watchlist"]    { --accent: #8b5cf6; --accent-2: #f97316; }
body[data-tab="uptime"]       { --accent: #14b8a6; --accent-2: #22c55e; }
body[data-tab="settings"]     { --accent: #64748b; --accent-2: #7c5cff; }

body { background: var(--bg) !important; }
h1, h2, h3, .page-title, .card-title, .stat-value, .podium-value, .brand-name, .rank-val, .medal, .day-tile-value { font-family: 'Outfit', var(--tblr-font-sans-serif); }

/* --- Fond animé : grosses taches de lumière floues ---
   Halo dessiné par un masque en dégradé (pas de filter: blur, très lourd pour la carte graphique) :
   la tache ne fait que glisser, le navigateur n'a rien à recalculer. Taille = disque + l'ancien flou. */
.bg-glow { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-glow span { position: absolute; border-radius: 50%; opacity: .38; animation: dash-float 22s ease-in-out infinite; transition: background 1s; will-change: transform;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 25%, rgba(0, 0, 0, .55) 55%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, #000 25%, rgba(0, 0, 0, .55) 55%, transparent 100%); }
.bg-glow span:nth-child(1) { width: 820px; height: 820px; background: var(--accent); top: -290px; left: calc(12% - 130px); }
.bg-glow span:nth-child(2) { width: 740px; height: 740px; background: var(--accent-2); bottom: -310px; right: calc(6% - 130px); animation-delay: -7s; }
.bg-glow span:nth-child(3) { width: 640px; height: 640px; background: #5865f2; top: calc(40% - 130px); left: calc(55% - 130px); animation-delay: -14s; opacity: .22; }
@keyframes dash-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(70px, 50px) scale(1.12); }
  66% { transform: translate(-50px, 30px) scale(.92); }
}
.page { position: relative; z-index: 1; background: transparent; }
.page-wrapper { background: transparent; }

/* --- Barre latérale --- */
.navbar-vertical { background: rgba(12, 15, 25, .78) !important; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-right: 1px solid var(--card-border); }
.brand-icon { box-shadow: 0 0 22px rgba(124, 92, 255, .55); }
.navbar-vertical .nav-link { border-radius: 10px; margin: 2px 8px; transition: background .2s, transform .2s; }
.navbar-vertical .nav-link:hover { background: rgba(255, 255, 255, .05); transform: translateX(3px); }
.navbar-vertical .nav-link-icon i { color: var(--tab-color); }
.navbar-vertical .nav-item.active .nav-link {
  background: linear-gradient(90deg, color-mix(in srgb, var(--tab-color) 38%, transparent), transparent);
  color: #fff; border-radius: 10px; box-shadow: inset 3px 0 0 var(--tab-color);
}
.navbar-vertical .nav-item.active .nav-link-icon { color: var(--tab-color); }
#live-dot.status-green { box-shadow: 0 0 10px #2fb344; }

/* --- Bandeau du haut --- */
.sticky-bar { background: rgba(11, 14, 23, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.sticky-bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent); transition: background .6s; }
.page-title { font-size: 1.6rem; font-weight: 800; background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--accent-2) 70%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; }
#period-buttons .btn { border-color: var(--card-border); background: rgba(255, 255, 255, .03); }
#period-buttons .btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 45%, transparent); }
#custom-apply { background: var(--accent); border-color: var(--accent); }

/* --- Cartes (verre dépoli) ---
   Pas de backdrop-filter sur les cartes : derrière il n'y a que le halo déjà flou, et flouter chaque carte
   à chaque image figeait tout le navigateur à l'ouverture. Le flou reste sur la barre du haut et le menu. */
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c, var(--accent)) 45%, transparent); box-shadow: 0 10px 34px color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); }
.card-header { border-bottom-color: var(--card-border); }
.card-title .ti { color: var(--accent) !important; }

/* Cartes de chiffres : fond teinté + bord lumineux + icône en dégradé */
.stat-card { --c: var(--accent); position: relative; background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%), var(--card); overflow: hidden; }
.stat-card::before { content: ''; position: absolute; inset: 0; border-radius: 16px; padding: 1px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, transparent), transparent 55%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1.3rem; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #fff)); box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 50%, transparent); }
.stat-card .stat-label { text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; color: var(--text-dim); font-weight: 600; }
.stat-card .stat-value { font-size: 2.1rem; font-weight: 800; color: #fff; }
.stat-card .sparkline { margin: .5rem -1rem -1rem; height: 56px; }
.stat-value.flash-up { animation: dash-flash-up 1.6s ease; }
.stat-value.flash-down { animation: dash-flash-down 1.6s ease; }
@keyframes dash-flash-up { 0% { color: #4ade80; text-shadow: 0 0 18px rgba(74, 222, 128, .9); } 100% { color: #fff; text-shadow: none; } }
@keyframes dash-flash-down { 0% { color: #f87171; text-shadow: 0 0 18px rgba(248, 113, 113, .9); } 100% { color: #fff; text-shadow: none; } }
.delta { border-radius: 999px; padding: .25rem .55rem; }

/* --- Apparition en cascade --- */
.tab-content:not([hidden]) { animation: none; }
.reveal { animation: dash-reveal .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes dash-reveal { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* --- Podium --- */
.podium { gap: .8rem; }
.podium-step { position: relative; border-radius: 16px; padding: 1.1rem .6rem .9rem; background: rgba(255, 255, 255, .03); border: 1px solid var(--card-border); overflow: hidden; }
.podium-step.p1 { padding-top: 1.5rem; background: radial-gradient(120% 90% at 50% 0%, rgba(245, 197, 66, .28), transparent 70%), rgba(255, 255, 255, .03); border-color: rgba(245, 197, 66, .45); }
.podium-step.p2 { background: radial-gradient(120% 90% at 50% 0%, rgba(192, 199, 209, .2), transparent 70%), rgba(255, 255, 255, .03); border-color: rgba(192, 199, 209, .3); }
.podium-step.p3 { background: radial-gradient(120% 90% at 50% 0%, rgba(208, 138, 77, .22), transparent 70%), rgba(255, 255, 255, .03); border-color: rgba(208, 138, 77, .3); }
.podium-step.p1::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); transform: skewX(-18deg); animation: dash-shine 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes dash-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.medal { width: 30px; height: 30px; margin: 0 auto .5rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #1a1300; box-shadow: 0 3px 12px rgba(0, 0, 0, .4); }
.p1 .medal { background: var(--gold); width: 36px; height: 36px; font-size: 1.1rem; }
.p2 .medal { background: var(--silver); }
.p3 .medal { background: var(--bronze); }
.podium-value { font-size: 1.5rem; font-weight: 800; }
.p1 .podium-value { background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.9rem; }
.podium-step.p1 .avatar, .podium-step.p2 .avatar, .podium-step.p3 .avatar { box-shadow: 0 0 0 2px var(--role, #99aab5), 0 0 16px color-mix(in srgb, var(--role, #99aab5) 45%, transparent); }

/* --- Couleurs des rôles Discord --- */
.avatar.role-ring { box-shadow: 0 0 0 2px var(--role), 0 0 14px color-mix(in srgb, var(--role) 45%, transparent); }
.role-name { color: var(--role) !important; font-weight: 600; }

/* --- Classements --- */
.rank-row { padding: .55rem .6rem; border-radius: 12px; border-bottom: none; transition: background .2s, transform .2s; }
.rank-row:hover { background: rgba(255, 255, 255, .04); transform: translateX(4px); }
.rank-pos { font-family: 'Outfit'; font-weight: 700; }
.rank-val { font-weight: 800; font-size: 1.05rem; }
.rank-row .progress, .thread-row .progress { background: rgba(255, 255, 255, .06); border-radius: 999px; }
.rank-row .progress-bar, .thread-row .progress-bar { background: linear-gradient(90deg, var(--role, var(--accent)), var(--accent-2)) !important; border-radius: 999px; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }

/* --- Tuiles jour par jour --- */
.day-tile { border-radius: 12px; border: none; color: #fff; transition: transform .2s, box-shadow .2s; }
.day-tile:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 8px 22px rgba(0, 0, 0, .4); }
.day-tile.light { color: #151a26; }

/* --- Divers --- */
.funnel-track { background: rgba(255, 255, 255, .06); border-radius: 999px; }
.funnel-bar { border-radius: 999px; }
.table { --tblr-table-bg: transparent; }
.login-bg { background: radial-gradient(circle at 20% 20%, rgba(124, 92, 255, .35), transparent 40%), radial-gradient(circle at 80% 80%, rgba(255, 92, 168, .28), transparent 40%), var(--bg); }

/* Accessibilité : animations désactivées dans le système → tout reste statique */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   EFFETS PC (souris uniquement) : verre dépoli marqué + survol
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  /* --- Verre dépoli plus marqué --- */
  .card {
    position: relative;
    background-color: rgba(22, 27, 41, .46);
    /* reflet sur la tranche haute, comme une vitre */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 8px 30px rgba(0, 0, 0, .25);
  }
  .stat-card { background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--c) 24%, transparent), transparent 60%), rgba(22, 27, 41, .46); }
  /* Grain : texture très légère pour l'effet « dépoli » */
  .card::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .04; /* pas de mix-blend-mode : calcul en plus pour chaque carte */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
  .sticky-bar { background: rgba(11, 14, 23, .5); backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%); }
  .navbar-vertical { background: rgba(12, 15, 25, .5) !important; backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%); }
  .podium-step { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
  .apexcharts-tooltip { background: rgba(20, 24, 38, .6) !important; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .1) !important; box-shadow: 0 8px 24px rgba(0, 0, 0, .35) !important; }

  /* --- Projecteur qui suit la souris (élément .spot ajouté par le script) --- */
  .card > .card-body, .card > .card-header { position: relative; z-index: 1; }
  .spot { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; z-index: 0; }
  .spot::before {   /* halo à l'intérieur */
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c, var(--accent)) 20%, transparent), transparent 45%);
  }
  .spot::after {    /* bord qui s'illumine là où pointe la souris */
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c, var(--accent-2)) 85%, #fff), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  }
  .card:hover > .spot { opacity: 1; }

  /* --- Inclinaison 3D (appliquée par le script) --- */
  .tilt { transform-style: preserve-3d; will-change: transform; transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s; }
  .tilt.tilting { transition: transform .08s linear, box-shadow .25s, border-color .25s; }
  /* L'animation d'apparition du podium ne doit pas bloquer l'inclinaison une fois terminée */
  .podium-step.tilt { animation-fill-mode: backwards; }

  /* --- Icônes vivantes --- */
  .stat-icon { transition: transform .35s cubic-bezier(.2, .8, .2, 1.4), box-shadow .3s; }
  .stat-card:hover .stat-icon { transform: scale(1.14) rotate(-8deg); box-shadow: 0 8px 26px color-mix(in srgb, var(--c) 75%, transparent); }
  .sparkline { transition: filter .3s; }
  .stat-card:hover .sparkline { filter: brightness(1.35) drop-shadow(0 0 6px var(--c)); }
  .card-title .ti { display: inline-block; transition: transform .3s; }
  .card:hover .card-title .ti { transform: scale(1.2) rotate(-10deg); }

  /* --- Classements --- */
  .rank-row .avatar { transition: transform .25s, box-shadow .25s; }
  .rank-row:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--role, var(--accent)) 16%, transparent), transparent 70%); }
  .rank-row:hover .avatar { transform: scale(1.14); box-shadow: 0 0 0 2px var(--role, #99aab5), 0 0 22px color-mix(in srgb, var(--role, #99aab5) 75%, transparent); }
  .rank-row:hover .rank-name { text-shadow: 0 0 12px color-mix(in srgb, var(--role, var(--accent)) 70%, transparent); }
  .rank-row:hover .progress-bar { filter: brightness(1.3); box-shadow: 0 0 10px var(--role, var(--accent)); }
  .rank-row:hover .rank-val { color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, .4); }
  .podium-step .avatar { transition: transform .3s; }
  .podium-step:hover .avatar { transform: scale(1.1) translateZ(30px); }
  .podium-step .medal { transition: transform .4s cubic-bezier(.2, .8, .2, 1.4); }
  .podium-step:hover .medal { transform: rotate(360deg) scale(1.15); }

  /* --- Menu de gauche --- */
  .navbar-vertical .nav-link { position: relative; }
  .navbar-vertical .nav-link::before { content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; border-radius: 3px; background: var(--tab-color); box-shadow: 0 0 10px var(--tab-color); transform: scaleY(0); transition: transform .25s; }
  .navbar-vertical .nav-link:hover::before { transform: scaleY(1); }
  .navbar-vertical .nav-link:hover .nav-link-icon i { animation: dash-wiggle .5s ease; filter: drop-shadow(0 0 6px var(--tab-color)); }
  @keyframes dash-wiggle { 25% { transform: rotate(-14deg) scale(1.15); } 60% { transform: rotate(10deg) scale(1.15); } 100% { transform: none; } }

  /* --- Boutons --- */
  #period-buttons .btn { transition: background .3s, box-shadow .3s, color .2s; }
  #period-buttons .btn:not(.active):hover { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, transparent), color-mix(in srgb, var(--accent-2) 22%, transparent)); color: #fff; box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 35%, transparent); }
  #period-buttons .btn.active { background-size: 200% 100%; transition: background-position .5s; }
  #period-buttons .btn.active:hover { background-position: 100% 0; }
  .refresh-btn:hover .ti { animation: dash-spin-once .6s ease; }
  @keyframes dash-spin-once { to { transform: rotate(360deg); } }

  /* --- Tuiles et carte des heures : la case survolée ressort, les autres s'effacent --- */
  .day-tiles .day-tile { transition: transform .2s, opacity .25s, filter .25s, box-shadow .2s; }
  .day-tiles:hover .day-tile:not(:hover) { opacity: .45; filter: saturate(.55); }
  .day-tiles .day-tile:hover { transform: translateY(-4px) scale(1.08); box-shadow: 0 10px 26px rgba(0, 0, 0, .45), 0 0 18px color-mix(in srgb, var(--accent-2) 55%, transparent); z-index: 2; }
}

/* ============================================================
   PERFORMANCES SUR TÉLÉPHONE / TABLETTE
   Le flou « verre dépoli » au-dessus des lueurs animées oblige le navigateur à tout recalculer
   à chaque image (très lent sur Firefox Android) → sur écran tactile : pas de flou, fond fixe.
   ============================================================ */
@media (max-width: 991px), (pointer: coarse) {
  .card, .sticky-bar, .navbar-vertical { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .card { background-color: rgba(22, 27, 41, .94); }
  .stat-card { background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%), rgba(22, 27, 41, .94); }
  .sticky-bar { background: rgba(11, 14, 23, .96); }
  .navbar-vertical { background: rgba(12, 15, 25, .98) !important; }
  .bg-glow span { animation: none; }
  .podium-step.p1::after { animation: none; display: none; }
  .card:hover, .rank-row:hover, .day-tile:hover { transform: none; }
}

/* Carte « jour × heure » (onglet Messages) */
.chart-md.heat-wrap { min-height: 0; position: relative; }
.heat { display: grid; grid-template-columns: 76px repeat(24, 1fr); gap: 4px; }
.heat-day { font-size: .75rem; color: var(--text-dim); display: flex; align-items: center; }
.heat-hour { font-size: .68rem; color: var(--text-dim); text-align: center; }
.heat-cell { aspect-ratio: 1.6; border-radius: 5px; transition: transform .15s, opacity .25s, filter .25s, box-shadow .15s; }
.heat-animate .heat-cell { animation: dash-pop .45s cubic-bezier(.2, .8, .2, 1.3) backwards; } /* backwards : ne bloque pas l'agrandissement au survol */
@keyframes dash-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.heat-tip {
  position: absolute; left: 0; top: 0; pointer-events: none; z-index: 5; white-space: nowrap;
  padding: .45rem .7rem; border-radius: 10px; font-size: .78rem; color: #e6e9ef;
  background: rgba(20, 24, 38, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--accent-2) 35%, rgba(255, 255, 255, .12));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 0 18px color-mix(in srgb, var(--accent) 25%, transparent);
  /* invisible par défaut ; glisse d'une case à l'autre */
  opacity: 0; transform: translate(-50%, calc(-100% - 4px)) scale(.92);
  transition: opacity .18s ease, transform .18s ease, left .14s cubic-bezier(.2, .8, .2, 1), top .14s cubic-bezier(.2, .8, .2, 1);
}
.heat-tip.show { opacity: 1; transform: translate(-50%, calc(-100% - 10px)) scale(1); }
.heat-tip-title { color: var(--text-dim); font-size: .72rem; }
.heat-tip-value { font-family: 'Outfit', var(--tblr-font-sans-serif); font-weight: 700; font-size: .95rem; }
.heat-hour, .heat-day { transition: color .15s, text-shadow .15s; }
.heat-hour.on, .heat-day.on { color: #fff; font-weight: 700; text-shadow: 0 0 10px var(--accent-2); }
.heat-hour.on { transform: scale(1.15); }
@media (hover: hover) and (pointer: fine) {
  .heat:hover .heat-cell:not(:hover) { opacity: .45; filter: saturate(.55); }
  .heat-cell:hover { transform: scale(1.35); z-index: 2; position: relative; box-shadow: 0 0 14px color-mix(in srgb, var(--accent-2) 70%, transparent); }
}
/* Téléphone : grille tournée (7 jours en colonnes, 24 heures en lignes), cases larges et lisibles */
.heat.heat-vertical { grid-template-columns: 34px repeat(7, 1fr); gap: 5px; }
.heat-vertical .heat-day { justify-content: center; font-size: .72rem; font-weight: 600; padding-bottom: 2px; }
.heat-vertical .heat-hour { font-size: .68rem; display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; }
.heat-vertical .heat-hour.on { transform: none; }
.heat-vertical .heat-cell { aspect-ratio: auto; height: 22px; border-radius: 6px; }
/* Case / tuile touchée (téléphone) : mise en avant, les autres s'estompent */
.heat-cell.tapped { transform: scale(1.18); position: relative; z-index: 2; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 16px color-mix(in srgb, var(--accent-2) 70%, transparent); }
.heat:has(.heat-cell.tapped) .heat-cell:not(.tapped) { opacity: .5; }
.day-tile.tapped { transform: translateY(-3px) scale(1.04); box-shadow: 0 0 0 2px rgba(255, 255, 255, .8), 0 8px 22px rgba(0, 0, 0, .4); }
.tip-host { position: relative; }

/* --- Onglet Paramètres --- */
/* Pas de période ni de bouton ⟳ : les réglages ne dépendent pas des dates */
body[data-tab="settings"] #sticky-bar .col-auto, body[data-tab="settings"] #period-info { display: none; }
.settings-lock { max-width: 420px; margin: 3rem auto; text-align: center; }
.settings-lock .lock-icon { font-size: 2.6rem; color: var(--accent-2); }
.setting-row { padding: .85rem 0; border-bottom: 1px solid var(--card-border); }
.setting-row:last-child { border-bottom: 0; }
/* Réglages courts côte à côte, textes et listes sur toute la largeur */
.setting-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 1.5rem; align-items: start; }
.setting-grid > .setting-row { border-bottom: 0; padding: .65rem 0; }
.setting-grid > .setting-long, .setting-grid > .setting-sub { grid-column: 1 / -1; }
.setting-sub { margin: 1.1rem 0 .1rem; padding-bottom: .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sc, var(--accent-2)); border-bottom: 1px solid color-mix(in srgb, var(--sc, var(--accent-2)) 35%, transparent); }
.setting-grid > .setting-sub:first-child { margin-top: 0; }
.settings-searching .setting-sub { display: none; }
/* Petits blocs empilés sur deux colonnes, sans trou */
.settings-masonry { columns: 2 460px; column-gap: var(--tblr-gutter-x, 1rem); }
.settings-masonry.single { columns: 1; }
.settings-brick { break-inside: avoid; margin-bottom: var(--tblr-gutter-x, 1rem); display: inline-block; width: 100%; }
.settings-brick > .card { height: auto !important; }
.setting-row .form-label { font-weight: 600; margin-bottom: .35rem; }
.setting-row.changed .form-label::after { content: ' •'; color: var(--accent-2); }
.setting-row.invalid .form-control { border-color: #ef4444; }
.setting-meta { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: .35rem; font-size: .8rem; color: var(--text-dim); }
.setting-error { color: #f87171; font-size: .8rem; margin-top: .25rem; }
.setting-reset { background: none; border: 0; padding: 0; color: var(--accent-2); cursor: pointer; font-size: .8rem; }
.setting-reset:hover { text-decoration: underline; }
.setting-color { display: flex; gap: .5rem; align-items: center; }
.setting-color .form-control-color { width: 3rem; height: 2.25rem; padding: .2rem; }
.setting-textarea { font-family: var(--tblr-font-monospace); font-size: .85rem; min-height: 7rem; }
.settings-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.settings-status { font-size: .85rem; }
.history-value { font-family: var(--tblr-font-monospace); font-size: .78rem; word-break: break-word; }
.settings-toolbar { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.settings-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.settings-search > .ti { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.settings-search input { padding-left: 2.2rem; }
.setting-multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .1rem 1rem; }
.role-dot { width: .8rem; height: .8rem; border-radius: 50%; flex: none; }

/* --- Aperçu façon Discord --- */
.dc-previews { position: sticky; top: 6rem; background: #313338; border-radius: 10px; padding: .9rem 1rem; color: #dbdee1; font-size: .92rem; line-height: 1.375; }
.dc-previews-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #949ba4; font-weight: 700; margin-bottom: .6rem; }
.dc-message + .dc-message { margin-top: 1rem; }
.dc-label { font-size: .75rem; color: #949ba4; margin-bottom: .3rem; }
.dc-embed { background: #2b2d31; border-left: 4px solid var(--c, #5865f2); border-radius: 4px; padding: .6rem .9rem .75rem; max-width: 520px; word-wrap: break-word; }
.dc-title { font-weight: 700; color: #f2f3f5; margin-bottom: .35rem; }
.dc-desc, .dc-field-value { white-space: normal; }
.dc-field { margin-top: .5rem; }
.dc-field-name { font-weight: 700; color: #f2f3f5; font-size: .85rem; margin-bottom: .1rem; }
.dc-h { color: #f2f3f5; font-weight: 700; margin: .35rem 0 .15rem; line-height: 1.2; }
.dc-h1 { font-size: 1.35rem; } .dc-h2 { font-size: 1.15rem; } .dc-h3 { font-size: 1rem; }
.dc-sub { font-size: .78rem; color: #949ba4; }
.dc-gap { height: .5rem; }
.dc-li { display: flex; gap: .45rem; padding-left: .2rem; }
.dc-bullet { color: #b5bac1; }
.dc-quote { border-left: 4px solid #4e5058; padding-left: .6rem; margin: .1rem 0; }
.dc-code { background: #1e1f22; color: #dbdee1; padding: 0 .25rem; border-radius: 3px; font-size: .85em; }
.dc-spoiler { background: #1e1f22; border-radius: 3px; padding: 0 .15rem; }
.dc-link { color: #00a8fc; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 .15rem; font-weight: 500; }
.dc-time { background: rgba(255, 255, 255, .06); border-radius: 3px; padding: 0 .15rem; }
.dc-buttons { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.dc-button { background: #4e5058; color: #fff; border-radius: 4px; padding: .3rem .8rem; font-size: .85rem; font-weight: 500; }
@media (max-width: 1199px) { .dc-previews { position: static; } }

/* --- Survol des graphiques en barres (barHover dans app.js) --- */
.bar-hover-host > .apexcharts-canvas { z-index: 1; } /* barres devant le surlignage */
.bar-hover-strip { position: absolute; z-index: 0; pointer-events: none; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, transparent); transition: left .12s ease, width .12s ease; }
.bar-hover-tip { position: absolute; z-index: 5; pointer-events: none; white-space: nowrap; padding: .45rem .7rem; border-radius: 8px; font-size: .8rem; background: rgba(15, 18, 28, .96); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.bar-hover-strip[hidden], .bar-hover-tip[hidden] { display: none; }
.bar-hover-title { color: var(--text-dim); font-size: .75rem; margin-bottom: .2rem; }
.bar-hover-row { display: flex; align-items: center; gap: .25rem; }
.bar-hover-dot { width: .6rem; height: .6rem; border-radius: 50%; margin-right: .25rem; flex: none; }

/* ===== Watchlist ===== */
/* Affiches TMDB : rectangle arrondi au lieu du rond des photos de profil */
.avatar.poster-thumb { border-radius: 6px; background-size: cover; background-position: center; aspect-ratio: 2 / 3; height: auto; }
.avatar-sm.poster-thumb { width: 1.6rem; }
.avatar-md.poster-thumb { width: 2.4rem; }
.avatar-lg.poster-thumb { width: 3.4rem; }
.wl-prefs { display: grid; gap: .6rem; }
.wl-pref { display: flex; align-items: center; gap: .75rem; }
.wl-pref-label { flex: 0 0 11rem; color: var(--tblr-secondary); font-size: .85rem; }
.wl-pref .progress { flex: 1; height: .5rem; }
.wl-pref .progress-bar { background: linear-gradient(90deg, var(--accent), var(--accent-2)) !important; }
.wl-pref-val { flex: 0 0 3rem; text-align: right; font-weight: 600; }

/* ===== Tableau de l'équipe (onglet Modération) ===== */
.tip-host { position: relative; }
.team-table th.team-num, .team-table td.team-num { text-align: center; }
.team-table tbody tr { transition: background .2s; }
.team-table tbody tr > td { background: transparent; }
.team-table .avatar { transition: transform .25s, box-shadow .25s; }
.team-pill {
  display: inline-flex; justify-content: center; min-width: 2.1rem; padding: .18rem .6rem; border-radius: 999px; cursor: default;
  font-family: 'Outfit', var(--tblr-font-sans-serif); font-weight: 700; font-size: .85rem;
  color: color-mix(in srgb, var(--c) 70%, #fff);
  background: color-mix(in srgb, var(--c) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.team-zero { color: rgba(255, 255, 255, .16); font-weight: 700; }
.team-when { color: var(--tblr-secondary); font-size: .82rem; cursor: default; border-bottom: 1px dashed rgba(255, 255, 255, .15); }
@media (hover: hover) and (pointer: fine) {
  .team-table tbody tr:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--role, var(--accent)) 16%, transparent), transparent 70%); }
  .team-table tbody tr:hover .avatar { transform: scale(1.14); box-shadow: 0 0 0 2px var(--role, #99aab5), 0 0 22px color-mix(in srgb, var(--role, #99aab5) 75%, transparent); }
  .team-table tbody tr:hover .team-name { text-shadow: 0 0 12px color-mix(in srgb, var(--role, var(--accent)) 70%, transparent); }
  .team-pill:hover { transform: scale(1.15); background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 60%, transparent); }
  .team-when:hover { color: #fff; }
}

/* ===== Annonce aux membres de la watchlist (Paramètres) ===== */
.wl-ann-progress .progress { height: .5rem; background: rgba(255, 255, 255, .06); border-radius: 999px; }
.wl-ann-progress .progress-bar { background: linear-gradient(90deg, var(--accent), var(--accent-2)) !important; border-radius: 999px; transition: width .6s ease; }
.wl-ann-history .journal-row { align-items: center; }
.wl-ann-history .journal-reason { white-space: pre-line; }

/* Classements : « Voir les N autres » */
.rank-more-btn {
  display: flex; align-items: center; gap: .35rem; margin: .6rem auto 0; padding: .32rem .95rem; cursor: pointer;
  font-size: .8rem; font-weight: 600; color: color-mix(in srgb, var(--accent-2) 55%, #cbd5e1);
  background: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, .03));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 999px;
  transition: background .2s, color .2s, box-shadow .2s, border-color .2s, transform .2s;
}
.rank-more-btn .ti { transition: transform .25s; }
.rank-more-btn:hover {
  color: #fff; border-color: transparent; transform: translateY(-1px);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, transparent), color-mix(in srgb, var(--accent-2) 45%, transparent));
  box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 40%, transparent);
}
.rank-more-btn:hover .ti { transform: translateY(2px); }
.rank-more-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.rank-more:not([hidden]) { animation: rank-more-in .35s ease; }
/* Boutons côte à côte (« Tout voir » + « Voir moins ») */
.rank-more-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .6rem; }
.rank-more-actions .rank-more-btn { margin: 0; }
.rank-more-btn.rank-more-all {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, transparent), color-mix(in srgb, var(--accent-2) 35%, transparent));
}
@keyframes rank-more-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ===== Paramètres : barre des catégories ===== */
.settings-sections { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.1rem; }
.settings-sec-btn {
  position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; cursor: pointer;
  font-weight: 600; font-size: .88rem; color: var(--tblr-secondary);
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); border-radius: 999px;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.settings-sec-btn .ti { color: var(--sc); font-size: 1.05rem; transition: color .2s, transform .25s; }
.settings-sec-btn:hover { color: #fff; border-color: color-mix(in srgb, var(--sc) 55%, transparent); background: color-mix(in srgb, var(--sc) 14%, transparent); transform: translateY(-1px); }
.settings-sec-btn:hover .ti { transform: scale(1.15) rotate(-8deg); }
.settings-sec-btn.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, color-mix(in srgb, var(--sc) 75%, transparent), color-mix(in srgb, var(--sc) 35%, transparent));
  box-shadow: 0 4px 20px color-mix(in srgb, var(--sc) 45%, transparent);
}
.settings-sec-btn.active .ti { color: #fff; }
.settings-sec-btn:focus-visible { outline: 2px solid var(--sc); outline-offset: 2px; }
.settings-sec-dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: #f97316; box-shadow: 0 0 8px #f97316; }
.settings-sec-btn.dirty .settings-sec-dot { display: inline-block; }
.settings-section:not([hidden]) { animation: rank-more-in .3s ease; }
.settings-section-title { display: none; align-items: center; gap: .4rem; margin: .4rem 0 .8rem; font-weight: 700; font-size: 1.05rem; color: #fff; }
.settings-section-title .ti { color: var(--sc); }
.settings-searching .settings-section-title { display: flex; }
@media (max-width: 767px) {
  .settings-sections { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
  .settings-sections::-webkit-scrollbar { display: none; }
  .settings-sec-btn { flex-shrink: 0; }
}
/* Pendant une recherche : toutes les catégories sont affichées, aucune n'est « active » */
.settings-searching .settings-sec-btn.active { color: var(--tblr-secondary); background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .08); box-shadow: none; }
.settings-searching .settings-sec-btn.active .ti { color: var(--sc); }

/* ============================================================
   MENU EN TIROIR (téléphone / tablette < 992px)
   Bouton ☰ dans le bandeau collé (toujours visible), tiroir qui glisse depuis la gauche
   ============================================================ */
.menu-btn, .drawer-head, .menu-backdrop { display: none; }
@media (max-width: 991.98px) {
  /* Glisser horizontalement sert au menu : pas de « page précédente » du navigateur par-dessus */
  html, body { overscroll-behavior-x: none; }
  /* Plus de barre du haut : le nom du serveur est dans l'en-tête du tiroir */
  .navbar-vertical { position: relative; z-index: 1040; padding: 0 !important; min-height: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  .navbar-vertical > .container-fluid { padding: 0; min-height: 0; }
  .navbar-vertical .navbar-brand { display: none; }
  /* Le bandeau collé devient le haut de la page (plus de marge vide au-dessus) */
  .page-wrapper > .sticky-bar { margin-top: 0 !important; padding-top: calc(.9rem + env(safe-area-inset-top)); }

  /* --- Bouton ☰ : verre + bordure dégradée aux couleurs de l'onglet --- */
  .page-head { display: flex; align-items: center; gap: .85rem; min-width: 0; }
  .page-head-text { min-width: 0; }
  .menu-btn {
    display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; flex: none;
    width: 44px; height: 44px; padding: 0 12px; border-radius: 14px; cursor: pointer;
    border: 1.5px solid transparent;
    background:
      linear-gradient(145deg, rgba(30, 36, 56, .95), rgba(16, 20, 32, .95)) padding-box,
      linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .08);
    transition: transform .15s ease, box-shadow .25s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .menu-btn span {
    display: block; height: 2.5px; border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    transition: width .25s cubic-bezier(.2, .8, .2, 1);
  }
  .menu-btn span:nth-child(1) { width: 18px; }
  .menu-btn span:nth-child(2) { width: 12px; }
  .menu-btn span:nth-child(3) { width: 15px; }
  .menu-btn:active { transform: scale(.92); }
  .menu-btn:active span { width: 18px; }
  .menu-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

  /* --- Fond assombri --- */
  .menu-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1;
    background: radial-gradient(120% 80% at 0% 50%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), rgba(4, 6, 12, .62);
    opacity: 0; pointer-events: none; transition: opacity .3s ease;
  }
  body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; } /* la page ne défile pas derrière le tiroir */

  /* --- Tiroir --- */
  #sidebar-menu.navbar-collapse {
    display: flex !important; flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 2;
    width: min(300px, 86vw); height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    background:
      radial-gradient(90% 40% at 0% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
      radial-gradient(80% 35% at 100% 100%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 70%),
      linear-gradient(180deg, #121726, #0b0e17);
    border-right: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, .06));
    border-radius: 0 22px 22px 0;
    box-shadow: 24px 0 60px rgba(0, 0, 0, .55);
    transform: translateX(-105%); visibility: hidden;
    transition: transform .34s cubic-bezier(.2, .85, .25, 1), visibility 0s linear .34s;
  }
  body.menu-open #sidebar-menu.navbar-collapse { transform: translateX(0); visibility: visible; transition: transform .34s cubic-bezier(.2, .85, .25, 1), visibility 0s; }

  /* En-tête : icône du serveur + nom + ✕ */
  .drawer-head {
    display: flex; align-items: center; gap: .75rem; flex: none;
    padding: 1.1rem 1rem 1rem 1.1rem; margin-bottom: .35rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }
  .drawer-icon {
    width: 44px; height: 44px; flex: none; border-radius: 50%; font-size: 1.3rem;
    background-size: cover; background-position: center;
    box-shadow: 0 0 0 2px #0f1320, 0 0 0 4px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
  }
  .drawer-head .brand-text { flex: 1; }
  .drawer-close {
    width: 38px; height: 38px; flex: none; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .05); color: var(--text-dim); font-size: 1.15rem;
    display: inline-flex; align-items: center; justify-content: center; transition: background .2s, color .2s, transform .15s;
    -webkit-tap-highlight-color: transparent;
  }
  .drawer-close:active { transform: scale(.9); background: rgba(255, 255, 255, .1); color: #fff; }

  /* Onglets : grandes zones faciles à toucher, icône dans une pastille colorée */
  #sidebar-menu #tabs { padding: .25rem .5rem !important; flex: none; }
  #sidebar-menu .nav-link { min-height: 48px; margin: 2px 0; padding: .4rem .7rem; border-radius: 14px; font-size: .98rem; }
  #sidebar-menu .nav-link-icon {
    width: 34px; height: 34px; margin-right: .75rem; border-radius: 11px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--tab-color) 16%, transparent);
  }
  #sidebar-menu .nav-link-icon i { font-size: 1.15rem; }
  #sidebar-menu .nav-item.active .nav-link {
    color: #fff;
    background: linear-gradient(90deg, color-mix(in srgb, var(--tab-color) 30%, transparent), color-mix(in srgb, var(--tab-color) 6%, transparent));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tab-color) 35%, transparent);
  }
  #sidebar-menu .nav-item.active .nav-link-icon { background: var(--tab-color); box-shadow: 0 0 14px color-mix(in srgb, var(--tab-color) 60%, transparent); }
  #sidebar-menu .nav-item.active .nav-link-icon i { color: #fff; }
  /* Apparition des onglets l'un après l'autre */
  body.menu-open #sidebar-menu .nav-item { animation: drawer-item .38s cubic-bezier(.2, .85, .25, 1) both; animation-delay: calc(60ms + var(--i, 0) * 28ms); }
  @keyframes drawer-item { from { opacity: 0; transform: translateX(-18px); } }
  #sidebar-menu > .mt-auto { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .06); }
}
@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
  #sidebar-menu.navbar-collapse, .menu-backdrop { transition: none !important; }
  body.menu-open #sidebar-menu .nav-item { animation: none; }
}

/* ============================================================
   PARAMÈTRES → SANTÉ DU BOT
   ============================================================ */
.health-line { display: flex; justify-content: space-between; gap: 1rem; padding: .38rem 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); font-size: .88rem; }
.health-line:last-child { border-bottom: 0; }
.health-line > :last-child { min-width: 0; overflow-wrap: anywhere; }
.health-progress { height: .7rem; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.health-progress .progress-bar { border-radius: 999px; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.health-sizes { margin: .9rem 0 .4rem; }
.health-subtitle { margin: 1rem 0 .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.health-file { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) auto; align-items: center; gap: .75rem; padding: .22rem 0; font-size: .82rem; }
.health-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--tblr-font-monospace); }
.health-file-bar { height: .38rem; border-radius: 999px; background: rgba(255, 255, 255, .05); }
.health-file-bar .progress-bar { border-radius: 999px; }
.health-file-size { font-variant-numeric: tabular-nums; color: var(--text-dim); text-align: right; min-width: 4.5rem; }
.health-sources { display: grid; gap: .9rem; }
.health-source { padding: .8rem .95rem; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); }
.health-source-name { font-family: 'Outfit', var(--tblr-font-sans-serif); font-size: 1.05rem; }
.health-backups { display: grid; gap: .35rem; max-height: 260px; overflow-y: auto; }
.health-backup { display: flex; align-items: center; gap: .55rem; padding: .35rem .55rem; border-radius: 10px; background: rgba(255, 255, 255, .03); font-size: .85rem; }
.health-backup .ti { color: var(--accent-2); }
.health-backup-name { font-variant-numeric: tabular-nums; }
.health-backup-size { margin-left: auto; font-variant-numeric: tabular-nums; }
.health-problems { display: grid; gap: .45rem; max-height: 360px; overflow-y: auto; }
.health-problem { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: .55rem; font-size: .82rem; padding: .35rem 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.health-problem-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.health-problem-msg { overflow-wrap: anywhere; }
@media (max-width: 575px) {
  .health-problem { grid-template-columns: auto minmax(0, 1fr); }
  .health-problem-msg { grid-column: 1 / -1; }
}

/* Onglet Membres → rétention des nouveaux arrivants */
.retention-tile {
  height: 100%; padding: .85rem 1rem; border-radius: 14px;
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 65%), rgba(255, 255, 255, .03);
  border: 1px solid color-mix(in srgb, var(--c) 25%, rgba(255, 255, 255, .05));
}
.retention-tile-label { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
.retention-tile-label .ti { color: var(--c); }
.retention-tile-value { font-family: 'Outfit', var(--tblr-font-sans-serif); font-weight: 800; font-size: 1.7rem; line-height: 1.2; margin: .25rem 0 .1rem; }

/* Santé du bot : badge « En direct » (vert qui pulse ; orange en reconnexion ; gris en pause) */
.live-badge {
  display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  color: #86efac; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .35);
}
.live-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); animation: live-pulse 1.6s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); } 70% { box-shadow: 0 0 0 .45rem rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.live-badge[data-state="connecting"] { color: #fdba74; background: rgba(249, 115, 22, .12); border-color: rgba(249, 115, 22, .35); }
.live-badge[data-state="connecting"] .live-dot { background: #f97316; animation: live-blink 1s steps(2, start) infinite; box-shadow: none; }
.live-badge[data-state="off"] { color: var(--text-dim); background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.live-badge[data-state="off"] .live-dot { background: #64748b; animation: none; box-shadow: none; }
@keyframes live-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none !important; } }

/* ============================================================
   FICHE MEMBRE (Paramètres)
   ============================================================ */
.member-search-wrap { position: relative; display: flex; align-items: center; }
.member-search-wrap > .ti { position: absolute; left: .85rem; color: var(--text-dim); pointer-events: none; }
.member-search-input { padding-left: 2.4rem; height: 2.8rem; border-radius: 14px; font-size: 1rem; }
.member-results { margin-top: .5rem; display: grid; gap: .2rem; max-height: 360px; overflow-y: auto; }
.member-result {
  display: flex; align-items: center; gap: .65rem; width: 100%; padding: .45rem .6rem; border: 0; border-radius: 12px;
  background: transparent; color: inherit; text-align: left; cursor: pointer; transition: background .15s;
}
.member-result:hover, .member-result:focus-visible { background: color-mix(in srgb, var(--role, var(--accent)) 14%, transparent); outline: none; }
.member-result-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-head { overflow: hidden; }
.member-head::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 90px; pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--role, var(--accent)) 35%, transparent), transparent 75%);
}
.member-head .card-body { position: relative; }
.member-head-main { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.member-head .avatar-xl { width: 5.5rem; height: 5.5rem; font-size: 2rem; flex-shrink: 0; }
.member-head-text { min-width: 0; flex: 1; }
.member-head-name { font-family: 'Outfit', var(--tblr-font-sans-serif); font-size: 1.7rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.member-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin: .55rem 0 .3rem; }
.member-badge { font-weight: 600; }
.member-id { font-family: var(--tblr-font-monospace); font-size: .78rem; padding-left: 0; }
.member-roles { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed rgba(255, 255, 255, .08); }
.member-role {
  display: inline-flex; align-items: center; gap: .4rem; padding: .18rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: color-mix(in srgb, var(--rc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent);
}
.member-role-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--rc); }
.member-invited { display: grid; gap: .3rem; max-height: 340px; overflow-y: auto; }
.member-invited-row { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem; border-radius: 10px; font-size: .88rem; }
.member-invited-row .min-w-0 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-warns { display: grid; gap: .5rem; }
.member-warn { padding: .65rem .8rem; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); overflow-wrap: anywhere; }
.member-warn-reason { font-weight: 600; margin-bottom: .15rem; }
.member-wl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.member-wl-item { display: block; color: inherit; text-decoration: none; padding: .5rem; border-radius: 12px; background: rgba(255, 255, 255, .03); transition: background .2s, transform .2s; }
.member-wl-item:hover { background: rgba(255, 255, 255, .07); transform: translateY(-2px); color: inherit; }
.member-wl-poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; margin-bottom: .45rem; background: rgba(255, 255, 255, .05); }
.member-wl-noposter { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--text-dim); }
.member-wl-title { font-weight: 600; font-size: .85rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 575px) {
  .member-head .avatar-xl { width: 4.2rem; height: 4.2rem; }
  .member-head-name { font-size: 1.35rem; }
  .member-wl { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* Pseudos cliquables vers la fiche membre (propriétaire, Paramètres déverrouillés) */
.fiche-wrap { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; min-width: 0; vertical-align: bottom; }
.fiche-wrap .fiche-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; }
.fiche-discord { color: var(--text-dim); font-size: .85em; line-height: 1; opacity: .55; transition: opacity .15s, color .15s; flex-shrink: 0; }
.fiche-discord:hover { color: #5865f2; opacity: 1; }

/* ============================================================
   LISTE DES ADDONS (Paramètres → Addons)
   ============================================================ */
.addons-group + .addons-group { margin-top: 1rem; }
.addons-cat { display: flex; align-items: center; gap: .45rem; padding: .35rem .5rem; margin-bottom: .25rem; border-radius: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-dim); border: 1px dashed transparent; }
.addons-cat.drop { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.addons-cat-dot { width: .6rem; height: .6rem; border-radius: 3px; background: var(--c); flex-shrink: 0; }
.addons-cat .addon-emoji { width: 18px; height: 18px; font-size: 14px; }
.addon-row { display: grid; grid-template-columns: 18px 10px 22px minmax(0, 1fr) auto auto auto; gap: .6rem; align-items: center; padding: .45rem .6rem; border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.addon-row:hover { background: rgba(255, 255, 255, .04); }
.addon-row.sel { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.addon-row.child { margin-left: 1.6rem; }
.addon-row.dragging { opacity: .4; }
.addon-row.drop { border-top: 2px solid var(--accent); }
.addon-grip { color: #4b5563; cursor: grab; display: grid; place-items: center; }
.addon-pill { width: 10px; height: 10px; border-radius: 50%; background: #64748b; }
.addon-pill.up { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.addon-pill.unstable { background: #f97316; box-shadow: 0 0 8px #f97316; }
.addon-pill.down { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.addon-pill.limited { background: #f97316; box-shadow: 0 0 8px #f97316; }
.addon-emoji { width: 22px; height: 22px; object-fit: contain; display: inline-grid; place-items: center; font-size: 16px; line-height: 1; }
.addon-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addon-name small { color: var(--text-dim); margin-left: .35rem; }
.addon-chip { font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.addon-chip.ok { color: #86efac; } .addon-chip.bad { color: #fca5a5; } .addon-chip.warn { color: #fdba74; }
.addon-form { display: grid; gap: .8rem; }
.addon-field > label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-dim); margin-bottom: .3rem; }
.addon-two { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.addon-emoji-grid { display: flex; flex-wrap: wrap; gap: .3rem; max-height: 150px; overflow-y: auto; margin: .4rem 0; padding: .2rem; }
.addon-emoji-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04); display: grid; place-items: center; cursor: pointer; padding: 0; }
.addon-emoji-btn img { width: 24px; height: 24px; object-fit: contain; }
.addon-emoji-btn:hover { background: rgba(255, 255, 255, .1); }
.addon-emoji-btn.on { border-color: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent); }
.addon-host { display: flex; align-items: center; gap: .3rem; min-height: 30px; }
.addon-host-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem .15rem .2rem; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.addon-host-results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #1b1f2a; border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; padding: .25rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.addon-cats { display: grid; gap: .5rem; margin-bottom: .6rem; }
.addon-cat-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 46px minmax(0, 2fr) auto auto; gap: .4rem; align-items: center; }
@media (max-width: 767px) {
  .addon-row { grid-template-columns: 18px 10px 22px minmax(0, 1fr) auto; }
  .addon-row .addon-chip:nth-last-child(-n + 1), .addon-row .addon-chip:first-of-type:not(:last-child) { display: none; }
  .addon-two { grid-template-columns: 1fr; }
  .addon-cat-row { grid-template-columns: 90px minmax(0, 1fr) 46px; }
  .addon-cat-row > :nth-child(4) { grid-column: 1 / -1; }
}
/* Aperçu façon Discord */
.dc-chat { background: #313338; border-radius: 10px; padding: .6rem .8rem .8rem; color: #dbdee1; font-size: .92rem; line-height: 1.4; }
.dc-who { display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem; } .dc-who b { color: #fff; }
.dc-app { background: #5865f2; color: #fff; font-size: .62rem; font-weight: 700; padding: 0 .25rem; border-radius: 3px; }
.dc-embed { background: #2b2d31; border-left: 4px solid var(--c); border-radius: 4px; padding: .55rem .8rem .7rem; margin-top: .4rem; overflow-wrap: anywhere; }
.dc-embed a { color: #00a8fc; text-decoration: none; } .dc-embed a:hover { text-decoration: underline; }
.dc-h2 { font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: .2rem; }
.dc-h3 { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: .15rem; }
.dc-quote { border-left: 3px solid #4e5058; padding-left: .5rem; color: #b5bac1; margin: .15rem 0 .35rem; }
.dc-small { font-size: .78rem; color: #949ba4; }
.dc-gap { height: .4rem; }
.dc-emoji { width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: -.25em; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
/* Blocs Discord (Components V2) : liste des addons */
.dc-block { background: #2b2d31; border: 1px solid #3a3c42; border-left: 4px solid var(--c); border-radius: 8px; padding: .7rem .9rem; margin-top: .5rem; overflow-wrap: anywhere; }
.dc-block a { color: #00a8fc; text-decoration: none; } .dc-block a:hover { text-decoration: underline; }
.dc-block code { background: #1e1f22; border: 1px solid #232428; border-radius: 4px; padding: 0 .25rem; font-size: .8em; color: #dbdee1; }
.dc-section { display: flex; align-items: center; gap: .7rem; padding: .25rem 0; }
.dc-section > div { flex: 1; min-width: 0; }
.dc-linkbtn { background: #4e5058; color: #fff !important; border-radius: 8px; padding: .25rem .7rem; font-size: .85rem; font-weight: 500; white-space: nowrap; }
.dc-linkbtn::after { content: " ↗"; opacity: .7; }
.dc-sep { height: 1px; background: #3f4147; margin: .3rem 0; }
.dc-sep.big { margin: .6rem 0; }

/* Fiche d'un titre de la watchlist (propriétaire) */
.wlt-link { text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; cursor: pointer; }
.wlt-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(5, 7, 12, .72); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; }
.wlt-box { width: 100%; max-width: 920px; padding: 1.25rem 1.4rem; position: relative; background-color: rgba(22, 27, 41, .97); }
.wlt-close { position: absolute; top: .6rem; right: .6rem; }
.wlt-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: .5rem; padding-right: 2rem; }
.wlt-poster { width: 92px; border-radius: 8px; flex: none; }
.wlt-title { margin: .1rem 0 .25rem; font-size: 1.35rem; }
.wlt-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.wlt-h { font-size: 1rem; margin: 1.3rem 0 .6rem; }
.wlt-table td, .wlt-table th { white-space: nowrap; }
.wlt-rows { display: flex; flex-direction: column; gap: .6rem; }
.wlt-row { border: 1px solid var(--tblr-border-color); border-radius: 10px; padding: .6rem .8rem; }
.wlt-row-miss { border-color: rgba(239, 68, 68, .55); background: rgba(239, 68, 68, .06); }
.wlt-row-head { margin-bottom: .35rem; }
.wlt-state { display: flex; gap: .5rem; align-items: flex-start; padding: .15rem 0; }
.wlt-state-icon { width: 1.3rem; flex: none; text-align: center; }
.wlt-miss { color: #fca5a5; }
.wlt-old summary { cursor: pointer; color: var(--text-dim); font-size: .85rem; }
.wlt-old .wlt-row { opacity: .8; }
.wlt-release { font-family: ui-monospace, Consolas, monospace; font-size: .75rem; color: var(--text-dim); overflow-wrap: anywhere; }
@media (max-width: 600px) { .wlt-box { padding: 1rem .9rem; } .wlt-poster { width: 64px; } .wlt-title { font-size: 1.1rem; } }

.addon-sublabel { font-size: .75rem; color: var(--text-dim); margin: .45rem 0 .2rem; }

/* Paramètres → Logs : lecteur des fichiers de logs du bot */
.botlogs-toolbar { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-bottom: .75rem; }
.botlogs-date { width: auto; min-width: 12rem; }
.botlogs-cat { width: auto; min-width: 13rem; }
.botlogs-search { flex: 1 1 14rem; min-width: 0; }
.botlogs-check { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; font-size: .85rem; }
.botlogs-check .form-check-input { margin: 0; float: none; }
.botlogs-wrap { position: relative; }
.botlogs-new { position: absolute; top: .5rem; left: 50%; transform: translateX(-50%); z-index: 2; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.botlogs-list { max-height: 640px; overflow-y: auto; border: 1px solid var(--tblr-border-color); border-radius: 10px; font-size: .8rem; }
.botlogs-line { display: grid; grid-template-columns: 4.6rem 10.5rem minmax(0, 1fr); gap: .6rem; align-items: baseline; padding: .32rem .7rem; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.botlogs-line:last-child { border-bottom: none; }
.botlogs-line:hover { background: rgba(255, 255, 255, .03); }
.botlogs-error { background: rgba(239, 68, 68, .08); }
.botlogs-warn { background: rgba(245, 158, 11, .07); }
.botlogs-time { font-family: ui-monospace, Consolas, monospace; color: var(--text-dim); font-size: .75rem; }
.botlogs-cat-badge { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; font-weight: 600; padding: .08rem .45rem; border-radius: 6px;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.botlogs-msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.botlogs-msg mark { padding: 0 .1rem; border-radius: 3px; background: rgba(250, 204, 21, .35); color: inherit; }
.botlogs-dc { color: #8b9cff; margin-right: .3rem; font-size: .85rem; }
@media (max-width: 767px) {
  .botlogs-line { grid-template-columns: auto minmax(0, 1fr); row-gap: .2rem; }
  .botlogs-msg { grid-column: 1 / -1; }
  .botlogs-date, .botlogs-cat { flex: 1 1 100%; }
}

/* Fiche titre : titre « Alertes par sortie » + bouton « Masquer les prévenus » */
.wlt-h-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: 1.3rem 0 .6rem; }
.wlt-h-row .wlt-h { margin: 0; }
/* Onglet Watchlist : titre retiré */
.wl-removed .journal-text { opacity: .8; }

.wlt-more { margin-top: .35rem; align-self: flex-start; }
.wlt-table td { white-space: normal; vertical-align: top; }
.wlt-table td.wlt-datecell { min-width: 14rem; }
.wl-pref-group { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tblr-secondary, #94a3b8); margin: .9rem 0 .35rem; }
.wl-pref-group:first-child { margin-top: 0; }
.wl-pref-val { flex: 0 0 6.2rem; white-space: nowrap; }
.journal.journal-fold { max-height: none; overflow: visible; }
.wl-fold-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.wl-fold-btn { padding: 0 .3rem; flex: 0 0 auto; }
.wl-fold-details { margin-top: .35rem; display: flex; flex-direction: column; gap: .2rem; }
.wl-fold-names { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.wl-fold-item { font-size: .9em; }
/* Classements dépliés : la carte s allonge (pas de zone qui défile à l intérieur), « Voir moins » pour revenir aux 10 premiers */
.rank-scroll { max-height: none; overflow: visible; }
/* Listes de la watchlist (Réglages des membres, Dernières alertes, Ajouts et retraits) : défilement dans la carte,
   sans barre horizontale */
.wl-scroll { max-height: 34rem; overflow-y: auto; overflow-x: hidden; padding-right: .25rem; }
.wl-more-bar { display: flex; flex-wrap: wrap; gap: .5rem; }
.wl-more-bar[hidden], .wl-more-bar [hidden] { display: none !important; }
/* Lignes dépliables : toute la ligne cliquable, flèche fixe à droite */
.wl-fold-row { align-items: flex-start; }
.wl-fold-row .journal-text { flex: 1 1 auto; min-width: 0; }
.wl-fold-head { cursor: pointer; display: block; }
.wl-fold-btn { flex: 0 0 2rem; width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: .5rem; background: rgba(255,255,255,.06); color: inherit; cursor: pointer; margin-left: .5rem; padding: 0; }
.wl-fold-btn:hover, .wl-fold-row:hover .wl-fold-btn { background: rgba(255,255,255,.14); }
.wl-fold-btn svg, .wl-fold-btn i { transition: transform .15s; }
.wl-fold-row.open .wl-fold-btn svg, .wl-fold-row.open .wl-fold-btn i { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .wl-fold-btn svg, .wl-fold-btn i { transition: none; } }
/* Paramètres → Avertissements : raisons pré-remplies (nom + texte, monter / descendre / supprimer) */
.reasons-edit { display: grid; gap: .5rem; justify-items: start; }
.reasons-list { display: grid; gap: .5rem; width: 100%; }
.reasons-list.empty::before { content: "Aucune raison : seule « Raison personnalisée » sera proposée."; color: var(--tblr-secondary); font-size: .85rem; }
.reason-row { display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .5rem; align-items: start; padding: .5rem; border: 1px solid var(--tblr-border-color); border-radius: 8px; }
.reason-num { color: var(--tblr-secondary); font-weight: 600; padding-top: .3rem; text-align: right; }
.reason-fields { display: grid; gap: .35rem; min-width: 0; }
.reason-label { font-weight: 600; }
.reason-actions { display: flex; gap: .1rem; }
@media (max-width: 575px) {
  .reason-row { grid-template-columns: 1fr; }
  .reason-num { text-align: left; padding-top: 0; }
}
/* Aperçu d'un message en blocs : bouton vert, vignette (icône du serveur) */
.dc-button.dc-button-green { background: #248046; }
.dc-section > .dc-thumb { flex: 0 0 64px; height: 64px; border-radius: 8px; background: #3f4147; display: flex; align-items: center; justify-content: center; color: #949ba4; font-size: 1.4rem; }
.dc-block .dc-buttons { margin-top: .2rem; }
.dc-block .dc-sub { margin-top: .45rem; }
.dc-button.dc-button-side { flex: 0 0 auto; white-space: nowrap; align-self: center; }
/* Fiche titre : « Annuler cette alerte » (fausse release) */
.wlt-cancel { margin-top: .5rem; border-top: 1px dashed var(--tblr-border-color); padding-top: .4rem; }
.wlt-cancel-form { margin-top: .4rem; padding: .6rem; border: 1px solid rgba(214, 57, 57, .35); border-radius: 8px; background: rgba(214, 57, 57, .06); }
.wlt-cancel-form[hidden] { display: none !important; }

/* Compteur de caractères des raisons de warn */
.reason-count { font-size: 11px; color: #94a3b8; text-align: right; margin: 1px 2px 4px; }
.reason-count.near { color: #fb923c; }
.reason-count.full { color: #f87171; font-weight: 600; }

/* Onglet Badges */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.badge-card { display: block; width: 100%; min-width: 0; text-align: left; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 14px; color: inherit; transition: transform .15s, border-color .15s, background .15s; cursor: pointer; }
.badge-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.06); }
.badge-card.is-open { border-color: var(--bc, #fbbf24); box-shadow: 0 0 0 1px var(--bc, #fbbf24) inset; }
.badge-card.is-none { opacity: .55; }
.badge-card.rar-legend { --bc: #fbbf24; } .badge-card.rar-epic { --bc: #a855f7; } .badge-card.rar-rare { --bc: #3b82f6; } .badge-card.rar-common { --bc: #94a3b8; }
.badge-top { display: flex; justify-content: space-between; align-items: flex-start; }
.badge-emoji { font-size: 34px; line-height: 1; }
.badge-rarity { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; color: var(--bc); background: color-mix(in srgb, var(--bc) 15%, transparent); }
.badge-rarity.rar-legend { --bc: #fbbf24; } .badge-rarity.rar-epic { --bc: #a855f7; } .badge-rarity.rar-rare { --bc: #3b82f6; } .badge-rarity.rar-common { --bc: #94a3b8; }
.badge-name { font-weight: 600; font-size: 15px; margin-top: 10px; }
.badge-desc { color: #94a3b8; font-size: 12px; min-height: 32px; margin-top: 2px; }
.badge-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); margin: 10px 0 6px; overflow: hidden; }
.badge-bar span { display: block; height: 100%; background: var(--bc); border-radius: 3px; }
.badge-count { font-size: 12px; color: #cbd5e1; }
.badge-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; max-height: 420px; overflow: auto; }
.badge-member { display: flex; align-items: center; gap: 8px; min-width: 0; }
.badge-member a, .badge-member span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* IA d'aide (Paramètres) */
.ai-reason { margin-bottom: 8px; }
.ai-reason-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 3px; }
.ai-reason-bar span { display: block; height: 100%; background: #f97316; border-radius: 3px; }
.ai-list { display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow: auto; }
.ai-item { border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 10px 12px; background: rgba(255,255,255,.02); }
.ai-item.noted { opacity: .6; }
.ai-q { font-size: 13px; white-space: pre-wrap; }
.ai-a summary { cursor: pointer; color: #94a3b8; font-size: 12px; margin-top: 4px; }
.ai-a-text { white-space: pre-wrap; font-size: 13px; padding: 6px 0 0 4px; color: #cbd5e1; }
.ai-note-form { margin-top: 8px; }
/* Hébergeur anonyme : mention d'un rôle gris (comme dans Discord) */
.dc-mention.dc-mention-anon { background: rgba(153, 170, 181, .2); color: #c4ccd2; }
/* Onglet Addons : place prise par chaque catégorie dans le message Discord */
.addons-usage { display: grid; gap: 1rem; }
.addons-usage-head { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .35rem; }
.addons-usage-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-bottom: .3rem; }
.addons-usage-bar > span { display: block; height: 100%; border-radius: inherit; background: #22c55e; transition: width .3s; }
.addons-usage-row.warn .addons-usage-bar > span { background: #f59e0b; }
.addons-usage-row.bad .addons-usage-bar > span { background: #ef4444; }

/* ============================================================
   MODE TEST « ?leger » (classe posée par leger.js) : aucun effet visuel
   Sert à vérifier si les effets figent le navigateur à l'ouverture. Sans ?leger : rien ne change.
   ============================================================ */
html.leger .bg-glow, html.leger .card::after, html.leger .spot { display: none !important; }
html.leger *, html.leger *::before, html.leger *::after {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  animation: none !important; transition: none !important; will-change: auto !important;
}
html.leger .card { background-color: rgba(22, 27, 41, .94); }
html.leger .sticky-bar { background: rgba(11, 14, 23, .96); }
html.leger .navbar-vertical { background: rgba(12, 15, 25, .98) !important; }
