/* ============================================================
   AtlasBot — feuille de style unique
   Palette sombre bleu/indigo, reprise de la banniere du bot.
   ============================================================ */

:root {
  --bg: #0a0d18;
  --bg-soft: #0f1425;
  --surface: #141a2f;
  --surface-2: #1a2140;
  --border: #242c4d;
  --border-soft: #1c2340;

  --text: #e9ecf8;
  --text-muted: #98a2c8;
  --text-dim: #6b74a0;

  --brand: #4f6bff;
  --brand-2: #7c5cff;
  --brand-soft: rgba(79, 107, 255, 0.14);

  --success: #3ba55d;
  --danger: #ed4245;
  --warn: #faa61a;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .85em; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.75rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.75rem; }
.row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------------------------- Navigation ---------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 13, 24, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand svg { width: 30px; height: 30px; }
.nav-links { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.nav-links a {
  padding: .45rem .8rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .92rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); background: var(--brand-soft); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }

.avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); }
.nav-user { display: flex; align-items: center; gap: .55rem; padding: .3rem .5rem .3rem .3rem; border: 1px solid var(--border); border-radius: 999px; }

/* ---------------------------- Boutons ---------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .62rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  font-size: .92rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: transform .12s, filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 24px -12px var(--brand);
}
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(237, 66, 69, .12); border-color: rgba(237, 66, 69, .4); color: #ff9598; }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------------------------- Cartes ---------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.card + .card { margin-top: 1.2rem; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head p { margin: .2rem 0 0; font-size: .88rem; color: var(--text-muted); }

.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ---------------------------- Statistiques ---------------------------- */
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.15rem 1.25rem;
}
.stat-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat-label { color: var(--text-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-top: .3rem; }

/* ---------------------------- Formulaires ---------------------------- */
.field { margin-bottom: 1.15rem; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field .hint { font-size: .82rem; color: var(--text-dim); margin: .3rem 0 0; }

input[type=text], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: .62rem .8rem;
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .92rem;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2c8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 18px; padding-right: 2.2rem; }

.switch { display: flex; align-items: center; gap: .75rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 44px; height: 25px; border-radius: 999px; flex: none;
  background: var(--surface-2); border: 1px solid var(--border);
  position: relative; transition: background .18s, border-color .18s;
}
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--text-dim); transition: transform .18s, background .18s;
}
.switch input:checked + .track { background: var(--brand); border-color: var(--brand); }
.switch input:checked + .track::after { transform: translateX(19px); background: #fff; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--brand-soft); }
/* Le partial field-switch place l'interrupteur dans un .field : sans cette regle,
   « .field label » (plus precise que « .switch ») le repasse en bloc et la piste disparait. */
.field label.switch { display: flex; margin-bottom: 0; }

/* Cases a cocher multiples (roles et salons exemptes, salons ignores) */
.choices { border: 0; padding: 0; margin: 0 0 1.15rem; min-width: 0; }
.choices:last-child { margin-bottom: 0; }
.choices legend { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; padding: 0; }
.choices .hint { font-size: .82rem; color: var(--text-dim); margin: .3rem 0 0; }
.choice-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .15rem .8rem;
  max-height: 232px; overflow-y: auto; padding: .5rem .75rem;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.choice { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .28rem 0; font-size: .88rem; cursor: pointer; }
.choice input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--brand); }
.choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice-empty { margin: 0; font-size: .86rem; color: var(--text-dim); }
.inline-fields { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.inline-fields input[type=number] { width: 4.6rem; }

.form-actions {
  display: flex; gap: .75rem; align-items: center;
  margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border-soft);
}

/* ---------------------------- Tableaux ---------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
  text-align: left; font-weight: 600; font-size: .76rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim);
  padding: .6rem .75rem; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: .7rem .75rem; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
tbody tr:last-child td { border-bottom: 0; }

/* ---------------------------- Badges & alertes ---------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .18rem .55rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-success { background: rgba(59,165,93,.14); color: #6ee7a0; border-color: rgba(59,165,93,.35); }
.badge-danger  { background: rgba(237,66,69,.14); color: #ff9598; border-color: rgba(237,66,69,.35); }
.badge-warn    { background: rgba(250,166,26,.14); color: #ffce7a; border-color: rgba(250,166,26,.35); }
.badge-brand   { background: var(--brand-soft); color: #a6b4ff; border-color: rgba(79,107,255,.4); }

.alert {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .85rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  margin-bottom: 1.2rem; font-size: .92rem;
}
.alert-success { border-color: rgba(59,165,93,.4); background: rgba(59,165,93,.08); }
.alert-error { border-color: rgba(237,66,69,.4); background: rgba(237,66,69,.08); }
.alert-info { border-color: rgba(79,107,255,.4); background: rgba(79,107,255,.08); }

/* ---------------------------- Accueil ---------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 5.5rem 0 4.5rem;
  background:
    radial-gradient(900px 400px at 15% -10%, rgba(79,107,255,.35), transparent 60%),
    radial-gradient(700px 380px at 85% 0%, rgba(124,92,255,.28), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at center, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 44px 44px; opacity: .06; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 3rem; grid-template-columns: 1.15fr .85fr; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.hero h1 .grad {
  background: linear-gradient(120deg, #8fa4ff, #c3a5ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 1.1rem; color: var(--text-muted); max-width: 34rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-logo { display: grid; place-items: center; }
.hero-logo svg { width: min(300px, 80%); height: auto; filter: drop-shadow(0 24px 50px rgba(79,107,255,.45)); }

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .32rem .8rem; border-radius: 999px;
  background: var(--brand-soft); border: 1px solid rgba(79,107,255,.35);
  color: #a6b4ff; font-size: .82rem; font-weight: 600; margin-bottom: 1.2rem;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(59,165,93,.25); }

section.block { padding: 4rem 0; }
section.block.alt { background: var(--bg-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-title { text-align: center; max-width: 40rem; margin: 0 auto 2.5rem; }
.section-title p { color: var(--text-muted); margin: 0; }

.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: transform .18s, border-color .18s; }
.feature:hover { transform: translateY(-3px); border-color: rgba(79,107,255,.45); }
.feature .icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); border: 1px solid rgba(79,107,255,.3);
  font-size: 1.2rem; margin-bottom: .9rem;
}
.feature h3 { margin-bottom: .35rem; }
.feature p { margin: 0; color: var(--text-muted); font-size: .92rem; }

.cta {
  text-align: center; padding: 3.5rem 1.5rem; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(79,107,255,.2), rgba(124,92,255,.14));
  border: 1px solid rgba(79,107,255,.3);
}

/* ---------------------------- Pied de page ---------------------------- */
.footer { border-top: 1px solid var(--border-soft); background: var(--bg-soft); padding: 3rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: .8rem; }
.footer a { display: block; color: var(--text-muted); font-size: .9rem; padding: .2rem 0; }
.footer a:hover { color: var(--text); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-soft); color: var(--text-dim); font-size: .85rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------------------------- Layout applicatif ---------------------------- */
.app { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; align-items: start; padding: 2rem 0 4rem; }
.sidebar { position: sticky; top: 84px; }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.sidebar-guild { display: flex; gap: .7rem; align-items: center; padding-bottom: 1rem; margin-bottom: .8rem; border-bottom: 1px solid var(--border-soft); }
.sidebar-guild img, .sidebar-guild .placeholder {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.sidebar-guild strong { display: block; font-size: .93rem; line-height: 1.3; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .7rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .9rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.sidebar nav a:hover { background: var(--surface-2); color: var(--text); }
.sidebar nav a.active { background: var(--brand-soft); color: #a6b4ff; font-weight: 600; }
.sidebar nav .group { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); padding: 1rem .7rem .3rem; }
.sidebar nav a .ico { width: 18px; text-align: center; flex: none; }

.page-head { margin-bottom: 1.6rem; }
.page-head h1 { font-size: 1.6rem; margin-bottom: .25rem; }
.page-head p { margin: 0; color: var(--text-muted); }

/* ---------------------------- Serveurs (dashboard) ---------------------------- */
.guild-card {
  display: flex; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem;
  transition: transform .16s, border-color .16s;
}
.guild-card:hover { transform: translateY(-2px); border-color: rgba(79,107,255,.45); }
.guild-card .icon, .guild-card img {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  background: var(--surface-2); display: grid; place-items: center;
  font-weight: 800; letter-spacing: -.02em;
}
.guild-card .name { font-weight: 600; }

/* ---------------------------- Graphique ---------------------------- */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding-top: .5rem; }
.chart .bar { flex: 1; background: linear-gradient(180deg, var(--brand), var(--brand-2)); border-radius: 4px 4px 2px 2px; min-height: 3px; opacity: .85; transition: opacity .15s; }
.chart .bar:hover { opacity: 1; }
.chart-labels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-dim); margin-top: .5rem; }

/* ---------------------------- Divers ---------------------------- */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-dim); }
.empty .big { font-size: 2rem; margin-bottom: .5rem; }

.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: .35rem .7rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: .85rem; color: var(--text-muted);
}
.pagination a:hover { background: var(--surface-2); color: var(--text); }
.pagination .current { background: var(--brand-soft); color: #a6b4ff; border-color: rgba(79,107,255,.4); }

.user-cell { display: flex; align-items: center; gap: .55rem; }
.user-cell img { width: 26px; height: 26px; border-radius: 50%; flex: none; }

.cmd { display: flex; gap: 1rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--border-soft); }
.cmd:last-child { border-bottom: 0; }
.cmd code { color: #a6b4ff; font-weight: 600; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.cmd span { color: var(--text-muted); font-size: .9rem; }

.price { display: flex; align-items: baseline; gap: .3rem; margin: 1rem 0; }
.price .amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.check-list li { padding: .4rem 0 .4rem 1.7rem; position: relative; color: var(--text-muted); font-size: .92rem; }
.check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.prose ul { color: var(--text-muted); padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }

/* ---------------------------- Responsive ---------------------------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: .6rem; margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7rem .9rem; }
  h1 { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; align-items: stretch; }
}

/* ---------------------------- Page de statut ---------------------------- */
.status-banner {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.2rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  margin-bottom: 1.5rem;
}
.status-banner strong { font-size: 1.05rem; }
.status-banner .badge { margin-left: auto; flex: none; }
.status-banner .status-dot {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: var(--success); box-shadow: 0 0 0 4px rgba(59, 165, 93, .2);
  animation: pulse 2.4s ease-in-out infinite;
}
.status-banner.status-up { border-color: rgba(59, 165, 93, .4); background: rgba(59, 165, 93, .07); }
.status-banner.status-degraded { border-color: rgba(250, 166, 26, .45); background: rgba(250, 166, 26, .07); }
.status-banner.status-degraded .status-dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(250, 166, 26, .2); }
.status-banner.status-down { border-color: rgba(237, 66, 69, .45); background: rgba(237, 66, 69, .07); }
.status-banner.status-down .status-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(237, 66, 69, .2); }
.status-banner.status-maintenance { border-color: rgba(79, 107, 255, .45); background: rgba(79, 107, 255, .07); }
.status-banner.status-maintenance .status-dot { background: var(--brand); box-shadow: 0 0 0 4px rgba(79, 107, 255, .2); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

.service .card-head { margin-bottom: 1rem; }

.timeline { display: flex; gap: 2px; align-items: stretch; height: 38px; }
.timeline .tl { flex: 1; border-radius: 2px; min-width: 3px; transition: transform .12s; }
.timeline .tl:hover { transform: scaleY(1.12); }
.tl-up { background: var(--success); }
.tl-degraded { background: var(--warn); }
.tl-down { background: var(--danger); }
.tl-unknown { background: var(--surface-2); }

.uptime-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--border-soft);
}
.uptime-row div { display: flex; flex-direction: column; gap: .1rem; }
.uptime-row strong { font-size: 1.15rem; letter-spacing: -.02em; }

@media (max-width: 700px) {
  .status-banner { flex-wrap: wrap; }
  .status-banner .badge { margin-left: 0; }
  .timeline { height: 30px; }
}

/* ---------------------------- Apercu d'embed Discord ---------------------------- */
.embed-preview {
  background: #313338;
  border-radius: 8px;
  padding: 1rem;
  font-family: 'gg sans', 'Inter', -apple-system, sans-serif;
  font-size: .95rem;
  line-height: 1.4;
  color: #dbdee1;
}
.embed-preview .bot-line { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.embed-preview .bot-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #3a4fd8, #7c5cff);
}
.embed-preview .bot-name { color: #f2f3f5; font-weight: 500; }
.embed-preview .bot-tag {
  background: #5865f2; color: #fff; font-size: .65rem; font-weight: 600;
  padding: .05rem .3rem; border-radius: 3px; margin-left: .3rem; vertical-align: middle;
}

.embed-card {
  display: flex; margin-left: 48px; max-width: 520px;
  background: #2b2d31; border-radius: 4px; overflow: hidden;
}
.embed-bar { width: 4px; flex: none; background: #5865f2; }
.embed-body { padding: .7rem 1rem 1rem; min-width: 0; flex: 1; }
.embed-title {
  color: #f2f3f5; font-weight: 600; font-size: 1rem;
  margin-bottom: .4rem; word-wrap: break-word;
}
.embed-desc {
  color: #dbdee1; font-size: .9rem; white-space: pre-wrap; word-wrap: break-word;
}
.embed-desc strong { color: #f2f3f5; font-weight: 600; }
.embed-footer { color: #949ba4; font-size: .75rem; margin-top: .6rem; }

.embed-select {
  margin: .6rem 0 0 48px; max-width: 520px;
  background: #1e1f22; border: 1px solid #1e1f22; border-radius: 4px;
  padding: .55rem .75rem; color: #949ba4; font-size: .9rem;
  display: flex; align-items: center; justify-content: space-between;
}
.embed-select::after { content: '⌄'; color: #b5bac1; font-size: 1.1rem; line-height: 1; }

.embed-button {
  margin: .6rem 0 0 48px;
  display: inline-flex; align-items: center; gap: .4rem;
  background: #248046; color: #fff; border-radius: 3px;
  padding: .45rem .95rem; font-size: .875rem; font-weight: 500;
}

.embed-roles { margin: .55rem 0 0 48px; display: flex; flex-wrap: wrap; gap: .4rem; }
.embed-roles span {
  background: #1e1f22; border: 1px solid #3f4147; border-radius: 4px;
  padding: .2rem .55rem; font-size: .82rem; color: #dbdee1;
}

.color-row { display: flex; gap: .6rem; align-items: center; }
.color-row input[type=color] {
  width: 46px; height: 40px; padding: 2px; flex: none; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.color-row input[type=text] { flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* Markdown Discord rendu dans l'apercu */
.embed-preview strong { color: #f2f3f5; font-weight: 600; }
.embed-preview code {
  background: #1e1f22; border-radius: 3px; padding: 0 .25rem;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em;
}
.md-h1, .md-h2, .md-h3 { color: #f2f3f5; font-weight: 700; line-height: 1.3; margin: .35rem 0 .15rem; }
.md-h1 { font-size: 1.45rem; }
.md-h2 { font-size: 1.2rem; }
.md-h3 { font-size: 1rem; }
.md-sub { color: #949ba4; font-size: .75rem; }
.md-li { position: relative; padding-left: 1.1rem; }
.md-li::before { content: '•'; position: absolute; left: .3rem; }
.md-quote { border-left: 4px solid #4e5058; padding-left: .6rem; }

.embed-image { display: block; max-width: 100%; border-radius: 4px; margin-top: .8rem; }

/* Messages « Components V2 » : conteneur et texte simple */
.v2-container, .v2-plain { margin-left: 48px; max-width: 520px; }
.v2-container {
  background: #393a41; border: 1px solid #44454c; border-radius: 8px; padding: 1rem;
}
.v2-container + .v2-container { margin-top: .5rem; }
.v2-text { white-space: pre-wrap; word-wrap: break-word; font-size: .9rem; }
.v2-sep { border: 0; border-top: 1px solid #4e5058; margin: .7rem 0; }
.v2-sep-lg { margin: 1.2rem 0; }
.v2-media { display: block; width: 100%; border-radius: 8px; margin-bottom: .7rem; }
.v2-container .embed-button, .v2-plain .embed-button { margin-left: 0; margin-top: .8rem; }

.preview-warning { margin: .8rem 0 0 48px; color: #f0b232; font-size: .85rem; }

/* Choix du style du message */
.style-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.style-option {
  display: flex; gap: .6rem; align-items: flex-start; cursor: pointer;
  padding: .75rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.style-option:has(input:checked) { border-color: rgba(79,107,255,.7); background: var(--brand-soft); }
.style-option input { margin-top: .2rem; }
.style-option span { display: flex; flex-direction: column; gap: .2rem; }
.style-option small { opacity: .7; line-height: 1.35; }

/* Editeur de message a cartes (reglement, panneau des tickets) */
.card-list { display: flex; flex-direction: column; gap: .8rem; }
.card-editor {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-soft); padding: .9rem 1rem;
}
.card-editor .field:last-child { margin-bottom: 0; }
.card-editor-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .7rem; }
.card-editor-tools { display: flex; gap: .35rem; }
.card-editor-tools .btn:disabled { opacity: .35; cursor: default; }
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.embed-card + .embed-card { margin-top: .35rem; }
.embed-image-only { margin-top: 0; }
.embed-button.is-primary { background: #5865f2; }

/* Conversation archivee d'un ticket */
.transcript {
  display: flex; flex-direction: column; gap: 1.1rem;
  background: #313338; border-radius: 8px; padding: 1.1rem;
  font-family: 'gg sans', 'Inter', -apple-system, sans-serif; color: #dbdee1;
}
.transcript-message { display: flex; gap: .85rem; }
.transcript-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.transcript-body { min-width: 0; flex: 1; }
.transcript-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem; }
.transcript-meta strong { color: #f2f3f5; font-weight: 600; }
.transcript-meta .bot-tag {
  background: #5865f2; color: #fff; font-size: .65rem; font-weight: 600;
  padding: .05rem .3rem; border-radius: 3px;
}
.transcript-time { color: #949ba4; font-size: .75rem; }
.transcript-content { white-space: pre-wrap; word-wrap: break-word; font-size: .92rem; margin-top: .15rem; }
.transcript-content strong { color: #f2f3f5; }
.transcript-embed {
  margin-top: .4rem; padding: .55rem .8rem; max-width: 520px;
  background: #2b2d31; border-left: 4px solid #5865f2; border-radius: 4px;
  font-size: .88rem; white-space: pre-wrap; word-wrap: break-word;
}
.transcript-embed > strong { display: block; color: #f2f3f5; margin-bottom: .2rem; }
.transcript-files { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .35rem; font-size: .85rem; }
.transcript-empty { color: #949ba4; font-style: italic; font-size: .85rem; }
.mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 .15rem; }

@media (max-width: 700px) {
  .embed-card, .embed-select, .embed-button, .embed-roles,
  .v2-container, .v2-plain, .preview-warning { margin-left: 0; }
  .style-picker { grid-template-columns: 1fr; }
}
