/* =========================================================
   MultiCode — thème sombre (inspiré du Dashboard 2 MetroAdmin)
   Valeurs relevées sur le modèle : fond #1d1e26, cartes #262932,
   bordures #383c46, texte #828690, primaire #1e78ff, violet #7356f1
   ========================================================= */
:root {
  --bg: #1d1e26;
  --card: #262932;
  --line: #383c46;
  --text: #828690;
  --text-2: #c4c9d5;
  --sub: #b3b3b3;
  --label: #999999;
  --white: #ffffff;

  --primary: #1e78ff;
  --primary-hover: #0b63e5;
  --violet: #7356f1;
  --violet-dark: #5a3be8;
  --warning: #ffaa16;
  --danger: #ff4c41;
  --danger-soft: #ffe1e1;
  --danger-text: #c52424;
  --success: #68cf29;
  --success-soft: rgba(104, 207, 41, .15);
  --info: #1ec6ff;

  --sidebar-w: 275px;
  --sidebar-mini: 90px;
  --header-h: 80px;
  --radius: 4px;
  --shadow: 0 0 13px 0 rgba(82, 63, 105, .05);
  --shadow-lg: 0 0 40px 0 rgba(82, 63, 105, .1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
h1, h2, h3, h4, h5, h6 { color: var(--white); margin: 0 0 8px; font-weight: 500; line-height: 1.2; }
p { margin: 0 0 12px; }
code, .mono { font-family: "Roboto Mono", ui-monospace, Consolas, monospace; }
svg.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

/* ---------------- Logo / nav-header ---------------- */
.nav-header {
  position: fixed; top: 0; left: 0; z-index: 30;
  width: var(--sidebar-w); height: var(--header-h);
  background: var(--bg);
  transition: width .3s;
}
.brand-logo {
  display: flex; align-items: center; height: 100%;
  padding: 0 30px; color: var(--white); font-size: 18px; font-weight: 700;
}
.logo-abbr { width: 40px; height: 40px; flex-shrink: 0; }
.brand-title { margin-left: 15px; letter-spacing: .5px; white-space: nowrap; }
.brand-title b { color: var(--violet); font-weight: 700; }

.nav-control {
  position: absolute; top: 20px; left: calc(100% + 12px);
  width: 53px; height: 41px; padding: 2px 8px 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 0; border-radius: 2px; cursor: pointer;
}
.hamburger { position: relative; width: 26px; height: 20px; }
.hamburger .line {
  position: absolute; left: 0; height: 2px; border-radius: 3px;
  background: var(--violet); transition: all .3s;
}
.hamburger .line:nth-child(1) { top: 0; width: 26px; }
.hamburger .line:nth-child(2) { top: 9px; width: 26px; }
.hamburger .line:nth-child(3) { top: 18px; width: 15px; }
.nav-control:hover .line:nth-child(3) { width: 26px; }

/* ---------------- Header ---------------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: var(--header-h); padding-left: var(--sidebar-w);
  background: var(--bg); box-shadow: var(--shadow-lg);
  transition: padding .3s;
}
.header-content {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; padding: 0 30px 0 125px;
}
.search-area { position: relative; width: 300px; }
.search-area .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--white); }
.search-area input {
  width: 100%; height: 44px; padding: 6px 12px 6px 46px;
  background: var(--card); color: var(--white);
  border: 1px solid transparent; border-radius: 4px 80px 80px 4px;
  font: inherit; font-size: 14px; outline: none;
}
.search-area input::placeholder { color: var(--white); opacity: .85; }
.search-area input:focus { border-color: var(--line); }

.header-right { display: flex; align-items: center; gap: 22px; }
.header-balance {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 8px; border-radius: 30px; background: var(--card);
}
.header-balance .ic-wrap {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(30, 120, 255, .15); color: var(--primary);
}
.header-balance small { display: block; font-size: 11px; color: var(--text); text-transform: uppercase; letter-spacing: .5px; line-height: 1.1; }
.header-balance strong { color: var(--white); font-size: 15px; font-weight: 500; line-height: 1.2; white-space: nowrap; }

.notif { position: relative; color: var(--white); cursor: pointer; display: flex; }
.pulse-css {
  position: absolute; top: -2px; right: -2px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--primary);
}
.pulse-css::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 3px solid var(--primary); opacity: 0; animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.2); opacity: .8; } 100% { transform: scale(1.4); opacity: 0; } }

.header-profile { position: relative; }
.header-profile > a { display: flex; align-items: center; gap: 12px; color: var(--white); cursor: pointer; }
.avatar {
  width: 30px; height: 30px; border-radius: 50px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--primary));
}
.avatar.lg { width: 42px; height: 42px; font-size: 15px; }
.header-profile .who { line-height: 1.2; text-align: right; }
.header-profile .who span { display: block; font-size: 14px; font-weight: 500; }
.header-profile .who small { font-size: 12px; color: var(--text); }

.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 14px); min-width: 200px; z-index: 50;
  background: var(--card); border-radius: var(--radius); box-shadow: 0 0 30px rgba(0, 0, 0, .35);
  padding: 8px 0; display: none;
}
.dropdown-menu.show { display: block; animation: drop .18s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dropdown-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 20px;
  color: var(--text-2); font-size: 14px;
}
.dropdown-item:hover { background: rgba(255, 255, 255, .04); color: var(--white); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--line); margin: 6px 0; }

/* ---------------- Sidebar (deznav) ---------------- */
.deznav {
  position: fixed; top: var(--header-h); left: 0; bottom: 0; z-index: 15;
  width: var(--sidebar-w); background: var(--bg);
  box-shadow: var(--shadow-lg); overflow-y: auto; padding-bottom: 40px;
  transition: width .3s, transform .3s;
}
.nav-label {
  margin: 0 25px; padding: 25px 0 10px;
  font-size: 12px; color: var(--label); text-transform: uppercase; letter-spacing: .8px;
  white-space: nowrap;
}
.nav-label.sep { border-top: 1px solid var(--line); margin-top: 12px; }
.metismenu { list-style: none; margin: 0; padding: 0; }
.metismenu > li { margin: 0 10px; border-radius: var(--radius); transition: background .2s; }
.metismenu > li > a {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 20px; color: var(--white); font-weight: 600; font-size: 15px;
  white-space: nowrap; border-radius: var(--radius);
}
.metismenu > li > a .ic:first-child { color: var(--text); transition: color .2s; }
.metismenu > li > a .nav-text { flex: 1; }
.metismenu > li > a .arrow { color: var(--text); transition: transform .25s; }
.metismenu > li:hover > a .ic:first-child { color: var(--white); }
.metismenu > li.mm-active { background: var(--card); box-shadow: var(--shadow); }
.metismenu > li.mm-active.has-sub { padding: 12px 0; }
.metismenu > li.mm-active > a .ic:first-child { color: var(--primary); }
.metismenu > li.open > a .arrow { transform: rotate(90deg); }

.metismenu ul { list-style: none; margin: 0; padding: 0 0 0 25px; display: none; }
.metismenu li.open > ul { display: block; }
.metismenu ul a {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 20px; color: var(--sub); font-weight: 300; font-size: 15px; white-space: nowrap;
}
.metismenu ul a::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid currentColor; flex-shrink: 0;
}
.metismenu ul a:hover, .metismenu ul li.mm-active a { color: var(--white); }
.metismenu ul li.mm-active a { font-weight: 500; }
.metismenu ul li.mm-active a::before { background: var(--primary); border-color: var(--primary); }

.sidebar-footer { margin: 30px 25px 0; font-size: 12px; color: var(--label); white-space: nowrap; }
.sidebar-footer strong { color: var(--text-2); font-weight: 500; }

/* Sidebar réduite (bouton hamburger sur grand écran) */
@media (min-width: 992px) {
  body.menu-toggle .nav-header { width: var(--sidebar-mini); }
  body.menu-toggle .brand-logo { padding: 0 25px; }
  body.menu-toggle .brand-title,
  body.menu-toggle .nav-label,
  body.menu-toggle .nav-text,
  body.menu-toggle .arrow,
  body.menu-toggle .metismenu ul,
  body.menu-toggle .sidebar-footer { display: none !important; }
  body.menu-toggle .deznav { width: var(--sidebar-mini); }
  body.menu-toggle .metismenu > li > a { justify-content: center; padding: 15px 0; }
  body.menu-toggle .metismenu > li.mm-active.has-sub { padding: 0; }
  body.menu-toggle .metismenu > li { margin: 6px 15px; }
  body.menu-toggle .header { padding-left: var(--sidebar-mini); }
  body.menu-toggle .content-body { margin-left: var(--sidebar-mini); }
}

/* ---------------- Contenu ---------------- */
.content-body { margin-left: var(--sidebar-w); padding-top: var(--header-h); min-height: 100vh; transition: margin .3s; }
.container-fluid { padding: 30px 30px 0; }
.footer { padding: 20px 30px 25px; text-align: center; font-size: 13px; color: var(--text); }
.footer a { color: var(--primary); }

.page-titles {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-bottom: 30px;
}
.page-titles h4 { font-size: 20px; margin: 0 0 4px; color: var(--primary); }
.page-titles p { margin: 0; font-size: 14px; }
.breadcrumb { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--text); }
.breadcrumb a { color: var(--text); }
.breadcrumb .active { color: var(--white); }

/* ---------------- Grille ---------------- */
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
[class*="col-"] { width: 100%; padding: 0 15px; }
.col-12 { width: 100%; }
@media (min-width: 576px) { .col-sm-4 { width: 33.3333%; } .col-sm-6 { width: 50%; } }
@media (min-width: 768px) {
  .col-md-4 { width: 33.3333%; } .col-md-5 { width: 41.6667%; } .col-md-6 { width: 50%; }
  .col-md-7 { width: 58.3333%; } .col-md-8 { width: 66.6667%; }
}
@media (min-width: 992px) { .col-lg-4 { width: 33.3333%; } .col-lg-6 { width: 50%; } .col-lg-8 { width: 66.6667%; } }
@media (min-width: 1200px) {
  .col-xl-3 { width: 25%; } .col-xl-4 { width: 33.3333%; } .col-xl-5 { width: 41.6667%; }
  .col-xl-6 { width: 50%; } .col-xl-7 { width: 58.3333%; } .col-xl-8 { width: 66.6667%; } .col-xl-12 { width: 100%; }
}
@media (min-width: 1400px) { .col-xxl-3 { width: 25%; } }

/* ---------------- Cartes ---------------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 30px; position: relative; display: flex; flex-direction: column;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 20px 20px 5px; border-radius: 3px 3px 0 0;
}
.card-header.bordered { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.card-title { font-size: 16px; font-weight: 500; letter-spacing: .8px; color: var(--white); margin: 0; }
.card-sub { font-size: 13px; color: var(--text); margin: 4px 0 0; letter-spacing: 0; }
.card-body { padding: 20px; flex: 1; }
.card-footer { padding: 15px 20px; border-top: 1px solid var(--line); }

/* Widgets statistiques (CUSTOMERS / ORDERS / REVENUE) */
.row > [class*="col-"] > .widget-stat { height: calc(100% - 30px); }
.widget-stat .media { display: flex; align-items: center; }
.widget-stat .media > span {
  width: 60px; height: 60px; border-radius: 50px; margin-right: 16px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--line); color: var(--white);
}
.widget-stat .media > span.primary { background: rgba(30, 120, 255, .15); color: var(--primary); }
.widget-stat .media > span.violet { background: rgba(115, 86, 241, .18); color: var(--violet); }
.widget-stat .media > span.warning { background: rgba(255, 170, 22, .15); color: var(--warning); }
.widget-stat .media > span.success { background: var(--success-soft); color: var(--success); }
.widget-stat .media-body { min-width: 0; }
.widget-stat p { font-size: 14px; font-weight: 500; color: var(--text-2); text-transform: uppercase; margin: 0 0 4px; }
.widget-stat .value { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.widget-stat .value h3 { font-size: 24px; font-weight: 500; color: var(--primary); margin: 0; }

/* Carte colorée (en-tête dégradé) */
.card-gradient {
  background: linear-gradient(135deg, var(--violet-dark), var(--violet) 60%, #8f7af7);
  color: rgba(255, 255, 255, .85);
}
.card-gradient h3, .card-gradient h4 { color: #fff; }

/* ---------------- Badges / points de statut ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 30px; font-size: 12px; font-weight: 400; line-height: 18px; white-space: nowrap;
  background: var(--primary); color: #fff;
}
.badge-primary { background: var(--primary); color: #fff; }
.badge-violet { background: var(--violet); color: #fff; }
.badge-warning { background: var(--warning); color: #212529; }
.badge-danger { background: var(--danger-soft); color: var(--danger-text); }
.badge-success { background: var(--success); color: #fff; }
.badge-dark { background: var(--line); color: var(--text-2); }
.badge-soft-primary { background: rgba(30, 120, 255, .15); color: #5c9dff; }
.badge-soft-success { background: var(--success-soft); color: var(--success); }
.badge-soft-warning { background: rgba(255, 170, 22, .15); color: var(--warning); }
.badge-soft-danger { background: rgba(255, 76, 65, .15); color: var(--danger); }

.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.success { background: var(--success); }
.dot.warning { background: var(--warning); }
.dot.danger { background: var(--danger); }
.dot.primary { background: var(--primary); }
.dot.muted { background: var(--text); }

/* ---------------- Boutons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 500; line-height: 1.2; cursor: pointer;
  background: var(--bg); color: var(--white); border-color: var(--line);
  transition: background .2s, border-color .2s, opacity .2s, transform .1s;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-violet:hover { background: var(--violet-dark); border-color: var(--violet-dark); }
.btn-light { background: var(--line); border-color: var(--line); color: var(--white); }
.btn-light:hover { background: #454a56; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-outline-primary { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.btn-block { width: 100%; }
.btn-rounded { border-radius: 30px; }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; transform: none; }

.sharp { width: 30px; height: 30px; padding: 0; border-radius: var(--radius); }
.action-btns { display: flex; gap: 6px; justify-content: flex-end; }
.action-btns .btn { width: 32px; height: 32px; padding: 0; background: transparent; border-color: var(--line); color: var(--text-2); }
.action-btns .btn:hover { border-color: var(--primary); color: var(--primary); }
.action-btns .btn.del:hover { border-color: var(--danger); color: var(--danger); }

/* Pilules (Day / Week / Month / Year) */
.nav-pills { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-pills a {
  display: block; padding: 6px 18px; border-radius: 30px;
  color: var(--white); font-weight: 500; font-size: 15px; cursor: pointer;
}
.nav-pills a.active { background: var(--primary); color: #fff; }
.nav-pills a:not(.active):hover { color: var(--primary); }

/* ---------------- Formulaires ---------------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.form-control, .form-select {
  display: block; width: 100%; height: 48px; padding: 8px 16px;
  background: var(--bg); color: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-control::placeholder { color: #6a6e7a; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 120, 255, .15); }
textarea.form-control { height: auto; min-height: 180px; padding: 12px 16px; resize: vertical; font-family: "Roboto Mono", ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.7; }
.form-select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23828690' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.form-control-sm, .form-select.form-control-sm { height: 40px; font-size: 13px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group-text {
  display: flex; align-items: center; padding: 0 16px; font-size: 14px;
  background: var(--line); color: var(--text-2); border-radius: 0 var(--radius) var(--radius) 0;
}
.form-hint { font-size: 12px; color: var(--text); margin-top: 6px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters .form-control, .filters .form-select { width: auto; min-width: 160px; }

/* Case à cocher style modèle (carré blanc) */
.check {
  appearance: none; width: 16px; height: 16px; margin: 0; cursor: pointer; vertical-align: middle;
  background: #fff; border-radius: 2px; position: relative; flex-shrink: 0;
}
.check:checked { background: var(--primary); }
.check:checked::after {
  content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.check-label { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; }

/* Interrupteur */
.switch { position: relative; display: inline-block; width: 42px; height: 22px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--line); border-radius: 22px; transition: .25s; }
.switch .slider::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; transition: .25s;
}
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------------- Tableaux ---------------- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; color: var(--white); }
.table thead th {
  padding: 12px; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  color: var(--white); border-bottom: 1px solid var(--line);
}
.table tbody td {
  padding: 12px; font-size: 15px; font-weight: 500; color: var(--text);
  border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap;
}
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr { transition: background .15s; }
.table-hover tbody tr:hover { background: rgba(255, 255, 255, .02); }
.table .t-white { color: var(--white); }
.table .t-code { font-family: "Roboto Mono", ui-monospace, Consolas, monospace; color: var(--white); font-size: 14px; letter-spacing: .3px; }
.table .t-right { text-align: right; }
.table .t-pos { color: var(--success); }
.table .t-neg { color: var(--danger); }
.table .w-check { width: 40px; }
.table-sm tbody td { padding: 10px 12px; font-size: 14px; }
.user-cell { display: flex; align-items: center; gap: 12px; color: var(--white); }
.server-cell { display: flex; align-items: center; gap: 12px; color: var(--white); }
.server-ico {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
}

.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 6px; background: var(--primary); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }
.progress-bar.success { background: var(--success); }

.pagination { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination a {
  min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center;
  border-radius: var(--radius); background: var(--bg); color: var(--text-2); font-size: 14px; border: 1px solid var(--line);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active a { background: var(--primary); border-color: var(--primary); color: #fff; }
.table-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 18px; font-size: 14px; }

/* ---------------- Cartes serveurs (grille produits) ---------------- */
.server-card { overflow: hidden; transition: transform .2s, box-shadow .2s; }
.server-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.server-cover {
  position: relative; height: 150px; display: grid; place-items: center; color: #fff; overflow: hidden;
}
.server-cover::before, .server-cover::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.server-cover::before { width: 180px; height: 180px; right: -50px; top: -70px; }
.server-cover::after { width: 120px; height: 120px; left: -40px; bottom: -60px; }
.server-cover .cover-name { position: relative; z-index: 1; text-align: center; }
.server-cover .cover-name .ic { opacity: .95; }
.server-cover .cover-name span { display: block; margin-top: 8px; font-size: 20px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.server-cover .stock-badge { position: absolute; top: 14px; right: 14px; z-index: 1; }
.server-card .card-body { display: flex; flex-direction: column; gap: 12px; }
.server-card .s-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.server-card .s-name { color: var(--white); font-size: 16px; font-weight: 500; margin: 0; }
.server-card .s-price { color: var(--primary); font-size: 22px; font-weight: 600; white-space: nowrap; }
.server-card .s-price small { font-size: 13px; font-weight: 500; }
.server-card .s-meta { display: flex; justify-content: space-between; font-size: 13px; }
.server-card .s-meta b { color: var(--text-2); font-weight: 500; }

.g-violet { background: linear-gradient(135deg, #5a3be8, #8f7af7); }
.g-blue { background: linear-gradient(135deg, #0b5fd9, #3d9bff); }
.g-orange { background: linear-gradient(135deg, #f07f12, #ffbf47); }
.g-green { background: linear-gradient(135deg, #3c9a17, #7fdc45); }
.g-pink { background: linear-gradient(135deg, #d4246f, #ff6aa4); }
.g-cyan { background: linear-gradient(135deg, #0596b8, #36d3f5); }

/* ---------------- Graphiques ---------------- */
.chart-wrap { width: 100%; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-wrap .axis { fill: var(--white); font-size: 11px; font-family: "Roboto", sans-serif; }
.chart-wrap .grid { stroke: var(--line); stroke-width: 1; }
.chart-legend { display: flex; gap: 18px; font-size: 13px; margin-top: 10px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.big-number { font-size: 30px; font-weight: 500; color: var(--primary); line-height: 1.1; margin: 6px 0 14px; }

/* Liste simple (Top Active Pages) */
.mini-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.mini-list li { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); }
.mini-list li.head { border-top: 0; padding-top: 4px; }
.mini-list li span:last-child { color: var(--white); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 22px 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .t-dot {
  position: absolute; left: 0; top: 3px; width: 12px; height: 12px; border-radius: 50%;
  box-shadow: 0 0 0 4px var(--card);
}
.timeline .t-time { font-size: 13px; color: var(--text); }
.timeline .t-text { color: var(--white); font-size: 14px; font-weight: 500; margin-top: 2px; }

/* Todo / alertes */
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.todo-list li:first-child { border-top: 0; padding-top: 0; }
.todo-list .todo-text { flex: 1; font-size: 14px; color: var(--text-2); }
.todo-list .todo-text small { display: block; color: var(--text); font-size: 12px; }

/* ---------------- Code obtenu ---------------- */
.code-reveal {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 8px;
  background: rgba(30, 120, 255, .08); border: 2px dashed rgba(30, 120, 255, .55);
}
.code-reveal code { flex: 1; font-size: 22px; font-weight: 700; color: var(--white); letter-spacing: 1.5px; word-break: break-all; }
.summary-list { list-style: none; margin: 18px 0 0; padding: 0; font-size: 14px; }
.summary-list li { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); }
.summary-list li b { color: var(--white); font-weight: 500; }
.summary-list li.total b { color: var(--primary); font-size: 16px; }

/* ---------------- Modale ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: flex-start; justify-content: center; padding: 60px 16px 16px;
  background: rgba(10, 11, 16, .7); overflow-y: auto;
}
.modal.show { display: flex; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-dialog { width: 100%; max-width: 500px; background: var(--card); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: slide .25s ease-out; }
.modal-dialog.lg { max-width: 640px; }
@keyframes slide { from { transform: translateY(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 18px; font-weight: 500; color: var(--white); margin: 0; }
.modal-close { background: none; border: 0; color: var(--text); cursor: pointer; padding: 4px; display: flex; }
.modal-close:hover { color: var(--white); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 20px; border-top: 1px solid var(--line); }
.modal-icon {
  width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center; background: var(--success-soft); color: var(--success);
}

/* ---------------- Toasts ---------------- */
.toast-zone { position: fixed; top: 96px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: flex-start; gap: 12px; min-width: 280px; max-width: 360px;
  padding: 14px 16px; border-radius: var(--radius); color: #fff; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: toastIn .3s ease-out;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }
.toast b { display: block; font-weight: 600; margin-bottom: 2px; }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- Alertes ---------------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius); font-size: 14px; margin-bottom: 20px; }
.alert-warning { background: rgba(255, 170, 22, .12); color: var(--warning); border-left: 3px solid var(--warning); }
.alert-info { background: rgba(30, 120, 255, .1); color: #6aa7ff; border-left: 3px solid var(--primary); }
.alert-danger { background: rgba(255, 76, 65, .12); color: #ff7b72; border-left: 3px solid var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); border-left: 3px solid var(--success); }
.alert .ic { margin-top: 1px; }
.alert code { color: var(--white); }

/* ---------------- Validation ---------------- */
.form-error { color: var(--danger); font-size: 12px; margin-top: 6px; }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger); }

/* ---------------- Sélecteurs couleur / icône ---------------- */
.picker { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch, .icon-pick { position: relative; cursor: pointer; }
.swatch input, .icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 38px; height: 38px; border-radius: 8px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.swatch input:checked + span { outline-color: #fff; }
.swatch input:focus-visible + span { outline-color: var(--primary); }
.icon-pick span {
  width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--text-2); background: var(--bg); transition: all .15s;
}
.icon-pick:hover span { border-color: var(--text); }
.icon-pick input:checked + span { border-color: var(--primary); color: var(--primary); background: rgba(30, 120, 255, .1); }

textarea.form-control.plain { min-height: 90px; font-family: inherit; font-size: 14px; line-height: 1.5; }
input[type=file].form-control { height: auto; padding: 9px 12px; color: var(--text-2); }
input[type=file].form-control::file-selector-button {
  margin-right: 12px; padding: 6px 14px; border: 0; border-radius: var(--radius);
  background: var(--line); color: var(--white); font: inherit; font-size: 13px; cursor: pointer;
}
.server-ico img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.server-cover .cover-logo { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; background: rgba(255, 255, 255, .12); padding: 6px; }
.sticky-col { position: sticky; top: calc(var(--header-h) + 20px); }
.table td.wrap { white-space: normal; min-width: 220px; }

/* Offres d'un serveur */
.offer-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.offer-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 30px;
  background: rgba(30, 120, 255, .1); color: var(--text-2); font-size: 12px; font-weight: 400; white-space: nowrap;
}
.offer-chip b { color: var(--white); font-weight: 500; }
.offer-chip.off { background: var(--line); opacity: .55; text-decoration: line-through; }
.offers-table td { vertical-align: top; }
.offers-table .form-select { min-width: 140px; }
.offers-table .input-group { min-width: 160px; }
.offers-table .switch { margin-top: 9px; }
.offers-table .action-btns { margin-top: 4px; }

/* Codes */
.row-muted td { opacity: .55; }
.bulk-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius);
  background: rgba(30, 120, 255, .08); border: 1px solid rgba(30, 120, 255, .3); font-size: 14px;
}
.import-counter { margin-top: 8px; font-size: 13px; color: var(--text-2); }
.import-counter b { color: var(--primary); }
.import-list { list-style: none; margin: 0; padding: 0; }
.import-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.import-list li:first-child { border-top: 0; padding-top: 0; }

/* Revendeurs */
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-head h4 { font-size: 18px; }
a.user-cell:hover { color: var(--primary); }
.section-title { font-size: 15px; font-weight: 500; color: var(--white); margin: 0 0 14px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.feature-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.feature-row.disabled { opacity: .55; cursor: default; }
.mini-stat { padding: 14px 16px; margin-bottom: 20px; border-radius: var(--radius); background: var(--bg); }
.mini-stat span { display: block; font-size: 12px; color: var(--text); text-transform: uppercase; letter-spacing: .4px; }
.mini-stat b { display: block; font-size: 18px; font-weight: 500; margin-top: 4px; }
.tabs-nav a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
button.btn-gen { border: 0; cursor: pointer; color: var(--white); }
button.btn-gen:hover { background: #454a56; }
.margins-table td { vertical-align: middle; }
.margins-table .input-group { max-width: 180px; }
.margins-table .final-input { font-weight: 600; color: var(--white); }
.margins-table .final-input.is-up { color: var(--success); }

/* Obtenir un code : choix de la durée, quantité, total */
.duration-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.duration-row .form-select { flex: 1; min-width: 0; width: 100%; }
.duration-row .form-select option:disabled { color: #6a6e7a; }
.offer-options { display: flex; flex-direction: column; gap: 6px; }
.offer-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; transition: border-color .15s, background .15s;
}
.offer-option input { position: absolute; opacity: 0; pointer-events: none; }
.offer-option:hover { border-color: var(--text); }
.offer-option:has(input:checked) { border-color: var(--primary); background: rgba(30, 120, 255, .08); }
.offer-option.disabled { opacity: .45; cursor: not-allowed; }
.oo-main { display: flex; flex-direction: column; gap: 2px; }
.oo-dur { color: var(--white); font-weight: 500; font-size: 14px; }
.oo-price { color: var(--primary); font-weight: 600; white-space: nowrap; }
.qty-row, .total-row { display: flex; align-items: center; justify-content: space-between; }
.total-row { padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.total-row b { color: var(--white); font-size: 18px; font-weight: 600; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty button { width: 34px; height: 34px; border: 0; background: var(--bg); color: var(--white); font-size: 18px; cursor: pointer; }
.qty button:hover { background: var(--line); }
.qty input {
  width: 50px; height: 34px; border: 0; text-align: center; background: var(--card); color: var(--white);
  font: inherit; font-weight: 600; -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Tableau de bord revendeur : offres du moment et nouveautés */
.deal-card { overflow: hidden; border: 1px solid var(--line); }
.deal-card .card-body { display: flex; flex-direction: column; gap: 10px; }
.deal-gain { font-size: 20px; font-weight: 700; color: var(--warning); white-space: nowrap; }
.deal-title { margin: 0; font-size: 16px; }
.deal-text { margin: 0; font-size: 14px; color: var(--text-2); flex: 1; }
.deal-end { font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.deal-alert { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 13px; font-weight: 700; letter-spacing: .3px; }
.deal-soon { border-color: rgba(255, 170, 22, .6); }
.deal-soon .deal-alert { background: var(--warning); color: #212529; }
.deal-urgent { border: 2px solid var(--danger); animation: dealPulse 1.6s ease-in-out infinite; }
.deal-urgent .deal-alert { background: var(--danger); color: #fff; }
.deal-urgent .deal-alert .ic { animation: shake .8s ease-in-out infinite; }
@keyframes dealPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 76, 65, .55); }
  50%      { box-shadow: 0 0 0 10px rgba(255, 76, 65, 0); }
}
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.countdown {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border-radius: 8px;
  background: rgba(255, 76, 65, .12); color: #ff7b72;
}
.countdown .cd-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.countdown .cd-time { font-family: "Roboto Mono", ui-monospace, monospace; font-size: 20px; white-space: nowrap; font-weight: 700; color: #fff; }
.countdown.cd-last .cd-time { color: var(--danger); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.btn-warning-solid { background: var(--warning); border-color: var(--warning); color: #212529; }
.btn-warning-solid:hover { background: #e89a0f; }
.badge-new { background: linear-gradient(135deg, #1e78ff, #7356f1); color: #fff; font-weight: 700; letter-spacing: .5px; }
.highlight-row > [class*="col-"] > .card { height: calc(100% - 30px); }
.highlight-row .server-card .card-body .btn-block { margin-top: auto; }
.new-card { box-shadow: 0 0 0 1px rgba(30, 120, 255, .45), 0 0 24px rgba(30, 120, 255, .15); }
@media (prefers-reduced-motion: reduce) {
  .deal-urgent, .deal-urgent .deal-alert .ic, .countdown.cd-last .cd-time { animation: none; }
}

/* Marketing (admin) */
.mode-cards.mode-cards-3 { grid-template-columns: 1fr; }
.mode-cards-3 .mode-card span { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.mode-cards-3 .mode-card small { flex-basis: 100%; }
.promo-preview {
  display: flex; gap: 10px; padding: 12px 14px; margin-bottom: 18px; border-radius: 8px; font-size: 13px;
  background: rgba(255, 170, 22, .1); color: var(--warning);
}
.promo-preview:empty { display: none; }
.promo-preview ul { margin: 6px 0 0; padding-left: 16px; color: var(--text-2); }
.promo-preview b { color: var(--white); }
/* Récompenses (revendeur) */
.reward-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.reward-item:first-child { border-top: 0; padding-top: 0; }
.reward-item .ri-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 170, 22, .15); color: var(--warning); flex-shrink: 0; }
.reward-item .ri-text { flex: 1; min-width: 0; font-size: 14px; color: var(--text-2); }
.reward-item .ri-text b { color: var(--white); font-weight: 500; }
.reward-item .progress { margin-top: 6px; }

/* Promotions dans « Obtenir un code » */
.promo-badge { position: absolute; top: 14px; left: 14px; z-index: 1; font-weight: 600; }
.promo-tag {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
  background: rgba(255, 170, 22, .12); color: var(--warning);
}
.free-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--warning); }
.free-row b { font-weight: 600; }

/* Message « maximum atteint » sous la quantité */
.qty-msg {
  display: none; align-items: center; gap: 6px; margin-top: -4px;
  padding: 6px 10px; border-radius: 6px; font-size: 12px;
  background: rgba(255, 170, 22, .12); color: var(--warning);
}
.qty-msg.show { display: flex; animation: fade .2s; }

/* Vérification avant achat */
.verify-line { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--primary); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.diff-list { margin: 6px 0 0; padding-left: 18px; }
.diff-list li { margin: 2px 0; }
.diff-list s { opacity: .7; }
.diff-list b { color: var(--white); }
.toast.warning { background: var(--warning); color: #212529; }

/* Reçu : liste des codes */
.codes-list { display: flex; flex-direction: column; gap: 8px; }
.code-line {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px;
  background: rgba(30, 120, 255, .06); border: 1px dashed rgba(30, 120, 255, .45);
}
.code-line code { flex: 1; font-size: 17px; font-weight: 700; color: var(--white); letter-spacing: 1px; word-break: break-all; }
.code-n { min-width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-size: 12px; color: var(--text-2); }

/* Packs */
.pack-content { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pack-content li { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.pack-content b { color: var(--white); font-weight: 600; min-width: 26px; }
.pack-card .server-cover::before { background: rgba(255, 255, 255, .12); }
.pack-value { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 8px; background: var(--bg); font-size: 13px; margin-top: 28px; }
.pack-value div { display: flex; justify-content: space-between; gap: 10px; }
.pack-value b { color: var(--white); font-weight: 600; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card span {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; height: 100%;
  transition: border-color .15s, background .15s;
}
.mode-card span .ic { color: var(--text); }
.mode-card b { color: var(--white); font-weight: 500; }
.mode-card small { color: var(--text); font-size: 12px; }
.mode-card input:checked + span { border-color: var(--primary); background: rgba(30, 120, 255, .08); }
.mode-card input:checked + span .ic { color: var(--primary); }
.codes-group { margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.codes-group:first-child { margin-top: 0; }
@media (max-width: 575px) { .mode-cards { grid-template-columns: 1fr; } }

/* Sélecteur en arbre (déplacer un revendeur) */
.tree-picker { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.tree-search { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); }
.tree-search .ic { position: absolute; left: 24px; color: var(--text); }
.tree-search .form-control { height: 40px; padding-left: 40px; background: var(--card); }
.tree-count { font-size: 12px; color: var(--text); white-space: nowrap; }
.tree-list { list-style: none; margin: 0; padding: 6px 0; max-height: 320px; overflow-y: auto; }
.tree-item { position: relative; padding-left: calc(12px + var(--d, 0) * 26px); }
/* Lignes de liaison vers le parent */
.tree-item:not(.root)::before {
  content: ""; position: absolute; top: 0; bottom: 50%;
  left: calc(var(--d, 1) * 26px - 6px); width: 12px;
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-bottom-left-radius: 6px;
}
.tree-item label {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; margin-right: 8px;
  border-radius: 6px; cursor: pointer; transition: background .12s;
}
.tree-item label:hover { background: rgba(255, 255, 255, .04); }
.tree-item input { position: absolute; opacity: 0; pointer-events: none; }
.tree-item.selected label { background: rgba(30, 120, 255, .14); box-shadow: inset 0 0 0 1px rgba(30, 120, 255, .5); }
.tree-item.current label { opacity: .5; cursor: not-allowed; }
.tree-item.match .tree-text b { color: var(--white); }
.tree-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  color: #fff; font-size: 11px; font-weight: 600;
}
.tree-avatar.admin { background: var(--line); color: var(--text-2); }
.tree-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.tree-text b { color: var(--text-2); font-weight: 500; font-size: 14px; }
.tree-text small { color: var(--text); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-text mark { background: rgba(255, 170, 22, .3); color: var(--white); border-radius: 2px; padding: 0 1px; }
.tree-empty { padding: 20px; text-align: center; font-size: 13px; color: var(--text); }
.tree-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-top: 1px solid var(--line); background: var(--card);
}

/* Choix segmenté (Recharger / Retirer) */
.seg { display: flex; padding: 4px; border-radius: 8px; background: var(--bg); gap: 4px; }
.seg label { flex: 1; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 10px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--text-2); transition: all .15s;
}
.seg input:checked + span { background: var(--primary); color: #fff; }
.seg label:last-child input:checked + span { background: var(--danger); }

/* Position + flèches monter / descendre */
.position-cell { display: flex; align-items: center; gap: 10px; }
.pos-num {
  min-width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--line); color: var(--white); font-size: 13px; font-weight: 600;
}
.pos-arrows { display: flex; flex-direction: column; gap: 2px; }
.pos-arrows button {
  width: 22px; height: 16px; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 3px; color: var(--text-2);
}
.pos-arrows button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pos-arrows button:disabled { opacity: .3; cursor: default; }
.fw-normal { font-weight: 400; } .d-block { display: block; }
.g-red { background: linear-gradient(135deg, #b71c1c, #ff5a5a); }
.g-gold { background: linear-gradient(135deg, #b8860b, #f5c542); }

/* Bouton dans un menu déroulant (déconnexion) */
button.dropdown-item { width: 100%; background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
a.header-balance:hover { background: #2d303a; }

/* ---------------- Connexion ---------------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background:
  radial-gradient(circle at 15% 20%, rgba(115, 86, 241, .18), transparent 40%),
  radial-gradient(circle at 85% 80%, rgba(30, 120, 255, .15), transparent 40%), var(--bg); }
.auth-form { width: 100%; max-width: 460px; padding: 50px 45px; background: var(--card); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.auth-form .brand-logo { justify-content: center; padding: 0; height: auto; margin-bottom: 28px; }
.auth-form h4 { text-align: center; font-size: 20px; margin-bottom: 6px; }
.auth-form .sub { text-align: center; font-size: 14px; margin-bottom: 30px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 24px; font-size: 14px; }

/* ---------------- Utilitaires ---------------- */
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; } .flex-wrap { flex-wrap: wrap; } .flex-1 { flex: 1; }
.mb-0 { margin-bottom: 0 !important; } .mb-10 { margin-bottom: 10px; } .mb-20 { margin-bottom: 20px; } .mt-20 { margin-top: 20px; }
.p-0 { padding: 0 !important; }
.text-white { color: var(--white) !important; } .text-primary { color: var(--primary) !important; }
.text-violet { color: var(--violet) !important; } .text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; } .text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text) !important; } .text-center { text-align: center; } .text-right { text-align: right; }
.fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; } .fs-14 { font-size: 14px; } .fw-500 { font-weight: 500; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text); }
.empty-state .ic { color: var(--line); margin-bottom: 10px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1399px) {
  .header-content { padding-left: 100px; }
}
@media (max-width: 991px) {
  .nav-header { width: var(--sidebar-mini); }
  .brand-logo { padding: 0 25px; }
  .nav-header .brand-title { display: none; }
  .nav-control { left: calc(100% + 4px); }
  .header { padding-left: var(--sidebar-mini); }
  .header-content { padding: 0 16px 0 80px; }
  .deznav { transform: translateX(-100%); width: var(--sidebar-w); z-index: 40; }
  body.sidebar-open .deznav { transform: none; }
  body.sidebar-open::after { content: ""; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0, 0, 0, .5); z-index: 35; }
  .content-body { margin-left: 0; }
  .container-fluid { padding: 20px 16px 0; }
  .card { margin-bottom: 20px; }
  .row { margin: 0 -10px; } [class*="col-"] { padding: 0 10px; }
}
@media (max-width: 767px) {
  .search-area { display: none; }
  .header-profile .who { display: none; }
  .header-right { gap: 14px; }
  .header-balance { padding: 5px 12px 5px 6px; }
  .header-balance small { display: none; }
  .page-titles { margin-bottom: 20px; }
  .filters .form-control, .filters .form-select { width: 100%; }
  .toast-zone { left: 16px; right: 16px; }
  .toast { min-width: 0; max-width: none; }
  .auth-form { padding: 36px 22px; }
  .code-reveal code { font-size: 18px; }
}

/* Renouveler un abonnement */
.renew-info { margin-top: 0; }
.mono { font-family: "Roboto Mono", ui-monospace, monospace; letter-spacing: .5px; }
.mt-10 { margin-top: 10px; }

/* Outils : SAV Abon. et Softs */
.copy-line { display: inline-flex; align-items: center; gap: 6px; }
.copy-line .btn-icon { width: 26px; height: 26px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.copy-line .btn-icon:hover { color: var(--primary); }
.sav-actions { display: grid; gap: 10px; }
.sav-action {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-2); transition: border-color .15s, background .15s;
}
.sav-action:hover { border-color: var(--primary); background: rgba(30, 120, 255, .06); }
.sav-action > span:first-of-type { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sav-action b { color: var(--white); font-weight: 500; }
.sav-action small { font-size: 12px; color: var(--text); }
.sav-handle { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.sav-handle .form-control { width: 190px; }
.soft-card .card-body { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.soft-card { height: calc(100% - 30px); }
.soft-icon { width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.soft-icon.kind-file { background: rgba(30, 120, 255, .15); color: var(--primary); }
.soft-icon.kind-link { background: rgba(43, 193, 85, .15); color: var(--success); }
.soft-icon.kind-tutorial { background: rgba(115, 86, 241, .15); color: var(--violet); }
.soft-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.soft-btns small { opacity: .75; margin-left: 4px; }
.modal-lg { max-width: 760px; }
.tuto-text { line-height: 1.7; color: var(--text-2); max-height: 65vh; overflow-y: auto; }

/* Finances */
.finance-period { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.finance-range { display: flex; align-items: center; gap: 8px; }
.finance-range .form-control { width: 150px; }
.chart-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.table tfoot td { border-top: 2px solid var(--line); font-weight: 600; padding-top: 12px; }
@media (max-width: 767px) {
  .finance-range { width: 100%; }
  .finance-range .form-control { flex: 1; width: auto; min-width: 0; }
}

/* Softs : choix des serveurs */
.server-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.server-checks.is-invalid .server-check { border-color: var(--danger); }
.server-check { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: 13px; color: var(--text-2); user-select: none; }
.server-check:has(input:checked) { border-color: var(--primary); background: rgba(30, 120, 255, .1); color: var(--white); }
.server-check.all { flex-basis: 100%; }
.server-check.disabled { opacity: .45; cursor: default; }
.server-check input { accent-color: var(--primary); }

/* Réglages */
.settings-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.brand-preview .logo-abbr { width: 40px; height: 40px; }
.logo-img { object-fit: contain; border-radius: 8px; }
.maintenance-on { border: 1px solid var(--danger); }
.card-footer { padding: 16px 20px; border-top: 1px solid var(--line); }
.ml-auto { margin-left: auto; }
.d-block { display: block; }
.announce { font-size: 14px; }
.maintenance-msg { max-width: 480px; margin: 8px auto 18px; color: var(--text-2); font-size: 15px; }

/* Réglages → Menu revendeurs */
.menu-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; color: var(--text-2); }
.menu-toggle > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.menu-toggle:has(input:not(:checked)) { opacity: .55; }
.action-btns .btn.restore:hover { color: var(--warning); border-color: var(--warning); }

/* Captcha de connexion */
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row img { border-radius: 8px; border: 1px solid var(--line); display: block; max-width: calc(100% - 50px); height: auto; }

/* Tableau de bord admin : résumé Finances */
.fin-quick { margin-bottom: 8px; }
.fin-quick td, .fin-quick th { padding: 9px 6px; }
.fin-ico { display: inline-flex; width: 26px; height: 26px; border-radius: 7px; align-items: center; justify-content: center; margin-right: 6px; vertical-align: middle; }
.fin-ico.success { background: rgba(43, 193, 85, .15); color: var(--success); }
.fin-ico.primary { background: rgba(30, 120, 255, .15); color: var(--primary); }
.fin-ico.violet { background: rgba(115, 86, 241, .15); color: var(--violet); }
.fin-ico.warning { background: rgba(255, 170, 22, .15); color: var(--warning); }

/* Recherche rapide (en-tête) */
.search-area input[type=search]::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.qs-results {
  position: absolute; left: 0; top: calc(100% + 8px); width: 420px; max-width: 90vw; max-height: 70vh; overflow-y: auto; z-index: 60;
  background: var(--card); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .45); padding: 6px 0; display: none;
}
.qs-results.show { display: block; animation: drop .18s ease-out; }
.qs-group { padding: 10px 16px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text); }
.qs-item { display: flex; align-items: center; gap: 12px; padding: 8px 16px; color: var(--text-2); }
.qs-item:hover, .qs-item.active { background: rgba(30, 120, 255, .1); color: var(--white); }
.qs-item span { display: flex; flex-direction: column; min-width: 0; }
.qs-item b { color: var(--white); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-item small { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-empty { padding: 14px 16px; font-size: 13px; color: var(--text); }

/* Notifications (cloche) */
.header-notif { position: relative; }
.notif-count {
  position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.notif-menu { width: 340px; padding: 0; overflow: hidden; }
.notif-head { padding: 12px 16px; font-weight: 500; color: var(--white); border-bottom: 1px solid var(--line); }
.notif-empty { padding: 18px 16px; font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.notif-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: rgba(30, 120, 255, .08); color: var(--white); }
.notif-ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.notif-ic.danger { background: rgba(255, 76, 65, .15); color: var(--danger); }
.notif-ic.warning { background: rgba(255, 170, 22, .15); color: var(--warning); }
.notif-ic.success { background: rgba(43, 193, 85, .15); color: var(--success); }
.notif-ic.primary { background: rgba(30, 120, 255, .15); color: var(--primary); }
