:root {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-alt: #101a2d;
  --card: #131f36;
  --border: #223252;
  --text: #e7edf7;
  --text-dim: #93a1bd;
  --accent: #2ee6a6;
  --accent-dark: #17b384;
  --danger: #ff6b6b;
  --warning: #f5a623;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.page { flex: 1; }

/* ---- Top nav ---- */
.topnav {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
/* Trois colonnes : logo à gauche, les 3 boutons de navigation exactement au centre, menu utilisateur à droite. */
.topnav-inner {
  width: 100%;
  padding: 16px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.brand { font-size: 1.3rem; font-weight: 800; color: var(--text); justify-self: start; }
.brand span { color: var(--accent); }
.topnav-links { display: flex; gap: 28px; justify-content: center; align-items: center; }
.topnav-links a { color: var(--text-dim); font-weight: 600; font-size: 0.92rem; }
.topnav-links a:hover, .topnav-links a.active { color: var(--accent); text-decoration: none; }
.topnav-actions { display: flex; align-items: center; gap: 12px; justify-self: end; }

/* ---- Layout basics ---- */
.container { width: 100%; padding: 28px 32px 48px; }
.container.narrow { max-width: 480px; margin: 0 auto; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.hero-section {
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 0;
}
.hero-inner { width: 100%; padding: 0 32px; }
.hero-title { font-size: 2.6rem; margin: 10px 0 12px; max-width: 900px; }
.hero-text { color: var(--text-dim); font-size: 1.1rem; max-width: 720px; margin: 0 0 24px; }
.section-title { margin: 0 0 18px; font-size: 1.5rem; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 1px; font-size: 0.8rem; margin: 0; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.product-card { display: block; position: relative; }
.product-card h2 { margin: 0 0 6px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-maintenance { background: rgba(245,166,35,0.15); color: var(--warning); border: 1px solid var(--warning); }

/* ---- Forms / buttons ---- */
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-stack label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--text-dim); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], textarea, select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
textarea { resize: vertical; font-family: inherit; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; }

button, .btn-primary, .btn-ghost, .link-button { cursor: pointer; font-family: inherit; }
.btn-primary {
  background: var(--accent);
  color: #04231a;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  display: inline-block;
}
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius);
}
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }
.btn-discord { display: flex; align-items: center; justify-content: center; gap: 10px; background: #5865f2; color: #fff !important; font-weight: 700; padding: 10px 18px; border-radius: var(--radius); text-decoration: none !important; }
.btn-discord:hover { background: #4752c4; }
.btn-discord-inline { display: inline-flex; margin-top: 8px; }
.callback-box { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.callback-box input { flex: 1; font-family: Consolas, monospace; }
.link-button { background: none; border: none; color: var(--accent); padding: 0; font-size: 0.95rem; }
.link-button.danger { color: var(--danger); }

.alert-error { background: rgba(255,107,107,0.12); border: 1px solid var(--danger); color: var(--danger); padding: 10px 14px; border-radius: var(--radius); }
.alert-success { background: rgba(46,230,166,0.12); border: 1px solid var(--accent); color: var(--accent); padding: 10px 14px; border-radius: var(--radius); }

.hint { color: var(--text-dim); font-size: 0.85rem; }

.checkbox-list { display: flex; flex-direction: column; gap: 10px; }
.checkbox-row, .form-stack .checkbox-row { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; font-size: 0.9rem; color: var(--text); text-align: left; }
.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.hidden { display: none !important; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--text-dim); }

/* ---- Panels ---- */
.panel-heading { margin-bottom: 16px; }
.panel-heading h1 { margin: 4px 0; font-size: 1.8rem; }

.panel-shell { width: 100%; display: flex; align-items: stretch; gap: 0; }
.panel-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  position: sticky;
  top: 70px;
  align-self: flex-start;
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.panel-sidebar-dashboard {
  background: var(--accent);
  color: #04231a !important;
  font-weight: 700;
  border-radius: var(--radius);
  padding: 10px 12px;
  text-decoration: none !important;
  margin-bottom: 10px;
}
.panel-sidebar-category { color: var(--accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.6px; margin: 6px 0 2px; padding: 0 12px; }
.panel-sidebar-link { color: var(--text-dim) !important; padding: 9px 12px; border-radius: var(--radius); text-decoration: none !important; font-size: 0.9rem; border-left: 3px solid transparent; }
.panel-sidebar-link:hover { background: var(--card); color: var(--text) !important; }
.panel-sidebar-link.active { background: var(--card); color: var(--accent) !important; border-left-color: var(--accent); font-weight: 600; }
.panel-content { flex: 1; min-width: 0; padding: 28px 40px 48px; }
.panel-heading-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.btn-small { padding: 7px 14px; font-size: 0.9rem; }
.actions-cell { white-space: nowrap; }
.actions-cell > * { margin-right: 6px; vertical-align: middle; }

/* ---- Bots Discord ---- */
.bot-cell { display: flex; align-items: center; gap: 12px; }
.bot-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.bot-avatar-empty { display: inline-flex; align-items: center; justify-content: center; background: var(--bg-alt); border: 1px solid var(--border); color: var(--accent); font-weight: 800; }
.bot-avatar-lg { width: 72px; height: 72px; font-size: 1.6rem; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-dim); }
.pill-online { background: rgba(46,230,166,0.12); border-color: var(--accent); color: var(--accent); }
.pill-warn { background: rgba(245,166,35,0.12); border-color: var(--warning); color: var(--warning); }
.pill-error { background: rgba(255,107,107,0.12); border-color: var(--danger); color: var(--danger); }
.hint-error { color: var(--danger); margin-top: 4px; }
.hint-warn { color: var(--warning); margin-top: 4px; }

.bot-dialog { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; width: min(560px, 92vw); }
.bot-dialog::backdrop { background: rgba(5, 9, 18, 0.75); }
.bot-dialog h2 { margin: 0; }
.avatar-picker { display: flex; align-items: center; gap: 16px; }
.file-label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--text-dim); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

.combo { position: relative; }
.combo input[type="text"] { width: 100%; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; margin: 0; padding: 4px; list-style: none; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); max-height: 260px; overflow-y: auto; }
.combo-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); }
.combo-list li:hover { background: var(--card); }
.combo-list li.disabled { opacity: 0.4; cursor: not-allowed; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-label { color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.5px; margin: 0; }
.stat-value { font-size: 1.6rem; font-weight: 800; margin: 6px 0; }
.stat-hint { color: var(--text-dim); font-size: 0.8rem; margin: 0; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.data-table th { color: var(--text-dim); font-weight: 600; background: var(--bg-alt); }
.data-table tr:last-child td { border-bottom: none; }

[hidden] { display: none !important; }

/* ---- Menu déroulant « Produits » ---- */
.nav-dropdown { position: relative; }
.nav-dropdown-btn { background: none; border: none; padding: 0; font-family: inherit; font-size: 0.92rem; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.nav-dropdown:hover .nav-dropdown-btn, .nav-dropdown.open .nav-dropdown-btn, .nav-dropdown-btn.active { color: var(--accent); }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: -14px; padding-top: 14px; min-width: 230px; z-index: 30; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-panel { display: flex; flex-direction: column; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.nav-dropdown-panel a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 600; font-size: 0.92rem; }
.nav-dropdown-panel a:hover, .nav-dropdown-panel a.active { background: var(--card); color: var(--accent); text-decoration: none; }

/* ---- Boutique (publique) ---- */
.shop-shell { width: 100%; display: flex; align-items: flex-start; }
.shop-sidebar { width: 240px; flex-shrink: 0; background: var(--bg-alt); border-right: 1px solid var(--border); padding: 20px 14px; position: sticky; top: 70px; min-height: calc(100vh - 70px); }
.shop-menu summary { cursor: pointer; list-style: none; color: var(--accent); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.8px; text-transform: uppercase; padding: 6px 12px 10px; }
.shop-menu summary::-webkit-details-marker { display: none; }
.shop-menu summary::after { content: " ▾"; }
.shop-menu:not([open]) summary::after { content: " ▸"; }
.shop-menu a { display: block; color: var(--text-dim); padding: 9px 12px; border-radius: var(--radius); border-left: 3px solid transparent; font-size: 0.92rem; }
.shop-menu a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.shop-menu a.active { background: var(--card); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.shop-content { flex: 1; min-width: 0; padding: 28px 40px 48px; }
.shop-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.shop-topbar h1 { margin: 0; font-size: 1.8rem; }
.shop-search { display: flex; gap: 8px; margin-left: auto; }
.shop-search input { width: 260px; max-width: 60vw; }
.section-title-spaced { margin-top: 32px; }

.category-banner { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 20px; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.category-card { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; margin-bottom: 0; color: var(--text); }
.category-card:hover { border-color: var(--accent); text-decoration: none; }
.category-thumb { width: 100%; height: 120px; object-fit: cover; display: block; }
.category-thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--bg-alt); color: var(--accent); font-size: 2rem; font-weight: 800; }
.category-card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }

.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.article-card { margin-bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.article-card h3 { margin: 6px 0 0; font-size: 1.05rem; }
.article-card p { margin: 0; }
.article-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.article-image-empty { display: flex; align-items: center; justify-content: center; background: var(--bg-alt); color: var(--accent); font-size: 2.2rem; font-weight: 800; }
.price { color: var(--accent); font-weight: 800; font-size: 1.1rem; }

/* ---- Boutique (admin) ---- */
.heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.banner-picker { display: flex; flex-direction: column; gap: 8px; }
.banner-preview { width: 100%; max-height: 160px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.article-thumb { border-radius: 8px; }

/* ---- Nav : séparateurs du menu Produits ---- */
.nav-dropdown-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.nav-dropdown-panel a.nav-dropdown-all { color: var(--accent); }

/* ---- Menu utilisateur (photo Discord + nom) ---- */
.user-btn { display: inline-flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.user-btn:hover, .user-menu.open .user-btn { border-color: var(--accent); color: var(--text); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; }
.user-avatar-empty { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #04231a; font-weight: 800; font-size: 0.9rem; }
.user-name { font-weight: 700; font-size: 0.9rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-dropdown-right { left: auto; right: -6px; }
.nav-dropdown-panel form { margin: 0; }
.nav-dropdown-item { display: block; width: 100%; text-align: left; background: none; border: none; padding: 9px 12px; border-radius: 8px; color: var(--text); font-family: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer; }
.nav-dropdown-item:hover { background: var(--card); }
.nav-dropdown-danger { color: var(--danger); }

/* ---- Tags ---- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-dim); font-size: 0.78rem; font-weight: 600; }
a.tag:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.tag-active { background: rgba(46,230,166,0.12); border-color: var(--accent); color: var(--accent); }
.tag-row, .tag-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-filter { margin-bottom: 22px; }
.tag-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; cursor: text; }
.tag-box input[type="text"] { flex: 1; min-width: 140px; border: none; background: transparent; padding: 4px; outline: none; }
.tag-remove { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px; }
.tag-remove:hover { color: var(--danger); }

/* ---- Pages produits ---- */
.hero-compact { padding: 44px 0; }
.product-page { width: 100%; max-width: 960px; margin: 0 auto; padding: 28px 24px 56px; }
.product-banner { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 24px; }
.product-head h1 { font-size: 2.4rem; margin: 6px 0 12px; }
.product-head .eyebrow a { color: var(--accent); }
.product-lead { color: var(--text-dim); font-size: 1.15rem; margin: 14px 0 0; }
.draft-notice { margin-bottom: 18px; }
.product-form { gap: 20px; }

/* Typographie des pages écrites avec l'éditeur (identique dans l'éditeur et sur la page publique) */
.page-content { line-height: 1.75; font-size: 1.05rem; word-wrap: break-word; }
.page-content h2 { font-size: 1.8rem; margin: 1.8em 0 0.5em; line-height: 1.25; }
.page-content h3 { font-size: 1.35rem; margin: 1.5em 0 0.4em; color: var(--accent); }
.page-content p { margin: 0 0 1em; }
.page-content ul, .page-content ol { margin: 0 0 1em; padding-left: 1.5em; }
.page-content li { margin: 0.3em 0; }
.page-content blockquote { margin: 1.2em 0; padding: 0.4em 1.2em; border-left: 4px solid var(--accent); background: var(--bg-alt); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-dim); }
.page-content pre { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; font-family: Consolas, monospace; font-size: 0.92rem; }
.page-content code { font-family: Consolas, monospace; background: var(--bg); padding: 2px 6px; border-radius: 6px; }
.page-content hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.page-content img { max-width: 100%; height: auto; border-radius: var(--radius); display: block; margin: 1.2em auto; }
.page-content a { color: var(--accent); text-decoration: underline; }
.page-content a.page-btn { display: inline-block; background: var(--accent); color: #04231a; font-weight: 700; padding: 10px 20px; border-radius: var(--radius); text-decoration: none; margin: 0.4em 0; }
.page-content a.page-btn:hover { background: var(--accent-dark); }
.page-content .callout { margin: 1.4em 0; padding: 14px 18px; background: rgba(46,230,166,0.08); border: 1px solid var(--accent); border-radius: var(--radius); }
.page-content .callout p:last-child { margin-bottom: 0; }

/* ---- Éditeur ---- */
.editor { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); margin-top: 12px; }
.editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px; background: var(--bg-alt); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; position: sticky; top: 70px; z-index: 5; }
.editor-toolbar button { background: transparent; border: 1px solid transparent; color: var(--text); border-radius: 8px; padding: 5px 10px; font-size: 0.85rem; min-width: 32px; }
.editor-toolbar button:hover { background: var(--card); border-color: var(--border); }
.editor-toolbar select { padding: 5px 8px; font-size: 0.85rem; }
.editor-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.editor-surface { min-height: 420px; padding: 24px 28px; outline: none; }
.editor-surface.is-empty p:first-child::before { content: "Commencez à écrire la page de votre produit…"; color: var(--text-dim); pointer-events: none; }
.editor-surface:focus { box-shadow: inset 0 0 0 2px rgba(46,230,166,0.35); }
#editor-status { margin: 0; padding: 6px 14px; min-height: 1.5em; color: var(--warning); }

/* ---- Grades : permissions ---- */
.toolbar-left { display: flex; justify-content: flex-start; margin-bottom: 18px; }
.grade-dialog { width: min(640px, 94vw); }
.perm-search-row { display: flex; align-items: center; gap: 12px; }
.perm-search-row input { flex: 1; }
.perm-groups { display: flex; flex-direction: column; gap: 14px; max-height: 46vh; overflow-y: auto; padding-right: 6px; }
.perm-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; background: var(--bg); }
.perm-group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.perm-group .checkbox-row { padding: 5px 0; }

/* ---- Codes promo ---- */
.promo-dialog { width: min(600px, 94vw); }
.input-with-btn { display: flex; gap: 8px; }
.input-with-btn input { flex: 1; min-width: 0; }
.choice-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.choice-group legend { padding: 0 6px; color: var(--text-dim); font-size: 0.85rem; }
.choice-inline { display: flex; gap: 22px; flex-wrap: wrap; }
.target-list { max-height: 190px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.promo-code { font-family: Consolas, monospace; letter-spacing: 0.5px; }

/* ---- Panier ---- */
.shop-topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.shop-topbar-right .shop-search { margin-left: 0; }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; position: relative; }
.cart-badge { background: var(--accent); color: #04231a; font-weight: 800; font-size: 0.75rem; min-width: 20px; height: 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.article-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.article-foot form { margin: 0; }

/* Panier : colonne intégrée à la page boutique, qui pousse le contenu (aucun calque sur le site). */
.cart-panel { width: 380px; flex-shrink: 0; align-self: flex-start; position: sticky; top: 86px; margin: 28px 28px 28px 0; max-height: calc(100vh - 110px); overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.cart-panel[hidden] { display: none; }
.cart-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); z-index: 2; }
.cart-panel-head h2 { margin: 0; font-size: 1.2rem; }
.cart-close { background: none; border: 1px solid var(--border); color: var(--text-dim); width: 32px; height: 32px; border-radius: 8px; font-size: 1.3rem; line-height: 1; }
.cart-close:hover { color: var(--text); border-color: var(--accent); }
.cart-panel .cart-contents { padding: 16px 20px 22px; }
@media (max-width: 800px) { .cart-panel { width: auto; position: static; margin: 0 16px 24px; max-height: none; } }
.cart-page { max-width: 760px; }
.cart-note { margin: 0 0 14px; }
.cart-empty { text-align: center; padding: 28px 0; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.cart-count { margin: 0 0 12px; color: var(--text-dim); }
.cart-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.cart-line { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.cart-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.cart-thumb-empty { display: inline-flex; align-items: center; justify-content: center; background: var(--bg-alt); color: var(--accent); font-weight: 800; font-size: 1.4rem; }
.cart-line-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-line-total { font-weight: 800; white-space: nowrap; }
.qty-controls { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qty-controls form { margin: 0; display: inline-flex; }
.qty-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-alt); color: var(--text); font-size: 1rem; line-height: 1; }
.qty-btn:hover { border-color: var(--accent); }
.qty-value { min-width: 24px; text-align: center; font-weight: 700; }
.cart-remove { margin-left: 10px; }
.cart-promo { margin: 18px 0; }
.promo-form { display: flex; gap: 8px; }
.promo-form input { flex: 1; min-width: 0; text-transform: uppercase; }
.promo-applied { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px dashed var(--accent); border-radius: var(--radius); background: rgba(46,230,166,0.06); }
.cart-totals { margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.cart-totals div { display: flex; justify-content: space-between; }
.cart-totals dt, .cart-totals dd { margin: 0; }
.cart-discount dd { color: var(--accent); }
.cart-total { font-size: 1.2rem; font-weight: 800; padding-top: 10px; border-top: 1px solid var(--border); }

/* ---- Panel Dev : équipe ---- */
.team-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.team-toolbar input[type="search"] { flex: 1; min-width: 220px; max-width: 420px; }
.text-danger { color: var(--danger) !important; }

/* ---- Panel Dev : tableaux ---- */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.board-tile { display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; min-height: 110px; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); color: #fff; }
.board-tile strong { text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }

/* Sélecteur d'arrière-plan */
.board-style-dialog { width: min(720px, 95vw); }
.bg-picker { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.bg-picker legend { padding: 0 6px; color: var(--text-dim); font-size: 0.85rem; }
.bg-preview { height: 110px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
.bg-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.bg-tab input { position: absolute; opacity: 0; }
.bg-tab span { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text-dim); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.bg-tab input:checked + span { background: rgba(46, 230, 166, 0.12); border-color: var(--accent); color: var(--accent); }
.bg-panel { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.bg-group-title { margin: 6px 0 0; color: var(--accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.bg-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.bg-swatch { position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.bg-swatch input { position: absolute; opacity: 0; }
.bg-swatch span { display: block; height: 58px; border-radius: 10px; border: 2px solid var(--border); }
.bg-swatch em { font-style: normal; font-size: 0.74rem; color: var(--text-dim); text-align: center; }
.bg-swatch input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(46, 230, 166, 0.35); }
.bg-swatch:hover span { border-color: var(--text-dim); }
.bg-panel input[type="color"] { width: 100%; height: 42px; padding: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.bg-panel input[type="range"] { width: 100%; accent-color: var(--accent); }
.board-tile:hover { border-color: var(--accent); text-decoration: none; }
.board-tile span { color: #cbd5e8; font-size: 0.85rem; }
.color-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.color-option { position: relative; cursor: pointer; }
.color-option input { position: absolute; opacity: 0; }
.color-option span { display: block; width: 36px; height: 36px; border-radius: 10px; background: var(--board-bg); border: 2px solid var(--border); }
.color-option input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(46, 230, 166, 0.35); }

.board-shell { min-height: calc(100vh - 70px); }
.board-page { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg-alt); padding: 20px 24px 28px; overflow: hidden; }
.board-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.board-header h1 { margin: 2px 0 0; font-size: 1.7rem; }
.board-back { color: #cbd5e8; font-size: 0.85rem; }
.board-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 50; margin: 0; background: var(--card); border: 1px solid var(--danger); color: var(--danger); padding: 10px 16px; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.board-lists { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 16px; flex: 1; scrollbar-color: var(--border) transparent; }
.board-list { width: 290px; flex-shrink: 0; background: rgba(11, 18, 32, 0.78); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.board-list-add { background: rgba(11, 18, 32, 0.45); padding: 6px; }
.list-header { display: flex; align-items: center; gap: 8px; padding: 12px 12px 6px; }
.list-title { margin: 0; font-size: 0.95rem; flex: 1; cursor: pointer; word-break: break-word; }
.list-done .list-title { color: var(--accent); }
.list-count { color: var(--text-dim); font-size: 0.8rem; }
.list-menu { position: relative; }
.list-menu summary { cursor: pointer; list-style: none; padding: 2px 8px; border-radius: 6px; color: var(--text-dim); }
.list-menu summary::-webkit-details-marker { display: none; }
.list-menu summary:hover { background: var(--card); }
.list-menu-panel { position: absolute; right: 0; top: 100%; z-index: 15; min-width: 210px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.list-menu-item { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text); padding: 8px 10px; border-radius: 6px; font-family: inherit; font-size: 0.88rem; cursor: pointer; }
.list-menu-item:hover:not(:disabled) { background: var(--card); }
.list-menu-item:disabled { opacity: 0.4; cursor: default; }
.list-menu-item.danger { color: var(--danger); }
.list-cards { display: flex; flex-direction: column; gap: 8px; padding: 6px 10px; overflow-y: auto; min-height: 24px; }
.list-cards.drag-over { background: rgba(46, 230, 166, 0.06); }
.card-tile { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.card-tile:hover, .card-tile:focus-visible { border-color: var(--accent); outline: none; }
.card-tile.dragging { opacity: 0.4; }
.card-placeholder { height: 42px; border: 2px dashed var(--accent); border-radius: 8px; background: rgba(46, 230, 166, 0.08); flex-shrink: 0; }
.card-labels { display: flex; gap: 4px; flex-wrap: wrap; }
.card-label { width: 38px; height: 7px; border-radius: 4px; display: block; }
.card-title { font-size: 0.92rem; word-break: break-word; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-chip { font-size: 0.72rem; color: var(--text-dim); background: var(--bg-alt); padding: 2px 7px; border-radius: 6px; }
.badge-chip.due-overdue { background: rgba(255, 107, 107, 0.18); color: var(--danger); }
.badge-chip.due-soon { background: rgba(245, 166, 35, 0.18); color: var(--warning); }
.badge-chip.due-done { background: rgba(46, 230, 166, 0.16); color: var(--accent); }
.card-assignees { display: flex; padding-left: 6px; }
.avatar-xs { width: 22px; height: 22px; font-size: 0.7rem; margin-left: -6px; border: 2px solid var(--card); }
.add-card { padding: 6px 10px 12px; }
.add-card-btn { width: 100%; text-align: left; background: none; border: none; color: var(--text-dim); padding: 8px; border-radius: 8px; font-family: inherit; cursor: pointer; }
.add-card-btn:hover { background: var(--card); color: var(--text); }
.add-card-form { display: flex; flex-direction: column; gap: 8px; }
.add-card-form textarea, .add-card-form input { width: 100%; }
.add-card-actions { display: flex; gap: 8px; }

/* Fenêtre d'une carte */
.card-dialog { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 0; width: min(900px, 95vw); max-height: 92vh; overflow-y: auto; }
.card-dialog::backdrop { background: rgba(5, 9, 18, 0.75); }
.card-dialog-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 20px 24px 8px; }
.card-dialog-title { flex: 1; min-width: 0; }
.card-dialog-title p { margin: 4px 0 0 12px; }
.card-title-input { width: 100%; font-size: 1.3rem; font-weight: 700; background: transparent; border: 1px solid transparent; }
.card-title-input:focus { border-color: var(--accent); background: var(--bg); outline: none; }
.card-dialog-body { display: grid; grid-template-columns: 1fr 240px; gap: 24px; padding: 8px 24px 24px; }
.card-dialog-main, .card-dialog-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card-section h4 { margin: 0 0 8px; font-size: 0.78rem; letter-spacing: 0.6px; text-transform: uppercase; color: var(--accent); }
.card-section textarea { width: 100%; }
.card-section input[type="date"] { width: 100%; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-column { display: flex; flex-direction: column; gap: 6px; }
.label-chip { border: 1px solid var(--label-color); background: transparent; color: var(--text); padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; font-family: inherit; }
.label-chip.active { background: var(--label-color); color: #08121f; font-weight: 700; }
.member-chip { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 5px 10px; border-radius: 8px; cursor: pointer; font-family: inherit; text-align: left; }
.member-chip.active { border-color: var(--accent); background: rgba(46, 230, 166, 0.1); }
.member-chip .avatar-xs { margin-left: 0; border-color: transparent; }
.progress-track { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.progress-fill { height: 100%; background: var(--accent); }
.check-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.check-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.check-item { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; word-break: break-word; }
.check-list li.done .check-item span { text-decoration: line-through; color: var(--text-dim); }
.icon-btn { background: none; border: none; color: var(--text-dim); font-size: 1.1rem; cursor: pointer; }
.icon-btn:hover { color: var(--danger); }
.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; min-width: 0; }
.comment-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.comment-head { display: flex; gap: 10px; align-items: center; }
.comment-text { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; }

@media (max-width: 800px) {
  .card-dialog-body { grid-template-columns: 1fr; }
  .board-list { width: 260px; }
  .shop-shell, .panel-shell { flex-direction: column; }
  .shop-sidebar, .panel-sidebar { width: 100%; min-height: 0; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .shop-content, .panel-content { padding: 20px 16px 40px; }
  .topnav-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; padding: 12px 16px; }
  .topnav-links { order: 3; width: 100%; justify-content: center; }
}


/* ---- Chat bot (bulle en bas à droite) ---- */
#chatbot-root { --chat-color: var(--accent); }
.chat-bubble { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--chat-color); color: #04231a; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); transition: transform 0.15s; }
.chat-bubble:hover { transform: scale(1.07); }
.chat-bubble.open { display: none; }
.chat-panel { position: fixed; right: 22px; bottom: 22px; z-index: 41; width: min(370px, calc(100vw - 24px)); height: min(540px, calc(100vh - 44px)); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); overflow: hidden; }
.chat-panel[hidden] { display: none !important; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--chat-color); color: #04231a; }
.chat-title { display: flex; flex-direction: column; line-height: 1.2; }
.chat-status { font-size: 0.74rem; opacity: 0.75; }
.chat-close { background: none; border: none; color: #04231a; font-size: 1.6rem; line-height: 1; padding: 0 4px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; scrollbar-color: var(--border) transparent; }
.chat-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 0.92rem; line-height: 1.4; word-break: break-word; }
.chat-msg p { margin: 0; white-space: pre-wrap; }
.chat-bot { align-self: flex-start; background: var(--bg-alt); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-user { align-self: flex-end; background: var(--chat-color); color: #04231a; border-bottom-right-radius: 4px; }
.chat-link { display: inline-block; margin-top: 8px; padding: 6px 12px; border-radius: 8px; background: var(--chat-color); color: #04231a !important; font-weight: 700; font-size: 0.85rem; }
.chat-link:hover { text-decoration: none; filter: brightness(0.92); }
.chat-feedback { display: flex; gap: 8px; margin-top: 8px; font-size: 0.78rem; color: var(--text-dim); }
.chat-feedback button { background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: 999px; padding: 2px 10px; font-size: 0.76rem; }
.chat-feedback button:hover { border-color: var(--chat-color); color: var(--text); }
.chat-typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); animation: chat-dot 1s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chat-chips:empty { display: none; }
.chat-chip { background: transparent; border: 1px solid var(--chat-color); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 0.8rem; text-align: left; }
.chat-chip:hover { background: rgba(46, 230, 166, 0.1); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.chat-form input { flex: 1; min-width: 0; }
.chat-send { background: var(--chat-color); color: #04231a; border: none; border-radius: var(--radius); padding: 0 14px; font-weight: 700; }

/* ---- Pages admin à onglets (chat bot, serveur Discord, dashboards) ---- */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 20px; border-bottom: 1px solid var(--border); }
.admin-tabs a { padding: 9px 16px; color: var(--text-dim); font-weight: 600; font-size: 0.92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tabs a:hover { color: var(--text); text-decoration: none; }
.admin-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-tabs .tab-count { margin-left: 6px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; font-size: 0.72rem; }
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.faq-item-main { min-width: 0; flex: 1; }
.faq-item h3 { margin: 0 0 4px; font-size: 1rem; }
.faq-item p { margin: 0 0 8px; color: var(--text-dim); font-size: 0.88rem; white-space: pre-wrap; word-break: break-word; }
.faq-keywords { display: flex; flex-wrap: wrap; gap: 5px; }
.faq-keywords span { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 1px 8px; font-size: 0.75rem; color: var(--text-dim); }
.faq-stats { font-size: 0.78rem; color: var(--text-dim); margin-top: 6px; }
.faq-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.faq-actions .row { display: flex; gap: 6px; align-items: center; }
.test-result { margin-top: 16px; }
.color-field { display: flex; gap: 10px; align-items: center; }
.color-field input[type="color"] { width: 54px; height: 38px; padding: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
@media (max-width: 800px) { .faq-item { flex-direction: column; } .faq-actions { align-items: flex-start; } }

/* ---- Dashboards produits ---- */
.dash-grid { margin-bottom: 20px; }
.dash-card { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; margin-bottom: 0; }
.dash-card h2 { margin: 4px 0 6px; }
.dash-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-card-foot .btn-small { margin-left: auto; }
.dash-activate { max-width: 640px; }
.panel-sidebar-sub { margin-left: 14px; font-size: 0.85rem; padding: 7px 12px; }

/* ---- Dashboard SilverGuard ---- */
.sg-steps { display: flex; flex-direction: column; gap: 4px; max-width: 900px; }
.sg-step { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.sg-step h2 { margin: 0 0 6px; font-size: 1.1rem; }
.sg-step-n { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.sg-secret { background: rgba(46, 230, 166, 0.08); border: 1px dashed var(--accent); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.sg-code { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.sg-code pre { margin: 0; overflow-x: auto; font-family: Consolas, monospace; font-size: 0.85rem; padding-right: 80px; }
.sg-code button { position: absolute; top: 8px; right: 8px; }
.sg-group { margin-bottom: 22px; display: flex; flex-direction: column; gap: 8px; }
.sg-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.sg-card[open] { border-color: var(--accent); }
.sg-card > summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.sg-card > summary::-webkit-details-marker { display: none; }
.sg-card-title { font-weight: 700; }
.sg-card-id { color: var(--text-dim); font-size: 0.78rem; flex: 1; }
.sg-card-body { padding: 4px 16px 16px; }
.sg-params { display: flex; flex-direction: column; gap: 10px; }
.sg-params.form-row { display: grid; }
.sg-params textarea { width: 100%; font-family: Consolas, monospace; font-size: 0.85rem; }
.sg-info summary { cursor: pointer; color: var(--text-dim); font-size: 0.85rem; }
.sg-info ul { margin: 4px 0; padding-left: 20px; }
.sg-row-off { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-dim); opacity: 0.7; font-size: 0.9rem; }
.sg-profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 24px; }
.sg-profile { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.sg-verdicts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sg-reasons { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.sg-chip { display: inline-block; margin: 2px 6px 2px 0; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 1px 8px; font-size: 0.78rem; }
.sg-table-wrap { overflow-x: auto; }
.sg-pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 16px; }

/* ---- Serveur Discord (admin) ---- */
.dc-guild { text-decoration: none !important; color: var(--text); }
.dc-guild:hover { border-color: var(--accent); }
.dc-check { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dc-check li::before { display: inline-block; width: 22px; font-weight: 800; }
.dc-check li.good::before { content: "✓"; color: var(--accent); }
.dc-check li.bad::before { content: "✗"; color: var(--danger); }
.dc-rolebox { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.dc-rolebox legend { color: var(--text-dim); font-size: 0.85rem; padding: 0 6px; }
.dc-preview { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-top: 4px; }
.dc-preview-box { padding-left: 10px; border-radius: 4px; }
.dc-preview-box p { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; }
.dc-dialog { width: min(760px, 95vw); max-height: 92vh; overflow-y: auto; }
.dc-options { display: flex; flex-direction: column; gap: 12px; }
.dc-option { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.dc-option label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-dim); }
.dc-option-head { display: flex; justify-content: space-between; align-items: center; }
.dc-option select[multiple] { min-height: 100px; }

/* ---- SilverGuard : serveurs, sous-menus repliables ---- */
.sb-servers { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px; }
.sb-server { margin-left: 10px; border-left: 1px solid var(--border); padding-left: 4px; }
.sb-server > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; color: var(--text); font-size: 0.88rem; font-weight: 600; border-radius: var(--radius); }
.sb-server > summary::-webkit-details-marker { display: none; }
.sb-server > summary::after { content: "▸"; margin-left: auto; color: var(--text-dim); font-size: 0.8rem; transition: transform 0.15s; }
.sb-server[open] > summary::after { transform: rotate(90deg); }
.sb-server > summary:hover { background: var(--card); }
.sb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); flex-shrink: 0; }
.sb-dot.on { background: var(--accent); }
.sb-server .panel-sidebar-sub { margin-left: 8px; }
.sb-add { margin-left: 10px; color: var(--accent) !important; }
.sg-server-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); margin-bottom: 20px; }
.sg-server-card { margin-bottom: 0; display: flex; flex-direction: column; gap: 8px; }
.sg-server-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sg-server-head h2 { margin: 0; font-size: 1.15rem; }
.sg-modes { gap: 6px; }
.sg-server-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sg-quick { max-width: 900px; margin-bottom: 18px; }
.sg-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sg-danger { border-color: var(--danger); }
.sb-server > a { display: block; }

/* ---- Présentation produit (dashboards) ---- */
.product-intro { display: flex; gap: 20px; align-items: stretch; padding: 0; overflow: hidden; }
.product-intro-banner { width: 280px; object-fit: cover; flex-shrink: 0; }
.product-intro-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.product-intro-body h2 { margin: 0; font-size: 1.5rem; }
.product-intro-desc { margin: 0; color: var(--text); }
.sg-license-line { margin: 0; }
.sg-free { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--border); }
@media (max-width: 800px) { .product-intro { flex-direction: column; } .product-intro-banner { width: 100%; height: 160px; } }
.sg-activate { max-width: 640px; margin: 24px auto; text-align: center; align-items: center; }
.sg-activate .inline-add { width: 100%; }
.sg-activate p { max-width: 520px; }
.sb-warn { color: var(--warning); margin-left: 4px; font-size: 0.8rem; }

/* ---- Fenêtres propres (remplacent les boîtes du navigateur) ---- */
.gz-modal { width: min(440px, 92vw); }
.gz-modal h2 { margin: 0; font-size: 1.25rem; }
.gz-modal-text { margin: 0; color: var(--text-dim); line-height: 1.5; white-space: pre-wrap; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #e55a5a; }
.list-title { cursor: pointer; }

/* ---- Utilisateurs : grades multiples ---- */
.user-table td { vertical-align: middle; }
.role-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.role-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--accent); background: rgba(46, 230, 166, 0.1); color: var(--accent); font-size: 0.78rem; font-weight: 700; }
.role-chip-base { border-color: var(--border); background: var(--bg-alt); color: var(--text-dim); }
.role-picker { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.role-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.role-option:hover { background: var(--bg-alt); }
.role-option.disabled { opacity: 0.45; cursor: not-allowed; }
.role-option-name { flex: 1; font-weight: 600; }

/* ---- Tableaux : qui voit le tableau ---- */
.access-picker { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.access-picker legend { padding: 0 6px; color: var(--text-dim); font-size: 0.85rem; }
.access-members { display: flex; flex-direction: column; gap: 8px; }
.access-members[hidden] { display: none; }
.access-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 210px; overflow-y: auto; padding-right: 4px; }
.access-member { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 0.88rem; }
.access-member:has(input:checked) { border-color: var(--accent); background: rgba(46, 230, 166, 0.08); }
.access-member[hidden] { display: none; }
.board-private { font-weight: 600; font-size: 0.8rem; opacity: 0.9; margin-left: 6px; }
.form-stack .role-option, .form-stack .access-member, .access-picker .checkbox-row { flex-direction: row; align-items: center; gap: 10px; color: var(--text); }
.form-stack .role-option input, .form-stack .access-member input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.access-picker input[type="search"] { width: 100%; }

/* ---- Accueil ---- */
.home-sections { display: flex; flex-direction: column; gap: 56px; padding-top: 48px; }
.home-section { text-align: center; }
.home-section .section-title { margin-bottom: 8px; font-size: 1.7rem; }
.home-subtitle { margin: 0 0 22px; }
.home-grid { justify-content: center; margin-top: 22px; text-align: left; }
.product-grid.home-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); }
.home-product { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 0; }
.home-product h2 { margin: 0; color: var(--accent); }
.home-product .hint { margin: 0 0 6px; flex: 1; }
.shop-rank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 240px)); gap: 18px; }
.shop-rank-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; margin-bottom: 0; color: var(--text); }
.shop-rank-card:hover { border-color: var(--accent); text-decoration: none; }
.shop-rank-card h3 { margin: 6px 0 0; font-size: 1rem; }
.shop-rank-badge { position: absolute; top: 20px; left: 20px; z-index: 1; background: var(--accent); color: #04231a; font-weight: 800; border-radius: 999px; padding: 2px 10px; font-size: 0.85rem; }
.home-section > p { margin-top: 26px; }

/* ---- Actualités ---- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.news-grid.home-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 340px)); }
.news-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; margin-bottom: 0; color: var(--text); }
.news-card:hover { border-color: var(--accent); text-decoration: none; }
.news-card-image { width: 100%; height: 150px; object-fit: cover; display: block; }
.news-card-image-empty { display: flex; align-items: center; justify-content: center; background: var(--bg-alt); font-size: 2.4rem; }
.news-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.news-card-body h3 { margin: 0; font-size: 1.1rem; }
.news-card-body .hint { margin: 0; }
.news-meta { margin: 0; color: var(--text-dim); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.3px; }
.news-stats { display: flex; gap: 14px; margin: 6px 0 0; font-size: 0.85rem; color: var(--text-dim); align-items: center; }
.news-read { margin-left: auto; color: var(--accent); font-weight: 700; }
.news-page { max-width: 1100px; margin: 0 auto; }
.news-head { margin-bottom: 26px; }
.news-head h1 { margin: 4px 0; font-size: 2rem; }
.news-article { max-width: 820px; margin: 0 auto; }
.news-banner { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); margin: 8px 0 18px; }
.news-title { margin: 6px 0 8px; font-size: 2.2rem; line-height: 1.2; }
.news-lead { color: var(--text-dim); font-size: 1.15rem; margin: 0 0 22px; }
.news-content { margin-bottom: 26px; }
.news-reactions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.reaction-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 6px 14px; font-size: 0.95rem; }
.reaction-btn:hover { border-color: var(--accent); }
.reaction-btn.mine { border-color: var(--accent); background: rgba(46, 230, 166, 0.12); }
.reaction-count { font-weight: 700; font-size: 0.85rem; min-width: 8px; }
.news-comments { margin-top: 28px; }
.news-comments h2 { font-size: 1.3rem; }
.news-comment-form { margin-bottom: 18px; }
.news-comment-form textarea { width: 100%; }
.comment-form-foot { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.news-comment-list { gap: 14px; }
.news-comment { display: flex; gap: 12px; align-items: flex-start; }
.news-comment-body { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.news-comment-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.news-comment-head .comment-delete { margin-left: auto; font-size: 0.8rem; }
.news-comment .comment-text { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; }

/* ---- Admin : accueil, classements ---- */
.home-admin-card { max-width: 760px; }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank-list li { display: flex; align-items: center; gap: 12px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; }
.rank-n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #04231a; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.85rem; }
.rank-name { flex: 1; min-width: 0; font-weight: 600; }
.rank-actions { display: flex; gap: 6px; align-items: center; }
.chat-send:disabled { opacity: 0.55; cursor: default; }

/* ---- SilverCore (dashboard) ---- */
.sc-guilds { display: grid; gap: 10px; max-width: 720px; }
.sc-guild { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.sc-guild-icon { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-alt); }
.sc-guild-initial { display: grid; place-items: center; font-weight: 800; color: var(--accent); }
.sc-guild-body { flex: 1; min-width: 0; display: grid; }
.sc-guild-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text); }
.sc-wait { display: flex; align-items: center; gap: 10px; color: var(--text-dim); margin: 0; }
.sc-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: sc-spin 0.9s linear infinite; }
@keyframes sc-spin { to { transform: rotate(360deg); } }
.sc-modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; max-width: 900px; }
.sc-module { display: flex; flex-direction: column; gap: 8px; padding: 14px; color: var(--text); }
.sc-module:hover { border-color: var(--accent); text-decoration: none; }

.sc-urgent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sc-urgent li { display: flex; align-items: center; gap: 10px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.sc-urgent-num { width: 24px; height: 24px; border-radius: 50%; background: var(--card); border: 1px solid var(--border); display: grid; place-items: center; font-size: 0.8rem; color: var(--accent); flex-shrink: 0; }
.sc-urgent-label { flex: 1; min-width: 0; }
.sc-urgent .actions { display: flex; gap: 2px; }
.sc-urgent .actions form { margin: 0; }
.sc-urgent .icon { background: none; border: 0; color: var(--text); cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.sc-urgent .icon:hover:not(:disabled) { background: var(--card); color: var(--accent); }
.sc-urgent .icon:disabled { opacity: 0.3; cursor: default; }
.sc-urgent-add { display: grid; gap: 8px; }
.sc-urgent-add form { margin: 0; }
.sc-member-add { position: relative; }
.sc-member-add input[type=search] { width: 100%; }
.sc-member-results { list-style: none; margin: 4px 0 0; padding: 4px; position: absolute; left: 0; right: 0; z-index: 5; background: var(--card); border: 1px solid var(--border); border-radius: 8px; max-height: 240px; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.sc-member-results button { width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.sc-member-results button:hover { background: var(--bg-alt); }
.sc-member-results .empty { padding: 8px 10px; color: var(--text-dim); }
.sc-role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

.sc-toolbar { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.sc-toolbar button { min-width: 32px; height: 30px; padding: 0 8px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); border-radius: 6px; cursor: pointer; font-size: 0.85rem; }
.sc-toolbar button:hover { border-color: var(--accent); color: var(--accent); }
.sc-modes { display: flex; gap: 18px; }
.sc-compose { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 960px) { .sc-compose { grid-template-columns: 1fr; } }
.sc-preview { position: sticky; top: 16px; }
.sc-discord { background: #313338; border-radius: 8px; padding: 14px; color: #dbdee1; font-size: 0.95rem; line-height: 1.4; overflow-wrap: anywhere; }
.sc-discord a { color: #00a8fc; }
.sc-discord code { background: #2b2d31; padding: 1px 4px; border-radius: 4px; }
.sc-discord pre { background: #2b2d31; padding: 8px; border-radius: 6px; margin: 4px 0; white-space: pre-wrap; }
.sc-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; padding: 0 2px; }
.sc-spoiler:hover { color: #dbdee1; }
.sc-mention { background: rgba(88,101,242,.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.sc-quote { border-left: 4px solid #4e5058; padding-left: 10px; margin: 2px 0; }
.sc-h1 { font-size: 1.5rem; font-weight: 700; } .sc-h2 { font-size: 1.25rem; font-weight: 700; } .sc-h3 { font-size: 1.05rem; font-weight: 700; }
.sc-prev-embed { display: flex; margin-top: 6px; background: #2b2d31; border-radius: 4px; overflow: hidden; max-width: 440px; }
.sc-prev-bar { width: 4px; flex-shrink: 0; }
.sc-prev-body { padding: 10px 12px; display: grid; gap: 6px; min-width: 0; position: relative; }
.sc-prev-title { font-weight: 700; color: #fff; }
.sc-prev-thumb { position: absolute; top: 10px; right: 10px; width: 56px; height: 56px; border-radius: 6px; object-fit: cover; }
.sc-prev-img { max-width: 100%; border-radius: 6px; }
.sc-prev-footer { font-size: 0.78rem; color: #949ba4; }
.sc-current-image { display: flex; align-items: center; gap: 14px; }
.sc-current-image img { max-width: 160px; max-height: 90px; border-radius: 6px; border: 1px solid var(--border); object-fit: cover; }

/* ---- Configuration d'un bot (admin) ---- */
.bot-detail-row td { padding-top: 0; border-top: 0; }
.bot-details > summary { cursor: pointer; color: var(--text-dim); font-size: 0.88rem; display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.bot-details[open] > summary { color: var(--text); }
.bot-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 6px; }
.bot-detail-grid .callback-box input { font-size: 0.78rem; }
.bot-guilds { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.bot-guilds li { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.dc-check li:not(.good):not(.bad)::before { content: "•"; color: var(--text-dim); }

/* ---- SilverCore : pages larges, tuiles, systèmes ---- */
.sc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; margin-bottom: 24px; }
.sc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1300px) { .sc-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) { .sc-cols, .sc-cols-3 { grid-template-columns: 1fr; } }
.sc-stack { display: grid; gap: 20px; }
.sc-cols > .card, .sc-stack > .card { max-width: none; margin: 0; }
.sc-section { margin: 8px 0 32px; scroll-margin-top: 80px; }
.sc-section-head { margin-bottom: 14px; }
.sc-section-head h2 { margin: 0 0 4px; }
.sc-anchors { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sc-anchors a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-alt); color: var(--text); font-size: 0.88rem; }
.sc-anchors a:hover { border-color: var(--accent); text-decoration: none; }
#bienvenue, #aurevoir { scroll-margin-top: 80px; }

.sc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.sc-tile { display: flex; flex-direction: column; gap: 10px; padding: 22px; margin: 0; max-width: none; }
.sc-tile h2 { margin: 0; font-size: 1.25rem; }
.sc-tile p { margin: 0; }
.sc-tile-head { display: flex; justify-content: space-between; align-items: center; }
.sc-tile-icon { font-size: 2rem; line-height: 1; }
.sc-tile-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.sc-tile-soon { opacity: 0.65; }
.sc-switch { display: flex; align-items: center; gap: 12px; }
.sc-sep { border: 0; border-top: 1px solid var(--border); width: 100%; margin: 6px 0; }
.sc-modules { max-width: none; }
code { background: var(--bg-alt); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; font-size: 0.82rem; }

/* SilverCore : niveaux, économie, commandes */
.sc-rolegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; max-height: 260px; overflow: auto; padding: 10px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; }
.sc-roleopt { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--text); cursor: pointer; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-roleopt input { margin: 0; flex-shrink: 0; }
.cm-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; padding: 16px; overflow: auto; }
.cm-dialog { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; margin: 0; }
.cm-dialog h2 { margin: 0; }
.cm-label { margin: 0; font-weight: 700; font-size: 0.9rem; }
.cm-field { display: grid; gap: 6px; }
.cm-more summary { cursor: pointer; color: var(--text-dim); margin-bottom: 10px; }
.cm-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 2px; }
.cm-x:hover { color: var(--danger); }
.sc-edit summary { list-style: none; display: inline-block; cursor: pointer; }
.sc-edit summary::-webkit-details-marker { display: none; }
.table-wrap { overflow-x: auto; }
.sc-rolegrid .sc-roleopt, .form-stack .sc-rolegrid .sc-roleopt, .cm-dialog .sc-rolegrid .sc-roleopt { flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; flex-wrap: nowrap; }
.sc-roleopt input[type="checkbox"], .form-stack .sc-roleopt input[type="checkbox"] { width: 16px; height: 16px; }

/* SilverGuard : installation et page Joueurs */
.sg-live { max-width: 1100px; display: flex; align-items: center; gap: 14px; margin-bottom: 18px; border-color: var(--warning); }
.sg-live.is-online { border-color: var(--accent); background: rgba(46, 230, 166, 0.06); }
.sg-live-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--warning); flex-shrink: 0; box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.2); animation: sg-pulse 1.8s ease-in-out infinite; }
.sg-live.is-online .sg-live-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(46, 230, 166, 0.2); animation: none; }
@keyframes sg-pulse { 50% { box-shadow: 0 0 0 8px rgba(245, 166, 35, 0); } }
.sg-btnrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sg-bigbtn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 20px; font-size: 1.05rem; }
.sg-bigbtn small { font-weight: 400; opacity: 0.8; font-size: 0.8rem; }
.sg-tree { margin: 10px 0 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-family: Consolas, monospace; font-size: 0.85rem; overflow-x: auto; line-height: 1.5; }
.sg-tree strong { color: var(--accent); }
.sg-pbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.sg-pbar input[type=search] { margin-left: auto; min-width: 260px; flex: 1; max-width: 380px; }
.sg-notice { border-color: var(--warning); margin-bottom: 14px; max-width: 900px; }
.sg-players td { vertical-align: middle; }
.sg-ping { font-weight: 700; }
.sg-ping.good { color: var(--accent); }
.sg-ping.mid { color: var(--warning); }
.sg-ping.bad { color: var(--danger); }
.sg-shot { width: min(1100px, 100%); }
.sg-shot-frame { background: #000; border-radius: 8px; min-height: 240px; display: grid; place-items: center; overflow: hidden; }
.sg-shot-frame img { width: 100%; height: auto; display: block; }
.sg-shot-frame p { margin: 0; padding: 40px 12px; }

/* ---- SilverGuard : configuration simple (un choix par protection) ---- */
.sg-bulk { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 4px 0 18px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.sg-bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.sg-row { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; transition: border-color 0.2s, box-shadow 0.2s; }
.sg-row.saving { opacity: 0.7; }
.sg-row.saved { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(46, 230, 166, 0.18); }
.sg-row[data-mode="OFF"] .sg-row-title strong { color: var(--text-dim); }
.sg-row-head { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.sg-row-text { flex: 1 1 320px; min-width: 0; }
.sg-row-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sg-row-desc { margin: 4px 0 0; }
.sg-pill-sm { font-size: 0.7rem; padding: 1px 8px; }
.sg-seg { display: inline-flex; margin: 0; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--bg); flex-shrink: 0; }
.seg { appearance: none; border: 0; background: transparent; color: var(--text-dim); padding: 8px 16px; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.seg + .seg { border-left: 1px solid var(--border); }
.seg:hover { background: var(--bg-alt); color: var(--text); }
.seg.active.seg-off { background: var(--bg-alt); color: var(--text); }
.seg.active.seg-observe { background: rgba(255, 190, 70, 0.18); color: var(--warning); }
.seg.active.seg-flag { background: var(--accent); color: #04140e; }
.seg:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sg-row-more { margin-top: 8px; }
.sg-row-more > summary { cursor: pointer; color: var(--text-dim); font-size: 0.82rem; }
.sg-advanced { margin: 10px 0 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.sg-detail-text code { background: var(--bg); padding: 1px 6px; border-radius: 4px; }
.sg-na { margin: 8px 0 24px; border: 1px dashed var(--border); border-radius: var(--radius); padding: 10px 16px; }
.sg-na > summary { cursor: pointer; color: var(--text-dim); }
.sg-na .sg-row-off { margin-top: 8px; align-items: flex-start; }
.sg-overview-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 8px; }
.sg-tab-card { display: flex; flex-direction: column; gap: 6px; margin: 0; text-decoration: none !important; color: var(--text); }
.sg-tab-card:hover { border-color: var(--accent); }
.sg-tab-counts { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .sg-seg { width: 100%; }
  .seg { flex: 1; padding: 10px 6px; }
}

/* ---- SilverBase : configuration (images) ---- */
.sb-image-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.sb-image-row { display: flex; align-items: center; gap: 10px; }
.sb-image-row img { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); flex-shrink: 0; }
.sb-image-row input { flex: 1; min-width: 0; }
.sb-brand { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sb-brand:last-of-type { border-bottom: 0; }
.sb-brand-row { display: flex; align-items: center; gap: 10px; }
.sb-brand-row img { width: 64px; height: 36px; object-fit: contain; background: var(--bg); border-radius: 6px; border: 1px solid var(--border); flex-shrink: 0; }
.sb-brand-row input { flex: 1; min-width: 0; }

/* ---- SilverGuard : configuration en cartes (brouillon + Enregistrer) ---- */
.sgc-page { max-width: none; width: 100%; }
.sgc-bar { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 4px 0 14px; padding: 10px 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.sgc-bar-left, .sgc-bar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sgc-dirty { color: var(--warning); font-size: 0.82rem; font-weight: 600; }
.sgc-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.sgc-tab { flex: 1 1 0; min-width: max-content; appearance: none; border: 0; background: transparent; color: var(--text-dim); padding: 10px 14px; border-radius: calc(var(--radius) - 3px); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sgc-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.sgc-tab.active { color: var(--accent); background: rgba(46, 230, 166, 0.1); box-shadow: inset 0 0 0 1px rgba(46, 230, 166, 0.35); }
.sgc-intro { margin: 0 0 12px; }
.sgc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 16px; align-items: start; }
.sgc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 8px; }
.sgc-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sgc-card-head h2 { margin: 0; font-size: 1.05rem; }
.sgc-card-head p { margin: 2px 0 0; color: var(--text-dim); font-size: 0.8rem; }
.sgc-card-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(46, 230, 166, 0.1); color: var(--accent); flex-shrink: 0; }
.sgc-row { border-top: 1px solid var(--border); padding: 11px 0; transition: background 0.15s; }
.sgc-row.is-changed { background: linear-gradient(90deg, rgba(245, 166, 35, 0.1), transparent 70%); box-shadow: inset 3px 0 0 var(--warning); padding-left: 10px; margin-left: -10px; }
.sgc-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sgc-name { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.sgc-title { font-weight: 600; font-size: 0.92rem; }
.sgc-row:not(.is-on) .sgc-title { color: var(--text-dim); }
.sgc-info, .sgc-adv, .sgc-sanc { appearance: none; border: 1px solid transparent; background: transparent; color: var(--text-dim); cursor: pointer; border-radius: 8px; font: inherit; line-height: 1; padding: 5px 7px; font-size: 0.95rem; }
.sgc-info { padding: 2px 5px; font-size: 0.85rem; }
.sgc-info:hover, .sgc-adv:hover, .sgc-sanc:hover { color: var(--text); border-color: var(--border); }
.sgc-sanc.is-on { color: var(--warning); border-color: rgba(245, 166, 35, 0.5); background: rgba(245, 166, 35, 0.1); }
.sgc-sanc.is-on.is-idle { opacity: 0.55; }
.sgc-ctl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sgc-tag { font-size: 0.68rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--warning); cursor: pointer; }
.sgc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.sgc-switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.sgc-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); transition: background 0.15s, border-color 0.15s; }
.sgc-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-dim); transition: transform 0.15s, background 0.15s; }
.sgc-switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.sgc-switch input:checked + span::after { transform: translateX(20px); background: #04140e; }
.sgc-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sgc-more { margin-top: 8px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 0.82rem; color: var(--text-dim); }
.sgc-more p { margin: 0 0 6px; }
.sgc-more p:last-child { margin-bottom: 0; }
.sgc-adv-panel { margin-top: 10px; padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.sgc-card-na { opacity: 0.8; border-style: dashed; }
.sgc-na-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding: 10px 0; font-size: 0.85rem; }
.sgc-na-row div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sgc-na-row span { color: var(--text-dim); font-size: 0.78rem; }
.sgc-na-row em { font-style: normal; font-size: 0.7rem; color: var(--text-dim); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.sgc-na-more { margin: 4px 0 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.sgc-na-more summary { cursor: pointer; color: var(--text-dim); font-size: 0.82rem; }
.sgc-help { display: block; margin: 6px 0 0; color: var(--text-dim); font-size: 0.8rem; line-height: 1.45; }
.sgc-box { padding: 10px 12px; margin: 10px 0 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.sgc-field { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); padding: 11px 0; }
.sgc-field label { font-weight: 600; font-size: 0.9rem; }
.sgc-field input, .sgc-field select { max-width: 240px; }
.sgc-profile { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding: 11px 0; margin: 0; }
.sgc-profile > div { display: flex; flex-direction: column; min-width: 0; }
.sgc-code { margin: 8px 0; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 0.8rem; overflow-x: auto; }
.sgc-dialog { border: 0; background: transparent; padding: 0; color: var(--text); width: min(560px, 94vw); }
.sgc-dialog::backdrop { background: rgba(3, 6, 14, 0.7); }
.sgc-dialog textarea { width: 100%; font-family: Consolas, monospace; font-size: 0.82rem; }
@media (max-width: 640px) { .sgc-grid { grid-template-columns: 1fr; } .sgc-bar { position: static; } }

/* ---- Assistant d'installation SilverGuard (étapes) ---- */
.sgw { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; max-width: 1100px; margin-bottom: 22px; align-items: start; }
.sgw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sgw-step { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; font: inherit; transition: border-color 0.15s, background 0.15s; }
.sgw-step:hover { border-color: var(--accent); }
.sgw-step.is-active { border-color: var(--accent); background: rgba(46, 230, 166, 0.08); }
.sgw-n { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted, var(--text)); }
.sgw-step.is-active .sgw-n { border-color: var(--accent); color: var(--accent); }
.sgw-step.is-done .sgw-n { background: var(--accent); border-color: var(--accent); color: var(--bg); font-size: 0; }
.sgw-step.is-done .sgw-n::after { content: "✓"; font-size: 1rem; }
.sgw-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sgw-t small { opacity: 0.7; }
.sgw-help { margin-top: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; font-size: 0.88rem; }
.sgw-help ul { margin: 0 0 10px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.sgw-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sgw-head .eyebrow { margin: 0 0 8px; }
.sgw-bar { height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; }
.sgw-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.25s; }
.sgw-panel h2 { margin: 0 0 8px; font-size: 1.3rem; }
.sgw-panel[hidden] { display: none; }
.sgw-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }
.sgw-foot [hidden] { display: none; }
@media (max-width: 820px) { .sgw { grid-template-columns: 1fr; } .sgw-list { flex-direction: row; overflow-x: auto; } .sgw-step { min-width: 190px; } .sgw-help { display: none; } }

/* ---- Pied de page du site ---- */
.site-footer { padding: 40px 32px 28px; border-top: 1px solid var(--border); background: var(--bg-alt); text-align: center; }
.footer-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; max-width: 1400px; margin: 0 auto 26px; }
.footer-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 24px 22px; min-height: 190px; }
.footer-card h3 { margin: 0 0 16px; color: var(--accent); font-size: 1.25rem; }
.footer-card p { margin: 0; line-height: 1.55; font-weight: 600; }
.footer-card .footer-empty { color: var(--text-dim); font-weight: 400; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.footer-links a { color: var(--text); font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 4px; }
.footer-socials a { color: var(--text); display: inline-flex; transition: color 0.15s, transform 0.15s; }
.footer-socials a:hover { color: var(--accent); transform: translateY(-2px); }
.footer-copy { margin: 0; padding-top: 22px; border-top: 1px solid var(--border); max-width: 1400px; margin-left: auto; margin-right: auto; font-weight: 600; line-height: 1.6; }
@media (max-width: 820px) { .footer-cards { grid-template-columns: 1fr; } .site-footer { padding: 28px 16px 22px; } }

/* ---- Accueil : couverture centrée ---- */
.hero-section .hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-section .hero-title { margin-left: auto; margin-right: auto; }
.hero-section .hero-text { margin-left: auto; margin-right: auto; }

/* ---- Menu repliable « Produits » du panel admin ---- */
.panel-sidebar-group { display: block; }
.panel-sidebar-group-body { display: flex; flex-direction: column; gap: 2px; }
.panel-sidebar-group > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--text-dim); padding: 9px 12px; border-radius: var(--radius); font-size: 0.9rem; border-left: 3px solid transparent; }
.panel-sidebar-group > summary::-webkit-details-marker { display: none; }
.panel-sidebar-group > summary::after { content: "▸"; font-size: 0.8rem; transition: transform 0.15s; }
.panel-sidebar-group[open] > summary::after { transform: rotate(90deg); }
.panel-sidebar-group > summary:hover { background: var(--card); color: var(--text); }
.panel-sidebar-group.has-active > summary { color: var(--accent); font-weight: 600; border-left-color: var(--accent); }
.panel-sidebar-group .panel-sidebar-sub { margin-left: 14px; }
.sb-admin-note { display: flex; flex-direction: column; gap: 3px; background: rgba(245, 166, 35, 0.1); border: 1px solid var(--warning); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; font-size: 0.82rem; }
.sb-admin-note strong { color: var(--warning); }

/* ---- Admin → Produits (clés et serveurs d'un produit) ---- */
.pk-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pk-tabs a { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--border); color: var(--text-dim); text-decoration: none; font-size: 0.88rem; }
.pk-tabs a.active { border-color: var(--accent); color: var(--accent); background: rgba(46, 230, 166, 0.08); }
.pk-private { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pk-private code { word-break: break-all; }

/* Menu « Produits » : même titre que « GESTION », repliable en cliquant dessus */
.panel-sidebar-group > summary.panel-sidebar-category { font-size: 0.72rem; letter-spacing: 0.6px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin: 14px 0 2px; padding: 0 12px; border-left: none; border-radius: 0; color: var(--accent); font-weight: 700; }
.panel-sidebar-group > summary.panel-sidebar-category:hover { background: transparent; color: var(--accent); }
.panel-sidebar-group > summary.panel-sidebar-category::after { font-size: 0.7rem; }
.panel-sidebar-group.has-active > summary { border-left-color: transparent; }

/* ---- Pied de page : logos personnalisés, lignes de liens (admin) ---- */
.footer-logo { width: 30px; height: 30px; object-fit: contain; display: block; border-radius: 6px; transition: transform 0.15s, opacity 0.15s; opacity: 0.92; }
.footer-socials a:hover .footer-logo { transform: translateY(-2px); opacity: 1; }
.fl-rows { display: flex; flex-direction: column; gap: 10px; }
.fl-row { display: grid; grid-template-columns: minmax(140px, 1fr) 150px minmax(180px, 1.4fr) auto; gap: 8px; align-items: center; }
.fl-row [data-page], .fl-row [data-url] { grid-column: 3; }
.fl-row [hidden] { display: none; }
.fl-logos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fl-logos li { display: flex; align-items: center; gap: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.fl-logos img { object-fit: contain; border-radius: 8px; background: var(--card); }
.fl-logos li > span { flex: 1; min-width: 0; word-break: break-all; }
@media (max-width: 820px) { .fl-row { grid-template-columns: 1fr auto; } .fl-row [data-kind], .fl-row [data-page], .fl-row [data-url] { grid-column: 1 / -1; } }

/* ---- Licences : fenêtre de recherche ---- */
.lic-search { width: min(720px, 94vw); max-height: 88vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.lic-search[open] { display: flex; }
.lic-search-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lic-search input[type="search"] { width: 100%; }
.lic-results { display: flex; flex-direction: column; gap: 8px; }
.lic-result { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.lic-result.is-exact { border-color: var(--accent); }
.lic-result-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- Projets (panel Admin) ---- */
.sb-project > summary { cursor: pointer; list-style: none; }
.sb-project > summary::-webkit-details-marker { display: none; }
.sb-project > summary::after { content: "▾"; float: right; opacity: 0.6; }
.sb-project:not([open]) > summary::after { content: "▸"; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-card { border-top: 3px solid var(--project-color, var(--accent)); display: flex; flex-direction: column; gap: 10px; margin-bottom: 0; }
.project-card h2 { margin: 0; font-size: 1.2rem; }
.project-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.project-nav a { padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-dim); font-size: 0.9rem; }
.project-nav a.active, .project-nav a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.console-box { background: #05080f; border: 1px solid var(--border); border-radius: var(--radius); font-family: Consolas, monospace; font-size: 0.85rem; color: var(--text-dim); padding: 14px; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; }
.console-input { display: flex; gap: 8px; margin-top: 10px; }
.console-input input { flex: 1; }
.pfa-bot { margin-bottom: 18px; }
.pfa-bot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pfa-discord { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-top: 10px; background: var(--bg-alt); }
.pfa-discord textarea { width: 100%; }
.field-hidden { display: none !important; }

/* ---- Panels privés PrismFA : DA violette des panels Prism FA (entreprise / gang) ---- */
.pfa {
  --pfa-bg0: #0a0b0f; --pfa-bg1: #0f1117; --pfa-bg2: #151822; --pfa-bg3: #1c2030;
  --pfa-border: #262b3a; --pfa-text2: #c3c7d1; --pfa-muted: #8a90a3;
  --pfa-accent: #8b5cf6; --pfa-accent2: #a78bfa; --pfa-accent-d: #6d28d9;
  background: var(--pfa-bg0); color: #f2f3f5; border: 1px solid var(--pfa-border); border-radius: 14px; padding: 28px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.pfa h1, .pfa h2, .pfa h3 { margin: 0; }
.pfa .pfa-eyebrow { color: var(--pfa-accent2); font-weight: 700; letter-spacing: 1px; font-size: 0.75rem; margin: 0 0 4px; }
.pfa .pfa-head { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--pfa-border); flex-wrap: wrap; }
.pfa .pfa-logo { width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(135deg, var(--pfa-accent), var(--pfa-accent-d)); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; }
.pfa .pfa-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: rgba(139, 92, 246, 0.15); color: var(--pfa-accent2); border: 1px solid var(--pfa-accent); margin-right: 6px; }
.pfa .pfa-badge.illegal { background: rgba(237, 66, 69, 0.12); color: #ff8a8c; border-color: #ed4245; }
.pfa .pfa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pfa .pfa-card { background: var(--pfa-bg2); border: 1px solid var(--pfa-border); border-radius: 14px; padding: 16px; }
.pfa .pfa-card.soon { opacity: 0.65; border-style: dashed; }
.pfa .pfa-card h3 { font-size: 1rem; margin-bottom: 4px; }
.pfa .pfa-card p { margin: 0; color: var(--pfa-muted); font-size: 0.85rem; }
.pfa .pfa-link-card { display: block; color: inherit; transition: 0.15s; }
.pfa .pfa-link-card:hover { border-color: var(--pfa-accent); text-decoration: none; transform: translateY(-2px); }
.pfa .pfa-section { margin-top: 24px; }
.pfa .pfa-section h2 { font-size: 0.8rem; letter-spacing: 0.8px; color: var(--pfa-accent2); text-transform: uppercase; margin-bottom: 10px; }
.pfa .pfa-btn { display: inline-block; background: var(--pfa-accent); color: #fff; font-weight: 700; padding: 8px 16px; border-radius: 10px; }
.pfa .pfa-btn:hover { filter: brightness(1.12); text-decoration: none; }
.pfa .pfa-muted { color: var(--pfa-muted); font-size: 0.85rem; }

/* ---- Accueil : boutons du hero et liens des projets ---- */
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 0; }
.home-project-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
html { scroll-behavior: smooth; }

/* ---- Menu du profil : icônes (même style trait fin que le reste du site) ---- */
.nav-item-label { display: inline-flex; align-items: center; gap: 10px; }
.nav-ic { flex-shrink: 0; opacity: 0.9; }

/* ---- Panel Finance ---- */
.fin-filters { padding: 14px 18px; margin-bottom: 14px; }
.fin-filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.fin-filter-row label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--text-dim); min-width: 120px; }
.fin-filter-row input, .fin-filter-row select { padding: 7px 10px; font-size: 0.88rem; }
.fin-filter-actions { display: flex; gap: 8px; align-items: center; padding-bottom: 2px; }
.fin-chart { width: 100%; height: auto; display: block; margin-top: 8px; }
.fin-bar { fill: var(--accent); opacity: 0.85; }
.fin-bar:hover { opacity: 1; }
.fin-axis { stroke: var(--border); stroke-width: 1; }
.fin-label { fill: var(--text-dim); font-size: 11px; }
.fin-inactive { opacity: 0.55; }
.fin-notice { border-left: 3px solid var(--warning); }
.fin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fin-table-wrap { overflow-x: auto; }
.fin-pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 14px 0; color: var(--text-dim); }
.fin-defs ul { margin: 10px 0 0; padding-left: 20px; color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; }
.fin-list { color: var(--text-dim); line-height: 1.8; }
.fin-edit summary { cursor: pointer; }
.text-danger { color: var(--danger); }
@media (max-width: 900px) { .fin-cols { grid-template-columns: 1fr; } .fin-filter-row label { min-width: 46%; } }
.fin-scope { min-width: 0; }
.fin-scope .data-table { display: block; overflow-x: auto; max-width: 100%; }
@media (max-width: 760px) {
  .panel-shell:has(.fin-scope) { flex-direction: column; }
  .panel-shell:has(.fin-scope) .panel-sidebar { width: 100%; min-height: 0; position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; border-right: 0; border-bottom: 1px solid var(--border); padding: 12px; }
  .panel-shell:has(.fin-scope) .panel-sidebar-category { display: none; }
  .panel-shell:has(.fin-scope) .panel-content { padding: 18px 14px 36px; }
}

/* Cartes des projets : Site, Discord, En savoir plus sur une seule ligne */
.home-project-links { flex-wrap: nowrap; }
.home-project-links .btn-small { white-space: nowrap; padding-left: 10px; padding-right: 10px; }

/* Permissions d'un rôle de projet : une carte par catégorie */
.perm-group { border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px 10px; margin: 0 0 10px; display: grid; gap: 6px; }
.perm-group legend { padding: 0 8px; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }

/* Paramètres du projet : sous-navigation */
.settings-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.settings-nav a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.settings-nav a:hover { color: var(--text); }
.settings-nav a.active { background: rgba(46,230,166,0.12); border-color: var(--accent); color: var(--accent); }
.pill[draggable="true"] { cursor: grab; user-select: none; }
.pill.drag-over { outline: 2px dashed var(--accent); }
.pill.dragging { opacity: 0.4; }

/* Cartes de bots : compactes, dépliables */
.bot-card { padding: 0; margin-bottom: 10px; }
.bot-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.bot-summary::-webkit-details-marker { display: none; }
.bot-summary::before { content: "▸"; color: var(--text-dim); margin-right: 8px; }
.bot-card[open] > .bot-summary::before { content: "▾"; }
.bot-summary-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.bot-body { padding: 0 16px 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.bot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.bot-actions form { margin: 0; }
.bot-h { margin: 16px 0 8px; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); }
.bot-servers { display: grid; gap: 8px; }
.bot-server { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg-alt); }
.bot-server-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bot-sub { margin-top: 8px; }

/* Accueil : produits numériques à gauche (2 colonnes), projets à droite */
.home-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 36px; align-items: start; }
.home-split > .home-section:only-child { grid-column: 1 / -1; }
.home-split .product-grid.home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-split .home-projects .product-grid.home-grid { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1000px) { .home-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .home-split .product-grid.home-grid { grid-template-columns: minmax(0, 1fr); } }

/* Avis : note, votes, commentaires */
.narrow-wide { max-width: 820px; margin: 0 auto 40px; }
.reviews { margin-top: 36px; text-align: left; }
.reviews h2 { margin: 0 0 14px; }
.reviews-top { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.reviews-score { text-align: center; min-width: 110px; }
.reviews-avg { font-size: 2.4rem; font-weight: 800; margin: 0; line-height: 1; }
.reviews-avg span { font-size: 1rem; color: var(--text-dim); font-weight: 600; }
.reviews-stars { color: #f5b301; letter-spacing: 2px; margin: 4px 0; }
.reviews-dist { flex: 1; min-width: 200px; display: grid; gap: 4px; }
.reviews-row { display: grid; grid-template-columns: 38px 1fr 28px; gap: 8px; align-items: center; font-size: 0.82rem; }
.reviews-bar { height: 8px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.reviews-bar i { display: block; height: 100%; background: #f5b301; }
.reviews-votes { display: flex; gap: 8px; margin: 0; }
.reviews-votes .is-on { border-color: var(--accent); color: var(--accent); background: rgba(46,230,166,0.1); }
.reviews-form { margin-bottom: 16px; }
.review { margin-top: 10px; padding: 12px 16px; }
.review-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.review-head form { margin-left: auto; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; font-size: 1.9rem; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: var(--border); line-height: 1; padding: 0 2px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #f5b301; }
.star-input input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }

/* ===== Accueil v2 : plus sobre, deux colonnes égales, texte centré ; sur téléphone : onglets sur une ligne + liste déroulante ===== */
.hero-section { padding: 44px 0 40px; }
.hero-section .hero-title { font-size: 1.95rem; margin: 4px 0 8px; letter-spacing: -0.01em; }
.hero-section .hero-text { font-size: 0.98rem; max-width: 620px; margin: 0 auto 18px; line-height: 1.55; }
.hero-actions .btn-primary, .hero-actions .btn-ghost { padding: 8px 18px; font-size: 0.9rem; }
.home-sections { max-width: 1240px; margin: 0 auto; padding-top: 34px; gap: 40px; }
.home-section .section-title { font-size: 1.2rem; margin: 0 0 4px; }
.home-section .section-title::after { content: ""; display: block; width: 36px; height: 3px; border-radius: 3px; background: var(--accent); margin: 10px auto 0; }
.home-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.home-split > .home-tabs { display: none; }
.home-split .product-grid.home-grid, .home-split .home-projects .product-grid.home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.home-split .home-product { align-items: center; text-align: center; gap: 4px; padding: 16px 14px 14px; border-radius: 12px; transition: border-color .15s, transform .15s; }
.home-split .home-product:hover { border-color: var(--accent); transform: translateY(-2px); }
.home-split .home-product h2 { font-size: 1.05rem; }
.home-split .home-product .eyebrow { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.home-split .home-product .hint { font-size: 0.8rem; line-height: 1.45; margin: 2px 0 8px; }
.home-split .home-product .btn-small, .home-split .home-product .badge { font-size: 0.78rem; }
.home-split .home-product .btn-small { padding: 5px 12px; }
.home-split .home-product .badge { margin-bottom: 4px; }
.home-split .home-project-links { justify-content: center; margin: 4px 0 0; gap: 6px; flex-wrap: wrap; }
.home-split .home-project-links .btn-small { padding: 5px 11px; }

@media (max-width: 860px) {
  .hero-section { padding: 30px 0 26px; }
  .hero-section .hero-title { font-size: 1.55rem; }
  .home-sections { padding-top: 22px; gap: 28px; }
  .home-split { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* les deux titres tiennent sur une seule ligne et ouvrent chacun leur liste */
  .home-split.is-tabbed > .home-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
  .home-tab { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-weight: 700; font-size: 0.86rem; cursor: pointer; }
  .home-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-tab::after { content: "▾"; color: var(--text-dim); transition: transform .2s; }
  .home-tab.is-open { border-color: var(--accent); color: var(--accent); background: rgba(46,230,166,0.08); }
  .home-tab.is-open::after { transform: rotate(180deg); color: var(--accent); }
  .home-split.is-tabbed .home-section[data-pane] { display: none; }
  .home-split.is-tabbed .home-section[data-pane].is-open { display: block; animation: homeDrop .18s ease-out; }
  .home-split.is-tabbed .home-section[data-pane] > .section-title { display: none; }
  .home-split .product-grid.home-grid, .home-split .home-projects .product-grid.home-grid { margin-top: 0; }
}
@media (max-width: 520px) {
  .home-split .product-grid.home-grid, .home-split .home-projects .product-grid.home-grid { grid-template-columns: minmax(0, 1fr); }
  .container { padding-left: 16px; padding-right: 16px; }
}
@keyframes homeDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ===== Menus : un seul ouvert, téléphone, panels repliables, onglets compacts ===== */
.topnav-links:has(.nav-dropdown.open) .nav-dropdown:not(.open) .nav-dropdown-menu { display: none !important; }
.sb-collapse { align-self: flex-end; background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 0.76rem; cursor: pointer; margin: 0 0 8px; }
.sb-collapse:hover { color: var(--text); border-color: var(--accent); }
.sb-expand { display: none; position: fixed; left: 12px; bottom: 18px; z-index: 35; background: var(--card); color: var(--text); border: 1px solid var(--accent); border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,0.45); }
.panel-shell.sb-collapsed > .panel-sidebar { display: none; }
.project-nav, .settings-nav { gap: 6px; }
.project-nav a, .settings-nav a { min-width: 92px; text-align: center; padding: 6px 12px; font-size: 0.82rem; border-radius: 999px; white-space: nowrap; line-height: 1.3; }
.project-nav a[style*="margin-left:auto"] { min-width: 0; }

@media (max-width: 800px) {
  .topnav-inner { padding: 10px 14px; gap: 8px 12px; }
  .topnav-links { position: relative; justify-content: space-between; gap: 6px; flex-wrap: nowrap; }
  .topnav-links > a, .topnav-links .nav-dropdown-btn { font-size: 0.82rem; white-space: nowrap; }
  .nav-dropdown { position: static; }
  .nav-dropdown-menu { left: 0; right: 0; min-width: 0; padding-top: 10px; }
  .project-nav, .settings-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .project-nav::-webkit-scrollbar, .settings-nav::-webkit-scrollbar { display: none; }
  .project-nav a, .settings-nav a { flex: 0 0 auto; min-width: 84px; }
}

/* ===== Mon profil : page centrée, onglets comme l'accueil ===== */
.profile-page { max-width: 680px; margin: 0 auto; padding-top: 8px; text-align: center; }
.pf-head { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 18px; }
.pf-head .user-avatar, .pf-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; font-size: 1.6rem; }
.pf-head h1 { margin: 6px 0 0; font-size: 1.5rem; }
.pf-head p { margin: 0; }
.pf-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.pf-tabs a { display: flex; align-items: center; justify-content: center; padding: 9px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); font-weight: 700; font-size: 0.84rem; text-decoration: none; white-space: nowrap; transition: border-color .15s, transform .15s; }
.pf-tabs a:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.pf-tabs a.active { border-color: var(--accent); color: var(--accent); background: rgba(46,230,166,0.08); }
.pf-card { text-align: left; border-radius: 14px; padding: 20px 22px; margin-bottom: 14px; }
.pf-card h2 { margin: 0 0 4px; font-size: 1.05rem; text-align: center; }
.pf-card h2::after { content: ""; display: block; width: 32px; height: 3px; border-radius: 3px; background: var(--accent); margin: 8px auto 14px; }
.pf-card .hint { text-align: center; }
.pf-rows { display: grid; gap: 0; margin: 0; }
.pf-rows > div { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 11px 2px; border-top: 1px solid var(--border); font-size: 0.92rem; }
.pf-rows > div:first-child { border-top: none; }
.pf-rows dt { color: var(--text-dim); }
.pf-rows dd { margin: 0; text-align: right; font-weight: 600; }
.pf-card .form-stack { text-align: left; }
.pf-center { text-align: center; }
@media (max-width: 560px) { .pf-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-card { padding: 16px 14px; } }

/* ===== Accueil : cartes cliquables ===== */
.home-card { position: relative; }
.home-card .stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.home-card-badge { position: absolute; top: 9px; right: 10px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(245,166,35,0.12); color: var(--warning); border: 1px solid rgba(245,166,35,0.6); }
.home-card-foot { width: 100%; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.home-card-more { color: var(--accent); font-weight: 700; font-size: 0.8rem; text-decoration: none; }
.home-card:hover .home-card-more { text-decoration: underline; }
.home-card-bar { display: flex; width: calc(100% + 28px); margin: auto -14px -14px; border-top: 1px solid var(--border); }
.home-bar-link { position: relative; z-index: 2; flex: 1; text-align: center; padding: 9px 6px; font-size: 0.78rem; font-weight: 700; color: var(--text-dim); text-decoration: none; border-left: 1px solid var(--border); transition: color .15s, background .15s; }
.home-bar-link:first-child { border-left: none; }
.home-bar-link:hover { color: var(--accent); background: rgba(46,230,166,0.06); text-decoration: none; }
.home-bar-main { z-index: 1; color: var(--accent); }
.home-split .home-product .home-card-bar .btn-small { all: unset; }

/* ===== Page d'un projet ===== */
.pj-page { max-width: 820px; margin: 0 auto; padding-top: 10px; text-align: center; }
.pj-hero h1 { font-size: 2rem; margin: 0; }
.pj-hero h1::after { content: ""; display: block; width: 40px; height: 3px; border-radius: 3px; background: var(--accent); margin: 12px auto 0; }
.pj-rating { display: inline-flex; align-items: baseline; gap: 6px; margin-top: 14px; color: var(--text); text-decoration: none; padding: 5px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); }
.pj-rating:hover { border-color: var(--accent); text-decoration: none; }
.pj-stars { color: #f5b301; letter-spacing: 2px; }
.pj-of, .pj-count { color: var(--text-dim); font-size: 0.82rem; }
.pj-lead { color: var(--text-dim); margin: 14px auto 0; max-width: 620px; line-height: 1.55; }
.pj-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0 22px; }
.pj-actions .btn-primary, .pj-actions .btn-ghost { padding: 8px 18px; font-size: 0.9rem; }
.pj-card { text-align: left; border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; }
.pj-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 26px; }
.pj-links a { padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); font-weight: 700; font-size: 0.84rem; text-decoration: none; transition: border-color .15s, color .15s; }
.pj-links a:hover { border-color: var(--accent); color: var(--accent); }
.pj-section { margin-top: 10px; }
.pj-title { font-size: 1.15rem; margin: 6px 0 14px; }
.pj-title::after { content: ""; display: block; width: 32px; height: 3px; border-radius: 3px; background: var(--accent); margin: 8px auto 0; }
.pj-servers { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.pj-server { text-align: center; padding: 16px 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; margin: 0; }
.pj-server h3 { margin: 0; font-size: 1rem; }
.pj-server-link { padding: 5px 16px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: var(--text); text-decoration: none; }
.pj-server-link:hover { border-color: var(--accent); color: var(--accent); }
.pj-back { margin-top: 24px; }
@media (max-width: 560px) { .pj-hero h1 { font-size: 1.6rem; } .pj-servers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.home-bar-link { white-space: nowrap; padding-left: 4px; padding-right: 4px; font-size: 0.76rem; }
.home-bar-main { flex: 1.6; }

/* ===== Page projet v2 : barre en haut (boutons | titre | note et votes), contenu plus large, avis en fenêtres ===== */
.pj-wide { max-width: 1060px; margin: 0 auto; padding-top: 4px; text-align: center; }
.pj-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; margin: 6px 0 4px; }
.pj-bar-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pj-bar-left { justify-self: start; }
.pj-bar-right { justify-self: end; justify-content: flex-end; }
.pj-name { margin: 0; font-size: 1.8rem; }
.pj-name::after { content: ""; display: block; width: 40px; height: 3px; border-radius: 3px; background: var(--accent); margin: 10px auto 0; }
.pj-bar .btn-primary, .pj-bar .btn-ghost { padding: 7px 15px; font-size: 0.84rem; }
button.pj-rating { margin: 0; font: inherit; cursor: pointer; padding: 5px 12px; font-size: 0.85rem; }
.pj-votes { display: flex; gap: 6px; margin: 0; }
.pj-vote { background: var(--card); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.pj-vote:hover, .pj-vote.is-on { border-color: var(--accent); color: var(--accent); }
.pj-lead { margin: 12px auto 0; max-width: 760px; font-size: 0.95rem; }
.pj-links { margin: 14px 0 18px; }
.pj-card { padding: 18px 24px; }
.pj-intro { text-align: left; white-space: pre-line; font-size: 0.9rem; line-height: 1.6; color: var(--text); column-width: 380px; column-gap: 44px; }
.pj-servers { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.pj-server { padding: 12px 10px; }
.pj-server h3 { font-size: 0.95rem; }
.pj-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; text-align: left; }
.pj-events .pj-card { margin: 0; }
.rv-dialog { width: min(560px, 95vw); max-height: 88vh; overflow-y: auto; }
.rv-list-dialog { width: min(680px, 95vw); }
.rv-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rv-summary { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 12px; }
.rv-summary strong { font-size: 1.6rem; }
.rv-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.rv-filters input { flex: 1; min-width: 200px; }
.rv-items { display: grid; gap: 8px; text-align: left; }
.rv-item { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; background: var(--bg-alt); }
.rv-item[hidden] { display: none; }
@media (max-width: 860px) {
  .pj-bar { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .pj-bar .pj-name { order: 1; }
  .pj-bar-right { order: 2; justify-self: center; justify-content: center; }
  .pj-bar-left { order: 3; justify-self: center; justify-content: center; }
  .pj-intro { column-width: auto; }
}
.pj-servers { grid-template-columns: repeat(auto-fit, minmax(170px, 240px)); justify-content: center; }

a.stat-card { color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.stat-card:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }

/* ===== Statistiques du site ===== */
.site-chart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 190px; margin: 6px 0 12px; }
.site-bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; padding-bottom: 32px; }
.site-bar-fill { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--accent), rgba(46,230,166,0.35)); min-height: 2px; }
.site-bar-val { position: absolute; bottom: 16px; font-size: 0.68rem; color: var(--text-dim); }
.site-bar-label { position: absolute; bottom: 0; font-size: 0.64rem; color: var(--text-dim); white-space: nowrap; }
@media (max-width: 600px) { .site-chart { gap: 3px; } .site-bar-label { display: none; } .site-bar { padding-bottom: 18px; } }

/* ===== Panel Growzy : titres et descriptions centrés ===== */
.panel-shell:has(#growzy-sidebar) .panel-heading { text-align: center; }
.panel-shell:has(#growzy-sidebar) .panel-heading h1, .panel-shell:has(#growzy-sidebar) .panel-heading .eyebrow { text-align: center; }
.panel-shell:has(#growzy-sidebar) .panel-heading .hint { max-width: 760px; margin-left: auto; margin-right: auto; }
.panel-shell:has(#growzy-sidebar) .panel-heading-row { justify-content: space-between; align-items: flex-start; }
.panel-shell:has(#growzy-sidebar) .panel-heading-row > .panel-heading { flex: 1; }
.panel-shell:has(#growzy-sidebar) .panel-content > h1, .panel-shell:has(#growzy-sidebar) .panel-content > h2.section-title { text-align: center; }

/* ===== Bandeau d'en-tête des pages produit et projet : ligne sur toute la largeur, comme sous le haut de l'accueil ===== */
.page-band { background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); padding: 4px 0 12px; margin-bottom: 26px; }
.page-band .container { padding-top: 22px; padding-bottom: 6px; }
.page-band .pj-links { margin-bottom: 8px; }
.page-band .pj-actions { margin-top: 12px; }
.pj-wide .product-banner { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; margin-bottom: 16px; }
.pj-wide .page-content { text-align: left; font-size: 0.93rem; line-height: 1.65; }

/* ---- Dashboards produit : en-tête centré, alertes orange en haut à droite, activation et liste des serveurs ---- */
.panel-shell:has(#dashboard-sidebar) .panel-content { position: relative; }
.panel-shell:has(#dashboard-sidebar) .panel-heading { text-align: center; }
.panel-shell:has(#dashboard-sidebar) .panel-heading .hint { max-width: 760px; margin-left: auto; margin-right: auto; }
.dash-notices { position: absolute; top: 18px; right: 28px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 20; }
.dash-notice { position: relative; }
.dash-notice summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--warning); background: rgba(245, 166, 35, 0.12); color: var(--warning); font-size: 0.85rem; font-weight: 600; }
.dash-notice summary::-webkit-details-marker { display: none; }
.dash-notice-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--warning); color: #1a1100; font-size: 0.75rem; font-weight: 800; }
.dash-notice p { position: absolute; right: 0; top: calc(100% + 6px); width: min(340px, 80vw); margin: 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--warning); border-radius: var(--radius); font-size: 0.88rem; line-height: 1.45; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
@media (max-width: 1100px) { .dash-notices { position: static; align-items: stretch; margin-bottom: 14px; } .dash-notice p { position: static; width: auto; margin-top: 6px; } }
.dash-hero { max-width: 820px; margin: 12px auto 26px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, rgba(46, 230, 166, 0.07), transparent 70%), var(--card); overflow: hidden; }
.dash-hero-banner { width: 100%; max-height: 200px; object-fit: cover; display: block; }
.dash-hero-body { padding: 30px 28px 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dash-hero-body h1 { margin: 0; font-size: 2.1rem; }
.dash-hero-desc { margin: 4px 0 0; max-width: 620px; font-size: 1.05rem; }
.dash-hero-excerpt { margin: 0; max-width: 620px; }
.dash-hero-body .btn-ghost { margin-top: 10px; }
.dash-activate { max-width: 720px; margin: 0 auto 28px; text-align: center; padding: 26px 28px; }
.dash-activate h2 { margin: 0 0 8px; }
.dash-activate .hint { margin: 0 auto 16px; max-width: 560px; }
.dash-activate .inline-add { display: flex; gap: 10px; }
.dash-activate .inline-add input { flex: 1; min-width: 0; }
.dash-servers { max-width: 820px; margin: 0 auto 24px; text-align: center; }
.dash-servers h2 { font-size: 1.15rem; margin: 0 0 12px; }
.dash-server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.dash-server { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.dash-server:hover { border-color: var(--accent); transform: translateY(-2px); }
@media (max-width: 600px) { .dash-activate .inline-add { flex-direction: column; } .dash-hero-body h1 { font-size: 1.7rem; } }

/* ---- Calendrier d'un projet ---- */
.cal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-title { min-width: 140px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: 0.78rem; font-weight: 700; color: var(--text-dim); padding: 4px 0; }
.cal-cell { background: var(--card); border: 1px solid var(--border); border-radius: 10px; min-height: 92px; padding: 6px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-empty { background: transparent; border-style: dashed; opacity: 0.35; }
.cal-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cal-day { font-weight: 700; font-size: 0.85rem; }
.cal-chip { font-size: 0.72rem; background: rgba(46, 230, 166, 0.14); color: var(--accent); border-radius: 6px; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: 0.7rem; color: var(--text-dim); }
.cal-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.cal-row:first-of-type { border-top: 0; }
.cal-form { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-bottom: 10px; }
@media (max-width: 700px) {
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 56px; padding: 3px; border-radius: 6px; }
  .cal-chip { font-size: 0; padding: 0; height: 6px; width: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
  .cal-form { grid-template-columns: 1fr; }
}

/* ---- Pied de page sur téléphone : rien ne passe sous la bulle de chat, cartes compactes (version PC inchangée) ---- */
@media (max-width: 820px) {
  .site-footer { padding: 22px 14px 96px; }
  .footer-cards { gap: 12px; margin-bottom: 18px; }
  .footer-card { min-height: 0; padding: 16px 16px 18px; border-radius: 14px; }
  .footer-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
  .footer-links { gap: 10px; }
  .footer-socials { gap: 16px; justify-content: flex-start; }
  .footer-copy { padding-top: 16px; font-size: 0.85rem; }
  .chat-bubble { right: 14px; bottom: 14px; width: 50px; height: 50px; }
}

/* ---- Joueurs en ligne ---- */
.pl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pl-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; }

/* ---- Liste des entreprises (Pris / Dispo) ---- */
.co-cat { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.co-cat-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.co-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.co-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-alt); color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; }
.co-chip:hover { border-color: var(--accent); }
.co-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.co-state { font-size: 0.72rem; font-weight: 700; opacity: 0.85; }
.co-chip.co-dispo { color: #2ee6a6; } .co-chip.co-pris { color: #f59e0b; }
.co-chip .co-name { color: var(--text); }
.co-chip.co-new { color: var(--text-dim); border-style: dashed; }
.co-state-pick { display: flex; gap: 10px; }
.co-radio { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-weight: 700; }
.co-radio.co-dispo { color: #2ee6a6; } .co-radio.co-pris { color: #f59e0b; }

/* ---- Page Staff : recherche, filtres, grades repliables ---- */
.staff-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; margin-bottom: 14px; }
.staff-toolbar input[type="search"] { flex: 1; min-width: 220px; max-width: 380px; }
.staff-grade[hidden], .staff-row[hidden], .staff-body[hidden] { display: none !important; }
.staff-toggle { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 4px 0; text-align: left; }
.staff-chevron { display: inline-block; width: 1.1em; color: var(--accent); }
.staff-fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.staff-fieldset legend { padding: 0 6px; font-weight: 700; font-size: 0.85rem; color: var(--text-dim); }

/* ---- Titres centrés des pages de projet ---- */
.project-title { text-align: center; }
.page-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 14px; }
.page-head h2 { margin: 0; text-align: center; }
.page-head > :last-child { justify-self: end; }
@media (max-width: 700px) { .page-head { grid-template-columns: 1fr; justify-items: center; } .page-head > :first-child { display: none; } .page-head > :last-child { justify-self: center; } }

/* ---- Accueil du projet : statistiques et staff ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat-card .eyebrow { margin: 0 0 10px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.stat-row strong { display: block; font-size: 1.8rem; line-height: 1.1; color: var(--accent); }
.stat-row span { font-size: 0.78rem; color: var(--text-dim); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.team-member { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; }
.team-absent { opacity: 0.75; border-style: dashed; }
.bots-dialog { width: min(1000px, 96vw); max-height: 92vh; overflow: auto; padding: 22px; }

/* ---- Page Staff : actions à gauche, fenêtres de fonction et de réunion ---- */
.staff-toolbar { justify-content: space-between !important; }
.staff-actions, .staff-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.staff-filters { flex: 1; justify-content: flex-end; }
.staff-filters input[type="search"] { flex: 1; min-width: 200px; max-width: 360px; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.perm-box { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.perm-box h3 { margin: 0; font-size: 0.95rem; }
.form-stack .perm-item { flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-alt); color: var(--text); cursor: pointer; font-size: 0.92rem; }
.form-stack .perm-item input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.perm-name { font-weight: 700; }
.perm-bots { margin-left: auto; font-size: 0.75rem; color: var(--text-dim); text-align: right; }
.perm-tag { font-size: 0.7rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); margin-left: 6px; }
.perm-off { margin: 0; font-size: 0.85rem; color: var(--text-dim); }
.meeting-functions { display: flex; flex-direction: column; gap: 6px; }
.recruit-image { display: flex; align-items: center; gap: 14px; }
.recruit-image img { max-width: 220px; max-height: 120px; border-radius: 10px; border: 1px solid var(--border); object-fit: cover; }
@media (max-width: 700px) { .perm-grid { grid-template-columns: 1fr; } .staff-filters { justify-content: flex-start; } }

/* ---- Calendrier : réunions, absences, récap ---- */
.cal-chip.cal-reunion { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.cal-abs { font-size: 0.68rem; color: #f59e0b; background: rgba(245, 158, 11, 0.12); border-radius: 6px; padding: 1px 5px; }
.cal-recap { grid-template-columns: repeat(4, 1fr); margin-bottom: 8px; }
.cal-abs-list { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
@media (max-width: 700px) { .cal-recap { grid-template-columns: repeat(2, 1fr); } .cal-abs { font-size: 0; width: 6px; height: 6px; padding: 0; border-radius: 50%; background: #f59e0b; display: inline-block; } }

/* ---- Tickets : fonctions staff par raison ---- */
.dc-fn-wrap { display: flex; flex-direction: column; gap: 6px; }
.dc-functions { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-fn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-alt); color: var(--text); cursor: pointer; font-size: 0.88rem; flex-direction: row; }
.dc-fn input { width: 15px; height: 15px; margin: 0; }
.dc-fn-off { opacity: 0.5; cursor: not-allowed; }
/* ---- Affiliés ---- */
.aff-role { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.aff-role input[type="search"] { margin-left: auto; min-width: 220px; max-width: 360px; flex: 1; }

/* ---- Clé de liaison du site Prism : affichée une fois dans la fenêtre des bots ---- */
.key-box { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; margin: 10px 0; border: 1px solid var(--accent); border-radius: 12px; background: rgba(46, 230, 166, 0.08); }
.key-row { display: flex; gap: 8px; }
.key-row input { flex: 1; font-family: monospace; min-width: 0; }

/* ---- Support : fils de discussion ---- */
.sup-page { max-width: 1100px; margin: 0 auto; }
.sup-head { text-align: center; margin-bottom: 18px; }
.sup-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.sup-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sup-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.sup-row:first-of-type { border-top: 0; }
.sup-row:hover strong { color: var(--accent); }
.sup-conv { display: flex; flex-direction: column; gap: 10px; }
.sup-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; background: var(--bg-alt); border: 1px solid var(--border); align-self: flex-start; }
.sup-msg.sup-me { align-self: flex-end; background: color-mix(in srgb, var(--accent) 14%, var(--bg-alt)); }
.sup-msg.sup-system { align-self: center; max-width: 100%; background: transparent; border: 0; color: var(--text-dim); font-size: 0.85rem; text-align: center; }
.sup-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; font-size: 0.85rem; }
.sup-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sup-st-attente { border-color: #f59e0b; color: #f59e0b; }
.sup-st-en_cours { border-color: #38bdf8; color: #38bdf8; }
.sup-st-resolu { border-color: var(--accent); color: var(--accent); }
.sup-st-ferme { color: var(--text-dim); }
@media (max-width: 800px) { .sup-grid, .sup-modes { grid-template-columns: 1fr; } }

/* ---- Support : toute la largeur de la page ; liste des discussions à gauche, formulaire / conversation à droite ---- */
.sup-page { width: 100%; padding: 20px clamp(12px, 2vw, 28px) 40px; }
.sup-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.sup-side { display: flex; flex-direction: column; gap: 4px; padding: 14px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.sup-main { min-width: 0; width: 100%; }
.sup-new { text-align: center; margin-bottom: 8px; text-decoration: none; }
.sup-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; color: var(--text); text-decoration: none; }
.sup-item:hover { background: rgba(255,255,255,.05); }
.sup-item.active { background: rgba(255,255,255,.07); border-color: var(--accent); }
.sup-item-main { display: flex; flex-direction: column; min-width: 0; }
.sup-item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-item-main .hint { font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-open { border-color: var(--accent); color: var(--accent); }
.sup-closed { color: var(--text-dim); }
.sup-head h1 { text-align: left; }
@media (max-width: 900px) { .sup-layout { grid-template-columns: 1fr; } .sup-side { position: static; max-height: none; } }

/* ---- Tickets : menu déroulant des rôles (Voir / Ping) ---- */
.dc-roles { background: var(--bg); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; }
.dc-roles > summary { cursor: pointer; padding: 12px 14px; list-style: none; }
.dc-roles > summary::after { content: "▾"; float: right; }
.dc-roles[open] > summary::after { content: "▴"; }
.dc-roles-list { max-height: 260px; overflow: auto; border-top: 1px solid rgba(255,255,255,.08); padding: 6px 10px; }
.dc-roles-head, .dc-roles-row { display: grid; grid-template-columns: 1fr 56px 56px; align-items: center; gap: 6px; padding: 5px 4px; }
.dc-roles-head { position: sticky; top: 0; background: var(--bg); font-size: .8rem; color: var(--text-dim); }
.dc-roles-head span:not(:first-child), .dc-roles-row input { justify-self: center; }
.dc-roles-row:hover { background: rgba(255,255,255,.04); }

/* ---------- Agents d'un projet (Projets → Prism → Agents) ---------- */
.ag-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; align-items: start; }
.ag-side { display: flex; flex-direction: column; gap: 14px; }
.ag-side-title { margin: 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.ag-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card, rgba(255,255,255,.03)); color: inherit; text-decoration: none; }
.ag-card:hover { text-decoration: none; border-color: var(--ag-color, var(--accent)); }
.ag-card.active { border-color: var(--ag-color, var(--accent)); box-shadow: 0 0 0 1px var(--ag-color, var(--accent)) inset; }
.ag-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--ag-color, var(--accent)) 22%, transparent); flex: none; }
.ag-avatar.big { width: 48px; height: 48px; font-size: 26px; }
.ag-card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ag-card-body small { color: var(--text-dim); }
.ag-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ag-dot.on { background: #2ee6a6; box-shadow: 0 0 8px #2ee6a6; }
.ag-dot.off { background: #ff6b6b; }
.ag-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-dim); }
.ag-box { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card, rgba(255,255,255,.03)); }
.ag-box h3 { margin: 0 0 10px; font-size: 0.95rem; }
.ag-task { padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; font-size: 0.88rem; line-height: 1.4; background: rgba(255,255,255,.04); border-left: 3px solid var(--text-dim); }
.ag-task.ag-warn { border-left-color: #ff6b6b; }
.ag-task.ag-todo { border-left-color: #f5b942; }
.ag-task.ag-info { border-left-color: #6aa9ff; }
.ag-skills { margin: 0; padding-left: 18px; font-size: 0.88rem; line-height: 1.6; }
.ag-chat { display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-card, rgba(255,255,255,.03)); min-height: 560px; max-height: calc(100vh - 220px); overflow: hidden; }
.ag-chat-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.ag-chat-head > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ag-chat-head small { color: var(--text-dim); }
.ag-new { margin: 0; }
.ag-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.ag-msg { display: flex; }
.ag-msg.user { justify-content: flex-end; }
.ag-bubble { max-width: 82%; padding: 12px 16px; border-radius: 16px; line-height: 1.55; font-size: 0.95rem; background: rgba(255,255,255,.06); border-top-left-radius: 4px; }
.ag-msg.user .ag-bubble { background: color-mix(in srgb, var(--ag-color, var(--accent)) 28%, transparent); border-top-left-radius: 16px; border-top-right-radius: 4px; }
.ag-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.ag-chip { border: 1px solid var(--border); background: transparent; color: inherit; border-radius: 20px; padding: 6px 12px; font-size: 0.85rem; cursor: pointer; }
.ag-chip:hover { border-color: var(--ag-color, var(--accent)); }
.ag-form { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.ag-form input { flex: 1; }
@media (max-width: 900px) { .ag-layout { grid-template-columns: 1fr; } .ag-chat { max-height: none; } .ag-bubble { max-width: 94%; } }

/* Éditeur de panel de tickets : types réductibles, boutons réponse */
.dc-option-title { cursor: pointer; }
.dc-option-tools { display: inline-flex; gap: 10px; align-items: center; }
.dc-option.dc-collapsed { padding-top: 8px; padding-bottom: 8px; gap: 0; }
.dc-option.dc-collapsed > :not(.dc-option-head) { display: none; }
.dc-replies { display: flex; flex-direction: column; gap: 8px; }
.dc-replies-list, .dc-replies-sub { display: flex; flex-direction: column; gap: 8px; }
.dc-reply { border: 1px solid var(--border); border-left: 3px solid var(--accent, #2ee6a6); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; background: rgba(255,255,255,.02); }
.dc-reply-head { display: flex; gap: 8px; align-items: center; }
.dc-reply-head input { flex: 1; min-width: 0; }
.dc-reply-tag { font-size: .75rem; color: var(--text-dim); white-space: nowrap; }
.dc-replies-sub { margin-left: 14px; }
.dc-replies .btn-small { align-self: flex-start; }

/* ── Page Discord : cartes, interrupteurs, sélecteurs segmentés ── */
.dc-card { display: flex; flex-direction: column; gap: 16px; max-width: 820px; margin-bottom: 20px; }
.dc-card label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--text-dim); }
.dc-card .checkbox-row { flex-direction: row; color: var(--text); }
.dc-card-head, .dc-section-head, .dc-dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.dc-card-head h2, .dc-section-head h2 { margin: 0; font-size: 1.25rem; }
.dc-card-head .hint, .dc-section-head .hint { margin: 4px 0 0; }
.dc-head-actions, .dc-section-btns, .dc-dlg-btns { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.dc-card-foot { display: flex; justify-content: flex-end; }
.dc-page-section { max-width: 820px; margin: 28px 0 14px; }
.dc-row-inline { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.dc-row-inline > .grow { flex: 1; min-width: 200px; }
.dc-row-3 > * { flex: 1; min-width: 140px; }
.dc-row-3 .color-field { height: 40px; }
.dc-row-bottom { align-items: stretch; }
.dc-check-card { flex: 1; min-width: 220px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; background: var(--bg); align-self: flex-end; flex-wrap: wrap; gap: 4px 10px; }
.dc-check-card .hint { flex-basis: 100%; margin-left: 26px; }
.dc-field { display: flex; flex-direction: column; gap: 6px; }
.dc-lab { font-size: .9rem; color: var(--text-dim); }
/* interrupteur Activé / Désactivé */
.dc-switch { position: relative; display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 10px !important; cursor: pointer; user-select: none; color: var(--text) !important; font-weight: 600; flex-shrink: 0; }
.dc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.dc-switch-ui { width: 44px; height: 24px; border-radius: 99px; background: var(--border); position: relative; transition: background .15s; flex-shrink: 0; }
.dc-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.dc-switch input:checked + .dc-switch-ui { background: var(--accent, #2ee6a6); }
.dc-switch input:checked + .dc-switch-ui::after { transform: translateX(20px); }
.dc-switch input:focus-visible + .dc-switch-ui { outline: 2px solid var(--accent, #2ee6a6); outline-offset: 2px; }
.dc-switch-on { display: none; }
.dc-switch input:checked ~ .dc-switch-on { display: inline; color: var(--accent, #2ee6a6); }
.dc-switch input:checked ~ .dc-switch-off { display: none; }
.dc-switch-off { color: var(--text-dim); }
/* sélecteur segmenté (Boutons / Menu déroulant, Texte simple / Message en cadre) */
.dc-seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.dc-seg label { position: relative; display: block !important; margin: 0; cursor: pointer; }
.dc-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dc-seg span { display: block; padding: 8px 14px; border-radius: 8px; font-size: .88rem; color: var(--text-dim); white-space: nowrap; transition: background .12s, color .12s; }
.dc-seg input:checked + span { background: var(--accent, #2ee6a6); color: #04120c; font-weight: 700; }
.dc-seg input:focus-visible + span { outline: 2px solid var(--accent, #2ee6a6); }
.dc-modebar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
textarea.dc-auto { overflow: hidden; resize: none; min-height: 44px; }
/* listes de rôles (auto-rôles) */
.dc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dc-rb { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; min-width: 0; }
.dc-rb-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.dc-rb-head input { flex: 1; min-width: 0; max-width: 190px; padding: 6px 10px; font-size: .85rem; }
.dc-rb-list { max-height: 300px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.dc-role { flex-direction: row !important; align-items: center; gap: 10px !important; padding: 7px 8px; border-radius: 8px; cursor: pointer; color: var(--text) !important; }
.dc-role:hover { background: rgba(255,255,255,.05); }
.dc-role[hidden] { display: none !important; }
.dc-role input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.dc-role-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dc-role-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-role-off { opacity: .45; cursor: not-allowed; }
/* fenêtre de panel */
.dc-dlg-head { position: sticky; top: -28px; z-index: 5; margin: -28px -28px 0; padding: 18px 28px 14px; background: var(--card); border-bottom: 1px solid var(--border); align-items: center; }
.dc-dlg .dc-section-head { align-items: center; margin-top: 4px; }
.dc-dlg .dc-section-head h3 { margin: 0; }
.dc-roles-head, .dc-roles-row { grid-template-columns: 1fr 56px 56px 78px !important; }
@media (max-width: 700px) { .dc-cols { grid-template-columns: 1fr; } .dc-card-head, .dc-section-head { flex-direction: column; } }

/* Cartes de la liste des projets : trois cadres sous la fiche — Gérer (normal), Supprimer (rouge), Listé (vert) / Non listé (rouge) */
.pcard-actions { display: flex; gap: 8px; margin-top: 12px; }
.pcard-actions .inline-form { flex: 1; margin: 0; display: flex; }
.pcard-act { flex: 1; display: block; text-align: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-alt); color: var(--text); font-size: 0.85rem; font-weight: 700; cursor: pointer; font-family: inherit; text-decoration: none; }
.pcard-actions > .pcard-act { flex: 1; }
.pcard-act:hover { filter: brightness(1.2); text-decoration: none; }
.pcard-del { border-color: var(--danger); color: var(--danger); background: rgba(255, 107, 107, 0.1); }
.pcard-on { border-color: var(--accent); color: var(--accent); background: rgba(46, 230, 166, 0.1); }
.pcard-off { border-color: var(--danger); color: var(--danger); background: rgba(255, 107, 107, 0.1); }

/* Calendrier : types, couleurs, fenêtre d'ajout */
.cal-chip { --c: #2ee6a6; display: block; width: 100%; text-align: left; border: 0; font-family: inherit; cursor: pointer; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); border-left: 3px solid var(--c); }
.cal-chip:hover { background: color-mix(in srgb, var(--c) 36%, transparent); }
.cal-chip.cal-reunion { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
.cal-chip.cal-cont { border-left-color: transparent; border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -6px; width: calc(100% + 6px); }
.cal-chip.cal-cont-next { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: -6px; width: calc(100% + 6px); }
.cal-chip.cal-cont.cal-cont-next { width: calc(100% + 12px); }
.cal-more { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; text-align: left; }
.cal-more:hover { color: var(--text); }
.cal-clickable { cursor: pointer; }
.cal-clickable:hover { border-color: var(--accent); }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 12px; color: var(--text-dim); font-size: 0.8rem; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i, .cal-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.cal-row-main { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.cal-row-main .cal-dot { margin-top: 6px; }
.cal-row-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.cal-note { white-space: pre-wrap; margin-top: 2px; }
.cal-dialog { width: min(640px, 95vw); }
.cal-kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-kind { cursor: pointer; }
.cal-kind input { position: absolute; opacity: 0; pointer-events: none; }
.cal-kind span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; }
.cal-kind i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.cal-kind input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); font-weight: 700; }
.cal-kind input:focus-visible + span { outline: 2px solid var(--accent); }
.cal-color-row { display: flex; gap: 12px; align-items: center; }
.cal-color-row input[type="color"] { width: 44px; height: 30px; padding: 0; vertical-align: middle; margin-left: 8px; }
.cal-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cal-check input { width: auto; }
.cal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cal-detail-row { border-left: 3px solid var(--accent); padding: 6px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.dialog-actions .grow { flex: 1; }
@media (max-width: 700px) { .cal-form-grid { grid-template-columns: 1fr; } .cal-chip { font-size: 0; padding: 0; height: 6px; width: 6px; border-radius: 50%; border: 0; background: var(--c); display: inline-block; margin: 0; } .cal-row { flex-direction: column; align-items: flex-start; } }

/* Documents joints à une carte */
.att-drop { display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center; padding: 16px; border: 2px dashed var(--border); border-radius: 10px; cursor: pointer; }
.att-drop:hover, .att-drop.over, .att-drop:focus-visible { border-color: var(--accent); background: rgba(46, 230, 166, 0.06); outline: none; }
.att-status { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: 0.82rem; }
.att-uprow { display: flex; justify-content: space-between; gap: 10px; }
.att-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.att-item { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.att-media { display: grid; place-items: center; width: 120px; min-height: 70px; background: var(--card); border-radius: 8px; overflow: hidden; }
.att-media img { width: 100%; height: 80px; object-fit: cover; }
.att-media video, .att-media audio { width: 100%; max-height: 120px; }
.att-icon { font-size: 2rem; text-decoration: none; }
.att-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.att-info strong { word-break: break-word; font-size: 0.9rem; }
.att-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 800px) { .att-item { grid-template-columns: 1fr; } .att-media { width: 100%; } }
