:root {
  --bg: #07081a;
  --bg-2: #111327;
  --dc-dark: #1e1f22;
  --dc-mid: #2b2d31;
  --dc-light: #313338;
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f3f5;
  --muted: #a3a6c2;
  --blurple: #5865f2;
  --accent: #7c5cff;
  --accent-2: #eb459e;
  --green: #23a55a;
  --danger: #f23f43;
  --radius: 20px;
  --side-w: 80px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-title: 'Outfit', var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
::selection { background: var(--blurple); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: #2a2d4a; border-radius: 10px; border: 2px solid var(--bg); }

/* ---------- Fond ---------- */
#progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, var(--blurple), var(--accent), var(--accent-2));
  transform-origin: left; transform: scaleX(0);
}
#bg { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; }
/* Taches lumineuses : dégradés radiaux (pas de filter: blur, très coûteux) */
.blobs {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 700px at 70% -10%, #1b1650 0%, transparent 60%);
}
.blobs span {
  position: absolute; width: 900px; height: 900px; border-radius: 50%;
  background: radial-gradient(circle, var(--blob) 0%, transparent 65%);
  opacity: .32; animation: drift 24s ease-in-out infinite alternate;
  will-change: transform;
}
.blobs span:nth-child(1) { --blob: var(--blurple); top: -420px; left: -10%; }
.blobs span:nth-child(2) { --blob: var(--accent-2); bottom: -500px; right: -15%; opacity: .16; animation-delay: -9s; }
.blobs span:nth-child(3) { --blob: var(--accent); top: 20%; left: 35%; opacity: .16; animation-delay: -15s; }
@keyframes drift {
  50% { transform: translate(90px, 70px) scale(1.12); }
  100% { transform: translate(-70px, 30px) scale(.94); }
}
.grid-floor {
  position: fixed; left: 0; right: 0; bottom: 0; height: 45vh; z-index: -1; pointer-events: none; overflow: hidden;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, .7), transparent 80%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, .7), transparent 80%);
}
/* On déplace un calque (GPU) au lieu d'animer background-position (repeint à chaque image) */
.grid-floor > div {
  position: absolute; left: 0; right: 0; top: -60px; bottom: 0;
  background-image:
    linear-gradient(rgba(88, 101, 242, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 101, 242, .18) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: floor 4s linear infinite;
  will-change: transform;
}
@keyframes floor { to { transform: translateY(60px); } }

/* ---------- Barre latérale (style Discord) ---------- */
#sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w); z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 0;
  background: #1e1f22;
  border-right: 1px solid rgba(255, 255, 255, .04);
}
#bot-list {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  overflow-y: auto; scrollbar-width: none; padding: 4px 0; width: 100%;
}
#bot-list::-webkit-scrollbar { display: none; }
.side-sep { width: 32px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .08); flex-shrink: 0; }

.side-item {
  position: relative; flex-shrink: 0;
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--dc-light); border: 0; padding: 0; cursor: pointer; text-decoration: none;
  transition: border-radius .2s ease, transform .2s ease, box-shadow .25s ease, background .2s;
}
.side-item img, .side-item .avatar { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.side-item:hover, .side-item.active { border-radius: 16px; }
.side-item:hover { box-shadow: 0 6px 22px -6px var(--c, var(--blurple)); }
.side-item::before {
  content: ''; position: absolute; left: -15px; top: 50%;
  width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: #fff;
  transform: translateY(-50%) scale(0); transition: height .2s ease, transform .2s ease;
}
.side-item:hover::before { transform: translateY(-50%) scale(1); height: 20px; }
.side-item.active::before { transform: translateY(-50%) scale(1); height: 40px; }
.side-home { padding: 8px; }
.side-home:hover, .side-home.active { background: var(--blurple); }
.side-home img { object-fit: contain; border-radius: 0; transition: filter .2s; }
.side-home:hover img, .side-home.active img { filter: brightness(0) invert(1); }
.side-add {
  color: var(--green); font-size: 26px; font-weight: 400; line-height: 1;
}
.side-add:hover { background: var(--green); color: #fff; box-shadow: 0 6px 22px -6px var(--green); }
.side-item.dragging { opacity: .4; }
.side-item.drop-target { outline: 2px solid var(--blurple); outline-offset: 3px; }

#tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  padding: 7px 12px; border-radius: 6px; font-size: 14px; font-weight: 600;
  background: #111214; box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateX(-6px) translateY(-50%) scale(.96); transition: opacity .12s, transform .12s;
  white-space: nowrap;
}
#tooltip::before {
  content: ''; position: absolute; left: -5px; top: 50%; transform: translateY(-50%);
  border: 5px solid transparent; border-left: 0; border-right-color: #111214;
}
#tooltip.show { opacity: 1; transform: translateX(0) translateY(-50%) scale(1); }

/* ---------- Avatars ---------- */
.avatar {
  display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, var(--c, var(--blurple)), #1a1d2e);
  color: #fff; font-family: var(--font-title); font-weight: 700; font-size: 20px;
  text-transform: uppercase; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.av-wrap { position: relative; width: fit-content; }
.av-wrap .status {
  position: absolute; right: 2px; bottom: 2px; width: 22%; height: 22%; min-width: 14px; min-height: 14px;
  border-radius: 50%; background: var(--green); border: 4px solid var(--dc-mid);
}
.av-wrap .status::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--green); animation: ping 2.2s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }

.bot-tag {
  display: inline-flex; align-items: center; gap: 2px; vertical-align: middle;
  padding: 1px 6px 1px 4px; border-radius: 4px; margin-left: 6px;
  background: var(--blurple); color: #fff;
  font: 700 11px/1.5 var(--font); letter-spacing: .02em; text-transform: uppercase;
}
.bot-tag svg { width: 13px; height: 13px; }

/* ---------- Structure ---------- */
.shell { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(9, 10, 30, .92);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-title); font-weight: 700; font-size: 21px; }
.brand img { width: 36px; height: 36px; object-fit: contain; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(-12deg) scale(1.1); }
.brand-accent { color: var(--accent); }
.topnav { display: flex; gap: 4px; margin-right: auto; }
.topnav a {
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px;
  padding: 7px 14px; border-radius: 999px; transition: color .2s, background .2s;
}
.topnav a:hover { color: var(--text); background: var(--card-hover); }
.topnav a.active { color: var(--text); background: rgba(88, 101, 242, .2); }
.top-actions { display: flex; gap: 10px; align-items: center; }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 48px) 40px; outline: none; }
main.enter { animation: pageIn .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.footer {
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
  padding: 26px clamp(16px, 4vw, 48px); color: var(--muted); font-size: 14px;
  border-top: 1px solid var(--border); background: rgba(7, 8, 26, .6);
}
.footer nav { display: flex; gap: 18px; }
.footer a { text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--text); }
.footer-admin { opacity: .4; }

/* ---------- Boutons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 10px 20px; border-radius: 10px; border: 1px solid transparent;
  font: 600 15px var(--font); text-decoration: none; cursor: pointer; color: var(--text);
  transition: transform .2s, box-shadow .25s, background .2s, border-color .2s, opacity .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn .dc-logo { width: 20px; height: 20px; flex-shrink: 0; }
.btn-primary { background: var(--blurple); box-shadow: 0 8px 26px -10px var(--blurple); }
.btn-primary:hover { background: #4752c4; box-shadow: 0 12px 32px -8px var(--blurple); }
.btn-primary::after, .btn-white::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn-primary:hover::after, .btn-white:hover::after { left: 130%; }
.btn-white { background: #fff; color: #23272a; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
.btn-white .dc-logo { color: var(--blurple); }
.btn-ghost { background: rgba(255, 255, 255, .06); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: var(--border-strong); }
.btn-danger { background: rgba(242, 63, 67, .12); border-color: rgba(242, 63, 67, .3); color: #ff7a7d; }
.btn-danger:hover { background: rgba(242, 63, 67, .22); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 12px; }

/* Mode admin */
.admin-only { display: none !important; }
body.is-admin .admin-only { display: inline-flex !important; }
body.is-admin .side-add.admin-only { display: grid !important; }
body.is-admin .footer-admin { display: none; }
.admin-bar { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.admin-bar::before {
  content: 'Mode admin'; margin-right: auto; align-self: center;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green); padding: 4px 10px; border-radius: 999px; background: rgba(35, 165, 90, .12);
}

/* ---------- Apparition / parallaxe / inclinaison ---------- */
.reveal { opacity: 0; translate: 0 34px; transition: opacity .8s ease, translate .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.visible { opacity: 1; translate: 0 0; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.offscreen, .offscreen * { animation-play-state: paused !important; }
[data-parallax] { transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
[data-depth] { translate: var(--dx, 0px) var(--dy, 0px); }
[data-tilt] {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .25s ease-out, box-shadow .3s, border-color .3s, background .3s;
  transform-style: preserve-3d;
}

/* ---------- Accueil : hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center;
  min-height: min(calc(100vh - 160px), 760px); padding: 10px 0 40px;
}
.hero-logo {
  width: clamp(170px, 18vw, 230px); height: auto; margin-bottom: 22px;
  filter: drop-shadow(0 14px 36px rgba(124, 92, 255, .5));
}
.hero-logo.visible { animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.badge {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 6px 14px 6px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  background: rgba(88, 101, 242, .14); border: 1px solid rgba(88, 101, 242, .4); color: #c9cdfb;
}
.live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.live::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: ping 2s ease-out infinite; }
.hero h1 { font-size: clamp(38px, 5.4vw, 68px); font-weight: 800; letter-spacing: -.025em; margin-bottom: 20px; }
.grad {
  background: linear-gradient(100deg, #8ea1ff 0%, var(--accent) 35%, var(--accent-2) 70%, #8ea1ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-text > p { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 560px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-proof { display: flex; align-items: center; gap: 14px; margin-top: 30px; color: var(--muted); font-size: 14px; }
.hero-proof b { color: var(--text); }
.stack { display: flex; }
.stack .avatar { width: 36px; height: 36px; font-size: 14px; border: 3px solid var(--bg); margin-left: -10px; transition: transform .2s; }
.stack .avatar:first-child { margin-left: 0; }
.stack .avatar:hover { transform: translateY(-4px); }

.hero-visual { position: relative; }
.hero-visual-inner { position: relative; padding: 40px 10px; }
.glow-ring {
  position: absolute; inset: -10% -14%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side at 35% 40%, rgba(88, 101, 242, .55), transparent),
    radial-gradient(closest-side at 70% 65%, rgba(235, 69, 158, .35), transparent);
  animation: pulse 8s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
@keyframes pulse { from { transform: scale(.92) rotate(-6deg); opacity: .7; } to { transform: scale(1.06) rotate(6deg); opacity: 1; } }

/* Fenêtre Discord */
.dc-window {
  position: relative; border-radius: 14px; overflow: hidden;
  background: var(--dc-light); border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .3);
  font-size: 15px;
}
.dc-titlebar {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px;
  background: var(--dc-dark); color: #dbdee1; font-weight: 600; font-size: 14px;
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ed6a5e; }
.dots i:nth-child(2) { background: #f5bf4f; }
.dots i:nth-child(3) { background: #61c554; }
.dc-channel { color: #949ba4; }
.dc-body { display: flex; min-height: 330px; }
.dc-servers {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 10px; background: var(--dc-dark);
}
.dc-servers img, .dc-servers .avatar { width: 40px; height: 40px; border-radius: 50%; font-size: 15px; object-fit: contain; background: var(--dc-light); }
.dc-servers img { padding: 6px; border-radius: 14px; background: var(--blurple); filter: none; }
.dc-sep { width: 24px; height: 2px; background: rgba(255, 255, 255, .08); border-radius: 2px; }
.dc-chat { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 18px 18px 14px; min-width: 0; }
.dc-msg { display: flex; gap: 12px; opacity: 0; animation: msgIn .5s cubic-bezier(.2, .9, .3, 1.2) forwards; animation-delay: calc(var(--d) * 1s + .5s); }
@keyframes msgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.dc-msg > .avatar { width: 40px; height: 40px; flex-shrink: 0; font-size: 16px; }
.dc-content { min-width: 0; flex: 1; }
.dc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; line-height: 1.3; }
.dc-head b { font-weight: 600; }
.dc-head time { color: #949ba4; font-size: 12px; margin-left: 6px; }
.dc-content p { margin: 2px 0 0; color: #dbdee1; }
.dc-embed {
  margin-top: 6px; padding: 10px 14px; border-radius: 4px;
  background: var(--dc-mid); border-left: 4px solid var(--c);
  color: #dbdee1; font-size: 14px;
}
.dc-input {
  margin-top: auto; padding: 11px 14px; border-radius: 8px; background: #383a40;
  color: #6d6f78; font-size: 14px; display: flex; align-items: center;
}
.caret { width: 2px; height: 16px; background: #dbdee1; margin-left: 4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Éléments flottants */
.float { position: absolute; z-index: 2; }
.float-inner { animation: hover 6s ease-in-out infinite; }
.f1 { top: 2%; left: -4%; }
.f2 { top: -2%; right: 8%; }
.f2 .float-inner { animation-delay: -2s; }
.f3 { bottom: 4%; left: 4%; }
.f3 .float-inner { animation-delay: -3s; }
.f4 { bottom: 12%; right: -4%; }
.f4 .float-inner { animation-delay: -1s; }
.f5 { top: 42%; right: -7%; }
.f5 .float-inner { animation-delay: -4s; }
@keyframes hover { 50% { transform: translateY(-14px) rotate(3deg); } }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px;
  background: #2b2d31; border: 1px solid rgba(88, 101, 242, .5);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .7); font-size: 15px;
}
.chip b { color: #c9cdfb; }
.chip.cmd { font-family: ui-monospace, Consolas, monospace; color: #c9cdfb; background: rgba(88, 101, 242, .3); }
.bubble {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px;
  background: var(--blurple); box-shadow: 0 16px 34px -10px var(--blurple); padding: 10px;
}
.bubble > img { filter: brightness(0) invert(1); }
.bubble .avatar { width: 100%; height: 100%; border-radius: 14px; }
.f5 .bubble { padding: 0; overflow: hidden; background: var(--dc-mid); }
.f5 .bubble .avatar { border-radius: 0; }

/* Bandeau défilant */
.marquee {
  position: relative; overflow: hidden; margin: 10px calc(-1 * clamp(16px, 4vw, 48px));
  padding: 18px 0; border-block: 1px solid var(--border); background: rgba(30, 31, 34, .45);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.mq-item { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-title); font-size: 18px; white-space: nowrap; opacity: .85; }
.mq-item .avatar { width: 32px; height: 32px; font-size: 13px; }

/* ---------- Sections ---------- */
.section { margin-top: clamp(60px, 9vw, 120px); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; }
.section-head p { color: var(--muted); margin: 0 auto; max-width: 560px; }
.eyebrow {
  display: inline-block; margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #8ea1ff;
}

.card {
  position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; overflow: hidden;
}
.card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 92, 255, .16), transparent 45%);
}
.card:hover { border-color: rgba(124, 92, 255, .4); --lift: -6px; }
.card:hover::after { opacity: 1; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid > .reveal { display: flex; }
.grid > .reveal > * { flex: 1; }
.highlight .icon {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  font-size: 26px; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(88, 101, 242, .35), rgba(235, 69, 158, .2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  transform: translateZ(30px);
}
.highlight h3 { font-size: 21px; }
.highlight p { color: var(--muted); margin: 0; font-size: 15px; }

/* Cartes profil Discord */
.bots-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.profile-card {
  position: relative; display: flex; flex-direction: column; text-decoration: none;
  background: var(--dc-mid); border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .9);
}
.profile-card:hover { --lift: -8px; box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--c) 70%, #000); border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.profile-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .07), transparent 50%);
}
.profile-card:hover::after { opacity: 1; }
.pc-banner {
  height: 96px;
  background:
    radial-gradient(circle at 20% 120%, rgba(255, 255, 255, .25), transparent 50%),
    linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #000));
}
.pc-banner { overflow: hidden; }
.pc-banner img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.profile-card:hover .pc-banner img { transform: scale(1.06); }
.profile-card .av-wrap { margin: -44px 0 0 18px; }
.profile-card .av-wrap .avatar { width: 86px; height: 86px; font-size: 32px; border: 6px solid var(--dc-mid); }
.profile-card .av-wrap .status { right: 4px; bottom: 4px; width: 22px; height: 22px; border-width: 4px; }
.pc-body { display: flex; flex-direction: column; flex: 1; margin: 12px; padding: 14px; border-radius: 12px; background: var(--dc-dark); }
.pc-body h3 { font-size: 21px; margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; }
.pc-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #b5bac1; margin-bottom: 4px; }
.pc-body p { color: #dbdee1; margin: 0 0 16px; font-size: 14px; flex: 1; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.access-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); color: #dbdee1;
}
.access-pill.sm { margin-top: 0; padding: 3px 9px; font-size: 12px; }
.pc-more { font-weight: 600; font-size: 14px; color: color-mix(in srgb, var(--c) 60%, #fff); }
.pc-more span { display: inline-block; transition: transform .3s; }
.profile-card:hover .pc-more span { transform: translateX(5px); }

/* Bandeau final */
.cta {
  position: relative; overflow: hidden; border-radius: 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  padding: clamp(32px, 5vw, 60px);
  background: linear-gradient(120deg, var(--blurple), #7c5cff 55%, #b04ae0);
  box-shadow: 0 40px 80px -40px var(--blurple);
}
.cta::before {
  content: ''; position: absolute; inset: 0; opacity: .25;
  background-image: radial-gradient(rgba(255, 255, 255, .6) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
}
.cta-text { position: relative; flex: 1; min-width: 260px; }
.cta h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 8px; }
.cta .grad { background: none; color: #fff; -webkit-text-fill-color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 6px; }
.cta p { margin: 0; color: rgba(255, 255, 255, .85); font-size: 17px; }
.cta .btn { position: relative; }
.cta-deco { position: absolute; right: 22%; top: -30px; width: 160px; opacity: .14; pointer-events: none; }
.cta-deco img { filter: brightness(0) invert(1); }
.cta-deco .avatar { width: 160px; height: 160px; font-size: 60px; }

/* ---------- Page bot (profil Discord) ---------- */
.profile {
  position: relative; border-radius: 28px; overflow: hidden;
  background: var(--dc-mid); border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9);
}
.profile-banner {
  position: relative; height: clamp(150px, 22vw, 230px); overflow: hidden;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 40%, #000));
}
.banner-pattern {
  position: absolute; inset: -60% -10%;
  background-image:
    radial-gradient(circle at 25% 30%, rgba(255, 255, 255, .25), transparent 25%),
    radial-gradient(circle at 80% 70%, rgba(0, 0, 0, .25), transparent 30%),
    radial-gradient(rgba(255, 255, 255, .22) 1.5px, transparent 1.5px);
  background-size: auto, auto, 26px 26px;
}
/* Bannière perso : plus haute que le cadre pour laisser de la marge à la parallaxe */
.banner-img { position: absolute; left: 0; top: -20%; width: 100%; height: 140%; object-fit: cover; }
.profile-body {
  position: relative; display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding: 0 clamp(20px, 4vw, 40px) 26px;
}
.profile .av-wrap.big { margin-top: calc(-1 * clamp(60px, 7vw, 80px)); }
.av-wrap.big .avatar {
  width: clamp(120px, 14vw, 160px); height: clamp(120px, 14vw, 160px); font-size: 54px;
  border: 8px solid var(--dc-mid);
}
.av-wrap.big .status { width: 34px; height: 34px; right: 8px; bottom: 8px; border-width: 6px; }
.profile-info { flex: 1; min-width: 240px; padding-top: 16px; }
.profile-info h1 { font-size: clamp(32px, 4.5vw, 48px); font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; flex-wrap: wrap; }
.profile-info .bot-tag { font-size: 14px; padding: 2px 8px 2px 5px; }
.profile-info .bot-tag svg { width: 16px; height: 16px; }
.tagline { color: #b5bac1; font-size: clamp(16px, 1.8vw, 19px); margin: 0; }
.profile-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.profile-actions .btn-primary { background: var(--c); color: var(--on-c, #fff); box-shadow: 0 8px 26px -10px var(--c); }
.profile-actions .btn-primary:hover { background: color-mix(in srgb, var(--c) 80%, #000); }
.profile-about {
  margin: 0 clamp(20px, 4vw, 40px) clamp(20px, 4vw, 40px); padding: 22px 26px;
  border-radius: 16px; background: var(--dc-dark);
}

.prose { color: #d3d6e6; font-size: 17px; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 26px; margin-top: 1.6em; color: var(--text); }
.prose h3 { font-size: 21px; margin-top: 1.4em; color: var(--text); }
.prose h4 { font-size: 18px; margin-top: 1.2em; color: var(--text); }
.prose a { color: #8ea1ff; }
.prose strong { color: #fff; }
.prose ul { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--blurple); }

.features { display: flex; flex-direction: column; gap: clamp(60px, 9vw, 120px); padding-top: 50px; }
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.feature:nth-child(even) .feature-media-wrap { order: 2; }
.feature-media-wrap { position: relative; }
.feature-num {
  position: absolute; top: -60px; left: -20px; z-index: -1;
  font-family: var(--font-title); font-weight: 800; font-size: clamp(120px, 16vw, 200px); line-height: 1;
  color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--c) 45%, transparent);
  pointer-events: none; user-select: none;
}
.feature:nth-child(even) .feature-num { left: auto; right: -20px; }
.feature-media {
  border-radius: 14px; overflow: hidden; background: var(--dc-light);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 40px 80px -36px color-mix(in srgb, var(--c) 60%, #000), 0 0 0 1px rgba(0, 0, 0, .3);
}
.fm-bar {
  display: flex; align-items: center; gap: 14px; padding: 9px 14px;
  background: var(--dc-dark); color: #949ba4; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feature-media img { width: 100%; height: auto; cursor: zoom-in; }
.feature-media .placeholder {
  aspect-ratio: 16 / 10; display: grid; place-items: center; color: var(--muted); font-size: 14px;
  background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, .02) 14px 28px);
}
.feature-text .eyebrow { color: color-mix(in srgb, var(--c) 55%, #fff); }
.feature h3 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.feature .prose { font-size: 16.5px; color: var(--muted); }

.empty {
  text-align: center; color: var(--muted); padding: 50px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
}

/* ---------- Pages légales / login / 404 ---------- */
.legal { max-width: 860px; margin: 0 auto; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; margin-bottom: 30px; }
.legal .card { padding: clamp(24px, 4vw, 44px); }
.login { max-width: 420px; margin: clamp(20px, 6vw, 60px) auto; text-align: left; }
.login-logo { width: 64px; margin: 0 auto 14px; }
.login h1 { font-size: 30px; text-align: center; }
.login p.sub { text-align: center; color: var(--muted); margin-top: 0; }
.notfound { text-align: center; padding: 80px 0; }
.notfound h1 { font-size: clamp(90px, 18vw, 180px); font-weight: 800; margin: 0; }
.notfound p { color: var(--muted); margin-bottom: 26px; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12px; font-weight: 700; color: #b5bac1; letter-spacing: .04em; text-transform: uppercase; }
.field small { color: var(--muted); font-size: 12px; }
input[type=text], input[type=password], input[type=url], textarea {
  width: 100%; padding: 11px 14px; border-radius: 8px;
  background: var(--dc-dark); border: 1px solid rgba(255, 255, 255, .06); color: var(--text);
  font: 15px/1.5 var(--font); transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 90px; }
textarea.big { min-height: 360px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
input:focus, textarea:focus { outline: none; border-color: var(--blurple); box-shadow: 0 0 0 3px rgba(88, 101, 242, .25); }
input[type=color] { width: 52px; height: 44px; padding: 3px; border-radius: 8px; border: 1px solid var(--border); background: var(--dc-dark); cursor: pointer; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error { color: #ff7a7d; font-size: 14px; min-height: 1.2em; margin: 4px 0 12px; }

.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--dc-dark); width: fit-content; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span {
  display: block; padding: 8px 14px; border-radius: 7px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s;
}
.seg-opt span:hover { color: var(--text); }
.seg-opt input:checked + span { background: var(--blurple); color: #fff; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--blurple); outline-offset: 2px; }
.img-field { display: flex; align-items: center; gap: 14px; }
.img-preview {
  width: 84px; height: 84px; border-radius: 14px; flex-shrink: 0; overflow: hidden;
  background: var(--dc-dark); border: 1px dashed var(--border-strong);
  display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center;
}
.img-preview.round { border-radius: 50%; }
.img-preview.wide { width: 150px; height: 94px; }
.img-preview.banner { width: 170px; height: 68px; border-radius: 10px; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-field .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.img-field input[type=file] { display: none; }

.sub-list { display: flex; flex-direction: column; gap: 14px; }
.sub-item { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: rgba(0, 0, 0, .15); animation: pageIn .3s ease; }
.sub-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sub-item-head strong { margin-right: auto; font-size: 14px; color: var(--muted); }
.form-section { font-family: var(--font-title); font-size: 19px; font-weight: 700; margin: 26px 0 14px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- Modale ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, .78);
  animation: fadeIn .2s ease;
}
.modal {
  width: min(760px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  background: var(--dc-light); border-radius: 16px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8);
  animation: popIn .3s cubic-bezier(.2, .9, .3, 1.2);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-close { background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 4px 24px 24px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; background: var(--dc-mid); border-radius: 0 0 16px 16px; }
.modal-overlay.closing { animation: fadeOut .2s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }

.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 30px; background: rgba(0, 0, 0, .9); cursor: zoom-out; animation: fadeIn .2s; }
.lightbox img { max-height: 90vh; border-radius: 12px; animation: popIn .3s ease; }

/* ---------- Toasts ---------- */
#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 400; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 12px 18px; border-radius: 10px; background: var(--dc-dark); border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font-size: 14px; font-weight: 500;
  animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.ok { border-left: 4px solid var(--green); }
.toast.err { border-left: 4px solid var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: 0; text-align: center; }
  .hero-text > p { margin-inline: auto; }
  .hero-actions, .hero-proof { justify-content: center; }
  .hero-logo { margin-inline: auto; }
  .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; }
}
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-media-wrap { order: 0; }
  .topnav { display: none; }
  .row { grid-template-columns: 1fr; }
  .float { display: none; }
  .cta-deco { display: none; }
}
@media (max-width: 600px) {
  :root { --side-w: 0px; }
  #sidebar {
    top: auto; width: 100%; height: 70px; flex-direction: row; padding: 0 12px;
    border-right: 0; border-top: 1px solid var(--border);
  }
  #bot-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 0 4px; width: auto; flex: 1; }
  .side-sep { width: 2px; height: 32px; }
  .side-item { width: 46px; height: 46px; }
  .side-item::before { display: none; }
  .shell { padding-bottom: 70px; }
  .brand span { display: none; }
  .top-actions .btn { padding: 8px 12px; font-size: 13px; }
  .dc-servers { display: none; }
  .grid-floor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .dc-msg { opacity: 1; translate: none; }
}
