/* ═══════════════════════════════════════════════════════════════
   AURA - SITE - thème « forge »
   Base sombre acier, accents sémantiques :
     laiton  #d4a24c → positif / accent
     acier   #7d8ca3 → négatif
     forge   #c8442e → toxique
   Typo : Archivo (display étendu) · IBM Plex Sans · IBM Plex Mono
   Aucun emoji dans l'interface.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg: #14161d;
    --panel: #1b1f29;
    --panel-2: #202634;
    --line: #2c3140;
    --text: #e9e7e0;
    --muted: #969cae;
    --accent: #d4a24c;
    --accent-strong: #e8c27a;
    --neg: #7d8ca3;
    --tox: #c8442e;
    --pos: #d4a24c;
    --radius: 10px;
    --font-body: 'IBM Plex Sans', system-ui, sans-serif;
    --font-display: 'Archivo', var(--font-body);
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; overflow-x: clip; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    background-image: radial-gradient(1200px 500px at 70% -10%, rgba(212, 162, 76, 0.06), transparent 60%);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── Marqueur signature : tête de clou ── */
.nail {
    display: inline-block; width: 13px; height: 13px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--accent-strong), var(--accent) 45%, #7a5c24 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), inset 0 -1px 2px rgba(0, 0, 0, 0.45);
    position: relative; flex: none;
}
.nail::before, .nail::after {
    content: ''; position: absolute; left: 50%; top: 50%; background: #3a2d10; border-radius: 1px;
}
.nail::before { width: 7px; height: 1.6px; transform: translate(-50%, -50%) rotate(0.001deg); }
.nail::after  { width: 1.6px; height: 7px; transform: translate(-50%, -50%); }
.nail-lg { width: 18px; height: 18px; }
.nail-lg::before { width: 10px; height: 2px; }
.nail-lg::after  { width: 2px; height: 10px; }

/* ── Topbar ── */
.topbar {
    display: flex; align-items: center; gap: 28px;
    padding: 14px 28px; border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 85%, black); position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
    width: 36px; height: 36px; flex: none; border-radius: 8px;
    object-fit: contain; display: block;
}
.brand-logo-sm { width: 22px; height: 22px; border-radius: 5px; }
.brand-name {
    font-family: var(--font-display); font-weight: 800; font-stretch: 118%;
    text-transform: uppercase; letter-spacing: 0.06em; font-size: 18px;
}
.brand-ver { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 7px 13px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.session { display: flex; align-items: center; gap: 10px; }
.session-name { font-weight: 600; font-size: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); }

/* ── Recherche globale (topbar) ── */
.topbar-search { position: relative; width: 220px; }
.topbar-search input { width: 100%; font-size: 12.5px; padding: 7px 11px; }
.topbar-search-results {
    position: absolute; top: calc(100% + 6px); right: 0; width: 300px; max-width: 80vw;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    padding: 6px; z-index: 60; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.topbar-search-results:empty { display: none; }
.topbar-search-results .search-hit { cursor: pointer; }

/* ── Structure ── */
.container { max-width: 1240px; margin: 0 auto; padding: 34px 28px 80px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; text-align: center; padding: 22px; }

/* ── Typo display ── */
.eyebrow {
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.eyebrow::before { content: ''; }
.display {
    font-family: var(--font-display); font-weight: 850; font-stretch: 122%;
    text-transform: uppercase; letter-spacing: 0.015em; font-size: clamp(34px, 5vw, 58px); line-height: 1.02;
}
.display-sm {
    font-family: var(--font-display); font-weight: 800; font-stretch: 118%;
    text-transform: uppercase; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.08;
}
.accent { color: var(--accent); }
.hero { padding: 18px 0 34px; }
.hero-lockup {
    display: block; width: min(420px, 92vw); height: auto;
    margin: 4px 0 8px; filter: drop-shadow(0 8px 28px rgba(212, 162, 76, 0.18));
}
.hero-sub { color: var(--muted); max-width: 640px; margin-top: 12px; }
.page-head { padding: 10px 0 26px; }
.profile-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.guild-head { display: flex; align-items: center; gap: 18px; }

.live-dot {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted);
}
.live-dot::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 8px var(--accent); animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* ── KPIs + soulignement « frappé » ── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 4px;
}
.kpi-solo { min-width: 220px; }
.kpi-value {
    font-family: var(--font-display); font-weight: 800; font-stretch: 115%;
    font-size: 26px; line-height: 1.1; letter-spacing: 0.01em;
}
.kpi-value.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: -0.01em; }
.struck { position: relative; padding-bottom: 9px; }
.struck::after {
    content: ''; position: absolute; left: 1px; bottom: 0; width: 34px; height: 4px;
    background: var(--accent); transform: skewX(-18deg); border-radius: 1px;
}
.struck.pos::after { background: var(--pos); }
.struck.neg::after { background: var(--neg); }
.struck.tox::after { background: var(--tox); }
.kpi-label { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.pos { color: var(--accent-strong); }
.neg { color: var(--neg); }
.tox { color: #e06a55; }

/* ── Panneaux ── */
.panel {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px 22px; margin-bottom: 22px;
}
.panel-head {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    flex-wrap: wrap; margin-bottom: 14px;
}
.panel-head h2 {
    font-family: var(--font-display); font-weight: 750; font-stretch: 112%;
    text-transform: uppercase; font-size: 15px; letter-spacing: 0.05em;
}
.panel-foot { margin-top: 14px; }
.hint { font-size: 12px; color: var(--muted); }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
    padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.table td { padding: 9px 10px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.num { text-align: right; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.rank { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.rank-n { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
tr:nth-child(-n+3) .nail { width: 15px; height: 15px; }
.empty { color: var(--muted); text-align: center; padding: 18px 10px; }
.link { color: var(--accent-strong); }
.link:hover { text-decoration: underline; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
    padding: 6px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
    color: var(--muted); border: 1px solid transparent;
}
.tab:hover { color: var(--text); background: var(--panel-2); }
.tab.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.tabs-main { margin-bottom: 22px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.tabs-main .tab { font-size: 13.5px; padding: 8px 15px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.count-pill {
    font-family: var(--font-mono); font-size: 10.5px; background: var(--panel-2);
    padding: 1px 7px; border-radius: 20px; margin-left: 4px;
}

/* ── Chips & tags ── */
.level-chip {
    --chip: var(--accent);
    display: inline-block; font-family: var(--font-mono); font-size: 11.5px;
    padding: 2px 9px; border-radius: 20px;
    color: color-mix(in srgb, var(--chip) 75%, white);
    background: color-mix(in srgb, var(--chip) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--chip) 35%, transparent);
    white-space: nowrap;
}
.level-chip-lg { font-size: 13px; padding: 4px 13px; margin-top: 10px; }
.tag {
    display: inline-block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em;
    padding: 2px 8px; border-radius: 5px; background: var(--panel-2); color: var(--muted);
    border: 1px solid var(--line);
}
.tag-tox { color: #e06a55; border-color: color-mix(in srgb, var(--tox) 40%, transparent); background: color-mix(in srgb, var(--tox) 10%, transparent); }

/* ── Boutons ── */
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
    border-radius: 8px; font-weight: 600; font-size: 13.5px; border: 1px solid var(--line);
    transition: transform 0.08s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #1c1608; }
.btn-accent:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-danger { background: transparent; color: #e06a55; border-color: color-mix(in srgb, var(--tox) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--tox) 14%, transparent); }

/* ── Cartes serveurs ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px; display: flex; flex-direction: column; gap: 16px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
.card-top { display: flex; gap: 14px; align-items: center; }
.card-title { display: block; font-weight: 600; font-size: 15.5px; }
.card-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; }
.card-cta { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.guild-icon { width: 46px; height: 46px; border-radius: 12px; flex: none; object-fit: cover; }
.guild-icon-lg { width: 62px; height: 62px; border-radius: 14px; }
.guild-icon-fallback {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--panel-2); border: 1px solid var(--line);
    font-family: var(--font-display); font-weight: 800; color: var(--accent);
}

/* ── Formulaires ── */
input, select {
    background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
    border-radius: 8px; padding: 8px 11px; font: inherit; font-size: 13.5px; min-width: 0;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); padding: 0; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 9px; color: var(--text); }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.form-row input[type="search"], .form-row input[type="text"] { flex: 1; min-width: 160px; }
.form-col { display: flex; flex-direction: column; gap: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; margin-bottom: 14px; }
.form-section {
    font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--accent); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-top: 8px;
}
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.save-status { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Divers ── */
.chart-wrap { position: relative; height: 260px; }
.badge-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.badge-item { display: flex; gap: 10px; align-items: flex-start; }
.badge-item .hint { display: block; }
.hidden { display: none !important; }
.empty-state { text-align: center; padding: 46px 24px; }
.empty-state p { color: var(--muted); max-width: 480px; margin: 10px auto 0; }
.error-state .error-code { font-size: 46px; color: var(--accent); display: block; margin-bottom: 8px; }
.error-state .btn { margin-top: 20px; }
.md-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.md-grid .kpi { padding: 12px 14px; }

@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .container { padding: 22px 16px 60px; }
    .badge-list { grid-template-columns: 1fr; }
}

/* Options de messages grisées quand le mode silencieux est actif */
.muted-options { opacity: 0.45; pointer-events: none; }
.muted-options::after { content: 'Mode silencieux actif : le bot n\'enverra aucun message.'; display: block; font-size: 12px; color: var(--muted); }
#msg-options { display: flex; flex-direction: column; gap: 13px; }
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   AURA - composants du site de réputation
   ═══════════════════════════════════════════════════════════════ */

textarea {
    background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
    border-radius: 8px; padding: 8px 11px; font: inherit; font-size: 13.5px; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); }

/* ── Hero de profil (couleur du membre via --user-accent) ── */
.profile-hero {
    display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap;
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px 30px; margin-bottom: 22px; position: relative; overflow: hidden;
}
.profile-hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(600px 220px at 85% 0%, color-mix(in srgb, var(--user-accent, var(--accent)) 14%, transparent), transparent 70%);
}
.banner-forge  { background: linear-gradient(135deg, #14161d, #1b1f29); }
.banner-acier  { background: linear-gradient(135deg, #161a22, #232c3d); }
.banner-laiton { background: linear-gradient(135deg, #1a1710, #2b2312); }
.banner-nuit   { background: linear-gradient(135deg, #101018, #1a1a2e); }
.banner-braise { background: linear-gradient(135deg, #1c1210, #2e1a14); }
.banner-givre  { background: linear-gradient(135deg, #101820, #16242e); }
.banner-aurore { background: linear-gradient(135deg, #14101c, #1e1430); }
.banner-mythe  { background: linear-gradient(135deg, #1a1408, #2a2010); }
.profile-id { display: flex; align-items: center; gap: 20px; position: relative; z-index: 1; }
.profile-initial {
    width: 74px; height: 74px; border-radius: 18px; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 850; font-size: 34px;
    color: var(--user-accent, var(--accent));
    background: color-mix(in srgb, var(--user-accent, var(--accent)) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--user-accent, var(--accent)) 40%, transparent);
}
.profile-rep { text-align: right; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.profile-rep-value {
    font-family: var(--font-display); font-weight: 850; font-stretch: 120%;
    font-size: clamp(40px, 6vw, 64px); line-height: 1;
}
.bio { white-space: pre-wrap; color: var(--text); max-width: 720px; }

/* ── Barres de progression ── */
.progress { width: min(360px, 100%); height: 8px; border-radius: 5px; background: var(--line); overflow: hidden; }
.progress-lg { width: 100%; height: 12px; }
.progress-fill { height: 100%; border-radius: 5px; background: var(--accent); transition: width 0.4s ease; }

/* ── Interrupteurs & lignes de réglage ── */
.switch-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.switch-row > span { display: flex; flex-direction: column; gap: 2px; }
.switch-row .hint { font-weight: 400; }
.switch-row.locked { opacity: 0.75; border-style: dashed; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; margin-bottom: 8px; }
.rule-row { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }

/* ── Choix de bannière & badges épinglés ── */
.banner-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.banner-opt {
    border: 1px solid var(--line); border-radius: 8px; padding: 22px 12px 10px;
    cursor: pointer; text-transform: capitalize; font-size: 12.5px; color: var(--text);
    display: flex; align-items: flex-end;
}
.banner-opt input { position: absolute; opacity: 0; }
.banner-opt.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.banner-opt.locked { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.4); }
.banner-forge  { background: linear-gradient(135deg, #14161d, #1b1f29); }
.banner-acier  { background: linear-gradient(135deg, #161a22, #232c3d); }
.banner-laiton { background: linear-gradient(135deg, #1a1710, #2b2312); }
.banner-nuit   { background: linear-gradient(135deg, #101018, #1a1a2e); }
.banner-braise { background: linear-gradient(135deg, #1c1210, #2e1a14); }
.banner-givre  { background: linear-gradient(135deg, #101820, #16242e); }
.banner-aurore { background: linear-gradient(135deg, #14101c, #1e1430); }
.banner-mythe  { background: linear-gradient(135deg, #1a1408, #2a2010); }

/* Carte animée (aperçu web - le PNG Discord reste fixe) */
.card-live {
    position: relative; overflow: hidden; border-radius: 16px;
    aspect-ratio: 1200 / 630; width: 100%; max-width: 900px;
    background: linear-gradient(135deg, var(--card-a), var(--card-b));
    border: 1px solid var(--line);
}
.card-live-glow {
    position: absolute; inset: 0;
    background: radial-gradient(55% 70% at 78% 18%, color-mix(in srgb, var(--user-accent) 28%, transparent), transparent 70%);
    pointer-events: none;
}
.card-live-body {
    position: relative; z-index: 1; height: 100%;
    padding: clamp(18px, 3.5%, 28px) clamp(20px, 4%, 32px);
    display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
    box-sizing: border-box;
}
.card-live-top { display: flex; align-items: center; gap: 10px; }
.card-live-theme { margin-left: auto; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--user-accent); opacity: 0.75; }
.card-live-main { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex: 1; padding-top: 8px; }
.card-live-name { font-size: clamp(22px, 3.2vw, 32px); font-weight: 800; margin: 0; letter-spacing: 0.02em; }
.card-live-level { margin: 10px 0 0; color: var(--user-accent); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; }
.card-live-name::after {
    content: ''; display: block; width: 42px; height: 4px; margin-top: 10px;
    border-radius: 2px; background: var(--user-accent);
}
.card-live-rep { text-align: right; }
.card-live-rep-n { display: block; font-size: clamp(28px, 4.5vw, 44px); font-weight: 800; line-height: 1; }
.card-live-progress { margin-top: auto; max-width: 420px; }
.card-live-progress .progress { width: 100%; margin-top: 4px; }
.card-live-foot { display: flex; gap: clamp(10px, 2.5%, 28px); flex-wrap: wrap; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.card-live-stat { min-width: 64px; flex: 1 1 64px; max-width: 120px; }
.card-live-stat strong { display: block; font-size: clamp(14px, 1.6vw, 18px); font-weight: 700; }
.card-live-stat span { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.check.disabled { opacity: 0.45; }

.theme-anim-pulse .card-live-glow,
.theme-anim-pulse.profile-hero::after { animation: aura-pulse 3.2s ease-in-out infinite; }
.theme-anim-shimmer .card-live-glow { animation: aura-shimmer 4s linear infinite; }
.theme-anim-stars .card-live-glow,
.theme-anim-aurora .card-live-glow { animation: aura-drift 6s ease-in-out infinite alternate; }
.theme-anim-ember .card-live-glow { animation: aura-ember 2.4s ease-in-out infinite; }
.theme-anim-frost .card-live-glow { animation: aura-frost 5s ease-in-out infinite; }
.theme-anim-myth .card-live-glow { animation: aura-myth 3.6s ease-in-out infinite; }

@keyframes aura-pulse { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes aura-shimmer { 0% { transform: translateX(-10%) rotate(8deg); } 100% { transform: translateX(20%) rotate(8deg); } }
@keyframes aura-drift { 0% { transform: translate(-4%, 2%); opacity: 0.5; } 100% { transform: translate(6%, -4%); opacity: 0.95; } }
@keyframes aura-ember { 0%, 100% { opacity: 0.4; filter: blur(0px); } 50% { opacity: 0.95; filter: blur(2px); } }
@keyframes aura-frost { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.9; } }
@keyframes aura-myth { 0%, 100% { opacity: 0.5; transform: scale(0.96) rotate(-2deg); } 50% { opacity: 1; transform: scale(1.05) rotate(2deg); } }

.badge-pick { display: grid; grid-template-columns: 1fr; gap: 8px; }
.badge-opt {
    display: flex; gap: 12px; align-items: center; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); cursor: pointer;
}
.badge-opt input { flex: none; }
.badge-opt > span:last-child { display: flex; flex-direction: column; }
.badge-opt.selected { border-color: var(--accent); }
.badge-opt.disabled { opacity: 0.45; pointer-events: none; }

/* ── Résultats de recherche (comparer, +rep) ── */
.search-results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.search-hit {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
    cursor: pointer;
}
.search-hit:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.search-hit .mono { color: var(--muted); font-size: 11.5px; }

/* ── Comparaison ── */
.compare-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-bottom: 16px; }
.compare-name { font-family: var(--font-display); font-weight: 800; font-stretch: 115%; text-transform: uppercase; font-size: clamp(18px, 2.6vw, 26px); color: var(--user-accent, var(--text)); }
.compare-vs { font-family: var(--font-mono); color: var(--muted); letter-spacing: 0.2em; }
.compare-table td:first-child { text-align: left; width: 34%; }
.compare-table td:last-child { text-align: right; width: 34%; }
.compare-label { text-align: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-mono); }
.compare-win { color: var(--accent-strong); position: relative; }
.compare-win::after { content: ''; position: absolute; bottom: 4px; width: 26px; height: 3px; background: var(--accent); transform: skewX(-18deg); }
td.compare-win:first-child::after { left: 10px; }
td.compare-win:last-child::after { right: 10px; }

/* ── Divers panels ── */
.danger-zone {
    border: 1px dashed color-mix(in srgb, var(--tox) 45%, transparent);
    border-radius: 8px; padding: 14px 16px; margin-top: 10px;
    display: flex; flex-direction: column; gap: 8px;
}
.lex-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; line-height: 1.9; }
.lex-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; white-space: nowrap; }
.lex-del { color: #e06a55; cursor: pointer; font-size: 11px; }
input[type="color"] { padding: 2px; width: 42px; height: 34px; cursor: pointer; }

/* Maintenance banner */
.maint-banner {
    background: color-mix(in srgb, var(--tox) 18%, var(--panel));
    color: var(--text); text-align: center; font-size: 12.5px; letter-spacing: 0.04em;
    padding: 8px 14px; border-bottom: 1px solid color-mix(in srgb, var(--tox) 35%, var(--line));
}

/* Language breakdown bar */
.lang-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line); width: min(420px, 100%); }
.lang-bar span { display: block; height: 100%; min-width: 0; }
.lang-bar .lang-fr { background: var(--accent); }
.lang-bar .lang-en { background: #7d8ca3; }
.lang-bar .lang-es { background: #c39a57; }
.lang-bar .lang-de { background: #8a7d6b; }
.lang-bar .lang-autre { background: #4a5060; }
.social-builder { margin-bottom: 12px; }
.social-platform-results { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.social-platform-hit {
  min-height: 40px; padding: 8px 14px; cursor: pointer;
  background: var(--panel-2, #171A20); border: 1px solid var(--line); color: var(--text);
  border-radius: 4px; font: inherit;
}
.social-platform-hit:hover { border-color: var(--accent); color: var(--accent); }
.social-slots { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.social-slot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.social-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; min-height: 40px; }
.social-link:hover { color: var(--accent); }
.social-icon { opacity: 0.7; flex-shrink: 0; }
.lang-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.lang-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lang-legend i.lang-fr { background: var(--accent); }
.lang-legend i.lang-en { background: #7d8ca3; }
.lang-legend i.lang-es { background: #c39a57; }
.lang-legend i.lang-de { background: #8a7d6b; }
.lang-legend i.lang-autre { background: #4a5060; }

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Nav burger */
.nav-toggle {
    display: none; width: 42px; height: 42px; flex: none; align-items: center; justify-content: center;
    flex-direction: column; gap: 5px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel);
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 1px; }
.nav-panel { display: flex; align-items: center; gap: 28px; flex: 1; min-width: 0; }

@media (max-width: 1024px) {
    .topbar { flex-wrap: wrap; gap: 12px; }
    .nav-panel { gap: 14px; }
    .topbar-search { width: min(200px, 100%); }
}

@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .container { padding: 22px 16px 60px; }
    .badge-list { grid-template-columns: 1fr; }
    .compare-head { grid-template-columns: 1fr; text-align: center; gap: 8px; }
    .compare-table td:first-child,
    .compare-table td:last-child { width: auto; }
    .panel { padding: 16px; }
    .panel-head { gap: 10px; }
    .tabs { gap: 6px; }
    .tab { padding: 8px 10px; min-height: 40px; }
}

@media (max-width: 768px) {
    .nav-toggle { display: inline-flex; margin-left: auto; order: 2; }
    .session { order: 3; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 54px); }
    .session .btn { padding: 8px 12px; font-size: 12.5px; }
    .session-name { display: none; }
    .nav-panel {
        display: none; order: 4; flex: 1 1 100%; flex-direction: column; align-items: stretch;
        gap: 10px; padding: 8px 0 4px; border-top: 1px solid var(--line);
    }
    .nav-panel.open { display: flex; }
    .nav { flex-direction: column; width: 100%; }
    .nav a { padding: 12px 14px; min-height: 44px; }
    .topbar-search { width: 100%; }
    .topbar-search-results { left: 0; right: 0; width: 100%; max-width: none; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kpi { padding: 12px 14px; min-width: 0; }
    .kpi-value { font-size: 22px; }
    .form-grid { grid-template-columns: 1fr; }
    .actions-row { flex-wrap: wrap; width: 100%; }
    .btn, .switch-row { min-height: 42px; }
    .check-grid { grid-template-columns: 1fr; }
    .banner-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-live { max-width: 100%; border-radius: 12px; }
    .card-live-main { flex-direction: column; gap: 12px; }
    .card-live-rep { text-align: left; }
    .card-live-foot { gap: 12px; }
    .table-wrap { margin: 0 -2px; padding-bottom: 2px; }
    .table-wrap .table { min-width: 520px; }
    .panel:has(> table.table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .panel > table.table { min-width: 520px; }
    .profile-head { align-items: flex-start; }
    .guild-head { flex-wrap: wrap; }
    .chart-wrap { height: 220px; }
}

@media (max-width: 480px) {
    .topbar { padding: 10px 12px; gap: 8px; }
    .container { padding: 18px 12px 52px; }
    .brand-ver { display: none; }
    .brand-name { font-size: 15px; }
    .display { font-size: clamp(26px, 9vw, 40px); }
    .display-sm { font-size: clamp(20px, 7vw, 28px); }
    .hero-lockup { width: min(280px, 88vw); }
    .kpis { grid-template-columns: 1fr; }
    .profile-hero { padding: 20px 16px; gap: 18px; }
    .profile-initial { width: 58px; height: 58px; font-size: 26px; border-radius: 14px; }
    .profile-rep-value { font-size: clamp(32px, 12vw, 48px); }
    .session .avatar { display: none; }
    .banner-pick { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
    .profile-hero { flex-direction: column; align-items: flex-start; }
    .profile-rep { align-items: flex-start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

