/* Zymeral Control — même identité que le site (couleurs, Syne / DM Sans, boutons à halo). */
:root {
  --bg: #0b0c14; --surface: #12131f; --surface2: #1a1b2e; --surface3: #222339;
  --accent: #c084fc; --accent2: #818cf8; --accent3: #38bdf8;
  --green: #34d399; --gold: #fbbf24; --red: #f87171;
  --text: #e2e8f0; --muted: #94a3b8; --muted2: #64748b;
  --border: rgba(192, 132, 252, .15); --border-strong: rgba(192, 132, 252, .4);
  --grad: linear-gradient(135deg, var(--accent), var(--accent2));
  --glow: 0 0 24px rgba(192, 132, 252, .35); --glow-strong: 0 0 36px rgba(192, 132, 252, .5);
  --radius: 14px; --nav: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.6 'DM Sans', system-ui, sans-serif; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 60% 45% at 50% 0%, rgba(129, 140, 248, .16), transparent 70%), radial-gradient(ellipse 40% 35% at 85% 60%, rgba(192, 132, 252, .09), transparent 60%), radial-gradient(ellipse 30% 30% at 8% 85%, rgba(56, 189, 248, .06), transparent 60%); }
body::after { content: ''; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #d8b4fe; }
code { font-family: ui-monospace, 'Courier New', monospace; font-size: .85em; color: var(--accent); background: rgba(192, 132, 252, .1); padding: .1rem .4rem; border-radius: 5px; }
h1, h2, h3, h4 { font-family: 'Syne', sans-serif; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
::selection { background: rgba(192, 132, 252, .35); }
:focus-visible { outline: 2px solid var(--accent3); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── Barre de navigation (.nav du site) ── */
.zy-nav { position: sticky; top: 0; z-index: 100; height: var(--nav); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 clamp(1rem, 3vw, 2.5rem); background: rgba(11, 12, 20, .88); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.zy-nav-logo { display: flex; align-items: center; gap: .55rem; }
.zy-nav-logo img { border-radius: 50%; }
.zy-nav-logo span { font: 800 1.2rem 'Syne', sans-serif; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.zy-nav-logo em { font-style: normal; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--border); border-radius: 100px; padding: .15rem .55rem; background: rgba(192, 132, 252, .08); }
.zy-nav-right { display: flex; align-items: center; gap: .6rem; }
.zy-nav-link { color: var(--muted); font-size: .85rem; font-weight: 500; padding: .42rem .85rem; border-radius: 8px; transition: color .2s, background .2s; }
.zy-nav-link:hover { color: var(--text); background: rgba(192, 132, 252, .08); }
.zy-user-menu { position: relative; }
.zy-user-menu summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .3rem .7rem .3rem .3rem; border: 1px solid var(--border); border-radius: 100px; font-size: .85rem; font-weight: 600; }
.zy-user-menu summary::-webkit-details-marker { display: none; }
.zy-user-menu summary img, .zy-avatar-fallback { width: 28px; height: 28px; border-radius: 50%; }
.zy-avatar-fallback { display: grid; place-items: center; background: var(--grad); color: #fff; font-size: .8rem; }
.zy-user-pop { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 190px; padding: .4rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.zy-user-pop a, .zy-user-pop button { display: block; width: 100%; text-align: left; padding: .55rem .75rem; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; font-size: .88rem; cursor: pointer; }
.zy-user-pop a:hover, .zy-user-pop button:hover { background: rgba(192, 132, 252, .1); }
.zy-user-pop button { color: var(--red); }

/* ── Boutons (.btn-primary / .btn-secondary du site) ── */
.zy-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 42px; padding: .7rem 1.4rem; border-radius: 12px; border: 1px solid transparent; font: 600 .9rem 'DM Sans', sans-serif; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, opacity .2s; white-space: nowrap; }
.zy-btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.zy-btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.zy-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--glow-strong); color: #fff; }
.zy-btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.zy-btn-ghost:hover:not(:disabled) { background: rgba(192, 132, 252, .08); border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.zy-btn-danger { background: transparent; color: var(--red); border-color: rgba(248, 113, 113, .35); }
.zy-btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, .1); border-color: var(--red); }
.zy-btn-sm { min-height: 34px; padding: .4rem .9rem; font-size: .82rem; border-radius: 10px; }
.zy-btn-lg { min-height: 52px; padding: .85rem 1.8rem; font-size: .95rem; }
.zy-icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; font-size: .9rem; }
.zy-icon-btn:hover { color: var(--red); background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); }

/* ── Page de connexion (#home du site) ── */
.zy-hero { min-height: calc(100vh - var(--nav)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4rem 1.25rem 3rem; }
.zy-hero > * { animation: fadeUp .7s ease both; }
.zy-hero > :nth-child(2) { animation-delay: .08s; } .zy-hero > :nth-child(3) { animation-delay: .16s; } .zy-hero > :nth-child(4) { animation-delay: .24s; } .zy-hero > :nth-child(n+5) { animation-delay: .32s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.zy-hero-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem 1rem; border: 1px solid var(--border); border-radius: 100px; background: rgba(192, 132, 252, .1); color: var(--accent); font-size: .8rem; font-weight: 500; margin-bottom: 2rem; }
.zy-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.zy-hero-title { font-size: clamp(2.8rem, 8vw, 6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-bottom: 1.5rem; }
.zy-gradient { background: linear-gradient(120deg, #c084fc 0%, #818cf8 40%, #38bdf8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.zy-hero-sub { max-width: 560px; color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.15rem); line-height: 1.7; margin: 0 0 2.5rem; }
.zy-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.zy-stats-band { display: flex; gap: clamp(1.5rem, 5vw, 3rem); flex-wrap: wrap; justify-content: center; margin-top: 3.5rem; }
.zy-stats-band strong { display: block; font: 800 2rem 'Syne', sans-serif; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.zy-stats-band span { font-size: .75rem; color: var(--muted2); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.zy-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .85rem; width: 100%; max-width: 920px; margin-top: 3.5rem; text-align: left; }
.zy-feature { display: flex; gap: .8rem; align-items: center; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .2s, border-color .2s, background .2s; }
.zy-feature:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface2); }
.zy-feature > span { font-size: 1.4rem; }
.zy-feature strong { display: block; font-size: .9rem; }
.zy-feature small { color: var(--muted2); font-size: .78rem; }
.zy-fineprint { margin-top: 2.5rem; color: var(--muted2); font-size: .8rem; max-width: 520px; }

/* ── Conteneurs ── */
.zy-container { max-width: 1100px; margin: 0 auto; padding: 3.5rem clamp(1rem, 4vw, 2rem) 4rem; }
.zy-narrow { max-width: 620px; }
.zy-section-header { margin-bottom: 2rem; }
.zy-eyebrow { margin: 0 0 .45rem; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.zy-section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; }
.zy-section-desc { color: var(--muted); margin: .6rem 0 0; }
.zy-h2 { font-size: 1.25rem; margin: 2rem 0 1rem; }
.zy-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: clamp(1.1rem, 2.5vw, 1.6rem); margin-bottom: 1rem; }
.zy-card h2, .zy-card h3 { font-size: 1.05rem; margin-bottom: .8rem; }
.zy-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.zy-card-head h2 { margin: 0; }
.zy-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.zy-two-col > .zy-card { margin-bottom: 0; }
.zy-empty { text-align: center; color: var(--muted); padding: 2rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius); margin-bottom: 1rem; }
.zy-hint { display: block; color: var(--muted2); font-size: .8rem; line-height: 1.5; margin-top: .35rem; }
.zy-readonly { margin: 0; padding: .6rem .9rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; color: var(--muted); }
.zy-error-card { text-align: center; }
.zy-error-card p:not(.zy-eyebrow) { color: var(--muted); margin: 1rem 0 1.5rem; }

/* ── Alertes et notifications ── */
.zy-alert { padding: .85rem 1.1rem; border-radius: 12px; margin-bottom: 1rem; border: 1px solid; font-size: .9rem; }
.zy-alert-ok { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .35); color: #6ee7b7; }
.zy-alert-err { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .35); color: #fca5a5; }
.zy-alert-warn { background: rgba(251, 191, 36, .07); border-color: rgba(251, 191, 36, .3); color: var(--gold); }
.zy-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 200; padding: .65rem 1.2rem; border-radius: 12px; background: var(--surface2); border: 1px solid var(--border); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); font-size: .88rem; }

/* ── Choix du serveur ── */
.zy-search { width: 100%; padding: .65rem 1rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font: inherit; font-size: .88rem; outline: none; transition: border-color .2s; }
.zy-search:focus { border-color: var(--accent); }
.zy-server-search { max-width: 380px; margin-bottom: 1.25rem; }
.zy-server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.zy-server-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .9rem; padding: 1.6rem 1.2rem 1.3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; transition: transform .2s, border-color .2s, background .2s; }
.zy-server-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface2); }
.zy-server-card.is-absent { opacity: .75; }
.zy-server-icon img, .zy-server-icon span { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; font: 800 1.6rem 'Syne', sans-serif; background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(129, 140, 248, .25); }
.zy-server-info h2 { font-size: 1rem; overflow-wrap: anywhere; }
.zy-server-info span { color: var(--muted2); font-size: .8rem; }
.zy-server-card .zy-btn { width: 100%; }

/* ── Disposition avec barre latérale ── */
.zy-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 0; min-height: calc(100vh - var(--nav)); }
.zy-sidebar { position: sticky; top: var(--nav); height: calc(100vh - var(--nav)); overflow-y: auto; padding: 1.2rem .9rem 2rem; border-right: 1px solid var(--border); background: rgba(13, 14, 23, .6); scrollbar-width: thin; scrollbar-color: var(--surface3) transparent; }
.zy-guild-card { display: flex; align-items: center; gap: .75rem; padding: .75rem; margin-bottom: .9rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 14px; }
.zy-guild-card img, .zy-guild-fallback { width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; }
.zy-guild-card strong { display: block; font-size: .92rem; line-height: 1.25; overflow-wrap: anywhere; }
.zy-guild-card small { color: var(--muted2); font-size: .76rem; }
.zy-sidebar .zy-search { margin-bottom: .8rem; }
.zy-side-nav { display: flex; flex-direction: column; gap: .25rem; }
.zy-side-nav a { display: flex; align-items: center; gap: .5rem; padding: .5rem .7rem; border-radius: 9px; color: var(--muted); font-size: .86rem; line-height: 1.3; border: 1px solid transparent; transition: color .15s, background .15s; }
.zy-side-nav a:hover { color: var(--text); background: rgba(192, 132, 252, .07); }
.zy-side-nav a.is-active { color: var(--accent); background: rgba(192, 132, 252, .1); border-color: rgba(192, 132, 252, .25); box-shadow: inset 3px 0 var(--accent); }
.zy-side-nav a i { margin-left: auto; font-style: normal; font-size: .75rem; }
.zy-side-nav a.is-locked { opacity: .55; }
.zy-side-top { font-weight: 600; color: var(--text) !important; }
.zy-side-family > summary { list-style: none; display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border-radius: 9px; cursor: pointer; font-size: .84rem; font-weight: 600; color: var(--text); user-select: none; }
.zy-side-family > summary::-webkit-details-marker { display: none; }
.zy-side-family > summary::after { content: '›'; margin-left: .2rem; color: var(--muted2); transition: transform .2s; }
.zy-side-family[open] > summary::after { transform: rotate(90deg); }
.zy-side-family > summary:hover { background: rgba(192, 132, 252, .06); }
.zy-side-family > summary em { margin-left: auto; font-style: normal; font-size: .7rem; color: var(--muted2); background: rgba(255, 255, 255, .05); border-radius: 100px; padding: .05rem .5rem; }
.zy-side-family > div { display: flex; flex-direction: column; gap: .15rem; margin: .1rem 0 .5rem .9rem; padding-left: .55rem; border-left: 1px solid var(--border); }
.zy-side-sep { height: 1px; background: var(--border); margin: .7rem .4rem; }
.zy-side-warn { margin-top: 1rem; padding: .7rem; font-size: .76rem; color: var(--gold); background: rgba(251, 191, 36, .06); border: 1px solid rgba(251, 191, 36, .25); border-radius: 10px; }
.zy-dot-status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted2); }
.zy-dot-status.on { background: var(--green); box-shadow: 0 0 8px rgba(52, 211, 153, .6); }
.zy-side-toggle { display: none; }
.zy-main { padding: clamp(1.2rem, 3vw, 2.2rem) clamp(1rem, 3vw, 2.5rem) 5rem; min-width: 0; max-width: 1240px; }

/* ── En-tête de module ── */
.zy-module-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.zy-module-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.zy-module-desc { color: var(--muted); margin: .5rem 0 0; max-width: 760px; }
.zy-sources { margin: .6rem 0 0; font-size: .76rem; color: var(--muted2); font-family: ui-monospace, monospace; }

/* ── Formulaires (.cform du site) ── */
.zy-module-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.zy-module-grid.has-preview { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
.zy-form { margin-bottom: 1rem; }
.zy-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.5rem; }
.zy-field { min-width: 0; display: flex; flex-direction: column; }
.zy-field.is-wide { grid-column: 1 / -1; }
.zy-field.has-error input, .zy-field.has-error select, .zy-field.has-error textarea { border-color: var(--red) !important; }
.zy-field-error { margin: .4rem 0 0; color: #fca5a5; font-size: .8rem; }
.zy-label { display: block; margin-bottom: .45rem; font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.zy-label em { font-style: normal; font-weight: 500; color: var(--muted2); }
.zy-app input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), .zy-app select, .zy-app textarea, .zy-plain input:not([type=checkbox]):not([type=radio]), .zy-plain select, .zy-plain textarea {
  width: 100%; min-height: 42px; padding: .6rem .85rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font: inherit; font-size: .9rem; outline: none; transition: border-color .2s, background .2s, box-shadow .2s; }
.zy-app input:focus, .zy-app select:focus, .zy-app textarea:focus, .zy-plain input:focus, .zy-plain select:focus { border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 3px rgba(192, 132, 252, .12); }
.zy-app input::placeholder, .zy-app textarea::placeholder { color: var(--muted2); }
.zy-app textarea { resize: vertical; line-height: 1.55; min-height: 90px; }
.zy-app select, .zy-plain select { appearance: none; cursor: pointer; padding-right: 2.3rem; 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='%2394a3b8' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; }
.zy-app select[multiple] { background-image: none; padding-right: .85rem; min-height: 110px; }
.zy-app select option, .zy-app select optgroup, .zy-plain select option { background: var(--surface2); color: var(--text); }
.zy-app input[type=checkbox], .zy-app input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.zy-check { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); margin-top: .5rem; cursor: pointer; }

/* Interrupteur */
.zy-switch { display: inline-flex; align-items: center; gap: .7rem; cursor: pointer; user-select: none; min-height: 42px; }
.zy-switch input[type=checkbox] { position: absolute; opacity: 0; width: 1px !important; height: 1px !important; }
.zy-switch-track { position: relative; width: 46px; height: 26px; border-radius: 100px; background: var(--surface3); border: 1px solid var(--border); transition: background .2s, border-color .2s, box-shadow .2s; flex: none; }
.zy-switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.zy-switch input:checked + .zy-switch-track { background: var(--grad); border-color: transparent; box-shadow: 0 0 16px rgba(192, 132, 252, .35); }
.zy-switch input:checked + .zy-switch-track::after { transform: translateX(20px); background: #fff; }
.zy-switch input:focus-visible + .zy-switch-track { outline: 2px solid var(--accent3); outline-offset: 2px; }
.zy-switch-label { font-size: .88rem; font-weight: 600; color: var(--muted); }
.zy-switch input:checked ~ .zy-switch-label { color: var(--text); }

/* Choix segmenté (.tab-switcher du site) */
.zy-segmented { display: inline-flex; flex-wrap: wrap; gap: 0; padding: 4px; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; max-width: 100%; align-self: flex-start; }
.zy-segmented label { position: relative; cursor: pointer; flex: 1 1 auto; }
.zy-segmented label span { width: 100%; justify-content: center; }
.zy-segmented input { position: absolute; opacity: 0; width: 1px !important; height: 1px !important; }
.zy-segmented span { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem 1rem; border-radius: 9px; font-size: .84rem; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; white-space: nowrap; }
.zy-segmented span small { font-weight: 500; opacity: .75; }
.zy-segmented label:hover span { color: var(--text); }
.zy-segmented input:checked + span { background: var(--grad); color: #fff; box-shadow: 0 0 16px rgba(192, 132, 252, .3); }
.zy-segmented input:focus-visible + span { outline: 2px solid var(--accent3); outline-offset: 1px; }

/* Couleur, nombres, préfixes, durées */
.zy-color { display: flex; gap: .5rem; }
.zy-color input[type=color] { width: 46px; height: 42px; flex: none; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); cursor: pointer; }
.zy-number, .zy-affix, .zy-duration { display: flex; align-items: stretch; }
.zy-number input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.zy-number span, .zy-affix span { display: flex; align-items: center; padding: 0 .8rem; font-size: .82rem; color: var(--muted); background: rgba(192, 132, 252, .06); border: 1px solid var(--border); white-space: nowrap; }
.zy-number span { border-left: 0; border-radius: 0 10px 10px 0; }
.zy-affix span { border-right: 0; border-radius: 10px 0 0 10px; }
.zy-affix input { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.zy-duration { gap: .5rem; }
.zy-duration input { flex: 1; } .zy-duration select { flex: 0 0 140px; }

/* Variables insérables */
.zy-vars { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.zy-var { font: .74rem ui-monospace, monospace; padding: .2rem .5rem; border-radius: 6px; border: 1px solid var(--border); background: rgba(192, 132, 252, .06); color: var(--accent); cursor: pointer; }
.zy-var:hover { border-color: var(--accent); }

/* Puces (mots, domaines) */
.zy-chips { border: 1px solid var(--border); border-radius: 12px; background: var(--surface2); padding: .5rem; }
.zy-chips:focus-within { border-color: var(--accent); }
.zy-chips-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.zy-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .35rem .25rem .7rem; border-radius: 100px; background: rgba(192, 132, 252, .12); border: 1px solid var(--border); font-size: .82rem; }
.zy-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 .3rem; font-size: 1rem; line-height: 1; }
.zy-chip button:hover { color: var(--red); }
.zy-app .zy-chips-input { border: 0 !important; background: transparent !important; box-shadow: none !important; min-height: 34px !important; padding: .3rem .4rem !important; }
.zy-chips.is-enhanced [data-chips-source] { display: none; }

/* Listes à cocher (salons, rôles) */
.zy-picker { border: 1px solid var(--border); border-radius: 12px; background: var(--surface2); overflow: hidden; }
.zy-app .zy-picker-search { border: 0 !important; border-bottom: 1px solid var(--border) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.zy-picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .25rem; max-height: 280px; overflow-y: auto; padding: .5rem; }
.zy-picker-item { display: flex; align-items: center; gap: .55rem; padding: .4rem .55rem; border-radius: 8px; cursor: pointer; font-size: .86rem; min-width: 0; }
.zy-picker-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zy-picker-item small { margin-left: auto; color: var(--muted2); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.zy-picker-item:hover { background: rgba(192, 132, 252, .07); }
.zy-picker-item:has(input:checked) { background: rgba(192, 132, 252, .13); color: var(--text); }
.zy-picker-foot { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; padding: .45rem .8rem; border-top: 1px solid var(--border); font-size: .76rem; color: var(--muted2); }
.zy-warn { color: var(--gold); }

/* Membres */
.zy-user-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .4rem; }
.zy-user { display: flex; align-items: center; gap: .6rem; padding: .45rem .55rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.zy-user > span:nth-child(2) { min-width: 0; flex: 1; }
.zy-user strong { display: block; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zy-user code { font-size: .7rem; }
.zy-user-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--grad); color: #fff; }
.zy-inline-add { display: flex; gap: .5rem; }
.zy-inline-add input, .zy-inline-add select { flex: 1; }
.zy-users.is-enhanced [data-user-source] { display: none; }

/* Tableaux éditables (boutons, champs, paliers…) */
.zy-rows.is-enhanced [data-rows-source] { display: none; }
.zy-rows-list { display: flex; flex-direction: column; gap: .5rem; }
.zy-row { display: grid; grid-template-columns: var(--cols); gap: .5rem; align-items: start; padding: .65rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; }
.zy-row-cell { display: flex; flex-direction: column; min-width: 0; }
.zy-row-cell > span { font-size: .7rem; color: var(--muted2); margin-bottom: .25rem; font-weight: 600; letter-spacing: .02em; }
.zy-app .zy-row-cell textarea { min-height: 42px; }
.zy-row-tools { display: flex; gap: .1rem; align-self: center; padding-top: 1rem; }
.zy-row-tools .zy-icon-btn { width: 28px; padding: 0; }
.zy-rows-foot { display: flex; align-items: center; gap: 1rem; margin-top: .6rem; }
.zy-rows-error { color: #fca5a5; font-size: .8rem; margin: .4rem 0 0; }

/* Permissions */
.zy-perm-grid { display: flex; flex-direction: column; gap: .4rem; }
.zy-perm-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(240px, 300px); gap: .4rem 1rem; align-items: center; padding: .55rem .75rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; }
.zy-perm-row strong { display: block; font-size: .88rem; }
.zy-perm-row small { color: var(--muted2); font-size: .74rem; }
.zy-perm-row .zy-perm-roles { grid-column: 1 / -1; }
.zy-perm-new { grid-template-columns: minmax(170px, 1fr) minmax(240px, 300px); }
.zy-subhead { font-size: .9rem; margin: 1.2rem 0 .6rem; }
.zy-filter { margin-bottom: .7rem; }
.zy-subfield { margin-bottom: .8rem; }
.zy-subfield label { display: block; font-size: .82rem; margin-bottom: .3rem; color: var(--text); }

/* Barre d'enregistrement */
.zy-savebar { position: sticky; bottom: 1rem; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: .6rem; margin-top: 1.4rem; padding: .7rem .8rem .7rem 1rem; background: rgba(26, 27, 46, .92); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 14px; }
.zy-save-state { margin-right: auto; font-size: .82rem; color: var(--muted2); }
.zy-form.is-dirty .zy-savebar { border-color: var(--border-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, .35), var(--glow); }
.zy-form.is-dirty .zy-save-state { color: var(--gold); }
.zy-danger-zone { margin-top: 1.5rem; border: 1px dashed rgba(248, 113, 113, .3); border-radius: 14px; padding: .8rem 1rem; }
.zy-danger-zone summary { cursor: pointer; color: var(--red); font-size: .85rem; font-weight: 600; }
.zy-danger-zone p { color: var(--muted); font-size: .85rem; }

/* Aperçu Discord */
.zy-preview { position: sticky; top: calc(var(--nav) + 1rem); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.1rem; }
.zy-preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.zy-preview-head .zy-eyebrow { margin: 0; }
.zy-live { font-size: .7rem; color: var(--green); }
.zy-discord { display: flex; gap: .8rem; padding: 1rem; background: #313338; border-radius: 10px; color: #dbdee1; font-family: 'gg sans', 'DM Sans', sans-serif; }
.zy-discord-avatar { border-radius: 50%; flex: none; }
.zy-discord-body { min-width: 0; flex: 1; font-size: .9rem; }
.zy-discord-author { font-weight: 600; color: #f2f3f5; margin-bottom: .2rem; }
.zy-discord-author time { font-weight: 400; color: #949ba4; font-size: .72rem; margin-left: .3rem; }
.zy-bot-tag { display: inline-block; font-size: .62rem; font-weight: 700; background: #5865f2; color: #fff; border-radius: 4px; padding: .05rem .3rem; vertical-align: 1px; }
.zy-embed { margin-top: .3rem; padding: .7rem .9rem .8rem; background: #2b2d31; border-left: 4px solid var(--accent); border-radius: 4px; max-width: 520px; }
.zy-embed strong { display: block; color: #f2f3f5; margin-bottom: .35rem; }
.zy-embed p, .zy-plain-msg { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.zy-embed img { display: block; max-width: 100%; border-radius: 6px; margin-top: .6rem; }
.zy-embed-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: .5rem; }
.zy-embed-fields > div { grid-column: 1 / -1; font-size: .82rem; } .zy-embed-fields > div.inline { grid-column: auto; }
.zy-embed-fields b { display: block; color: #f2f3f5; }
.zy-embed footer { margin-top: .5rem; font-size: .72rem; color: #b5bac1; }
.zy-discord-buttons { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.zy-discord-buttons span { padding: .35rem .8rem; border-radius: 4px; color: #fff; font-size: .82rem; font-weight: 500; }
.zy-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }

/* Actions et blocs particuliers */
.zy-presets, .zy-publish { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.zy-presets p { margin: .2rem 0 0; }
.zy-preset-buttons, .zy-publish-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.zy-publish-actions form { margin: 0; }
.zy-publish-state { display: flex; flex-direction: column; gap: .15rem; padding-left: .9rem; border-left: 3px solid var(--green); }
.zy-publish-state.is-warn { border-left-color: var(--gold); }
.zy-publish-state span { color: var(--muted); font-size: .85rem; }
.zy-locked p { margin: 0 0 .3rem; }

/* Catalogues */
.zy-collection-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.zy-collection-head .zy-search { max-width: 280px; }
.zy-count { color: var(--muted); font-size: .85rem; }
.zy-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: .55rem; transition: border-color .2s; }
.zy-item[open] { border-color: var(--border-strong); }
.zy-item > summary { list-style: none; display: flex; align-items: center; gap: .8rem; padding: .85rem 1.1rem; cursor: pointer; }
.zy-item > summary::-webkit-details-marker { display: none; }
.zy-item > summary span { color: var(--muted); font-size: .84rem; }
.zy-item > summary code { margin-left: auto; }
.zy-item > form, .zy-item > .zy-form { padding: 0 1.1rem 1.1rem; margin: 0; }
.zy-new-item > summary { cursor: pointer; font-weight: 600; color: var(--accent); list-style: none; }
.zy-new-item > summary::-webkit-details-marker { display: none; }
.zy-new-item[open] > summary { margin-bottom: 1rem; }
.zy-row-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.zy-row-item { display: flex; align-items: center; gap: .7rem; padding: .5rem .7rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; }
.zy-row-item form { margin-left: auto; }
.zy-pill { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); background: rgba(192, 132, 252, .1); border: 1px solid var(--border); border-radius: 100px; padding: .15rem .55rem; }
.zy-cmd-cat { margin-top: .5rem; }
.zy-cmd-cat > summary b.zy-off { color: var(--red); font-weight: 600; }
.zy-cat-toggle { margin: 0 1.1rem .7rem; }
.zy-cmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .35rem; padding: 0 1.1rem 1rem; }
.zy-cmd { display: grid; grid-template-columns: auto 1fr; gap: .1rem .55rem; align-items: center; padding: .45rem .6rem; border-radius: 9px; background: var(--surface2); border: 1px solid transparent; cursor: pointer; }
.zy-cmd:has(input:checked) { border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .06); }
.zy-cmd:has(input:checked) code { color: var(--red); text-decoration: line-through; }
.zy-cmd small { grid-column: 2; color: var(--muted2); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zy-savebar-floating { position: sticky; bottom: 1rem; }
.zy-change-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .3rem; max-height: 50vh; overflow: auto; }
.zy-change-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .7rem; background: var(--surface2); border-radius: 8px; font-size: .84rem; }
.zy-change-list code { max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Vue d'ensemble ── */
.zy-overview-hero { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: clamp(1.4rem, 3vw, 2.2rem); margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 22px; background: radial-gradient(circle at 88% 30%, rgba(192, 132, 252, .22), transparent 42%), radial-gradient(circle at 10% 120%, rgba(56, 189, 248, .12), transparent 45%), linear-gradient(120deg, var(--surface), var(--surface2)); }
.zy-overview-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; overflow-wrap: anywhere; }
.zy-overview-hero p:not(.zy-eyebrow) { color: var(--muted); margin: .5rem 0 0; }
.zy-hero-ring { --p: 0; flex: none; width: 128px; height: 128px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, var(--surface) 78%, transparent 80% 100%), conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface3) 0); }
.zy-hero-ring strong { font: 800 1.9rem 'Syne', sans-serif; line-height: 1; }
.zy-hero-ring span { font-size: .68rem; color: var(--muted); line-height: 1.3; }
.zy-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.zy-stat { padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.zy-stat span { display: block; color: var(--muted2); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.zy-stat strong { display: block; margin-top: .4rem; font: 800 1.9rem 'Syne', sans-serif; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.zy-stat strong i { font-style: normal; font-size: 1rem; -webkit-text-fill-color: var(--muted2); }
.zy-bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: .5rem; }
.zy-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .3rem; height: 100%; min-width: 0; }
.zy-bar span { width: 100%; max-width: 30px; border-radius: 6px 6px 2px 2px; background: var(--grad); box-shadow: 0 0 12px rgba(192, 132, 252, .2); }
.zy-bar small { font-size: .65rem; color: var(--muted2); }
.zy-protections { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.zy-protections li { display: flex; align-items: center; gap: .55rem; padding: .5rem .65rem; background: var(--surface2); border-radius: 9px; font-size: .84rem; }
.zy-protections em { margin-left: auto; font-style: normal; font-size: .72rem; color: var(--muted2); }
.zy-todo-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.zy-todo-list a { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: 10px; background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-size: .86rem; }
.zy-todo-list a:hover { border-color: var(--accent); }
.zy-todo-list em { font-style: normal; color: var(--accent); }
.zy-family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.zy-family-card { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: 'i t n' 'i p p'; gap: .3rem .9rem; align-items: center; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; color: var(--text); transition: transform .2s, border-color .2s, background .2s; }
.zy-family-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface2); color: var(--text); }
.zy-family-icon { grid-area: i; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: rgba(192, 132, 252, .1); }
.zy-family-card > div { grid-area: t; min-width: 0; }
.zy-family-card strong { display: block; font-size: .95rem; }
.zy-family-card small { display: block; color: var(--muted2); font-size: .76rem; line-height: 1.4; }
.zy-family-card em { grid-area: n; font-style: normal; font-size: .76rem; color: var(--muted); align-self: start; }
.zy-family-progress { grid-area: p; height: 4px; border-radius: 4px; background: var(--surface3); overflow: hidden; }
.zy-family-progress i { display: block; height: 100%; background: var(--grad); border-radius: 4px; }


/* ── Outils : onglets, tableaux, graphiques ── */
.zy-side-tools { display: flex; flex-direction: column; gap: .15rem; margin: .35rem 0 .2rem; }
.zy-side-tools a { font-weight: 500 !important; }
.zy-side-label { margin: .8rem .7rem .3rem; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted2); }
.zy-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: .3rem; padding: 4px; margin-bottom: 1.2rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; width: fit-content; max-width: 100%; }
.zy-tabs a { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .95rem; border-radius: 9px; color: var(--muted); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.zy-tabs a:hover { color: var(--text); }
.zy-tabs a.is-active { background: var(--grad); color: #fff; box-shadow: 0 0 16px rgba(192, 132, 252, .3); }
.zy-tabs-sm a { padding: .35rem .8rem; font-size: .8rem; }
.zy-seg-link { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem 1rem; border-radius: 9px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.zy-seg-link.is-active { background: var(--grad); color: #fff; }
.zy-segmented:has(.zy-seg-link) { margin-bottom: 1rem; }
.zy-filter-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.zy-filter-row input, .zy-filter-row select { flex: 1 1 200px; max-width: 320px; }
.zy-table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin-bottom: .8rem; }
.zy-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.zy-table th { text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted2); padding: .7rem .9rem; border-bottom: 1px solid var(--border); white-space: nowrap; background: rgba(26, 27, 46, .5); }
.zy-table td { padding: .65rem .9rem; border-bottom: 1px solid rgba(192, 132, 252, .07); vertical-align: middle; }
.zy-table tr:last-child td { border-bottom: 0; }
.zy-table tbody tr:hover { background: rgba(192, 132, 252, .04); }
.zy-table form { margin: 0; }
.zy-table td.num, .zy-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.zy-cell-text { max-width: 360px; overflow-wrap: anywhere; color: var(--muted); }
.zy-who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.zy-who strong { font-size: .86rem; font-weight: 600; }
.zy-who code { font-size: .68rem; background: none; padding: 0; color: var(--muted2); }
.zy-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.zy-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; }
.zy-pill.is-ok { color: var(--green); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.zy-pill.is-warn { color: var(--gold); border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); }
.zy-pill.is-bad { color: var(--red); border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .08); }
.zy-live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.zy-live-grid > .zy-card { margin: 0; }
.zy-live-card header { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.zy-live-card header a, .zy-live-card header code { margin-left: auto; }
.zy-live-card header code + a { margin-left: .5rem; }
.zy-live-card h3 { font-size: 1.05rem; margin-bottom: .8rem; overflow-wrap: anywhere; }
.zy-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0 0 1rem; }
.zy-dl dt { font-size: .7rem; color: var(--muted2); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.zy-dl dd { margin: .1rem 0 0; font-size: .9rem; overflow-wrap: anywhere; }
.zy-live-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.zy-live-actions form { margin: 0; }
.zy-hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.zy-hbars li { display: grid; grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) auto; align-items: center; gap: .6rem; font-size: .85rem; }
.zy-hbars.zy-rank li { grid-template-columns: 1.6rem minmax(80px, 34%) minmax(0, 1fr) auto; }
.zy-hbars li small { grid-column: 2 / -1; color: var(--muted2); font-size: .72rem; margin-top: -.35rem; }
.zy-hbars.zy-rank li small { grid-column: 2 / -1; }
.zy-hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zy-hbar-track { height: 10px; background: var(--surface3); border-radius: 4px; overflow: hidden; }
.zy-hbar-track i { display: block; height: 100%; background: #9333ea; border-radius: 0 4px 4px 0; }
.zy-hbars b { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.zy-hbars b small { color: var(--muted2); font-weight: 500; }
.zy-rank-n { color: var(--muted2); font-size: .78rem; text-align: right; font-variant-numeric: tabular-nums; }
.zy-stat small { display: block; margin-top: .25rem; font-size: .76rem; }
.zy-trend.up { color: var(--green); } .zy-trend.down { color: var(--red); }
.zy-chart { position: relative; }
.zy-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.zy-chart-grid { stroke: rgba(148, 163, 184, .14); stroke-width: 1; }
.zy-chart-axis { fill: var(--muted2); font-size: 12px; font-family: 'DM Sans', sans-serif; }
.zy-chart-cross { stroke: rgba(226, 232, 240, .35); stroke-width: 1; }
.zy-chart-tip { position: absolute; top: 0; z-index: 3; pointer-events: none; min-width: 130px; padding: .5rem .65rem; background: var(--surface3); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 24px rgba(0, 0, 0, .4); font-size: .78rem; }
.zy-chart-tip b { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; margin-bottom: .2rem; }
.zy-chart-tip div { display: flex; align-items: center; gap: .45rem; }
.zy-chart-tip div i { width: 12px; height: 2px; border-radius: 1px; }
.zy-chart-tip div strong { margin-left: auto; padding-left: .8rem; font-variant-numeric: tabular-nums; }
.zy-legend { display: flex; gap: 1rem; margin-bottom: .5rem; font-size: .8rem; color: var(--muted); }
.zy-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.zy-legend i { width: 14px; height: 2px; border-radius: 1px; }
.zy-data-table { margin: 0 0 1rem; }
.zy-data-table summary { cursor: pointer; color: var(--muted); font-size: .84rem; margin-bottom: .6rem; }
.zy-data-table .zy-table-wrap { max-height: 360px; overflow: auto; }
.zy-history { display: flex; flex-direction: column; gap: .7rem; }
.zy-history-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .9rem 1.1rem; }
.zy-history-item.is-undone { opacity: .6; }
.zy-history-item header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.zy-history-item header strong { font-size: .95rem; }
.zy-history-item header .zy-pill { margin-left: .4rem; }
.zy-history-item header small { display: block; color: var(--muted2); font-size: .76rem; margin-top: .2rem; }
.zy-history-item header form { margin: 0; flex: none; }
.zy-history-item .zy-change-list { margin: .7rem 0 0; max-height: none; }
.zy-diff { color: var(--muted); text-align: right; overflow-wrap: anywhere; }
.zy-diff del { color: #fca5a5; text-decoration: line-through; text-decoration-color: rgba(248, 113, 113, .5); }
.zy-diff ins { color: #6ee7b7; text-decoration: none; }
.zy-embed-tools { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.zy-embed-tools form { flex: 1 1 280px; }
.zy-form-sep { grid-column: 1 / -1; font-size: .95rem; margin: .4rem 0 -.4rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.zy-tpl-save { margin-right: auto; flex: 1; max-width: 420px; }
.zy-embed-author { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; color: #f2f3f5; margin-bottom: .3rem; }
.zy-embed-author img, .zy-embed footer img { width: 20px; height: 20px; border-radius: 50%; margin: 0; display: inline-block; }
.zy-embed-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; }
.zy-embed-thumb { max-width: 80px; border-radius: 6px; }
.zy-embed a { color: #00a8fc; }
.zy-discord-buttons span.is-link { background: #4e5058; }

/* ── Bots (passerelle) ── */
.zy-bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.zy-bot-card { display: flex; flex-direction: column; gap: .9rem; padding: 1.3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; transition: transform .2s, border-color .2s, background .2s; }
.zy-bot-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface2); }
.zy-bot-card.is-expired { opacity: .7; }
.zy-bot-head { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.zy-bot-head img, .zy-bot-head .zy-guild-fallback { width: 52px; height: 52px; border-radius: 16px; flex: none; }
.zy-bot-head h2 { font-size: 1.05rem; overflow-wrap: anywhere; }
.zy-bot-head small { color: var(--muted2); font-size: .76rem; }
.zy-bot-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.zy-bot-actions { display: flex; gap: .5rem; margin-top: auto; }
.zy-bot-actions .zy-btn { flex: 1; }
.zy-public-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.zy-public-bot { display: flex; flex-direction: column; gap: .6rem; padding: 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.zy-public-bot strong { font-size: 1rem; }
.zy-public-bot p { margin: 0; color: var(--muted); font-size: .85rem; flex: 1; }
.zy-servers-menu { position: relative; }
.zy-servers-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; padding: .42rem .85rem; border: 1px solid var(--border); border-radius: 10px; font-size: .85rem; font-weight: 600; color: var(--text); }
.zy-servers-menu > summary::-webkit-details-marker { display: none; }
.zy-servers-menu[open] > summary, .zy-servers-menu > summary:hover { border-color: var(--accent); background: rgba(192, 132, 252, .08); }
.zy-servers-pop { position: absolute; right: 0; top: calc(100% + .5rem); width: min(340px, 92vw); max-height: 70vh; overflow: auto; padding: .5rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); z-index: 120; }
.zy-servers-pop p { margin: .5rem .6rem .25rem; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted2); }
.zy-servers-pop a { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 9px; color: var(--text); font-size: .86rem; }
.zy-servers-pop a:hover { background: rgba(192, 132, 252, .1); }
.zy-servers-pop img, .zy-servers-pop .zy-mini-fallback { width: 26px; height: 26px; border-radius: 8px; flex: none; }
.zy-mini-fallback { display: grid; place-items: center; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; }
.zy-servers-pop .zy-hint { padding: .4rem .6rem; margin: 0; }
.zy-staff-badge { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #f43f5e, #c084fc); border-radius: 100px; padding: .2rem .6rem; box-shadow: 0 0 14px rgba(244, 63, 94, .35); }
.zy-kpi-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.zy-inline-form { display: inline-flex; gap: .35rem; align-items: center; margin: 0; }
.zy-inline-form input { width: 7rem !important; min-height: 34px !important; padding: .3rem .6rem !important; }
.zy-avatar-sm { width: 28px; height: 28px; border-radius: 9px; vertical-align: middle; }
.zy-bot-cell { display: flex; align-items: center; gap: .6rem; }

/* ── Responsive ── */
@media (max-width: 1180px) { .zy-module-grid.has-preview { grid-template-columns: minmax(0, 1fr); } .zy-preview { position: static; } }
@media (max-width: 960px) {
  .zy-layout { grid-template-columns: minmax(0, 1fr); }
  .zy-sidebar { position: fixed; top: var(--nav); left: 0; bottom: 0; z-index: 90; width: min(320px, 88vw); height: auto; background: var(--bg); transform: translateX(-102%); transition: transform .25s; box-shadow: 20px 0 40px rgba(0, 0, 0, .5); }
  .zy-sidebar.is-open { transform: none; }
  .zy-side-toggle { display: inline-flex; position: sticky; top: calc(var(--nav) + .6rem); z-index: 80; margin: .8rem 0 0 1rem; padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font: 600 .85rem 'DM Sans', sans-serif; cursor: pointer; }
  .zy-stat-grid, .zy-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .zy-fields, .zy-two-col { grid-template-columns: minmax(0, 1fr); }
  .zy-module-head { flex-direction: column; align-items: flex-start; }
  .zy-overview-hero { flex-direction: column; align-items: flex-start; }
  .zy-protections { grid-template-columns: minmax(0, 1fr); }
  .zy-row { grid-template-columns: minmax(0, 1fr) !important; }
  .zy-row-tools { padding-top: 0; justify-content: flex-end; }
  .zy-perm-row, .zy-perm-new { grid-template-columns: minmax(0, 1fr); }
  .zy-nav-link { display: none; }
  .zy-user-menu summary span:not(.zy-avatar-fallback) { display: none; }
  .zy-savebar { flex-wrap: wrap; }
  .zy-save-state { width: 100%; }
  .zy-duration select { flex-basis: 115px; }
  .zy-segmented { display: flex; width: 100%; }
  .zy-segmented label { flex: 1 1 auto; }
  .zy-segmented span { justify-content: center; width: 100%; }
  .zy-hbars li, .zy-hbars.zy-rank li { grid-template-columns: minmax(0, 1fr) auto; }
  .zy-hbars .zy-hbar-track { grid-column: 1 / -1; }
  .zy-rank-n { display: none; }
  .zy-dl { grid-template-columns: minmax(0, 1fr); }
  .zy-servers-menu > summary span { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
