/* ═══════════════════════════════════════════════════════════
   RAW Dashboard — thème v2 (verre dépoli, halos menthe)
   Se superpose à style.css : mêmes classes, nouvelle apparence.
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #07090b;
  --sidebar: rgba(10, 13, 15, 0.72);
  --panel: rgba(22, 27, 31, 0.72);
  --panel-2: rgba(255, 255, 255, 0.045);
  --panel-solid: #12171a;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #eef3f1;
  --muted: #8d9a97;
  --accent: #3beeae;
  --accent-2: #22d3c5;
  --accent-soft: rgba(59, 238, 174, 0.11);
  --accent-ink: #04281b;
  --grad: linear-gradient(135deg, #3beeae 0%, #22d3c5 100%);
  --radius: 16px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px -28px rgba(0, 0, 0, 0.75);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
::selection { background: rgba(59, 238, 174, .3); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }

/* Halos lumineux en arrière-plan + quadrillage discret */
.bg-glow { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-glow::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
.bg-glow span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 22s ease-in-out infinite alternate; }
.bg-glow span:nth-child(1) { width: 520px; height: 520px; background: #3beeae; top: -260px; left: -120px; opacity: .16; }
.bg-glow span:nth-child(2) { width: 460px; height: 460px; background: #22d3c5; top: 30%; right: -220px; opacity: .1; animation-delay: -8s; }
.bg-glow span:nth-child(3) { width: 380px; height: 380px; background: #5865f2; bottom: -220px; left: 30%; opacity: .08; animation-delay: -15s; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .bg-glow span, .content > *, .land-hero > *, .feat { animation: none !important; } }

/* ───── Typographie ───── */
h1, h2, h3 { letter-spacing: -0.02em; }
.content h1, .page h1 { font-size: 27px; font-weight: 800; }
.content .sub, .page .sub { font-size: 14.5px; max-width: 760px; }
.card h2, .module-form .card h2 { font-size: 16.5px; font-weight: 700; }

/* ───── Boutons ───── */
.btn { border-radius: 11px; border-color: var(--line); background: var(--panel-2); transition: transform .15s var(--ease), border-color .15s, background .15s, box-shadow .2s; font-weight: 650; }
.btn:hover:not(:disabled) { border-color: var(--line-strong); background: rgba(255,255,255,.07); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--grad); border: 0; color: var(--accent-ink); box-shadow: 0 10px 28px -10px rgba(59,238,174,.6); }
.btn.primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(59,238,174,.7); }
.btn.discord { background: #5865f2; border: 0; box-shadow: 0 10px 28px -10px rgba(88,101,242,.7); }
.btn.discord:hover:not(:disabled) { background: #6873f5; transform: translateY(-1px); }
.btn.lg { padding: 14px 26px; font-size: 15.5px; border-radius: 13px; }
.btn.ghost { background: transparent; }
.btn svg { width: 18px; height: 18px; }

/* ───── Champs ───── */
select, input[type=text], input:not([type]), input[type=number], textarea {
  background: rgba(0, 0, 0, .32); border: 1px solid var(--line); border-radius: 11px; transition: border-color .15s, box-shadow .15s;
}
select:hover, input:hover, textarea:hover { border-color: var(--line-strong); }
select:focus, input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 238, 174, .14); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d9a97' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
select option, select optgroup { background: #12171a; }
label.f > span, .lbl { font-size: 11.5px; letter-spacing: .07em; }

/* ───── Cartes ───── */
.card, .stat, .module, .guild-card, .cmd-card, .list-item {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card { padding: 22px; }
.list.compact .list-item { background: rgba(0,0,0,.22); box-shadow: none; }
.alert { border-radius: 12px; }

/* ───── Barre du haut ───── */
.topbar { background: rgba(7, 9, 11, .66); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-bottom: 1px solid var(--line); height: 64px; }
.topbar .title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.user-chip { background: var(--panel-2); border: 1px solid var(--line); padding: 4px 12px 4px 4px; border-radius: 999px; }
.user-chip img { width: 30px; height: 30px; }
.icon-logout { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); background: var(--panel-2); transition: color .15s, border-color .15s; }
.icon-logout:hover { color: #ff8a8d; border-color: rgba(242,85,90,.4); }
.icon-logout svg { width: 17px; height: 17px; }

/* ───── Barre latérale ───── */
.layout { grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { background: var(--sidebar); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-right: 1px solid var(--line); padding: 16px 12px 20px; display: flex; flex-direction: column; }
.guild-switch { background: linear-gradient(135deg, rgba(59,238,174,.12), rgba(34,211,197,.04)); border: 1px solid rgba(59,238,174,.22); border-radius: 14px; padding: 10px 12px; transition: border-color .15s, transform .15s var(--ease); }
.guild-switch:hover { border-color: rgba(59,238,174,.45); transform: translateY(-1px); }
.nav-title { font-size: 10.5px; letter-spacing: .12em; margin: 18px 12px 6px; opacity: .8; }
.nav a { gap: 11px; padding: 7px 10px; border-radius: 11px; color: #c9d1cf; font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s; position: relative; }
.nav a svg { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); transition: all .15s; }
.nav a:hover { background: rgba(255,255,255,.04); color: #fff; }
.nav a:hover svg { color: var(--text); }
.nav a.active { background: var(--accent-soft); color: #fff; }
.nav a.active svg { background: var(--grad); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 16px -6px rgba(59,238,174,.7); }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-foot { margin-top: auto; padding: 14px 10px 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #23a55a; box-shadow: 0 0 0 0 rgba(35,165,90,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(35,165,90,0); } 100% { box-shadow: 0 0 0 0 rgba(35,165,90,0); } }
.content { padding: 30px 36px 80px; }
.content > * { animation: rise .45s var(--ease) both; }
.content > *:nth-child(2) { animation-delay: .04s; }
.content > *:nth-child(3) { animation-delay: .08s; }
.content > *:nth-child(4) { animation-delay: .12s; }
.content > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.content h1 svg { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: var(--accent-soft); }

/* ───── Tableaux, badges, onglets ───── */
th { font-size: 11px; letter-spacing: .08em; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255,255,255,.025); }
.badge { border-radius: 999px; font-weight: 700; }
.badge.on { background: rgba(59,238,174,.12); color: var(--accent); }
.tabs { background: rgba(0,0,0,.28); border-radius: 12px; }
.tabs button.active { background: var(--grad); color: var(--accent-ink); box-shadow: 0 6px 16px -8px rgba(59,238,174,.7); }
.toast { border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.6); background: var(--grad); }
.sticky-actions {
  bottom: 14px; margin-top: 18px; padding: 12px 14px; border-radius: 14px;
  background: rgba(12, 16, 18, .82); border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7);
}
.switch span { background: rgba(255,255,255,.08); }
.switch input:checked + span { background: var(--grad); border-color: transparent; }
.switch input:checked + span::after { background: #fff; }
.icon-btn { border-radius: 9px; background: rgba(0,0,0,.25); transition: all .15s; }
.emoji-picker { background: #12171a; border-radius: 14px; }

/* ═════════ Page d'accueil (non connecté) ═════════ */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.land-top { display: flex; align-items: center; gap: 14px; padding: 20px clamp(16px, 5vw, 56px); }
.land-top img { height: 36px; }
.land-top .spacer { flex: 1; }
.land-hero { text-align: center; padding: clamp(40px, 9vh, 110px) 20px 40px; max-width: 860px; margin: 0 auto; }
.land-hero > * { animation: rise .7s var(--ease) both; }
.land-hero > *:nth-child(2) { animation-delay: .08s; }
.land-hero > *:nth-child(3) { animation-delay: .16s; }
.land-hero > *:nth-child(4) { animation-delay: .24s; }
.land-hero > *:nth-child(5) { animation-delay: .32s; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); border: 1px solid rgba(59,238,174,.25); color: var(--accent); font-weight: 700; font-size: 12.5px; }
.land-hero h1 { font-size: clamp(36px, 6.4vw, 68px); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; margin: 22px 0 18px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.land-hero p { color: var(--muted); font-size: clamp(15px, 1.8vw, 18px); line-height: 1.65; max-width: 620px; margin: 0 auto 30px; }
.land-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.land-logo { height: clamp(70px, 12vw, 110px); margin: 0 auto; filter: drop-shadow(0 18px 40px rgba(59,238,174,.35)); }
.land-hero .alert { max-width: 460px; margin: 0 auto 20px; }
.land-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; padding: 20px clamp(16px, 5vw, 56px) 60px; max-width: 1200px; margin: 0 auto; width: 100%; }
.feat { padding: 18px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012)); border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--ease); animation: rise .6s var(--ease) both; }
.feat:hover { border-color: rgba(59,238,174,.35); transform: translateY(-3px); }
.feat .fi { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.feat .fi svg { width: 21px; height: 21px; }
.feat b { display: block; font-size: 15px; margin-bottom: 4px; }
.feat span { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.land-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 0 20px 30px; margin-top: auto; }

/* ═════════ Choix du serveur ═════════ */
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head img { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(59,238,174,.3); }
.guild-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.guild-card { position: relative; overflow: hidden; padding: 0 0 18px; transition: transform .2s var(--ease), border-color .2s; }
.guild-card:hover { transform: translateY(-4px); border-color: rgba(59,238,174,.35); }
.guild-card .g-cover { height: 84px; width: 100%; background: var(--grad) center/cover; position: relative; }
.guild-card .g-cover::after { content: ''; position: absolute; inset: 0; backdrop-filter: blur(22px) brightness(.7); background: linear-gradient(transparent, rgba(7,9,11,.5)); }
.guild-card .gicon { width: 76px; height: 76px; margin-top: -40px; position: relative; z-index: 1; border: 4px solid #12171a; font-size: 24px; }
.guild-card .gname { padding: 0 16px; font-size: 16px; }
.guild-card .btn { width: calc(100% - 32px); }
.guild-card .muted-line { color: var(--muted); font-size: 12.5px; margin-top: -6px; }

/* ═════════ Vue d'ensemble ═════════ */
.ov-hero { position: relative; overflow: hidden; border-radius: 22px; border: 1px solid rgba(59,238,174,.2); padding: 28px; margin-bottom: 22px; background: linear-gradient(135deg, rgba(59,238,174,.14), rgba(34,211,197,.05) 50%, rgba(88,101,242,.08)); box-shadow: var(--shadow); }
.ov-hero-bg { position: absolute; inset: -40px; background: center/cover; filter: blur(50px) saturate(1.3); opacity: .28; }
.ov-hero-in { position: relative; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ov-hero .gicon { flex: none; display: grid; place-items: center; background-color: var(--panel-2); background-position: center; background-size: cover; background-repeat: no-repeat; font-weight: 700; color: var(--muted); width: 84px; height: 84px; border-radius: 22px; border: 3px solid rgba(255,255,255,.12); box-shadow: 0 16px 36px -14px rgba(0,0,0,.7); font-size: 28px; }
.ov-hero h1 { font-size: 30px; margin: 0; }
.ov-hero .meta { color: #b9c4c1; margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; }
.ov-hero .meta b { color: #fff; }
.ov-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.stat .s-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.stat .s-ico svg { width: 22px; height: 22px; }
.stat .value { font-size: 25px; font-weight: 800; margin-top: 2px; letter-spacing: -0.02em; }
.stat .value .small { font-size: 14px; }
.ring { --p: 0; width: 44px; height: 44px; flex: none; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); display: grid; place-items: center; }
.ring::after { content: ''; width: 34px; height: 34px; border-radius: 50%; background: #11161a; }
.group-title { display: flex; align-items: center; gap: 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 30px 0 12px; font-weight: 800; }
.group-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.modules { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.module { padding: 18px; gap: 10px; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.module:hover { transform: translateY(-3px); border-color: rgba(59,238,174,.4); box-shadow: var(--shadow), 0 0 0 1px rgba(59,238,174,.12), 0 18px 40px -20px rgba(59,238,174,.35); }
.module .m-top { display: flex; align-items: center; justify-content: space-between; }
.module .m-icon { width: 44px; height: 44px; border-radius: 12px; }
.module.is-on .m-icon { background: var(--grad); color: var(--accent-ink); box-shadow: 0 8px 20px -8px rgba(59,238,174,.6); }
.module h3 { font-size: 15.5px; }
.state { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state.on { color: var(--accent); background: rgba(59,238,174,.12); }
.state.off { color: var(--muted); background: rgba(255,255,255,.06); }
.state.ready { color: #8ea1ff; background: rgba(88,101,242,.14); }
.module .go { color: var(--muted); font-size: 12.5px; font-weight: 700; transition: color .15s; }
.module:hover .go { color: var(--accent); }

/* ═════════ Mobile ═════════ */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 12px 14px; }
  .side-foot { display: none; }
  .nav a { padding: 6px 10px 6px 6px; }
  .nav a.active::before { display: none; }
  .content { padding: 22px 16px 60px; }
  .ov-hero { padding: 20px; }
  .ov-actions { margin-left: 0; width: 100%; }
  .ov-actions .btn { flex: 1; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .stat .value { font-size: 21px; }
  .ov-hero h1 { font-size: 24px; }
  .ov-hero .gicon { width: 64px; height: 64px; border-radius: 18px; }
}
