/**
 * FiveHeberg — Polish 2026
 * Couche finale chargée après toutes les autres CSS.
 * Objectifs :
 *  - Homogénéiser les composants WHMCS résiduels (forms, tables, modales, alerts)
 *  - Renforcer le mobile (debordements, tables transformées en cartes, tap targets)
 *  - Améliorer les états (hover, focus, loading, empty, success, error)
 *  - Affiner la typographie et les espacements
 *  - Corriger les défauts visuels Bootstrap restants
 *
 * Convention : tout sous body.fh-whmcs pour rester isolé.
 */

/* ============================================================
   0. Variables additionnelles (compatibles avec :root existant)
   ============================================================ */
body.fh-whmcs {
  --fh-success: #34d399;
  --fh-success-bg: rgba(52, 211, 153, 0.14);
  --fh-success-border: rgba(52, 211, 153, 0.4);
  --fh-warning: #fbbf24;
  --fh-warning-bg: rgba(251, 191, 36, 0.14);
  --fh-warning-border: rgba(251, 191, 36, 0.4);
  --fh-danger: #f87171;
  --fh-danger-bg: rgba(248, 113, 113, 0.14);
  --fh-danger-border: rgba(248, 113, 113, 0.4);
  --fh-info: #60a5fa;
  --fh-info-bg: rgba(96, 165, 250, 0.14);
  --fh-info-border: rgba(96, 165, 250, 0.4);

  --fh-card-bg: rgba(12, 24, 41, 0.78);
  --fh-card-bg-hover: rgba(18, 32, 52, 0.88);
  --fh-card-border: rgba(77, 163, 255, 0.18);
  --fh-card-shadow: 0 14px 38px -16px rgba(0, 0, 0, 0.65);
  --fh-card-shadow-hover: 0 22px 56px -18px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(59, 158, 255, 0.18);

  --fh-input-bg: rgba(6, 13, 24, 0.6);
  --fh-input-border: rgba(77, 163, 255, 0.25);
  --fh-input-border-focus: rgba(59, 158, 255, 0.6);

  --fh-tap: 44px;

  --fh-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================================================
   1. Reset doux + comportement global
   ============================================================ */
body.fh-whmcs *,
body.fh-whmcs *::before,
body.fh-whmcs *::after {
  box-sizing: border-box;
}

body.fh-whmcs {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Images responsives — SEULEMENT dans le contenu, pas dans le chrome (header/footer/nav) */
body.fh-whmcs #main-body img,
body.fh-whmcs .invoice-container img,
body.fh-whmcs .modal img,
body.fh-whmcs .primary-content img {
  max-width: 100%;
  height: auto;
}

body.fh-whmcs a {
  transition: color 0.18s var(--fh-ease);
}

body.fh-whmcs a:focus-visible,
body.fh-whmcs button:focus-visible,
body.fh-whmcs input:focus-visible,
body.fh-whmcs select:focus-visible,
body.fh-whmcs textarea:focus-visible {
  outline: 2px solid var(--fh-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

body.fh-whmcs ::selection {
  background: rgba(59, 158, 255, 0.4);
  color: #fff;
}

/* Empêche les débordements horizontaux globaux mobile UNIQUEMENT au niveau body
   (laisser #main-body capable de scroller pour les tables larges) */
@media (max-width: 767.98px) {
  body.fh-whmcs {
    overflow-x: hidden;
  }
}

/* ============================================================
   2. Typographie
   Scoping :
   - Headings/paragraphes globaux SAUF dans le chrome vitrine (header/footer)
   - Le chrome a ses propres styles fh-* qui doivent être préservés
   ============================================================ */
body.fh-whmcs #main-body h1,
body.fh-whmcs #main-body h2,
body.fh-whmcs #main-body h3,
body.fh-whmcs #main-body h4,
body.fh-whmcs #main-body h5,
body.fh-whmcs #main-body h6,
body.fh-whmcs .invoice-container h1,
body.fh-whmcs .invoice-container h2,
body.fh-whmcs .invoice-container h3,
body.fh-whmcs .invoice-container h4,
body.fh-whmcs .invoice-container h5,
body.fh-whmcs .invoice-container h6,
body.fh-whmcs .modal h1,
body.fh-whmcs .modal h2,
body.fh-whmcs .modal h3,
body.fh-whmcs .modal h4,
body.fh-whmcs .modal h5,
body.fh-whmcs .modal h6 {
  color: var(--fh-text);
  font-family: var(--fh-font);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

body.fh-whmcs #main-body h1,
body.fh-whmcs .invoice-container h1 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem); }
body.fh-whmcs #main-body h2,
body.fh-whmcs .invoice-container h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.875rem); }
body.fh-whmcs #main-body h3,
body.fh-whmcs .invoice-container h3 { font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); }
body.fh-whmcs #main-body h4,
body.fh-whmcs .invoice-container h4 { font-size: clamp(1.05rem, 0.95rem + 0.3vw, 1.2rem); }

body.fh-whmcs #main-body .text-muted,
body.fh-whmcs #main-body .small-text,
body.fh-whmcs #main-body small,
body.fh-whmcs .invoice-container .text-muted,
body.fh-whmcs .invoice-container .small-text,
body.fh-whmcs .invoice-container small {
  color: var(--fh-muted) !important;
}

body.fh-whmcs #main-body p,
body.fh-whmcs .invoice-container p {
  color: var(--fh-text);
  line-height: 1.65;
}

body.fh-whmcs #main-body hr,
body.fh-whmcs .invoice-container hr {
  border-color: var(--fh-border);
  opacity: 0.6;
}

body.fh-whmcs #main-body strong,
body.fh-whmcs #main-body b,
body.fh-whmcs .invoice-container strong,
body.fh-whmcs .invoice-container b {
  color: var(--fh-text);
  font-weight: 700;
}

/* ============================================================
   3. Cartes & panels
   ============================================================ */
body.fh-whmcs .card {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  box-shadow: var(--fh-card-shadow);
  color: var(--fh-text);
  overflow: hidden;
  transition: transform 0.22s var(--fh-ease), box-shadow 0.22s var(--fh-ease), border-color 0.22s var(--fh-ease);
}

body.fh-whmcs .card-header,
body.fh-whmcs .card-footer {
  background: transparent;
  border-color: var(--fh-border);
  padding: 1rem 1.25rem;
}

body.fh-whmcs .card-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-weight: 600;
}

body.fh-whmcs .card-title {
  margin: 0;
  color: var(--fh-text);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

body.fh-whmcs .card-body {
  padding: 1.25rem;
  color: var(--fh-text);
}

body.fh-whmcs .card-body p:last-child {
  margin-bottom: 0;
}

body.fh-whmcs .card.card-accent-blue,
body.fh-whmcs .card.card-accent-green,
body.fh-whmcs .card.card-accent-gold,
body.fh-whmcs .card.card-accent-red,
body.fh-whmcs .card.card-accent-orange {
  position: relative;
}

body.fh-whmcs .card.card-accent-blue::before,
body.fh-whmcs .card.card-accent-green::before,
body.fh-whmcs .card.card-accent-gold::before,
body.fh-whmcs .card.card-accent-red::before,
body.fh-whmcs .card.card-accent-orange::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--fh-accent);
  pointer-events: none;
}

body.fh-whmcs .card.card-accent-green::before { background: var(--fh-success); }
body.fh-whmcs .card.card-accent-gold::before { background: var(--fh-warning); }
body.fh-whmcs .card.card-accent-red::before { background: var(--fh-danger); }
body.fh-whmcs .card.card-accent-orange::before { background: #fb923c; }

/* Panel WHMCS (panel.tpl) — alias .panel.panel-* */
body.fh-whmcs .panel {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  box-shadow: var(--fh-card-shadow);
  overflow: hidden;
  margin-bottom: 1rem;
}

body.fh-whmcs .panel-heading {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--fh-border);
  padding: 0.85rem 1.15rem;
  color: var(--fh-text);
  font-weight: 600;
}

body.fh-whmcs .panel-body {
  padding: 1.15rem;
  color: var(--fh-text);
}

body.fh-whmcs .panel-footer {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--fh-border);
  padding: 0.75rem 1.15rem;
  color: var(--fh-muted);
}

body.fh-whmcs .panel-default,
body.fh-whmcs .panel-info,
body.fh-whmcs .panel-success,
body.fh-whmcs .panel-warning,
body.fh-whmcs .panel-danger {
  position: relative;
}

body.fh-whmcs .panel-default::before,
body.fh-whmcs .panel-info::before,
body.fh-whmcs .panel-success::before,
body.fh-whmcs .panel-warning::before,
body.fh-whmcs .panel-danger::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  pointer-events: none;
}

body.fh-whmcs .panel-default::before { background: var(--fh-accent); }
body.fh-whmcs .panel-info::before { background: var(--fh-info); }
body.fh-whmcs .panel-success::before { background: var(--fh-success); }
body.fh-whmcs .panel-warning::before { background: var(--fh-warning); }
body.fh-whmcs .panel-danger::before { background: var(--fh-danger); }

/* ============================================================
   4. Boutons (couche complémentaire)
   ============================================================ */
body.fh-whmcs .btn,
body.fh-whmcs button.btn,
body.fh-whmcs input.btn,
body.fh-whmcs a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.55rem 1.1rem;
  font-family: var(--fh-font);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 0.18s var(--fh-ease), background 0.18s var(--fh-ease), border-color 0.18s var(--fh-ease), box-shadow 0.18s var(--fh-ease), filter 0.18s var(--fh-ease);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

body.fh-whmcs .btn:active {
  transform: translateY(1px);
}

body.fh-whmcs .btn-sm,
body.fh-whmcs .btn-xs {
  min-height: 32px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

body.fh-whmcs .btn-lg,
body.fh-whmcs .btn-large {
  min-height: 50px;
  padding: 0.75rem 1.5rem;
  font-size: 1.02rem;
  border-radius: 12px;
}

body.fh-whmcs .btn-block {
  width: 100%;
}

body.fh-whmcs .btn-primary,
body.fh-whmcs a.btn-primary,
body.fh-whmcs input.btn-primary,
body.fh-whmcs button.btn-primary {
  background: linear-gradient(135deg, var(--fh-accent) 0%, var(--fh-accent-2) 100%);
  border-color: var(--fh-accent-2);
  color: #fff !important;
  box-shadow: 0 8px 22px -10px rgba(59, 158, 255, 0.55);
}

body.fh-whmcs .btn-primary:hover,
body.fh-whmcs .btn-primary:focus,
body.fh-whmcs a.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 12px 28px -10px rgba(59, 158, 255, 0.7);
}

body.fh-whmcs .btn-success {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  border-color: #059669;
  color: #fff !important;
  box-shadow: 0 8px 22px -10px rgba(52, 211, 153, 0.5);
}

body.fh-whmcs .btn-success:hover { filter: brightness(1.08); }

body.fh-whmcs .btn-warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-color: #d97706;
  color: #1a1208 !important;
  -webkit-text-fill-color: #1a1208 !important;
  box-shadow: 0 8px 22px -10px rgba(251, 191, 36, 0.55);
}

body.fh-whmcs .btn-warning:hover { filter: brightness(1.05); }

body.fh-whmcs .btn-danger {
  background: linear-gradient(135deg, #f87171 0%, #dc2626 100%) !important;
  border-color: #b91c1c !important;
  color: #fff !important;
  box-shadow: 0 8px 22px -10px rgba(220, 38, 38, 0.45);
}

body.fh-whmcs .btn-default,
body.fh-whmcs .btn-secondary {
  background: var(--fh-surface);
  border: 1px solid var(--fh-border);
  color: var(--fh-text) !important;
}

body.fh-whmcs .btn-default:hover,
body.fh-whmcs .btn-secondary:hover {
  background: rgba(59, 158, 255, 0.12);
  border-color: rgba(59, 158, 255, 0.45);
  color: var(--fh-text) !important;
}

body.fh-whmcs .btn-link {
  color: var(--fh-accent);
  background: transparent !important;
  border: none;
  padding: 0.25rem 0.5rem;
  text-decoration: none;
  box-shadow: none;
  min-height: auto;
}

body.fh-whmcs .btn-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.fh-whmcs .btn-outline-primary {
  background: transparent;
  border-color: var(--fh-accent);
  color: var(--fh-accent) !important;
}

body.fh-whmcs .btn-outline-primary:hover {
  background: var(--fh-accent);
  color: #fff !important;
}

body.fh-whmcs .btn[disabled],
body.fh-whmcs .btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.3);
  pointer-events: none;
}

body.fh-whmcs .btn-group .btn + .btn {
  margin-left: 0;
}

body.fh-whmcs .btn-group > .btn:not(:first-child),
body.fh-whmcs .btn-group > .btn-group:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

body.fh-whmcs .btn-group > .btn:not(:last-child),
body.fh-whmcs .btn-group > .btn-group:not(:last-child) > .btn {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* ============================================================
   5. Formulaires
   ============================================================ */
body.fh-whmcs .form-label,
body.fh-whmcs label {
  color: var(--fh-text);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

body.fh-whmcs .form-control,
body.fh-whmcs .form-select,
body.fh-whmcs select,
body.fh-whmcs textarea,
body.fh-whmcs input[type="text"],
body.fh-whmcs input[type="email"],
body.fh-whmcs input[type="password"],
body.fh-whmcs input[type="number"],
body.fh-whmcs input[type="tel"],
body.fh-whmcs input[type="url"],
body.fh-whmcs input[type="search"],
body.fh-whmcs input[type="date"] {
  background: var(--fh-input-bg);
  border: 1px solid var(--fh-input-border);
  color: var(--fh-text);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-family: var(--fh-font);
  font-size: 0.92rem;
  line-height: 1.4;
  transition: border-color 0.18s var(--fh-ease), background 0.18s var(--fh-ease), box-shadow 0.18s var(--fh-ease);
  width: 100%;
  box-shadow: none;
}

body.fh-whmcs textarea,
body.fh-whmcs textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

body.fh-whmcs .form-control:focus,
body.fh-whmcs .form-select:focus,
body.fh-whmcs select:focus,
body.fh-whmcs textarea:focus,
body.fh-whmcs input:focus {
  background: rgba(6, 13, 24, 0.85);
  border-color: var(--fh-input-border-focus);
  box-shadow: 0 0 0 3px rgba(59, 158, 255, 0.18);
  outline: none;
  color: var(--fh-text);
}

body.fh-whmcs .form-control::placeholder,
body.fh-whmcs input::placeholder,
body.fh-whmcs textarea::placeholder {
  color: var(--fh-muted);
  opacity: 1;
}

body.fh-whmcs .form-control[readonly],
body.fh-whmcs .form-control:disabled,
body.fh-whmcs input:disabled {
  background: rgba(255, 255, 255, 0.03);
  color: var(--fh-muted);
  cursor: not-allowed;
}

body.fh-whmcs select,
body.fh-whmcs .form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238fa3be'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 14px;
  padding-right: 2.25rem;
  cursor: pointer;
}

body.fh-whmcs select option {
  background: #0c1829;
  color: var(--fh-text);
}

body.fh-whmcs .form-group {
  margin-bottom: 1rem;
}

body.fh-whmcs .form-check,
body.fh-whmcs .checkbox,
body.fh-whmcs .radio {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding-left: 0;
  margin-bottom: 0.45rem;
  color: var(--fh-text);
  cursor: pointer;
}

body.fh-whmcs .form-check-input,
body.fh-whmcs input[type="checkbox"],
body.fh-whmcs input[type="radio"] {
  flex-shrink: 0;
  margin: 3px 0 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--fh-accent);
  cursor: pointer;
  min-height: auto;
}

body.fh-whmcs .form-check-label {
  font-weight: 500;
  cursor: pointer;
  line-height: 1.4;
}

body.fh-whmcs .input-group {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  background: var(--fh-input-bg);
  border: 1px solid var(--fh-input-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.18s var(--fh-ease), box-shadow 0.18s var(--fh-ease);
}

body.fh-whmcs .input-group:focus-within {
  border-color: var(--fh-input-border-focus);
  box-shadow: 0 0 0 3px rgba(59, 158, 255, 0.18);
}

body.fh-whmcs .input-group > .form-control,
body.fh-whmcs .input-group > input,
body.fh-whmcs .input-group > select {
  border: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

body.fh-whmcs .input-group > .form-control:focus,
body.fh-whmcs .input-group > input:focus {
  box-shadow: none;
}

body.fh-whmcs .input-group-text,
body.fh-whmcs .input-group-addon {
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-right: 1px solid var(--fh-input-border);
  color: var(--fh-muted);
  padding: 0 0.85rem;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

body.fh-whmcs .input-group-append > .btn,
body.fh-whmcs .input-group-prepend > .btn,
body.fh-whmcs .input-group > .btn:last-child {
  border-radius: 0;
  border: none;
  border-left: 1px solid var(--fh-input-border);
  min-height: auto;
  padding: 0 1rem;
}

body.fh-whmcs .field-help-text,
body.fh-whmcs .form-text {
  display: block;
  color: var(--fh-muted);
  font-size: 0.8rem;
  margin-top: 0.4rem;
  line-height: 1.45;
}

body.fh-whmcs .has-error .form-control,
body.fh-whmcs .form-control.is-invalid,
body.fh-whmcs .is-invalid {
  border-color: var(--fh-danger) !important;
}

body.fh-whmcs .has-success .form-control,
body.fh-whmcs .form-control.is-valid {
  border-color: var(--fh-success) !important;
}

body.fh-whmcs .invalid-feedback {
  color: var(--fh-danger);
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

/* Champs avec icône préfixée (.prepend-icon / .field-icon) — pattern WHMCS */
body.fh-whmcs .form-group.prepend-icon {
  position: relative;
}

body.fh-whmcs .form-group.prepend-icon .field-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  z-index: 4;
  color: var(--fh-muted);
  pointer-events: none;
  margin: 0;
  font-weight: normal;
}

body.fh-whmcs .form-group.prepend-icon .field-icon + input,
body.fh-whmcs .form-group.prepend-icon .field-icon + select,
body.fh-whmcs .form-group.prepend-icon .field,
body.fh-whmcs .form-group.prepend-icon input.field,
body.fh-whmcs .form-group.prepend-icon select.field {
  padding-left: 2.5rem;
}

/* ============================================================
   6. Tables
   ============================================================ */
body.fh-whmcs .table {
  width: 100%;
  margin: 0;
  color: var(--fh-text);
  border-color: var(--fh-border);
  background: transparent;
  --bs-table-bg: transparent;
  --bs-table-color: var(--fh-text);
  --bs-table-border-color: var(--fh-border);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
  --bs-table-hover-bg: rgba(59, 158, 255, 0.08);
}

body.fh-whmcs .table th {
  background: rgba(255, 255, 255, 0.025);
  color: var(--fh-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--fh-border);
  padding: 0.75rem 0.9rem;
  vertical-align: middle;
}

body.fh-whmcs .table td {
  padding: 0.85rem 0.9rem;
  vertical-align: middle;
  border-color: var(--fh-border);
  border-top: 1px solid var(--fh-border);
  color: var(--fh-text);
  font-size: 0.92rem;
}

body.fh-whmcs .table tbody tr {
  transition: background 0.15s var(--fh-ease);
}

body.fh-whmcs .table tbody tr[onclick] {
  cursor: pointer;
}

body.fh-whmcs .table tbody tr:hover {
  background: rgba(59, 158, 255, 0.06) !important;
}

body.fh-whmcs .table tbody tr[onclick]:hover td:first-child {
  position: relative;
}

body.fh-whmcs .table tbody tr[onclick]:hover td:first-child::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, var(--fh-accent), var(--fh-accent-2));
}

/* Rows cliquables : indique visuellement qu'elles sont des liens */
body.fh-whmcs .table tbody tr[onclick] a {
  position: relative;
  z-index: 2;
}

/* Liste services : hiérarchie name + domain */
body.fh-whmcs .fh-services-table__product {
  line-height: 1.35;
}

body.fh-whmcs .fh-services-table__name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fh-text);
  margin-bottom: 0.15rem;
  letter-spacing: -0.005em;
}

body.fh-whmcs .fh-services-table__domain a {
  color: var(--fh-accent);
  font-size: 0.82rem;
  text-decoration: none;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

body.fh-whmcs .fh-services-table__domain a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.fh-whmcs .fh-services-table__domain--empty {
  color: var(--fh-muted);
  font-size: 0.82rem;
}

body.fh-whmcs .fh-services-table__amount {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fh-text);
}

body.fh-whmcs .fh-services-table__cycle {
  display: block;
  font-size: 0.72rem;
  color: var(--fh-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}

/* Liste factures : numéro facture en mono, date + statut côte à côte */
body.fh-whmcs .fh-invoices-page tbody tr td:first-child {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fh-text);
}

/* Tickets : numéro #X visible et stylé */
body.fh-whmcs #tableTicketsList tbody td a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fh-text);
  text-decoration: none;
  border-left: 0 !important;
  padding-left: 0 !important;
}

body.fh-whmcs #tableTicketsList tbody td a:hover {
  color: var(--fh-accent);
}

body.fh-whmcs #tableTicketsList .ticket-subject {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty state amélioré pour DataTables */
body.fh-whmcs .dataTables_empty {
  text-align: center !important;
  padding: 3rem 1rem !important;
  color: var(--fh-muted) !important;
  font-style: normal !important;
  font-size: 0.95rem !important;
}

body.fh-whmcs .dataTables_empty::before {
  content: "📭";
  display: block;
  font-size: 2rem;
  margin-bottom: 0.65rem;
  opacity: 0.7;
}

body.fh-whmcs .table-striped tbody tr:nth-of-type(odd) > * {
  background: rgba(255, 255, 255, 0.015);
}

body.fh-whmcs .table-bordered,
body.fh-whmcs .table-bordered td,
body.fh-whmcs .table-bordered th {
  border-color: var(--fh-border);
}

body.fh-whmcs .table-container,
body.fh-whmcs .table-responsive {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  overflow: hidden;
  box-shadow: var(--fh-card-shadow);
}

body.fh-whmcs .table-container > .table,
body.fh-whmcs .table-responsive > .table {
  margin: 0;
}

/* DataTables wrapper polish */
body.fh-whmcs .dataTables_wrapper {
  padding: 1rem 1.15rem 1.15rem;
}

body.fh-whmcs .dataTables_length,
body.fh-whmcs .dataTables_filter,
body.fh-whmcs .dataTables_info {
  color: var(--fh-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

body.fh-whmcs .dataTables_length select,
body.fh-whmcs .dataTables_filter input {
  min-height: 36px;
  background: var(--fh-input-bg);
  border: 1px solid var(--fh-input-border);
  color: var(--fh-text);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  margin: 0 0.4rem;
}

body.fh-whmcs .dataTables_filter input {
  min-width: 200px;
}

body.fh-whmcs .dataTables_wrapper .dataTables_paginate {
  margin-top: 0.85rem;
}

body.fh-whmcs .dataTables_wrapper .dataTables_paginate .paginate_button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--fh-muted) !important;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  margin: 0 1px;
  transition: all 0.15s var(--fh-ease);
}

body.fh-whmcs .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: rgba(59, 158, 255, 0.15) !important;
  border-color: rgba(59, 158, 255, 0.35) !important;
  color: var(--fh-text) !important;
}

body.fh-whmcs .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.fh-whmcs .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-2)) !important;
  border-color: var(--fh-accent-2) !important;
  color: #fff !important;
}

body.fh-whmcs .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.fh-whmcs .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  background: transparent !important;
  border-color: transparent !important;
  color: rgba(143, 163, 190, 0.4) !important;
  cursor: not-allowed;
}

/* Loader de table */
body.fh-whmcs #tableLoading {
  padding: 2.5rem 1rem;
  color: var(--fh-muted);
}

body.fh-whmcs #tableLoading .fa-spinner {
  color: var(--fh-accent);
  font-size: 1.5rem;
}

/* ============================================================
   7. Tables responsive
   On laisse DataTables gérer le responsive nativement (option "responsive": true
   dans tablelist.tpl). On ajoute juste de quoi rendre le scroll horizontal
   propre + des paddings réduits sur mobile.
   ============================================================ */
@media (max-width: 575.98px) {
  body.fh-whmcs .table-container,
  body.fh-whmcs .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.fh-whmcs .table th,
  body.fh-whmcs .table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  body.fh-whmcs .table th {
    font-size: 0.7rem;
  }
}

/* ============================================================
   8. Status / Labels
   ============================================================ */
body.fh-whmcs .label,
body.fh-whmcs .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
  background: var(--fh-surface);
  color: var(--fh-text);
}

body.fh-whmcs .label.status,
body.fh-whmcs .status {
  border: 1px solid transparent;
}

body.fh-whmcs .status-active,
body.fh-whmcs .status-paid,
body.fh-whmcs .status-completed,
body.fh-whmcs .status-open,
body.fh-whmcs .status-answered {
  background: var(--fh-success-bg);
  color: var(--fh-success);
  border-color: var(--fh-success-border);
}

body.fh-whmcs .status-pending,
body.fh-whmcs .status-draft,
body.fh-whmcs .status-customer-reply,
body.fh-whmcs .status-onhold,
body.fh-whmcs .status-in-progress {
  background: var(--fh-warning-bg);
  color: var(--fh-warning);
  border-color: var(--fh-warning-border);
}

body.fh-whmcs .status-unpaid,
body.fh-whmcs .status-overdue,
body.fh-whmcs .status-suspended,
body.fh-whmcs .status-cancelled,
body.fh-whmcs .status-terminated,
body.fh-whmcs .status-fraud,
body.fh-whmcs .status-closed {
  background: var(--fh-danger-bg);
  color: var(--fh-danger);
  border-color: var(--fh-danger-border);
}

body.fh-whmcs .status-expired,
body.fh-whmcs .status-refunded,
body.fh-whmcs .status-collections {
  background: rgba(168, 162, 158, 0.14);
  color: #d6d3d1;
  border-color: rgba(168, 162, 158, 0.4);
}

body.fh-whmcs .status-paymentpending,
body.fh-whmcs .status-payment-pending {
  background: var(--fh-info-bg);
  color: var(--fh-info);
  border-color: var(--fh-info-border);
}

/* Pulse pour les status actifs critiques */
body.fh-whmcs .status-active::before,
body.fh-whmcs .status-open::before,
body.fh-whmcs .status-paid::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: fhStatusPulse 2.4s ease-in-out infinite;
}

@keyframes fhStatusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================================
   9. Alerts & flash messages
   ============================================================ */
body.fh-whmcs .alert {
  border-radius: 12px;
  padding: 1rem 1.15rem;
  border: 1px solid var(--fh-border);
  background: var(--fh-card-bg);
  color: var(--fh-text);
  position: relative;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

body.fh-whmcs .alert::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  align-self: stretch;
  border-radius: 4px;
  background: var(--fh-accent);
  margin: -0.15rem 0;
}

body.fh-whmcs .alert > *:not(.close):not(.btn-close):not(button) {
  flex: 1;
  min-width: 0;
}

body.fh-whmcs .alert-success {
  background: var(--fh-success-bg);
  border-color: var(--fh-success-border);
  color: #d1fae5;
}

body.fh-whmcs .alert-success::before { background: var(--fh-success); }

body.fh-whmcs .alert-info {
  background: var(--fh-info-bg);
  border-color: var(--fh-info-border);
  color: #dbeafe;
}

body.fh-whmcs .alert-info::before { background: var(--fh-info); }

body.fh-whmcs .alert-warning {
  background: var(--fh-warning-bg);
  border-color: var(--fh-warning-border);
  color: #fef3c7;
}

body.fh-whmcs .alert-warning::before { background: var(--fh-warning); }

body.fh-whmcs .alert-danger,
body.fh-whmcs .alert-error {
  background: var(--fh-danger-bg);
  border-color: var(--fh-danger-border);
  color: #fee2e2;
}

body.fh-whmcs .alert-danger::before,
body.fh-whmcs .alert-error::before { background: var(--fh-danger); }

body.fh-whmcs .alert .close,
body.fh-whmcs .alert .btn-close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  font-size: 1.2rem;
  padding: 0;
  cursor: pointer;
  filter: brightness(1.2);
  transition: opacity 0.15s var(--fh-ease);
  margin-left: auto;
}

body.fh-whmcs .alert .close:hover,
body.fh-whmcs .alert .btn-close:hover {
  opacity: 1;
}

/* ============================================================
   10. Modales
   ============================================================ */
body.fh-whmcs .modal {
  --bs-modal-bg: var(--fh-bg-elevated);
  --bs-modal-color: var(--fh-text);
  --bs-modal-border-color: var(--fh-card-border);
  --bs-modal-border-radius: var(--fh-radius);
  --bs-modal-header-border-color: var(--fh-border);
  --bs-modal-footer-border-color: var(--fh-border);
  z-index: 10500;
}

body.fh-whmcs .modal-backdrop {
  background: rgba(3, 7, 14, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10499;
}

body.fh-whmcs .modal-backdrop.show {
  opacity: 1;
}

body.fh-whmcs .modal-content {
  background: var(--fh-bg-elevated);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  color: var(--fh-text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

body.fh-whmcs .modal-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--fh-border);
  padding: 1rem 1.25rem;
}

body.fh-whmcs .modal-title {
  color: var(--fh-text);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}

body.fh-whmcs .modal-body {
  padding: 1.25rem;
  color: var(--fh-text);
}

body.fh-whmcs .modal-footer {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--fh-border);
  padding: 0.85rem 1.25rem;
  gap: 0.5rem;
}

body.fh-whmcs .modal-header .close,
body.fh-whmcs .modal-header .btn-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--fh-border);
  color: var(--fh-text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  opacity: 1;
  font-size: 1.1rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s var(--fh-ease);
}

body.fh-whmcs .modal-header .close:hover,
body.fh-whmcs .modal-header .btn-close:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: var(--fh-danger);
  color: var(--fh-danger);
}

/* ============================================================
   11. Tabs / Nav-tabs
   ============================================================ */
body.fh-whmcs .nav-tabs {
  border-bottom: 1px solid var(--fh-border);
  gap: 0.25rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

body.fh-whmcs .nav-tabs .nav-link,
body.fh-whmcs .nav-tabs .nav-item > a {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px 10px 0 0;
  color: var(--fh-muted);
  padding: 0.65rem 1.05rem;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.15s var(--fh-ease);
  text-decoration: none;
  margin-bottom: -1px;
}

body.fh-whmcs .nav-tabs .nav-link:hover {
  color: var(--fh-text);
  background: rgba(59, 158, 255, 0.05);
  border-color: var(--fh-border);
  border-bottom-color: transparent;
}

body.fh-whmcs .nav-tabs .nav-link.active,
body.fh-whmcs .nav-tabs .nav-item > a.active {
  background: var(--fh-card-bg);
  border-color: var(--fh-border);
  border-bottom-color: var(--fh-card-bg);
  color: var(--fh-accent);
}

body.fh-whmcs .nav-pills .nav-link {
  border-radius: 999px;
  padding: 0.45rem 1rem;
  color: var(--fh-muted);
  background: transparent;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.15s var(--fh-ease);
}

body.fh-whmcs .nav-pills .nav-link:hover {
  background: rgba(59, 158, 255, 0.08);
  color: var(--fh-text);
}

body.fh-whmcs .nav-pills .nav-link.active {
  background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-2));
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(59, 158, 255, 0.55);
}

/* ============================================================
   12. List-group
   ============================================================ */
body.fh-whmcs .list-group {
  border-radius: 12px;
  overflow: hidden;
}

body.fh-whmcs .list-group-item {
  background: transparent;
  border-color: var(--fh-border);
  color: var(--fh-text);
  padding: 0.85rem 1.05rem;
  font-size: 0.92rem;
  transition: background 0.15s var(--fh-ease), color 0.15s var(--fh-ease);
}

body.fh-whmcs .list-group-item-action {
  cursor: pointer;
}

body.fh-whmcs .list-group-item-action:hover,
body.fh-whmcs .list-group-item-action:focus {
  background: rgba(59, 158, 255, 0.08);
  color: var(--fh-text);
}

body.fh-whmcs .list-group-item.active,
body.fh-whmcs .list-group-item-action.active {
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.18), rgba(29, 111, 216, 0.15));
  border-color: rgba(59, 158, 255, 0.35);
  color: var(--fh-text);
  position: relative;
}

body.fh-whmcs .list-group-item.active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--fh-accent);
}

body.fh-whmcs .list-group-flush > .list-group-item {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

body.fh-whmcs .list-group-flush > .list-group-item:first-child {
  border-top: 0;
}

body.fh-whmcs .list-group-flush > .list-group-item:last-child {
  border-bottom: 0;
}

/* ============================================================
   13. Pagination Bootstrap
   ============================================================ */
body.fh-whmcs .pagination {
  gap: 4px;
  flex-wrap: wrap;
}

body.fh-whmcs .page-link {
  background: transparent;
  border: 1px solid var(--fh-border);
  color: var(--fh-muted);
  border-radius: 8px !important;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
  font-size: 0.88rem;
  margin: 0;
  transition: all 0.15s var(--fh-ease);
}

body.fh-whmcs .page-link:hover {
  background: rgba(59, 158, 255, 0.12);
  border-color: rgba(59, 158, 255, 0.4);
  color: var(--fh-text);
}

body.fh-whmcs .page-item.active .page-link {
  background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-2));
  border-color: var(--fh-accent-2);
  color: #fff;
}

body.fh-whmcs .page-item.disabled .page-link {
  background: transparent;
  border-color: rgba(77, 163, 255, 0.1);
  color: rgba(143, 163, 190, 0.4);
}

/* ============================================================
   14. Sidebar polish (cards latérales : services, factures, etc.)
   ============================================================ */
body.fh-whmcs .fh-sidebar {
  position: sticky;
  top: 80px;
  align-self: flex-start;
}

@media (max-width: 991.98px) {
  body.fh-whmcs .fh-sidebar {
    position: static;
  }
}

body.fh-whmcs .fh-sidebar .card,
body.fh-whmcs .card-sidebar {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  box-shadow: var(--fh-card-shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}

body.fh-whmcs .card-sidebar .card-header {
  padding: 0.85rem 1.05rem;
  border-bottom: 1px solid var(--fh-border);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

body.fh-whmcs .card-sidebar .card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fh-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  flex: 1;
  min-width: 0;
}

body.fh-whmcs .card-sidebar .card-title > i:first-child {
  color: var(--fh-accent);
  font-size: 0.85rem;
}

body.fh-whmcs .card-sidebar .card-title .badge {
  margin-left: auto;
  font-size: 0.62rem;
  padding: 0.2rem 0.5rem;
  background: rgba(59, 158, 255, 0.15);
  color: var(--fh-accent);
  border: 1px solid rgba(59, 158, 255, 0.3);
}

body.fh-whmcs .card-sidebar .card-minimise {
  margin-left: auto;
  color: var(--fh-muted);
  font-size: 0.7rem;
  cursor: pointer;
  transition: transform 0.2s var(--fh-ease), color 0.15s var(--fh-ease);
  padding: 0.25rem;
}

body.fh-whmcs .card-sidebar .card-minimise:hover {
  color: var(--fh-accent);
}

body.fh-whmcs .card-sidebar.collapsed .card-minimise {
  transform: rotate(180deg);
}

body.fh-whmcs .card-sidebar.collapsed .collapsable-card-body {
  display: none;
}

body.fh-whmcs .card-sidebar .list-group {
  border-radius: 0;
}

body.fh-whmcs .card-sidebar .list-group-item {
  padding: 0.65rem 1.05rem;
  font-size: 0.88rem;
  background: transparent;
  border-color: var(--fh-border);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fh-text);
  position: relative;
}

body.fh-whmcs .card-sidebar .list-group-item-action:hover {
  background: rgba(59, 158, 255, 0.06);
  padding-left: 1.15rem;
  color: var(--fh-text);
}

body.fh-whmcs .card-sidebar .list-group-item i {
  color: var(--fh-muted);
  width: 16px;
  text-align: center;
  font-size: 0.85rem;
  transition: color 0.15s var(--fh-ease);
  flex-shrink: 0;
}

body.fh-whmcs .card-sidebar .list-group-item-action:hover i {
  color: var(--fh-accent);
}

body.fh-whmcs .card-sidebar .list-group-item.active {
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.16), rgba(29, 111, 216, 0.08));
  border-color: rgba(59, 158, 255, 0.32);
  color: var(--fh-text);
  font-weight: 600;
  padding-left: 1.15rem;
}

body.fh-whmcs .card-sidebar .list-group-item.active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--fh-accent), var(--fh-accent-2));
}

body.fh-whmcs .card-sidebar .list-group-item.active i {
  color: var(--fh-accent);
}

body.fh-whmcs .card-sidebar .list-group-item .badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
}

body.fh-whmcs .card-sidebar .card-footer {
  background: rgba(255, 255, 255, 0.015);
  padding: 0.65rem 1.05rem;
  font-size: 0.82rem;
}

/* ============================================================
   15. Breadcrumb
   ============================================================ */
body.fh-whmcs .breadcrumb {
  padding: 0;
  background: transparent;
  margin: 0;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 0.25rem;
}

body.fh-whmcs .breadcrumb-item {
  color: var(--fh-muted);
  display: flex;
  align-items: center;
}

body.fh-whmcs .breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--fh-muted);
  padding: 0 0.5rem;
  opacity: 0.6;
}

body.fh-whmcs .breadcrumb-item a {
  color: var(--fh-muted);
  text-decoration: none;
}

body.fh-whmcs .breadcrumb-item a:hover {
  color: var(--fh-accent);
}

body.fh-whmcs .breadcrumb-item.active {
  color: var(--fh-text);
  font-weight: 600;
}

/* ============================================================
   16. Dashboard tiles (clientareahome)
   ============================================================ */
body.fh-whmcs .tiles {
  margin-bottom: 1.5rem;
}

/* On NE TOUCHE PAS à la grille Bootstrap (.row + .col-6 + .col-xl-3).
   Bootstrap gère ça nativement : 2 cols sous xl, 4 cols à partir de xl. */

body.fh-whmcs .tiles .row > [class*="col-"] {
  margin-bottom: 0.75rem;
}

body.fh-whmcs .tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  position: relative;
  padding: 0.9rem 1rem;
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  color: var(--fh-text);
  text-decoration: none;
  min-height: 110px;
  height: 100%;
  overflow: hidden;
  box-shadow: var(--fh-card-shadow);
  transition: transform 0.22s var(--fh-ease), box-shadow 0.22s var(--fh-ease), border-color 0.22s var(--fh-ease);
}

body.fh-whmcs .tile::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 158, 255, 0.12), transparent 70%);
  pointer-events: none;
}

body.fh-whmcs .tile:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 158, 255, 0.4);
  box-shadow: var(--fh-card-shadow-hover);
  color: var(--fh-text);
}

body.fh-whmcs .tile > i,
body.fh-whmcs .tile > .fas,
body.fh-whmcs .tile > .far {
  position: absolute;
  top: 0.85rem;
  right: 0.95rem;
  font-size: 1.1rem;
  color: var(--fh-accent);
  opacity: 0.7;
  margin: 0;
}

body.fh-whmcs .tile .stat {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--fh-text);
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
}

body.fh-whmcs .tile .title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fh-muted);
}

body.fh-whmcs .tile .highlight {
  display: none;
}

body.fh-whmcs .tile:has(.bg-color-blue) > i { color: #60a5fa; }
body.fh-whmcs .tile:has(.bg-color-green) > i { color: var(--fh-success); }
body.fh-whmcs .tile:has(.bg-color-gold) > i { color: var(--fh-warning); }
body.fh-whmcs .tile:has(.bg-color-red) > i { color: var(--fh-danger); }

@media (max-width: 575.98px) {
  body.fh-whmcs .tile {
    padding: 0.75rem 0.85rem;
    min-height: 95px;
  }

  body.fh-whmcs .tile .stat {
    font-size: 1.4rem;
  }

  body.fh-whmcs .tile > i,
  body.fh-whmcs .tile > .fas,
  body.fh-whmcs .tile > .far {
    font-size: 1rem;
    top: 0.7rem;
    right: 0.75rem;
  }
}

/* ============================================================
   16-bis. Dashboard hero
   ============================================================ */
body.fh-whmcs .fh-dashboard {
  padding-top: 0.5rem;
}

body.fh-whmcs .fh-dashboard__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--fh-border);
}

body.fh-whmcs .fh-dashboard__hero-text {
  min-width: 0;
  flex: 1 1 250px;
}

body.fh-whmcs .fh-dashboard__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fh-accent);
  margin: 0 0 0.3rem;
}

body.fh-whmcs .fh-dashboard__title {
  font-size: clamp(1.25rem, 1.1rem + 1vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.3rem;
  color: var(--fh-text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

body.fh-whmcs .fh-dashboard__subtitle {
  color: var(--fh-muted);
  font-size: 0.88rem;
  margin: 0;
  max-width: 60ch;
  line-height: 1.5;
}

body.fh-whmcs .fh-dashboard__hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex-shrink: 0;
}

body.fh-whmcs .fh-dashboard__addon {
  margin-bottom: 1rem;
}

/* Alerte dashboard (factures impayées, expirations…) */
body.fh-whmcs .fh-dashboard-alert {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  margin: 0 0 1.25rem;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.06));
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--fh-radius);
  color: var(--fh-text);
  text-decoration: none;
  transition: transform 0.18s var(--fh-ease), border-color 0.18s var(--fh-ease), box-shadow 0.18s var(--fh-ease);
}

body.fh-whmcs .fh-dashboard-alert:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 12px 28px -16px rgba(251, 191, 36, 0.5);
  color: var(--fh-text);
}

body.fh-whmcs .fh-dashboard-alert--warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(245, 158, 11, 0.08));
  border-color: rgba(251, 191, 36, 0.4);
}

body.fh-whmcs .fh-dashboard-alert--danger {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.14), rgba(220, 38, 38, 0.08));
  border-color: rgba(248, 113, 113, 0.4);
}

body.fh-whmcs .fh-dashboard-alert__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.18);
  color: var(--fh-warning);
  font-size: 1.15rem;
}

body.fh-whmcs .fh-dashboard-alert--danger .fh-dashboard-alert__icon {
  background: rgba(248, 113, 113, 0.18);
  color: var(--fh-danger);
}

body.fh-whmcs .fh-dashboard-alert__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

body.fh-whmcs .fh-dashboard-alert__title {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--fh-text);
  line-height: 1.3;
}

body.fh-whmcs .fh-dashboard-alert__hint {
  color: var(--fh-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

body.fh-whmcs .fh-dashboard-alert__arrow {
  flex-shrink: 0;
  color: var(--fh-warning);
  font-size: 1rem;
  transition: transform 0.18s var(--fh-ease);
}

body.fh-whmcs .fh-dashboard-alert--danger .fh-dashboard-alert__arrow {
  color: var(--fh-danger);
}

body.fh-whmcs .fh-dashboard-alert:hover .fh-dashboard-alert__arrow {
  transform: translateX(4px);
}

@media (max-width: 575.98px) {
  body.fh-whmcs .fh-dashboard-alert {
    padding: 0.75rem 0.85rem;
    gap: 0.75rem;
  }

  body.fh-whmcs .fh-dashboard-alert__icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  body.fh-whmcs .fh-dashboard-alert__title {
    font-size: 0.9rem;
  }

  body.fh-whmcs .fh-dashboard-alert__hint {
    font-size: 0.78rem;
  }
}

/* Tile alert state (factures impayées) */
body.fh-whmcs .tile.tile--alert {
  border-color: rgba(251, 191, 36, 0.4);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), var(--fh-card-bg));
}

body.fh-whmcs .tile.tile--alert .stat {
  color: var(--fh-warning);
}

body.fh-whmcs .tile.tile--alert::after {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.18), transparent 70%);
}

/* Variantes color des tiles — override discret de la couleur icône */
body.fh-whmcs .tile.tile--blue > i { color: #60a5fa; }
body.fh-whmcs .tile.tile--green > i { color: var(--fh-success); }
body.fh-whmcs .tile.tile--red > i { color: var(--fh-danger); }
body.fh-whmcs .tile.tile--gold > i { color: var(--fh-warning); }

/* Panneau "Besoin d'aide" en bas du dashboard */
body.fh-whmcs .fh-dashboard-help {
  margin-top: 2rem;
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.08), rgba(29, 111, 216, 0.03));
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  overflow: hidden;
  position: relative;
}

body.fh-whmcs .fh-dashboard-help::before {
  content: "";
  position: absolute;
  inset: -50% 60% auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(59, 158, 255, 0.18), transparent 70%);
  pointer-events: none;
}

body.fh-whmcs .fh-dashboard-help__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  flex-wrap: wrap;
}

body.fh-whmcs .fh-dashboard-help__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-2));
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 12px 28px -10px rgba(59, 158, 255, 0.6);
}

body.fh-whmcs .fh-dashboard-help__text {
  flex: 1 1 260px;
  min-width: 0;
}

body.fh-whmcs .fh-dashboard-help__title {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fh-text);
}

body.fh-whmcs .fh-dashboard-help__lead {
  margin: 0;
  color: var(--fh-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

body.fh-whmcs .fh-dashboard-help__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  body.fh-whmcs .fh-dashboard-help__inner {
    padding: 1.15rem 1rem;
    gap: 0.85rem;
  }

  body.fh-whmcs .fh-dashboard-help__icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  body.fh-whmcs .fh-dashboard-help__title {
    font-size: 1rem;
  }

  body.fh-whmcs .fh-dashboard-help__actions {
    width: 100%;
  }

  body.fh-whmcs .fh-dashboard-help__actions .btn {
    flex: 1;
  }
}

@media (max-width: 575.98px) {
  body.fh-whmcs .fh-dashboard__hero {
    padding: 0.75rem 0 1rem;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  body.fh-whmcs .fh-dashboard__eyebrow {
    display: none;
  }

  body.fh-whmcs .fh-dashboard__subtitle {
    display: none;
  }

  body.fh-whmcs .fh-dashboard__hero-actions {
    width: 100%;
    flex-wrap: nowrap;
  }

  body.fh-whmcs .fh-dashboard__hero-actions .btn {
    flex: 1;
    min-height: 38px;
    padding: 0.4rem 0.5rem;
    font-size: 0.82rem;
  }
}

/* ============================================================
   17. Dashboard cards
   ============================================================ */
body.fh-whmcs .client-home-cards .card {
  margin-bottom: 1rem;
}

body.fh-whmcs .fh-dashboard-card__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
}

body.fh-whmcs .fh-dashboard-card__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fh-text);
}

body.fh-whmcs .fh-dashboard-card__title-icon {
  color: var(--fh-accent);
  font-size: 1.1rem;
}

body.fh-whmcs .fh-dashboard-card__action {
  margin-left: auto;
  min-height: 32px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

body.fh-whmcs .fh-dashboard-card__action.bg-color-blue,
body.fh-whmcs .fh-dashboard-card__action.bg-color-green,
body.fh-whmcs .fh-dashboard-card__action.bg-color-gold,
body.fh-whmcs .fh-dashboard-card__action.bg-color-red,
body.fh-whmcs .fh-dashboard-card__action.bg-color-orange {
  background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-2));
  border-color: var(--fh-accent-2);
  color: #fff !important;
}

body.fh-whmcs .fh-dashboard-card__action.bg-color-green {
  background: linear-gradient(135deg, #34d399, #10b981);
  border-color: #059669;
}

body.fh-whmcs .fh-dashboard-card__action.bg-color-gold {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: #d97706;
  color: #1a1208 !important;
}

body.fh-whmcs .fh-dashboard-card__action.bg-color-red {
  background: linear-gradient(135deg, #f87171, #dc2626);
  border-color: #b91c1c;
}

/* Empty states pour les cards du dashboard */
body.fh-whmcs .client-home-cards .card-body:empty::after,
body.fh-whmcs .client-home-cards .card-body p:only-child:empty::after {
  content: "—";
  display: block;
  text-align: center;
  color: var(--fh-muted);
  padding: 0.5rem;
}

/* ============================================================
   18. Login / register polish
   ============================================================ */
body.fh-whmcs .fh-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  min-height: calc(100vh - 250px);
}

body.fh-whmcs .fh-login__form {
  width: 100%;
  max-width: 460px;
}

body.fh-whmcs .fh-login__card {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

body.fh-whmcs .fh-login__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--fh-accent), transparent);
  opacity: 0.7;
}

body.fh-whmcs .fh-login__head {
  margin-bottom: 1.5rem;
}

body.fh-whmcs .fh-login__logo {
  margin-bottom: 1rem;
}

body.fh-whmcs .fh-login__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--fh-text);
}

body.fh-whmcs .fh-login__subtitle {
  color: var(--fh-muted);
  font-size: 0.92rem;
  margin: 0;
}

body.fh-whmcs .fh-login__forgot {
  color: var(--fh-accent);
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 600;
}

body.fh-whmcs .fh-login__forgot:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.fh-whmcs .fh-login__remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fh-muted);
  font-size: 0.88rem;
  cursor: pointer;
  font-weight: 500;
}

body.fh-whmcs .fh-login__submit {
  min-width: 140px;
}

body.fh-whmcs .fh-login__register {
  color: var(--fh-muted);
  font-size: 0.92rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--fh-border);
}

body.fh-whmcs .fh-login__register a {
  color: var(--fh-accent);
  font-weight: 600;
  text-decoration: none;
}

body.fh-whmcs .fh-login__register a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.fh-whmcs .btn-reveal-pw {
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-left: 1px solid var(--fh-input-border);
  color: var(--fh-muted);
  cursor: pointer;
  padding: 0 0.85rem;
  min-height: auto !important;
}

body.fh-whmcs .btn-reveal-pw:hover {
  background: rgba(59, 158, 255, 0.12);
  color: var(--fh-accent);
}

/* Password reset (réutilise les codes fh-login mais avec sa propre racine) */
body.fh-whmcs .fh-pwreset {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  min-height: calc(100vh - 250px);
}

body.fh-whmcs .fh-pwreset__wrap {
  width: 100%;
  max-width: 460px;
}

body.fh-whmcs .fh-pwreset__card {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

body.fh-whmcs .fh-pwreset__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--fh-accent), transparent);
  opacity: 0.7;
}

body.fh-whmcs .fh-pwreset__head {
  margin-bottom: 1.5rem;
}

body.fh-whmcs .fh-pwreset__logo {
  margin-bottom: 0.5rem;
}

body.fh-whmcs .fh-pwreset h6,
body.fh-whmcs .fh-pwreset .h3 {
  color: var(--fh-text);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

body.fh-whmcs .fh-pwreset__back {
  margin-top: 1.25rem;
  font-size: 0.88rem;
}

body.fh-whmcs .fh-pwreset__back a {
  color: var(--fh-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

body.fh-whmcs .fh-pwreset__back a:hover {
  color: var(--fh-accent);
}

/* ============================================================
   19. Register cards polish
   ============================================================ */
body.fh-whmcs .fh-register {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

body.fh-whmcs .fh-register__hero {
  padding: 1rem 0 1.85rem;
  border-bottom: 1px solid var(--fh-border);
  margin-bottom: 1.5rem;
  text-align: center;
}

body.fh-whmcs .fh-register__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fh-accent);
  margin: 0 0 0.5rem;
}

body.fh-whmcs .fh-register__title {
  font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

body.fh-whmcs .fh-register__subtitle {
  color: var(--fh-muted);
  margin: 0;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

body.fh-whmcs .fh-register__submit {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  text-align: center;
}

body.fh-whmcs .fh-register__submit .btn-primary {
  max-width: 320px;
  margin: 0 auto;
}

body.fh-whmcs .fh-register__signin {
  margin: 1rem 0 0;
  color: var(--fh-muted);
  font-size: 0.9rem;
}

body.fh-whmcs .fh-register__signin a {
  color: var(--fh-accent);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.35rem;
}

body.fh-whmcs .fh-register__signin a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.fh-whmcs #registration .card {
  margin-bottom: 1.25rem;
}

body.fh-whmcs #registration .card-body {
  padding: 1.5rem;
}

body.fh-whmcs #registration .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--fh-border);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

body.fh-whmcs #registration .card-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--fh-accent), var(--fh-accent-2));
  border-radius: 2px;
}

body.fh-whmcs .password-strength-meter {
  padding: 0.5rem 0;
}

body.fh-whmcs .password-strength-meter .progress {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

body.fh-whmcs .password-strength-meter .progress-bar {
  transition: width 0.3s ease, background 0.3s ease;
}

/* Toggle switch (optin) */
body.fh-whmcs .fh-optin {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

body.fh-whmcs .fh-optin__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

body.fh-whmcs .fh-optin__switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--fh-border);
  border-radius: 999px;
  transition: background 0.2s var(--fh-ease);
}

body.fh-whmcs .fh-optin__switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s var(--fh-ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

body.fh-whmcs .fh-optin__input:checked + .fh-optin__switch {
  background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-2));
  border-color: var(--fh-accent);
}

body.fh-whmcs .fh-optin__input:checked + .fh-optin__switch::after {
  transform: translateX(20px);
}

body.fh-whmcs .fh-optin__label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--fh-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

body.fh-whmcs .fh-optin__state {
  display: none;
}

body.fh-whmcs .fh-optin__state--off { display: inline; }
body.fh-whmcs .fh-optin__input:checked ~ .fh-optin__label .fh-optin__state--off { display: none; }
body.fh-whmcs .fh-optin__input:checked ~ .fh-optin__label .fh-optin__state--on { display: inline; color: var(--fh-success); }

/* ============================================================
   20. Invoices / view invoice spécifique
   ============================================================ */
body.fh-whmcs .fh-invoices-page .label.status {
  padding: 0.35rem 0.65rem;
}

body.fh-whmcs .invoice-container {
  padding: 2rem 1rem;
  max-width: 960px;
  margin: 0 auto;
}

body.fh-whmcs .invoice-header h2,
body.fh-whmcs .invoice-header h3 {
  color: var(--fh-text);
}

body.fh-whmcs .invoice-status > span {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.fh-whmcs .invoice-status .paid {
  background: var(--fh-success-bg);
  color: var(--fh-success);
  border: 1px solid var(--fh-success-border);
}

body.fh-whmcs .invoice-status .unpaid {
  background: var(--fh-danger-bg);
  color: var(--fh-danger);
  border: 1px solid var(--fh-danger-border);
}

body.fh-whmcs .invoice-status .draft {
  background: var(--fh-warning-bg);
  color: var(--fh-warning);
  border: 1px solid var(--fh-warning-border);
}

body.fh-whmcs .invoice-status .refunded,
body.fh-whmcs .invoice-status .cancelled,
body.fh-whmcs .invoice-status .collections {
  background: rgba(168, 162, 158, 0.14);
  color: #d6d3d1;
  border: 1px solid rgba(168, 162, 158, 0.4);
}

body.fh-whmcs .payment-btn-container {
  margin: 1rem 0;
}

body.fh-whmcs .payment-btn-container .btn,
body.fh-whmcs .payment-btn-container button {
  min-width: 180px;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
}

body.fh-whmcs .transactions-container {
  margin: 1.25rem 0;
}

body.fh-whmcs .total-row {
  background: rgba(59, 158, 255, 0.04);
  font-weight: 600;
}

body.fh-whmcs .total-row:last-child {
  background: rgba(59, 158, 255, 0.1);
  font-size: 1.05rem;
}

/* ============================================================
   21. Domain search
   ============================================================ */
body.fh-whmcs .domain-search,
body.fh-whmcs .domain-checker {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  padding: 1.5rem;
  box-shadow: var(--fh-card-shadow);
  margin-bottom: 1.5rem;
}

body.fh-whmcs .domain-search input,
body.fh-whmcs .domain-checker input {
  min-height: 50px;
  font-size: 1rem;
}

/* ============================================================
   22. Knowledge base
   ============================================================ */
body.fh-whmcs .kb-section,
body.fh-whmcs .knowledge-base {
  margin-bottom: 1.5rem;
}

body.fh-whmcs .kb-article,
body.fh-whmcs .kb-cat {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: transform 0.18s var(--fh-ease), border-color 0.18s var(--fh-ease);
  text-decoration: none;
  color: var(--fh-text);
  display: block;
}

body.fh-whmcs .kb-article:hover,
body.fh-whmcs .kb-cat:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 158, 255, 0.4);
  color: var(--fh-text);
}

body.fh-whmcs .kb-article h4,
body.fh-whmcs .kb-cat h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: var(--fh-accent);
}

/* ============================================================
   23. Tickets
   ============================================================ */
body.fh-whmcs .ticket-number {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  background: rgba(59, 158, 255, 0.12);
  border: 1px solid rgba(59, 158, 255, 0.3);
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: var(--fh-accent);
  font-weight: 600;
  margin-right: 0.5rem;
}

body.fh-whmcs .ticket-subject.unread {
  font-weight: 700;
  color: var(--fh-text);
}

body.fh-whmcs .ticket-subject.unread::after {
  content: "•";
  color: var(--fh-accent);
  margin-left: 0.4rem;
  font-size: 1.2rem;
}

/* Posts dans viewticket — couvert par fh-viewticket.css aussi */
body.fh-whmcs .ticket-reply,
body.fh-whmcs .ticket-post {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
}

/* ============================================================
   23-bis. Page détail produit/service (clientareaproductdetails)
   ============================================================ */
body.fh-whmcs .fh-product-card {
  margin-bottom: 1.25rem;
}

body.fh-whmcs .fh-product {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.fh-whmcs .fh-product__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--fh-border);
}

body.fh-whmcs .fh-product__identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

body.fh-whmcs .fh-product__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.18), rgba(29, 111, 216, 0.1));
  border: 1px solid rgba(59, 158, 255, 0.3);
  color: var(--fh-accent);
  font-size: 1.35rem;
}

body.fh-whmcs .fh-product__titles {
  min-width: 0;
  flex: 1;
}

body.fh-whmcs .fh-product__name {
  margin: 0 0 0.15rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fh-text);
  line-height: 1.25;
  word-break: break-word;
}

body.fh-whmcs .fh-product__group {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fh-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.fh-whmcs .fh-product__status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--fh-info-bg);
  color: var(--fh-info);
  border: 1px solid var(--fh-info-border);
}

body.fh-whmcs .product-status-active .fh-product__status {
  background: var(--fh-success-bg);
  color: var(--fh-success);
  border-color: var(--fh-success-border);
}

body.fh-whmcs .product-status-active .fh-product__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: fhStatusPulse 2.4s ease-in-out infinite;
}

body.fh-whmcs .product-status-suspended .fh-product__status,
body.fh-whmcs .product-status-terminated .fh-product__status,
body.fh-whmcs .product-status-cancelled .fh-product__status,
body.fh-whmcs .product-status-fraud .fh-product__status {
  background: var(--fh-danger-bg);
  color: var(--fh-danger);
  border-color: var(--fh-danger-border);
}

body.fh-whmcs .product-status-pending .fh-product__status {
  background: var(--fh-warning-bg);
  color: var(--fh-warning);
  border-color: var(--fh-warning-border);
}

body.fh-whmcs .fh-product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.fh-whmcs .fh-product__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin: 0;
  padding: 0;
}

body.fh-whmcs .fh-product__stat {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--fh-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0;
}

body.fh-whmcs .fh-product__stat--wide {
  grid-column: 1 / -1;
}

body.fh-whmcs .fh-product__stat dt {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fh-muted);
  margin: 0 0 0.3rem;
}

body.fh-whmcs .fh-product__stat dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fh-text);
  word-break: break-word;
  line-height: 1.35;
}

@media (max-width: 575.98px) {
  body.fh-whmcs .fh-product__header {
    flex-direction: column;
    align-items: stretch;
  }

  body.fh-whmcs .fh-product__status {
    align-self: flex-start;
  }

  body.fh-whmcs .fh-product__actions {
    width: 100%;
  }

  body.fh-whmcs .fh-product__actions .btn {
    flex: 1;
  }

  body.fh-whmcs .fh-product__icon {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }

  body.fh-whmcs .fh-product__name {
    font-size: 1.05rem;
  }
}

/* ============================================================
   23-ter. Modules add-ons et boutons custom (productdetails)
   ============================================================ */
body.fh-whmcs .product-details-actions,
body.fh-whmcs .module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

/* ============================================================
   23-quater. Viewinvoice header (standalone)
   ============================================================ */
body.fh-whmcs.fh-whmcs--invoice .invoice-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.5rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--fh-border);
}

body.fh-whmcs.fh-whmcs--invoice .invoice-col {
  flex: 1 1 280px;
}

body.fh-whmcs.fh-whmcs--invoice .invoice-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

@media (max-width: 575.98px) {
  body.fh-whmcs.fh-whmcs--invoice .invoice-status {
    align-items: stretch;
  }

  body.fh-whmcs.fh-whmcs--invoice .invoice-status > span {
    align-self: flex-start;
  }
}

body.fh-whmcs.fh-whmcs--invoice address {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--fh-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--fh-text);
}

body.fh-whmcs.fh-whmcs--invoice .transactions-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--fh-border);
  border-radius: var(--fh-radius);
  padding: 1rem;
  margin: 1rem 0;
}

/* ============================================================
   24. Orderforms / panier
   ============================================================ */
body.fh-whmcs .fh-order-cart,
body.fh-whmcs #order-standard_cart {
  padding: 1rem 0;
}

body.fh-whmcs .fh-order-cart .header-lined,
body.fh-whmcs #order-standard_cart .header-lined {
  border-bottom: 1px solid var(--fh-border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

body.fh-whmcs .fh-order-cart .header-lined h1,
body.fh-whmcs #order-standard_cart .header-lined h1 {
  margin: 0;
  color: var(--fh-text);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

body.fh-whmcs .view-cart-items {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

body.fh-whmcs .view-cart-items .item {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--fh-border);
  transition: background 0.15s var(--fh-ease);
}

body.fh-whmcs .view-cart-items .item:last-child {
  border-bottom: none;
}

body.fh-whmcs .view-cart-items .item:hover {
  background: rgba(59, 158, 255, 0.04);
}

body.fh-whmcs .view-cart-items .item-title {
  font-weight: 700;
  color: var(--fh-text);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.fh-whmcs .view-cart-items-header {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--fh-border);
  border-radius: 12px 12px 0 0;
  padding: 0.75rem 1.25rem;
  color: var(--fh-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: -1px;
}

body.fh-whmcs .view-cart-items-header + .view-cart-items {
  border-radius: 0 0 var(--fh-radius) var(--fh-radius);
}

/* Sidebar du panier */
body.fh-whmcs .cart-sidebar,
body.fh-whmcs .fh-order-cart__sidebar {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  padding: 1.15rem;
  margin-bottom: 1rem;
}

body.fh-whmcs .cart-sidebar h3,
body.fh-whmcs .cart-sidebar h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fh-muted);
  margin: 0 0 0.85rem;
}

body.fh-whmcs .cart-sidebar a,
body.fh-whmcs .fh-order-cart__sidebar a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--fh-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s var(--fh-ease);
  margin-bottom: 0.15rem;
}

body.fh-whmcs .cart-sidebar a:hover,
body.fh-whmcs .fh-order-cart__sidebar a:hover {
  background: rgba(59, 158, 255, 0.08);
  color: var(--fh-text);
}

body.fh-whmcs .cart-sidebar a.active,
body.fh-whmcs .fh-order-cart__sidebar a.active {
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.18), rgba(29, 111, 216, 0.15));
  color: var(--fh-text);
  font-weight: 600;
}

/* Order summary (sidebar récap commande) */
body.fh-whmcs .order-summary,
body.fh-whmcs #orderSummary,
body.fh-whmcs .ordersummary {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: var(--fh-radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--fh-card-shadow);
  position: sticky;
  top: 90px;
  font-size: 0.92rem;
}

body.fh-whmcs .order-summary .product-name,
body.fh-whmcs #orderSummary .product-name {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fh-text);
  margin-bottom: 0.15rem;
}

body.fh-whmcs .order-summary .product-group,
body.fh-whmcs #orderSummary .product-group {
  display: block;
  color: var(--fh-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--fh-border);
}

body.fh-whmcs .order-summary .clearfix,
body.fh-whmcs #orderSummary .clearfix {
  padding: 0.3rem 0;
  color: var(--fh-muted);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

body.fh-whmcs .order-summary .summary-totals,
body.fh-whmcs #orderSummary .summary-totals {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--fh-border);
}

body.fh-whmcs .order-summary .total-due-today,
body.fh-whmcs #orderSummary .total-due-today,
body.fh-whmcs .total-due-today {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--fh-accent);
}

body.fh-whmcs .total-due-today .amt {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--fh-accent);
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.fh-whmcs .total-due-today > span:last-child {
  color: var(--fh-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

/* Account chooser dans checkout */
body.fh-whmcs .account-select-container .account {
  border: 1px solid var(--fh-border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.65rem;
  transition: all 0.18s var(--fh-ease);
}

body.fh-whmcs .account-select-container .account:hover {
  border-color: rgba(59, 158, 255, 0.4);
  background: rgba(59, 158, 255, 0.03);
}

body.fh-whmcs .account-select-container .account.active {
  border-color: var(--fh-accent);
  background: rgba(59, 158, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(59, 158, 255, 0.15);
}

body.fh-whmcs .account-select-container .account label.radio-inline {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  margin: 0;
  width: 100%;
}

body.fh-whmcs .account-select-container .account .address {
  flex: 1;
  min-width: 0;
}

body.fh-whmcs .account-select-container .account .address strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--fh-text);
}

body.fh-whmcs .account-select-container .account .small {
  color: var(--fh-muted);
  font-size: 0.82rem;
}

/* Sub-heading dans le panier (séparateurs) */
body.fh-whmcs .sub-heading {
  position: relative;
  padding: 1rem 0;
  margin: 1.25rem 0 1rem;
  text-align: left;
}

body.fh-whmcs .sub-heading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--fh-border);
  z-index: 0;
}

body.fh-whmcs .sub-heading > span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--fh-bg-elevated);
  color: var(--fh-text);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 8px;
  border: 1px solid var(--fh-border);
}

/* Cart-sidebar (responsive) */
@media (max-width: 991.98px) {
  body.fh-whmcs .fh-order-cart__layout {
    flex-direction: column;
  }

  body.fh-whmcs .order-summary,
  body.fh-whmcs #orderSummary {
    position: static;
  }
}

/* Complete page (commande validée) */
body.fh-whmcs .order-complete,
body.fh-whmcs .complete-page {
  text-align: center;
  padding: 2rem 1rem;
  max-width: 720px;
  margin: 0 auto;
}

body.fh-whmcs .order-complete h1,
body.fh-whmcs .complete-page h1 {
  background: linear-gradient(135deg, var(--fh-success), #10b981);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.5rem);
  margin-bottom: 0.85rem;
}

/* ============================================================
   25. Captcha
   ============================================================ */
body.fh-whmcs .captcha,
body.fh-whmcs .g-recaptcha {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
}

body.fh-whmcs .captcha img {
  border: 1px solid var(--fh-border);
  border-radius: 8px;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.95);
}

/* ============================================================
   26. Tooltips
   ============================================================ */
body.fh-whmcs .tooltip {
  font-family: var(--fh-font);
}

body.fh-whmcs .tooltip-inner {
  background: var(--fh-bg-elevated);
  color: var(--fh-text);
  border: 1px solid var(--fh-border);
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

body.fh-whmcs .bs-tooltip-top .tooltip-arrow::before,
body.fh-whmcs .bs-tooltip-auto[x-placement^=top] .tooltip-arrow::before {
  border-top-color: var(--fh-border);
}

body.fh-whmcs .bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: var(--fh-border);
}

/* ============================================================
   27. Dropdowns Bootstrap (général)
   ============================================================ */
body.fh-whmcs .dropdown-menu {
  background: var(--fh-bg-elevated);
  border: 1px solid var(--fh-border);
  border-radius: 12px;
  padding: 0.4rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  color: var(--fh-text);
}

body.fh-whmcs .dropdown-item {
  color: var(--fh-text);
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  font-size: 0.92rem;
  transition: background 0.12s var(--fh-ease), color 0.12s var(--fh-ease);
}

body.fh-whmcs .dropdown-item:hover,
body.fh-whmcs .dropdown-item:focus {
  background: rgba(59, 158, 255, 0.15);
  color: #fff;
}

body.fh-whmcs .dropdown-item.active,
body.fh-whmcs .dropdown-item:active {
  background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-2));
  color: #fff;
}

body.fh-whmcs .dropdown-divider {
  border-top-color: var(--fh-border);
  margin: 0.35rem 0;
}

body.fh-whmcs .dropdown-header {
  color: var(--fh-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.5rem 0.85rem 0.3rem;
}

/* ============================================================
   28. Spinners / loaders
   ============================================================ */
body.fh-whmcs .spinner-border,
body.fh-whmcs .spinner-grow {
  color: var(--fh-accent);
}

body.fh-whmcs .fa-spinner,
body.fh-whmcs .fa-spin {
  color: var(--fh-accent);
}

body.fh-whmcs #fullpage-overlay {
  background: rgba(3, 7, 14, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.fh-whmcs #fullpage-overlay .msg {
  color: var(--fh-text);
  font-weight: 600;
}

/* ============================================================
   29. Pages d'erreur / placeholder
   ============================================================ */
body.fh-whmcs .fh-error-page,
body.fh-whmcs .access-denied,
body.fh-whmcs .error-page {
  text-align: center;
  padding: 3rem 1rem;
  max-width: 600px;
  margin: 0 auto;
}

body.fh-whmcs .fh-error-page__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.15), rgba(29, 111, 216, 0.1));
  border: 1px solid rgba(59, 158, 255, 0.35);
  border-radius: 50%;
  color: var(--fh-accent);
  font-size: 2rem;
}

body.fh-whmcs .fh-error-page__icon--danger {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.15), rgba(220, 38, 38, 0.1));
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--fh-danger);
}

body.fh-whmcs .fh-error-page h1,
body.fh-whmcs .access-denied h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.fh-whmcs .fh-error-page p,
body.fh-whmcs .access-denied p {
  color: var(--fh-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.55;
}

body.fh-whmcs .fh-error-page__panel {
  background: var(--fh-card-bg);
  border: 1px solid var(--fh-card-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem auto;
  text-align: left;
  max-width: 480px;
}

body.fh-whmcs .fh-error-page__panel-title {
  font-weight: 700;
  color: var(--fh-text);
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.fh-whmcs .fh-error-page__perms {
  list-style: none;
  padding: 0;
  margin: 0;
}

body.fh-whmcs .fh-error-page__perms li {
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--fh-text);
}

body.fh-whmcs .fh-error-page__perms li + li {
  border-top: 1px solid var(--fh-border);
}

body.fh-whmcs .fh-error-page__kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--fh-border);
}

body.fh-whmcs .fh-error-page__kv:last-child {
  border-bottom: none;
}

body.fh-whmcs .fh-error-page__kv-key {
  color: var(--fh-muted);
  font-size: 0.85rem;
}

body.fh-whmcs .fh-error-page__kv-val {
  color: var(--fh-text);
  font-weight: 600;
  font-size: 0.9rem;
}

body.fh-whmcs .fh-error-page__hint {
  font-size: 0.88rem;
  color: var(--fh-muted);
  font-style: italic;
}

body.fh-whmcs .fh-error-page__actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

body.fh-whmcs .fh-error-code {
  font-size: clamp(4rem, 3rem + 4vw, 7rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--fh-accent), var(--fh-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

body.fh-whmcs .fh-error-page__subtitle {
  color: var(--fh-text);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 575.98px) {
  body.fh-whmcs .fh-error-page__actions {
    flex-direction: column;
  }

  body.fh-whmcs .fh-error-page__actions .btn {
    width: 100%;
  }
}

/* ============================================================
   30. Empty states génériques (.empty / aucun résultat)
   ============================================================ */
body.fh-whmcs .empty,
body.fh-whmcs .no-records,
body.fh-whmcs .text-center.no-data {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--fh-muted);
  font-style: italic;
}

body.fh-whmcs .dataTables_empty {
  text-align: center !important;
  padding: 2.5rem 1rem !important;
  color: var(--fh-muted) !important;
  font-style: italic;
}

/* ============================================================
   31. Print
   ============================================================ */
@media print {
  body.fh-whmcs,
  body.fh-whmcs * {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border-color: #ccc !important;
    text-shadow: none !important;
    filter: none !important;
  }

  body.fh-whmcs .fh-whmcs-chrome,
  body.fh-whmcs .fh-header,
  body.fh-whmcs .fh-footer,
  body.fh-whmcs .fh-breadcrumb,
  body.fh-whmcs .d-print-none,
  body.fh-whmcs .fh-sidebar,
  body.fh-whmcs .sidebar {
    display: none !important;
  }

  body.fh-whmcs::before {
    display: none !important;
  }

  body.fh-whmcs a {
    text-decoration: none !important;
  }
}

/* ============================================================
   32. Responsive mobile final (tap targets, espacements)
   ============================================================ */
@media (max-width: 767.98px) {
  body.fh-whmcs #main-body.fh-main-body {
    padding: 1rem 0 1.5rem;
  }

  body.fh-whmcs .container,
  body.fh-whmcs .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body.fh-whmcs .card-body,
  body.fh-whmcs .panel-body {
    padding: 1rem;
  }

  body.fh-whmcs .card-header,
  body.fh-whmcs .card-footer,
  body.fh-whmcs .panel-heading,
  body.fh-whmcs .panel-footer {
    padding: 0.75rem 1rem;
  }

  /* Tap targets corrects sans inflater les btn-sm/xs */
  body.fh-whmcs .btn {
    min-height: 40px;
  }

  body.fh-whmcs .btn-sm {
    min-height: 36px;
  }

  body.fh-whmcs .btn-xs {
    min-height: 32px;
  }

  /* Inputs en 16px UNIQUEMENT (évite zoom iOS), pas les select/textarea qui ont déjà 16px naturellement */
  body.fh-whmcs input[type="text"],
  body.fh-whmcs input[type="email"],
  body.fh-whmcs input[type="password"],
  body.fh-whmcs input[type="tel"],
  body.fh-whmcs input[type="number"],
  body.fh-whmcs input[type="search"],
  body.fh-whmcs input[type="url"],
  body.fh-whmcs textarea {
    font-size: 16px;
  }

  body.fh-whmcs .modal-dialog {
    margin: 0.5rem;
  }

  body.fh-whmcs .modal-body {
    padding: 1rem;
  }

  body.fh-whmcs .modal-footer {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  /* Sidebar : passe en accordéons compacts */
  body.fh-whmcs .fh-sidebar,
  body.fh-whmcs .sidebar {
    margin-bottom: 1rem;
  }

  body.fh-whmcs .nav-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.fh-whmcs .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  body.fh-whmcs .nav-tabs .nav-link {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* DataTables : controls plus compacts */
  body.fh-whmcs .dataTables_filter input {
    min-width: 0;
    width: 100%;
  }

  body.fh-whmcs .dataTables_length,
  body.fh-whmcs .dataTables_filter {
    text-align: left !important;
    margin-bottom: 0.5rem;
  }

  /* Invoice */
  body.fh-whmcs .invoice-container {
    padding: 1rem 0.75rem;
  }
}

/* Très petits écrans */
@media (max-width: 359.98px) {
  body.fh-whmcs .tile {
    padding: 0.85rem;
    min-height: 110px;
  }

  body.fh-whmcs .tile .stat {
    font-size: 1.6rem;
  }
}

/* ============================================================
   33. Réduction de mouvement
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  body.fh-whmcs *,
  body.fh-whmcs *::before,
  body.fh-whmcs *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   34. Misc fixes (couleurs Bootstrap résiduels)
   ============================================================ */
body.fh-whmcs .bg-light,
body.fh-whmcs .bg-white {
  background: var(--fh-card-bg) !important;
  color: var(--fh-text) !important;
}

body.fh-whmcs .text-dark,
body.fh-whmcs .text-black {
  color: var(--fh-text) !important;
}

body.fh-whmcs .border,
body.fh-whmcs .border-top,
body.fh-whmcs .border-bottom,
body.fh-whmcs .border-left,
body.fh-whmcs .border-right,
body.fh-whmcs .border-start,
body.fh-whmcs .border-end {
  border-color: var(--fh-border) !important;
}

/* Selects natives Bootstrap qui forcent un fond blanc */
body.fh-whmcs .custom-select {
  background-color: var(--fh-input-bg) !important;
  color: var(--fh-text) !important;
  border-color: var(--fh-input-border) !important;
}

/* Tableaux WHMCS dits "address" */
body.fh-whmcs address {
  color: var(--fh-text);
  font-style: normal;
  line-height: 1.55;
}

/* Code & pre */
body.fh-whmcs pre,
body.fh-whmcs code {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--fh-border);
  border-radius: 8px;
  color: #cbd5e1;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85rem;
  padding: 0.15rem 0.4rem;
}

body.fh-whmcs pre {
  padding: 0.85rem 1rem;
  overflow-x: auto;
}

body.fh-whmcs pre code {
  background: transparent;
  border: none;
  padding: 0;
}

/* Liens dans le contenu */
body.fh-whmcs .primary-content a:not(.btn):not(.nav-link):not(.dropdown-item):not(.list-group-item):not(.page-link):not(.tile):not(.kb-article):not(.kb-cat):not(.breadcrumb-item):not(.fh-dashboard-card__action) {
  color: var(--fh-accent);
  text-decoration: none;
}

body.fh-whmcs .primary-content a:not(.btn):not(.nav-link):not(.dropdown-item):not(.list-group-item):not(.page-link):not(.tile):not(.kb-article):not(.kb-cat):not(.breadcrumb-item):not(.fh-dashboard-card__action):hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Misc — Aligne le bouton "retour admin" */
body.fh-whmcs .btn-return-to-admin {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10400;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1208 !important;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
}

body.fh-whmcs .btn-return-to-admin:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  color: #1a1208 !important;
}

/* Recaptcha layout fix */
body.fh-whmcs .g-recaptcha > div {
  margin: 0 auto;
}

/* Quote PDF & view */
body.fh-whmcs .quote-status,
body.fh-whmcs .quote-stage {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--fh-info-bg);
  color: var(--fh-info);
  border: 1px solid var(--fh-info-border);
}
