/* =========================================================
   Dashboard — thème « Atelier »
   Graphite chaud, un seul accent, filets fins au lieu d'ombres,
   Plex Sans pour le texte, Plex Mono pour chiffres et étiquettes.
   Chargé après style.css (dashboard uniquement) : il ne change que l'apparence.
   ========================================================= */
:root {
    --bg: #121211;
    --bg-2: #161615;
    --surface: #1a1a18;
    --surface-2: #222220;
    --surface-solid: #1a1a18;
    --surface-solid-2: #0e0e0d;
    --line: #2a2a27;
    --line-2: #3b3b37;
    --text: #ecebe5;
    --muted: #a9a79e;
    --faint: #75736b;
    --accent: #ff6a3d;
    --accent-hover: #ff8157;
    --accent-ink: #1d0c05;
    --blurple: var(--accent);
    --blurple-hover: var(--accent-hover);
    --violet: var(--accent);
    --indigo: var(--accent);
    --cyan: var(--accent);
    --grad: var(--accent);
    --grad-btn: var(--accent);
    --ok: #5dbe8a;
    --warn: #e2b34a;
    --err: #ef6461;
    --link: #f0a488;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    --font: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --display: var(--font);
    --top: 56px;
}

body { font: 14.5px/1.55 var(--font); background: var(--bg); letter-spacing: 0; }
::selection { background: rgba(255, 106, 61, 0.35); }
h1, h2, h3 { letter-spacing: -0.015em; font-weight: 600; }
a { text-underline-offset: 3px; }

/* Étiquettes en capitales mono (titres de section, en-têtes de tableau…) */
.side-title, .switcher-title, .palette-group, .table th, .qa b, .st-prev-label, .st-field-label, .st-nocat,
.stat > div > span, .eyebrow, .proof div span, .tw-uppercase {
    font-family: var(--mono) !important; font-weight: 500 !important; letter-spacing: .08em !important; font-size: 11px !important; text-transform: uppercase;
}
kbd { font-family: var(--mono); font-weight: 500; background: transparent; border: 1px solid var(--line-2); border-bottom-width: 1px; color: var(--faint); border-radius: 3px; padding: 0 5px; }

/* ---------- Boutons ---------- */
.btn { background: transparent; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 14px; font-weight: 500; font-size: 13.5px; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--surface-2); border-color: #4a4a45; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-danger { background: transparent; border-color: rgba(239, 100, 97, .45); color: var(--err); }
.btn-danger:hover { background: rgba(239, 100, 97, .1); border-color: var(--err); }
[role=alertdialog] .btn-danger { background: var(--err); border-color: var(--err); color: #1f0808; font-weight: 600; }
[role=alertdialog] .btn-danger:hover { background: #f47c79; }
.btn-premium { background: var(--warn); border-color: var(--warn); color: #1c1403; font-weight: 600; }
.btn-premium:hover { background: #ecc262; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-lg { padding: 11px 20px; }
.btn-icon { padding: 7px; }

/* ---------- Barre du haut ---------- */
.topbar { height: var(--top); background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: none; }
.brand { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand-logo { width: 28px; height: 28px; border-radius: 5px; background: var(--accent); color: var(--accent-ink); }
.crumbs { font-size: 13px; color: var(--faint); }
.crumbs svg { opacity: .5; }
.user-chip { background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 10px 2px 2px; }
.user-chip img { width: 26px; height: 26px; border-radius: 3px; }
.maint-badge { background: transparent; border-color: rgba(226, 179, 74, .5); color: var(--warn); }
.lang-switch { color: var(--muted); font-weight: 500; }
.lang-switch:hover, .lang-switch:focus-visible { background-color: var(--surface-2); }

/* ---------- Mise en page ---------- */
.layout { grid-template-columns: 256px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.sidebar { top: var(--top); height: calc(100vh - var(--top)); background: var(--bg-2); border-right: 1px solid var(--line); padding: 14px 12px 28px; scrollbar-color: #2e2e2b transparent; }
.content { padding: 36px clamp(16px, 4vw, 56px) 96px; max-width: 1160px; }
.page { padding-top: 40px; }

/* Menu latéral */
.side-guild { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px 8px 8px; }
.side-guild:hover { background: var(--surface); border-color: var(--line-2); }
.side-guild b { font-weight: 600; font-size: 14px; }
.side-guild span { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.g-icon, .g-icon.sm, .g-icon.md, .g-icon.xs { border-radius: 5px; background: var(--surface-2); font-weight: 600; }
.g-icon.xs { border-radius: 3px; }
.switcher-menu { background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.switcher-item:hover { background: var(--surface-2); color: var(--text); }
.switcher-item.current { color: var(--accent); }
.side-search { background: transparent; border: 1px solid var(--line); margin: 10px 0 6px; padding: 7px 8px 7px 10px; color: var(--faint); }
.side-search:hover { border-color: var(--line-2); color: var(--muted); }
.side-title { color: var(--faint); padding: 18px 8px 6px; }
.side-title:hover { color: var(--muted); }
.side-link { font-size: 14px; color: var(--muted); padding: 6px 10px; border-radius: var(--radius-sm); gap: 11px; }
.side-link .mi, .quick .mi, .palette-item .mi, .switcher-item .mi { color: var(--faint); }
.side-link:hover { background: transparent; color: var(--text); }
.side-link:hover .mi { color: var(--muted); }
.side-link.active { background: var(--surface-2); color: var(--text); }
.side-link.active .mi { color: var(--accent); }
.side-link.active::before { display: block; content: ''; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 2px; background: var(--accent); border-radius: 0 2px 2px 0; }
.side-pin { background: var(--surface-2); }
.side-pin:hover, .side-pin.on { color: var(--accent); }
.side-lock { color: var(--faint); }
.side-tip { font-size: 12px; }

/* ---------- En-têtes de page ---------- */
.page-head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-weight: 600; font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.02em; }
.hero-card, .module-head { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 4px 0 24px; margin-bottom: 28px; }
.hero-card h1, .module-head h1 { font-weight: 600; letter-spacing: -0.02em; }
.hero-card .g-icon { width: 60px; height: 60px; border-radius: 8px; background: var(--surface-2); }
.module-head p, .page-head p { color: var(--muted); }

/* Icônes en boîte : monochromes, cadre fin */
.ico { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: var(--radius); }
.ico.sm { width: 30px; height: 30px; border-radius: 5px; }
.ico.lg { width: 48px; height: 48px; border-radius: 8px; color: var(--text); }
.module-head .ico.lg { color: var(--accent); border-color: rgba(255, 106, 61, .35); }

/* ---------- Panneaux ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; box-shadow: none; }
.panel-head { padding-bottom: 14px; margin-bottom: 14px; gap: 12px; }
.panel-head h2 { font-size: 15px; font-weight: 600; }
.panel-head p { color: var(--faint); font-size: 12.5px; }
.grid-2 { gap: 20px; }

/* Cartes de chiffres : lecture d'instrument */
.cards { gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 28px; }
.stat { background: transparent; border-radius: 0; padding: 18px 20px; box-shadow: inset -1px -1px 0 var(--line); flex-direction: column; align-items: flex-start; gap: 12px; }
.stat .ico { width: 28px; height: 28px; border: 0; background: none; color: var(--faint); margin: -4px 0 0 -4px; }
.stat > div > span { color: var(--faint); margin-bottom: 4px; }
.stat > div > b { font-family: var(--mono); font-weight: 500; font-size: 26px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
a.stat-link:hover { background: var(--surface-2); }
.stat-go { top: 16px; right: 16px; }

/* Listes, rangs, checklist */
.list-row { border-top-color: var(--line); }
.rank, .rank.r1, .rank.r2, .rank.r3 { background: transparent; border: 1px solid var(--line); border-radius: 4px; font-family: var(--mono); font-weight: 500; color: var(--faint); }
.rank.r1 { color: var(--accent); border-color: rgba(255, 106, 61, .45); }
.rank.r2, .rank.r3 { color: var(--text); }
.progress { height: 4px; border-radius: 2px; background: var(--surface-2); }
.progress i { background: var(--accent); border-radius: 2px; }
.check .ci { border-radius: 4px; }
.check .ci.ok { background: transparent; border: 1px solid rgba(93, 190, 138, .4); color: var(--ok); }
.check .ci.todo { background: transparent; border: 1px solid rgba(226, 179, 74, .4); color: var(--warn); }
.check a, .mod .link, a.dc-title { color: var(--link); }

/* ---------- Badges ---------- */
.badge { background: transparent; border: 1px solid var(--line-2); color: var(--muted); font-family: var(--mono); font-weight: 500; font-size: 11px; padding: 1px 7px; border-radius: 3px; letter-spacing: .02em; }
.badge.ok { background: transparent; border-color: rgba(93, 190, 138, .4); color: var(--ok); }
.badge.warn { background: transparent; border-color: rgba(226, 179, 74, .4); color: var(--warn); }
.badge.err { background: transparent; border-color: rgba(239, 100, 97, .4); color: var(--err); }
.badge.violet { background: transparent; border-color: rgba(255, 106, 61, .4); color: var(--accent); }

/* ---------- Modules ---------- */
.mod-grid { gap: 16px; }
.mod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.mod:hover { border-color: var(--line-2); }
.mod.disabled { opacity: 1; }
.mod.disabled .mod-top h3, .mod.disabled p { color: var(--faint); }
.mod.disabled .ico { opacity: .5; }
.mod-top h3 { font-weight: 600; font-size: 15px; }
.filters .tab, .tabs .tab { border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--muted); font-size: 13px; }
.tab:hover { background: transparent; color: var(--text); border-color: var(--line); }
.tab.active { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }

/* ---------- Champs ---------- */
.field { border-top-color: var(--line); }
.field label { font-weight: 500; font-size: 14px; }
.field .hint { color: var(--faint); font-weight: 400; }
.input, select.input, textarea.input { background: var(--surface-solid-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; }
.input:hover { border-color: var(--line-2); }
.input:focus { border-color: var(--accent); }
select.input option, select.input optgroup { background: #1a1a18; }
.reset:hover { background: var(--surface-2); }
.switch { width: 40px; height: 22px; }
.switch span { background: #34342f; border-radius: 4px; border: 1px solid #45453f; }
.switch span::after { top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 2px; background: #b8b6ad; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--accent-ink); }
.switch input:focus-visible + span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.chk input { accent-color: var(--accent); }
.chip { background: transparent; border: 1px solid var(--line-2); border-radius: 3px; }
code.cmd, .md-code, .code-block { font-family: var(--mono); background: var(--surface-solid-2); border: 1px solid var(--line); color: var(--text); }
code.cmd { font-size: 12.5px; }

/* Alertes : filet coloré, fond neutre */
.alert { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--warn); color: var(--text); border-radius: var(--radius-sm); }
.alert svg { color: var(--warn); }
.alert.ok { background: var(--surface); border-left-color: var(--ok); color: var(--text); }
.alert.ok svg { color: var(--ok); }
.alert.err { background: var(--surface); border-left-color: var(--err); color: var(--text); }
.alert.err svg { color: var(--err); }
.alert .btn { margin-left: auto; flex: none; }
.empty { color: var(--faint); }

/* ---------- Tableaux ---------- */
.table th { color: var(--faint); border-bottom-color: var(--line); }
.table td { border-bottom-color: var(--line); }
.table tr:hover td { background: rgba(255, 255, 255, .015); }
.av { border-radius: 4px; }
.member-card { background: var(--surface); border: 1px solid var(--line); }
.member-card:hover { background: var(--surface-2); }
.member-card img, .admin-top img, .member-avatar { border-radius: 5px; }

/* ---------- Liste des serveurs ---------- */
.guild-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.guild-card:hover { background: var(--surface); border-color: var(--line-2); }
.g-banner { height: 3px; background: var(--banner, var(--line-2)); }
.guild-card .g-body { margin-top: 0; padding: 18px; gap: 12px; }
.guild-card .g-icon { width: 48px; height: 48px; border: 0; font-size: 16px; }
.guild-card.off { opacity: 1; }
.guild-card.off .g-name { color: var(--muted); }
.g-name { font-weight: 600; font-size: 15.5px; }

/* ---------- Premium ---------- */
.premium-hero { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--line-2); }
.premium-hero.on { border-left-color: var(--warn); }
.premium-lock { border-left: 2px solid var(--warn); }
.plan { background: transparent; border-color: var(--line); }
.plan span { font-family: var(--mono); font-weight: 500; }
.ref-box code { font-family: var(--mono); }
.lim { font-family: var(--mono); }

/* ---------- Graphiques ---------- */
.chart .grid { stroke: var(--line); }
.chart .axis { font-family: var(--mono); font-size: 10px; }
.hm-cell { border-radius: 2px; background: rgba(255, 106, 61, calc(0.05 + var(--a, 0) * 0.95)); }
.hm-h, .hm-d { font-family: var(--mono); }

/* ---------- Toasts, chargement, fenêtres ---------- */
.toast { background: var(--surface); border: 1px solid var(--line-2); border-left: 2px solid var(--ok); border-radius: var(--radius-sm); }
.toast.err { border-left-color: var(--err); }
.toast .ti { background: transparent; width: 20px; }
.toast.err .ti { background: transparent; }
.skeleton { background: var(--surface); border: 1px solid var(--line); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.spinner { border-width: 2px; border-color: var(--line-2); border-top-color: var(--accent); width: 32px; height: 32px; }
.modal-back, .palette-back { background: rgba(8, 8, 7, .72); }
.modal.panel { border-color: var(--line-2); box-shadow: var(--shadow); }
.palette { background: var(--surface); border: 1px solid var(--line-2); }
.palette-item[aria-selected=true] { background: var(--surface-2); color: var(--text); }
.palette-item[aria-selected=true] .mi { color: var(--accent); }
.palette-input { font-family: var(--font); font-weight: 400; }
.login-card { background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.login-card .brand-logo { border-radius: 10px; }

/* ---------- Accès rapide, sommaire, surbrillance ---------- */
.quick { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.quick:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.jump-nav { top: var(--top); gap: 2px; padding: 8px 0; margin: -12px 0 16px; border-bottom: 1px solid var(--line); }
.jump { background: transparent; border-radius: 0; color: var(--faint); font: 500 13px/1.4 var(--font); padding: 6px 12px; border-bottom: 2px solid transparent; margin-bottom: -9px; }
.jump:hover { background: transparent; color: var(--text); border-bottom-color: var(--line-2); }
@keyframes flash { 0%, 35% { background: rgba(255, 106, 61, .1); box-shadow: 0 0 0 6px rgba(255, 106, 61, .1); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
@keyframes flash-panel { 0%, 35% { box-shadow: 0 0 0 1px var(--accent); } 100% { box-shadow: 0 0 0 1px transparent; } }

/* ---------- Studio (l'aperçu Discord garde ses couleurs Discord) ---------- */
.st-cat { background: var(--surface-solid-2); border: 1px solid var(--line); }
.st-row { background: var(--surface); }
.st-tpl, .st-mode, .st-op, .st-seg-btn { background: var(--surface-solid-2); border-color: var(--line); }
.st-tpl:hover, .st-mode.on { border-color: var(--accent); }
.st-seg-btn.on { border-color: var(--accent); background: rgba(255, 106, 61, .1); }
.st-mode input { accent-color: var(--accent); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { top: var(--top); background: var(--bg-2); }
    .hero-card .g-icon { width: 48px; height: 48px; }
    .hero-card .actions .bot-lang { flex: 1 1 100%; max-width: none; }
    .overlay { inset: var(--top) 0 0 0; }
    .side-link.active::before { left: -12px; }
}
@media (max-width: 520px) {
    .user-chip { border: 0; padding: 0; }
    .stat > div > span { letter-spacing: .04em !important; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .stat { padding: 14px; }
    .stat > div > b { font-size: 22px; }
    .panel { padding: 18px; }
}
[role=alertdialog] { border: 1px solid var(--line-2); max-height: 100%; overflow-y: auto; }
.user-chip img { flex: none; }

/* =========================================================
   Cohérence (revue d'ensemble)
   ========================================================= */

/* Tailles d'icônes uniformes, quel que soit l'appel */
.btn svg { width: 15px; height: 15px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg svg { width: 17px; height: 17px; }
.btn-icon svg { width: 16px; height: 16px; }
.side-link .mi svg, .switcher-item .mi svg { width: 17px; height: 17px; }
.palette-item .mi svg, .quick .mi svg { width: 16px; height: 16px; }
.ico svg, .ico.sm svg { width: 16px; height: 16px; }
.ico.lg svg { width: 22px; height: 22px; }
.stat .ico svg { width: 18px; height: 18px; }
.badge svg { width: 12px; height: 12px; }
.rank svg { width: 14px; height: 14px; }
.alert > svg, .empty > svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.crumbs svg { width: 14px; height: 14px; }
.side-link .mi, .switcher-item .mi, .palette-item .mi, .quick .mi { display: grid; place-items: center; width: 18px; flex: none; }

/* En-tête de la vue d'ensemble : icône | nom et infos | actions sur une ligne */
.hero-card { flex-wrap: nowrap; align-items: center; gap: 20px; }
.hero-card > div:not(.actions):not(.g-icon) { flex: 1; min-width: 0; }
.hero-card h1 { margin: 0 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-card .meta { gap: 6px; }
.hero-card .actions { flex: none; margin-left: auto; flex-wrap: nowrap; gap: 8px; }
.hero-card .bot-lang { min-width: 0; width: 150px; padding: 7px 30px 7px 10px; font-size: 13px; }
@media (max-width: 1100px) {
    .hero-card { flex-wrap: wrap; }
    .hero-card .actions { width: 100%; margin-left: 0; flex-wrap: wrap; }
}

/* Badges : même police que l'interface, les chiffres restent alignés */
.badge { font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: 0; padding: 1px 8px; font-variant-numeric: tabular-nums; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.badge.violet { border-color: var(--line-2); color: var(--text); }
.side-extra .badge { font-family: var(--mono); font-size: 11px; padding: 0 6px; }

/* Premium : contour doré, l'orange reste le seul bouton plein */
.btn-premium { background: transparent; border-color: rgba(226, 179, 74, .55); color: var(--warn); font-weight: 500; }
.btn-premium:hover { background: rgba(226, 179, 74, .1); border-color: var(--warn); }
.premium-hero .ico, .premium-lock .ico { color: var(--warn); border-color: rgba(226, 179, 74, .35); }

/* Sélecteur de fichier aux couleurs du site */
input[type=file].input { padding: 5px; color: var(--muted); font-size: 13px; cursor: pointer; }
input[type=file]::file-selector-button { margin-right: 10px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font: 500 13px var(--font); cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: #4a4a45; }

/* Rangs / pastilles d'icône */
.rank { display: grid; place-items: center; }

/* Onglets du studio et des filtres alignés sur le reste */
.st-tab.on { border-bottom-color: var(--accent); }
.st-row.over { box-shadow: inset 0 2px 0 var(--accent); }

/* Aperçu profil (apparence) : reste façon Discord mais sans bleu vif hors carte */
.pv-banner.empty { background-color: var(--surface-2); }

/* Liens dans le texte */
.muted a, .empty a, .alert a, p a { color: var(--link); }

/* =========================================================
   Page d'accueil et page de maintenance (même thème)
   Les maquettes de messages Discord gardent les couleurs de Discord.
   ========================================================= */
.hero h1 { font-weight: 600; letter-spacing: -0.03em; }
.pill { background: transparent; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 4px 10px 4px 4px; font-size: 12.5px; }
.pill b { background: var(--accent); color: var(--accent-ink); border-radius: 3px; font-family: var(--mono); font-weight: 500; font-size: 11.5px; }
.proof div b { font-family: var(--mono); font-weight: 500; font-size: 28px; letter-spacing: -0.02em; }
.sec-head h2, .cta-band h2 { font-weight: 600; letter-spacing: -0.02em; }
.eyebrow { color: var(--accent); }
.dc { background: #313338; border-color: var(--line); }
.dc-av { background: #5865f2; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.feature:hover { background: var(--surface); border-color: var(--line-2); }
.feature h3 { font-weight: 600; font-size: 16px; }
.feature .cat { font-family: var(--mono); font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.feature .ico { color: var(--muted); }
.showcase { border-color: var(--line); background: var(--bg-2); }
.window { background: var(--bg-2); }
.window-bar { background: transparent; }
.window-bar i, .window-bar i:nth-child(1), .window-bar i:nth-child(2), .window-bar i:nth-child(3) { background: var(--line-2); }
.window-bar span { font-family: var(--mono); font-size: 11.5px; background: transparent; border: 1px solid var(--line); border-radius: 3px; }
.w-link { border-radius: var(--radius-sm); color: var(--muted); }
.w-link.on { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.w-card { background: var(--surface); border: 1px solid var(--line); }
.w-card span { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.w-card b { font-family: var(--mono); font-weight: 500; }
.w-row { background: var(--surface); border: 1px solid var(--line); }
.w-row .sw { border-radius: 4px; background: var(--accent); }
.w-row .sw::after { border-radius: 2px; background: var(--accent-ink); }
.w-row .sw.off { background: #34342f; }
.w-row .sw.off::after { background: #b8b6ad; }
.step { background: var(--surface); border: 1px solid var(--line); }
.step .num { background: transparent; border: 1px solid rgba(255, 106, 61, .5); color: var(--accent); border-radius: 4px; font-family: var(--mono); font-weight: 500; }
.faq details, .faq details[open] { background: var(--surface); border: 1px solid var(--line); }
.faq summary { font-weight: 500; }
.faq summary::after { font-family: var(--mono); color: var(--faint); }
.cta-band { background: var(--surface); border: 1px solid var(--line); }
footer.site { border-top-color: var(--line); }
.maintenance-page .brand-logo.lg { background: transparent; border: 1px solid rgba(226, 179, 74, .5); color: var(--warn); border-radius: 12px; }
.maintenance-page .m-reason { border: 1px solid var(--line); border-left: 2px solid var(--warn); }

/* Boutons ronds (pilule) ; boutons icône seuls en cercle */
.btn, .btn-sm, .btn-lg, input[type=file]::file-selector-button, .filters .tab, .tabs .tab, .st-seg-btn { border-radius: 999px; }
.btn { padding-left: 16px; padding-right: 16px; }
.btn-sm { padding-left: 12px; padding-right: 12px; }
.btn-lg { padding-left: 22px; padding-right: 22px; }
.btn-icon, .btn.btn-icon, .btn-sm.btn-icon { padding: 7px; border-radius: 50%; }
.btn.st-mini { padding: 4px 9px; }
.st-toolbar .btn-ghost { padding: 6px 12px; }
.reset { border-radius: 50%; }
.side-pin { border-radius: 50%; }
.user-chip { border-radius: 999px; }
.user-chip img { border-radius: 50%; }

/* Interrupteurs ronds (modules, options, aperçu de l'accueil) */
.switch span { border-radius: 999px; }
.switch span::after { border-radius: 50%; }
.w-row .sw { border-radius: 999px; }
.w-row .sw::after, .w-row .sw.off::after { border-radius: 50%; }
.badge { border-radius: 999px; padding: 1px 9px; }

/* Page Commandes */
.cmd-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.cmd-toolbar .filters { margin: 0; }
.cmd-row { border-top: 1px solid var(--line); padding: 12px 0; }
.panel-head + .cmd-row { border-top: 0; padding-top: 2px; }
.cmd-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmd-txt { display: grid; gap: 2px; flex: 1; min-width: 220px; }
.cmd-txt code.cmd { justify-self: start; }
.cmd-extra { margin-top: 10px; padding: 4px 14px; background: var(--surface-solid-2); border: 1px solid var(--line); border-radius: var(--radius); }
.cmd-extra .field:first-child { border-top: 0; }
.btn.on { color: var(--text); background: var(--surface-2); }

/* Classement public */
.board { max-width: 1100px; }
.board-head { display: flex; align-items: center; gap: 18px; justify-content: flex-start; }
.board-head .g-icon { width: 64px; height: 64px; border-radius: 10px; border: 0; }
.board-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.board-list { padding: 8px 12px; }
.board-row { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-top: 1px solid var(--line); }
.board-row:first-child { border-top: 0; }
.board-rank { width: 34px; text-align: center; font-family: var(--mono); font-size: 15px; color: var(--faint); flex: none; }
.board-row.top .board-rank { color: var(--text); font-weight: 500; }
.board-row.top1 .board-rank { color: var(--accent); }
.board-av { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); flex: none; object-fit: cover; }
.board-who { flex: 1; min-width: 0; display: grid; gap: 5px; }
.board-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; max-width: 360px; }
.board-bar i { display: block; height: 100%; background: var(--accent); }
.board-sub { font-size: 12px; color: var(--faint); }
.board-stat { display: grid; justify-items: end; min-width: 70px; flex: none; }
.board-stat span { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.board-stat b { font-family: var(--mono); font-weight: 500; font-size: 18px; }
@media (max-width: 860px) { .board-grid { grid-template-columns: 1fr; } }

/* Diagnostic */
.diag-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.diag-row:first-child { border-top: 0; padding-top: 0; }
.diag-row .badge { flex: none; min-width: 92px; justify-content: center; }
.diag-txt { flex: 1; min-width: 240px; display: grid; gap: 2px; }
/* Utilisation des commandes */
.usage-bars { display: grid; gap: 8px; }
.usage-row { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) 56px; align-items: center; gap: 12px; }
.usage-row code.cmd { justify-self: start; }
.usage-row b { font-family: var(--mono); font-weight: 500; text-align: right; }
.usage-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.badge.faint { color: var(--faint); border-color: var(--line); }
input[type=datetime-local].input { color-scheme: dark; }

/* ---------- Page Embeds ---------- */
.dc-author { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #f2f3f5; margin-bottom: 6px; }
.dc-author img, .dc-footer img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.dc-footer { display: flex; align-items: center; gap: 8px; }
.dc-footer img { width: 18px; height: 18px; }
.text-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.text-src { font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 8px; }
.text-row textarea { min-height: 38px; resize: vertical; }
.link-panel { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.link-panel > div { flex: 1; }
.link-panel:hover { border-color: var(--accent); }
@media (max-width: 700px) { .text-row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Démarrage rapide ---------- */
.step-num { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-family: var(--mono, 'IBM Plex Mono', monospace); font-weight: 600; font-size: 14px; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.preset { display: grid; gap: 6px; justify-items: start; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s; }
.preset:hover { border-color: var(--line-2); }
.preset.active { border-color: var(--accent); }
.preset .mi { color: var(--muted); }
.preset.active .mi { color: var(--accent); }
.preset:focus-visible, .mod-chip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.mod-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.mod-chip { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; min-width: 0; }
.mod-chip span:last-of-type { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.mod-chip:has(input:checked) { border-color: var(--accent); }
.mod-chip.locked { opacity: .55; cursor: not-allowed; }
.mod-chip input { accent-color: var(--accent); }

/* ---------- Nouveautés ---------- */
.news-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.new-tag { display: inline-block; padding: 1px 6px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-family: var(--mono, 'IBM Plex Mono', monospace); font-size: 10px; font-weight: 600; letter-spacing: .06em; line-height: 16px; vertical-align: middle; flex: none; }
.side-link .new-tag { margin-left: auto; }
.side-link .new-tag + .side-extra { margin-left: 6px; }
.mod .new-tag { align-self: flex-start; }
.panel-head .new-tag { margin-left: 2px; }
.release { border-top: 1px solid var(--line); padding: 12px 0; }
.release:first-of-type { border-top: 0; padding-top: 0; }
.release summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.release summary::-webkit-details-marker { display: none; }
.release summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.release[open] summary::before { transform: rotate(90deg); }
.release-v { font-family: var(--mono, 'IBM Plex Mono', monospace); font-size: 12px; color: var(--accent); }
.release-date { margin-left: auto; }
.release-items { list-style: none; margin: 10px 0 0; padding: 0 0 0 20px; display: grid; gap: 10px; }
.release-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.patch-notes { margin-top: 24px; }
.news-row { align-items: center; gap: 12px; }

/* ---------- Page de statut ---------- */
.status-page { max-width: 880px; margin: 0 auto; padding: 40px 16px 60px; }
.status-banner { display: flex; gap: 16px; align-items: flex-start; padding: 20px; margin-bottom: 20px; border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: var(--radius); background: var(--surface); }
.status-banner.warn { border-left-color: var(--warn); }
.status-banner.err { border-left-color: var(--err); }
.status-banner h1 { margin: 0 0 4px; font-size: 22px; }
.status-banner p { margin: 0; color: var(--muted); }
.status-dot { width: 12px; height: 12px; margin-top: 8px; flex: none; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.status-banner.warn .status-dot { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 20%, transparent); }
.status-banner.err .status-dot { background: var(--err); box-shadow: 0 0 0 4px color-mix(in srgb, var(--err) 20%, transparent); }
.status-page .stat small { display: block; margin-top: 2px; font-size: 12px; }
.status-foot { text-align: center; margin: 24px 0 14px; }
.skeleton.sk-banner { height: 100px; margin-bottom: 20px; }
.skeleton.sk-block { height: 180px; }
.skeleton.sk-tall { height: 420px; }
.status-page .cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---------- Page Embeds : aperçu réel et textes ---------- */
.dc-panel + .dc-panel { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.dc-panel-label { margin-bottom: 8px; }
.dc .dc-btns { margin-left: 0; }
.dc-btn.p { background: #5865f2; }
.dc-select { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 220px; padding: 8px 10px; border-radius: 4px; background: #1e1f22; color: #b5bac1; font-size: 13px; }
.kind-tag { display: inline-block; margin-right: 6px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 11px; color: var(--muted); vertical-align: 1px; }
.text-edit { display: flex; gap: 6px; align-items: flex-start; }
.text-edit textarea { flex: 1; }
.text-row.custom .text-edit textarea { border-color: var(--accent); }

/* ---------- Options : sections et options dépendantes ---------- */
.opt-section { margin: 22px 0 2px; padding-top: 14px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.panel-head + .opt-section { margin-top: 0; padding-top: 0; border-top: 0; }
.opt-section + .field { border-top: 0; padding-top: 6px; }
.field[hidden] { display: none; }
.field .ctrl > .mod-chips { width: 100%; }

/* ---------- Personnalisation : vue d'ensemble et menu ---------- */
.edit-bar { align-items: center; border-color: var(--accent); }
.edit-bar > svg { color: var(--accent); }
.w-edit { position: relative; outline: 1px dashed var(--line-2); outline-offset: 3px; cursor: grab; }
.w-edit > :not(.w-tools) { pointer-events: none; user-select: none; }
.w-edit.dragging, .side-row.dragging { opacity: .35; }
.w-edit.drop-before { box-shadow: -4px 0 0 var(--accent); }
.w-edit.drop-after { box-shadow: 4px 0 0 var(--accent); }
.w-wide { grid-column: 1 / -1; }
.w-tools { position: absolute; top: 6px; right: 6px; z-index: 2; display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-solid-2); cursor: default; }
.w-grip { display: grid; place-items: center; width: 22px; color: var(--faint); cursor: grab; }
.w-btn { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); cursor: pointer; }
.w-btn:hover { background: var(--surface-2); color: var(--text); }
.w-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.w-tray { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 24px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.side-head { display: flex; align-items: flex-end; }
.side-head .side-title { flex: 1; min-width: 0; }
.side-head .side-title:disabled { cursor: default; }
.side-head .side-tools { padding-bottom: 2px; }
.side-row.editing { display: flex; align-items: center; cursor: grab; }
.side-row.editing .side-link { flex: 1; min-width: 0; pointer-events: none; }
.side-row.drop-before { box-shadow: 0 -2px 0 var(--accent); }
.side-row.drop-after { box-shadow: 0 2px 0 var(--accent); }
.side-tools { display: flex; flex: none; gap: 0; }
.side-tools .w-btn { width: 24px; height: 24px; }
.side-off .side-link { opacity: .4; }
.side-off .side-link .side-text { text-decoration: line-through; }
.side-customize { display: flex; align-items: center; gap: 8px; width: 100%; margin: 18px 0 6px; padding: 7px 10px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); background: none; color: var(--faint); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; }
.side-customize:hover { color: var(--muted); border-color: var(--faint); }
.side-custom { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.side-custom .side-tip { margin: 8px 4px 10px; }
.side-custom-actions { display: flex; gap: 8px; justify-content: space-between; }
@media (hover: none) { .w-grip { display: none; } }

/* ---------- Formulaires et signalements ---------- */
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.quote { padding: 6px 10px; border-left: 3px solid var(--line-2); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; overflow-wrap: anywhere; }
.q-list { display: grid; gap: 8px; }
.q-row { display: grid; grid-template-columns: 24px minmax(0, 1.3fr) minmax(0, 1fr) 150px auto auto; gap: 8px; align-items: center; }
.q-row .mod-chip { padding: 6px 10px; }
.q-num { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
    .q-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
    .q-row > input:nth-of-type(2), .q-row > select { grid-column: 2 / -1; }
}

/* ---------- Rôles à boutons : lignes de l'éditeur ---------- */
.rm-row { display: grid; grid-template-columns: 24px minmax(0, 1.1fr) 70px minmax(0, 1fr) minmax(0, 1fr) 130px auto; gap: 8px; align-items: center; }
@media (max-width: 900px) {
    .rm-row { grid-template-columns: 24px minmax(0, 1fr) 70px auto; }
    .rm-row > input:nth-of-type(2), .rm-row > input:nth-of-type(3), .rm-row > select:nth-of-type(2) { grid-column: 2 / -1; }
}

/* ---------- Permissions des grades ---------- */
.perm-row { padding: 12px 0; border-top: 1px solid var(--line); }
.panel-head + .perm-row { border-top: 0; padding-top: 4px; }
.perm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.perm-head .l { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.perm-head select { min-width: 220px; }
.perm-note { margin: 6px 0 0; }
.perm-tree { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 10px; }
.perm-cmds { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; max-height: 460px; overflow: auto; }
.perm-cmd { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); align-content: start; }
.perm-check { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; padding: 3px 0; cursor: pointer; font-size: 14px; }
.perm-check input { accent-color: var(--accent); }
.perm-check .muted { grid-column: 2; font-size: 12px; }
.perm-check.sub { padding-left: 20px; }
.perm-check:has(input:disabled) { opacity: .6; cursor: default; }
@media (max-width: 640px) { .perm-head select { min-width: 0; width: 100%; } .perm-cmds { grid-template-columns: 1fr; } }

/* ---------- Tableaux triables ---------- */
.th-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.th-btn:hover, .th-btn.on { color: var(--text); }
.th-btn.on::after { content: ' ↓'; color: var(--accent); }
.table td.muted { color: var(--faint); }

/* ---------- Menu personnalisable : menu flottant, icônes, couleurs, affichage ---------- */
@media (min-width: 861px) { .layout { grid-template-columns: var(--side-w, 256px) minmax(0, 1fr); } }
.popover { position: fixed; z-index: 60; min-width: 220px; max-width: 320px; max-height: 70vh; overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.pop-item svg { color: var(--faint); flex: none; }
.pop-item:hover:not(:disabled), .pop-item:focus-visible { background: var(--surface-2); outline: none; }
.pop-item:disabled { opacity: .4; cursor: default; }
.pop-item.danger, .pop-item.danger svg { color: var(--err); }
.pop-title { padding: 8px 10px 4px; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.icon-grid { display: grid; grid-template-columns: repeat(8, 32px); gap: 2px; padding: 2px 4px; }
.icon-pick { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; color: var(--muted); cursor: pointer; }
.icon-pick:hover, .icon-pick:focus-visible { background: var(--surface-2); color: var(--text); outline: none; }
.icon-pick.on { border-color: var(--accent); color: var(--accent); }
.color-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 6px 6px; }
.color-pick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.color-pick.none { background: linear-gradient(135deg, transparent 45%, var(--faint) 45%, var(--faint) 55%, transparent 55%); border-color: var(--line-2); }
.color-pick.on { outline: 2px solid var(--text); outline-offset: 2px; }
.side-link .mi.tinted { color: var(--c); }
.side-opt { display: flex; align-items: center; gap: 8px; padding: 4px 4px; font-size: 13px; color: var(--muted); cursor: pointer; }
.side-opt input[type=checkbox] { accent-color: var(--accent); }
.side-opt select { margin-left: auto; width: auto; padding: 3px 8px; font-size: 13px; }
.side-custom .pop-title { padding-left: 4px; }
.side-custom .side-custom-actions + .pop-title { margin-top: 6px; }

/* Menu compact */
.sidebar.compact .side-link { padding: 3px 10px; font-size: 13px; }
.sidebar.compact .side-title { padding-top: 12px; padding-bottom: 4px; }
.sidebar.compact .side-row + .side-row { margin-top: 0; }
.sidebar.no-badges .side-extra, .sidebar.no-badges .side-link .new-tag { display: none; }

/* Icônes seulement (ordinateur) */
@media (min-width: 861px) {
    .layout:has(.sidebar.mini) { grid-template-columns: 64px minmax(0, 1fr); }
    .sidebar.mini { padding: 12px 8px 24px; }
    .sidebar.mini .side-text, .sidebar.mini .side-extra, .sidebar.mini .new-tag, .sidebar.mini .side-tip, .sidebar.mini .side-title, .sidebar.mini .side-search > span, .sidebar.mini .side-search kbd, .sidebar.mini .side-customize > span, .sidebar.mini .side-guild > div:not(.g-icon), .sidebar.mini .switcher-chev { display: none; }
    .sidebar.mini .side-head { height: 1px; margin: 10px 6px; background: var(--line); }
    .sidebar.mini .side-link, .sidebar.mini .side-search, .sidebar.mini .side-customize, .sidebar.mini .side-guild { justify-content: center; padding-left: 0; padding-right: 0; }
    .sidebar.mini .side-guild { padding: 6px 0; border: 0; }
    .sidebar.mini .side-guild .g-icon { width: 36px; height: 36px; font-size: 13px; }
    .sidebar.mini .switcher-menu { position: fixed; left: 72px; top: calc(var(--top, 64px) + 8px); width: 260px; }
}

/* ---------- Calendrier ---------- */
.cal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-month { margin: 0 6px; font-size: 18px; font-weight: 600; text-transform: capitalize; min-width: 150px; text-align: center; }
.cal-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cal-filter { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; color: var(--faint); font: 500 13px/1.4 var(--font); cursor: pointer; }
.cal-filter i { width: 8px; height: 8px; border-radius: 2px; background: var(--line-2); }
.cal-filter.on { color: var(--text); border-color: var(--line-2); }
.cal-filter.on i { background: var(--c); }
.cal-filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cal-count { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.cal-panel { padding: 0; overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd { padding: 8px 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); }
.cal-cell { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 104px; padding: 6px; background: transparent; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--text); text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-cell.out { color: var(--faint); }
.cal-cell.out .cal-chip { opacity: .55; }
.cal-cell.picked { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.cal-num { font-family: var(--mono); font-size: 12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 3px; }
.cal-cell.today .cal-num { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.cal-chip { display: block; font-size: 12px; line-height: 1.35; padding: 1px 5px; border-left: 2px solid var(--c); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--faint); margin-right: 4px; }
.cal-abs { color: var(--faint); }
.cal-more { font-family: var(--mono); font-size: 11px; color: var(--faint); padding-left: 7px; }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.cal-list { display: grid; }
.cal-item { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.cal-item:first-child { border-top: 0; }
.cal-item:hover b { color: var(--accent); }
.cal-time { font-family: var(--mono); font-size: 12px; color: var(--muted); border-left: 2px solid var(--c); padding-left: 8px; align-self: start; }
.cal-body { display: grid; min-width: 0; }
.cal-body b { font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 720px) {
    .cal-cell { min-height: 54px; padding: 4px; align-items: center; }
    .cal-chip, .cal-more { display: none; }
    .cal-dots { display: flex; justify-content: center; }
    .cal-wd { padding: 6px 2px; text-align: center; letter-spacing: 0; }
    .cal-month { min-width: 0; }
    .cal-item { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Éditeur du site web ---------- */
.site-save { display: flex; align-items: center; gap: 12px; }
.site-url { display: flex; align-items: center; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-solid-2); min-width: 0; }
.site-url span { padding: 0 2px 0 11px; color: var(--faint); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.site-url .input { border: 0; background: transparent; padding-left: 2px; font-family: var(--mono); font-size: 13px; min-width: 80px; }
.site-link { margin: -4px 0 10px; overflow-wrap: anywhere; }
.site-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.site-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.site-template, .site-add-btn { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.site-template:hover, .site-add-btn:hover { border-color: var(--accent); background: var(--surface-2); }
.site-template span, .site-add-btn small { color: var(--faint); font-size: 12.5px; line-height: 1.35; }
.site-pages { align-items: center; margin-bottom: 8px; }
.site-page-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; font-family: var(--mono); }
.site-blocks { display: grid; gap: 8px; }
.site-block { border: 1px solid var(--line); border-radius: var(--radius); }
.site-block.open { border-color: var(--line-2); }
.site-block-head { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; }
.site-block-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius-sm); }
.site-block-title:hover { background: var(--surface-2); }
.site-block-title .mi { color: var(--faint); display: grid; flex: none; }
.site-block.open .site-block-title .mi { color: var(--accent); }
.site-block-title b { font-weight: 500; flex: none; }
.site-block-title .muted { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-block-title .chev { color: var(--faint); display: grid; transition: transform .12s; }
.site-block.open .site-block-title .chev { transform: rotate(90deg); }
.site-block-body { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.site-rows { display: grid; gap: 8px; width: 100%; justify-items: start; }
.site-row { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.site-row-fields { flex: 1; min-width: 0; display: grid; gap: 6px; }
.site-target { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 6px; }
.site-warn { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; padding: 8px 10px; border: 1px solid rgba(226, 179, 74, .4); border-radius: var(--radius-sm); color: var(--warn); font-size: 13.5px; }
.site-warn svg { flex: none; margin-top: 2px; }
.site-warn a { color: var(--text); }
.site-add { margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--line); }
.site-add-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.site-add-btn { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 12px; }
.site-add-btn .mi { color: var(--faint); display: grid; margin-top: 2px; }
.site-add-btn > span:last-child { display: grid; }
.site-add-btn b { font-weight: 500; font-size: 14px; }
@media (max-width: 640px) {
    .site-target { grid-template-columns: 1fr; }
    .site-row { flex-direction: column; }
    .site-block-title .muted { display: none; }
}

/* Éditeur du site : accès des pages, statistiques de visites */
.site-access { width: auto; max-width: 190px; padding: 5px 8px; font-size: 12.5px; font-family: var(--font); }
.site-pages .tab svg { margin-left: 5px; vertical-align: -1px; color: var(--faint); }
.site-days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; height: 120px; align-items: end; }
.site-day { display: grid; grid-template-rows: 1fr auto; align-items: end; justify-items: center; gap: 4px; height: 100%; min-width: 0; }
.site-day i { width: 100%; max-width: 34px; background: var(--accent); border-radius: 2px 2px 0 0; opacity: .85; }
.site-day:hover i { opacity: 1; }
.site-day span { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.site-top-pages { margin-top: 18px; display: grid; gap: 6px; }
.site-top-page { display: grid; grid-template-columns: minmax(90px, 180px) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 13.5px; }
.site-top-page span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-top-page b { font-family: var(--mono); font-weight: 500; font-size: 12.5px; }
.site-top-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.site-top-bar i { display: block; height: 100%; background: var(--line-2); }

/* Garry's Mod : étapes d'installation, clé, message vers le jeu */
.gmod-steps { margin: 4px 0 16px; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.gmod-steps li { counter-increment: step; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding-left: 34px; position: relative; min-height: 26px; }
.gmod-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.gmod-steps li > span { flex: 1; min-width: 200px; }
.gmod-steps code, .panel p code { font-family: var(--mono); font-size: 12.5px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 3px; }
.gmod-key { display: flex; gap: 6px; width: 100%; flex-wrap: wrap; }
.gmod-key .input { flex: 1; min-width: 180px; }
.gmod-say { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.gmod-say .input { flex: 1; min-width: 200px; }

/* Site web v2.11 : thèmes prêts et apparence d'un bloc */
.site-presets { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); width: 100%; }
.site-swatch { display: flex; gap: 0; margin-bottom: 4px; }
.site-swatch i { width: 22px; height: 14px; border: 1px solid var(--line-2); }
.site-swatch i:first-child { border-radius: 3px 0 0 3px; }
.site-swatch i:last-child { border-radius: 0 3px 3px 0; border-left: 0; }
.site-style { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.site-style summary { display: flex; align-items: center; gap: 8px; padding: 8px 0; cursor: pointer; color: var(--muted); font-weight: 500; list-style: none; }
.site-style summary::-webkit-details-marker { display: none; }
.site-style summary:hover, .site-style[open] summary { color: var(--text); }
.site-style summary .badge { margin-left: 4px; }

/* Personnalisation v2.12 : identité des messages */
.perso-links { margin-bottom: 16px; }
.perso-links .quick { align-items: flex-start; }
.perso-links .quick > span:last-child { display: grid; gap: 2px; text-align: left; }
.perso-links small { font-size: 12.5px; line-height: 1.35; }
.id-status { display: grid; gap: 8px; width: 100%; }
.id-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.id-status-row > b { width: 130px; flex: none; font-weight: 500; }
.id-status-row .id-sample { flex: 1 1 240px; }
.id-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 100%; padding-left: 142px; }
.id-controls .site-colors { flex-wrap: nowrap; }
.id-emoji { width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; display: inline-block; }
.id-status-row:last-child { border-bottom: 0; }
.id-sample { display: flex; align-items: stretch; gap: 10px; min-width: 0; padding: 6px 10px 6px 0; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 13.5px; overflow: hidden; }
.id-sample-bar { width: 4px; flex: none; border-radius: 2px 0 0 2px; }
.id-sample span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .id-controls { padding-left: 0; } .id-controls .site-colors { flex-wrap: wrap; } }
