/* ==========================================================================
   Thème « nexli » — espace client Perfex CRM
   Transposition de la charte du site nexli.fr (cahier des charges §5) :
   noir / rouge #FF3131 / gris, Space Grotesk pour les titres, Inter pour le
   texte, mono système pour les surtitres et libellés, rayon 4 px.
   Chargée après style.css du thème (copie du thème « perfex ») : ne redéfinit
   que l'apparence, jamais la mise en page fonctionnelle de Perfex.
   Contenu en ton clair (lisibilité des tableaux), en-tête et connexion en
   ton sombre comme le site.
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('../fonts/space-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301,
    U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --nx-red: #ff3131;
  --nx-red-dark: #b31e1e;
  --nx-red-text: #c41e1e; /* rouge lisible sur fond clair (AA 4,5:1) */
  --nx-red-glow: rgba(255, 49, 49, 0.18);
  --nx-black: #000;
  --nx-surface-dark: #0a0a0a;
  --nx-line-dark: #1f1f1f;
  --nx-text-dark: #f5f5f5;
  --nx-text-dark-2: #a1a1a1;

  --nx-bg: #f5f5f5;
  --nx-surface: #fff;
  --nx-line: #e3e3e3;
  --nx-text: #0a0a0a;
  --nx-text-2: #525252;

  --nx-ff-display: 'Space Grotesk Variable', 'Space Grotesk', system-ui, sans-serif;
  --nx-ff-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nx-ff-mono: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', Menlo, Consolas, 'Liberation Mono',
    monospace;

  --nx-radius: 4px;
  --nx-header-h: 64px;
  --nx-tracking-caps: 0.14em;
  --nx-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
body.customers {
  background: var(--nx-bg);
  color: var(--nx-text);
  font-family: var(--nx-ff-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.customers h1,
body.customers h2,
body.customers h3,
body.customers h4,
body.customers .login-heading,
body.customers #greeting {
  font-family: var(--nx-ff-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--nx-text);
}

body.customers h1 {
  font-size: 2.25rem;
}

body.customers h2 {
  font-size: 1.75rem;
}

body.customers h3,
body.customers #greeting {
  font-size: 1.5rem;
}

body.customers h4 {
  font-size: 1.125rem;
}

body.customers a {
  color: var(--nx-red-text);
  text-decoration: none;
  transition: color 150ms var(--nx-ease);
}

body.customers a:hover,
body.customers a:focus {
  color: var(--nx-red-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

body.customers :focus-visible {
  outline: 2px solid var(--nx-red);
  outline-offset: 2px;
}

body.customers ::selection {
  background: var(--nx-red);
  color: var(--nx-black);
}

/* Surtitres mono (titres de section du tableau de bord Perfex) */
body.customers .projects-summary-heading,
body.customers .invoices-quick-info-heading,
body.customers .tw-text-neutral-700.tw-font-medium.tw-text-lg {
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--nx-tracking-caps);
  text-transform: uppercase;
  color: var(--nx-red-text);
}

body.customers .projects-summary-heading::before,
body.customers .invoices-quick-info-heading::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--nx-red);
}

/* --------------------------------------------------------------------------
   En-tête : noir, logo typographique, liens mono capitales
   -------------------------------------------------------------------------- */
body.customers .navbar.navbar-default.header {
  min-height: var(--nx-header-h);
  margin-bottom: 0;
  background: var(--nx-black);
  border: 0;
  border-bottom: 1px solid var(--nx-line-dark);
  border-radius: 0;
  box-shadow: none;
}

body.customers .navbar.header .navbar-brand {
  display: inline-flex;
  align-items: center;
  height: var(--nx-header-h);
  padding: 0 15px;
}

/* Logo officiel (img/logo-nexli-light.svg : tracés blancs, rouge de la charte). Hauteur fixe,
   largeur par le ratio 2,83 ; attributs width/height dans le HTML contre le saut de mise en page.
   Le style de base impose `.navbar a.navbar-brand img { height: 34px }` : sélecteur plus précis. */
.nx-brand,
body.customers .navbar a.navbar-brand img.nx-brand {
  display: block;
  height: 40px;
  width: auto;
}

.nx-brand--doc {
  height: 36px;
}

body.customers a.navbar-brand:hover,
body.customers a.navbar-brand:focus {
  text-decoration: none;
}

body.customers .navbar-default .navbar-nav > li > a {
  height: var(--nx-header-h);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--nx-tracking-caps);
  text-transform: uppercase;
  color: var(--nx-text-dark-2);
  background: transparent;
  transition: color 150ms var(--nx-ease);
}

body.customers .navbar-default .navbar-nav > li > a:hover,
body.customers .navbar-default .navbar-nav > li > a:focus,
body.customers .navbar-default .navbar-nav > li.active > a,
body.customers .navbar-default .navbar-nav > .open > a,
body.customers .navbar-default .navbar-nav > .open > a:hover,
body.customers .navbar-default .navbar-nav > .open > a:focus {
  color: var(--nx-text-dark);
  background: transparent;
  text-decoration: none;
}

body.customers .navbar-default .navbar-nav > li.active > a {
  box-shadow: inset 0 -2px 0 var(--nx-red);
}

body.customers .navbar-default .navbar-nav > li > a i {
  margin-right: 6px;
  color: var(--nx-red);
}

/* Le thème de base pose ce bouton en bleu avec !important : même arme, chargée après. */
body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a {
  display: inline-flex;
  color: var(--nx-black) !important;
  background: var(--nx-red) !important;
  border-radius: var(--nx-radius) !important;
  height: 40px;
  margin-top: 12px;
  padding: 0 16px;
  font-size: 0.75rem;
}

body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a:hover,
body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a:focus,
body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a:active {
  background: #ff5a5a !important;
  color: var(--nx-black) !important;
}

body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a i {
  color: var(--nx-black);
}

body.customers .client-profile-image-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--nx-line-dark);
}

body.customers .navbar-default .navbar-nav .badge {
  background: var(--nx-red);
  color: var(--nx-black);
}

/* Menu déroulant du profil : sombre */
body.customers .navbar.header .dropdown-menu {
  min-width: 220px;
  padding: 6px 0;
  background: var(--nx-surface-dark);
  border: 1px solid var(--nx-line-dark);
  border-radius: var(--nx-radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

body.customers .navbar.header .dropdown-menu > li > a,
body.customers .navbar-default .navbar-nav .open .dropdown-menu > li > a {
  padding: 10px 16px;
  font-family: var(--nx-ff-body);
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--nx-text-dark);
  background: transparent;
}

body.customers .navbar.header .dropdown-menu > li > a:hover,
body.customers .navbar.header .dropdown-menu > li > a:focus,
body.customers .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover {
  color: var(--nx-red);
  background: var(--nx-black);
  text-decoration: none;
}

body.customers .navbar.header .dropdown-menu > li.active > a {
  color: var(--nx-red);
  background: transparent;
}

/* Burger (mobile) */
body.customers .navbar-default .navbar-toggle {
  margin: 13px 15px 13px 0;
  border: 1px solid var(--nx-line-dark);
  border-radius: var(--nx-radius);
}

body.customers .navbar-default .navbar-toggle .icon-bar {
  background: var(--nx-text-dark);
}

body.customers .navbar-default .navbar-toggle:hover,
body.customers .navbar-default .navbar-toggle:focus {
  background: var(--nx-surface-dark);
}

@media (max-width: 767px) {
  body.customers .navbar-default .navbar-collapse {
    border-top: 1px solid var(--nx-line-dark);
    background: var(--nx-black);
  }

  body.customers .navbar-default .navbar-nav > li > a {
    height: auto;
    padding: 12px 15px;
    border-bottom: 1px solid var(--nx-line-dark);
  }

  body.customers .navbar-default .navbar-nav > li.active > a {
    box-shadow: inset 3px 0 0 var(--nx-red);
  }

  body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a {
    display: inline-flex;
    margin: 8px 15px 12px;
  }

  body.customers .navbar-default .navbar-nav .open .dropdown-menu > li > a {
    color: var(--nx-text-dark);
  }
}

/* Sous-menu (Fichiers, Calendrier) sous l'en-tête : décollé de la barre noire, zone cliquable
   de 40 px, libellé dans un span coloré par Tailwind */
body.customers .customer-top-submenu {
  margin: 28px 0 16px;
  padding: 0;
}

body.customers .customer-top-submenu > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--nx-radius);
}

body.customers .customer-top-submenu > li > a:hover {
  background: var(--nx-surface);
  text-decoration: none;
}

body.customers .customer-top-submenu > li > a,
body.customers .customer-top-submenu > li > a span {
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nx-text-2);
}

body.customers .customer-top-submenu > li > a:hover,
body.customers .customer-top-submenu > li > a:hover span {
  color: var(--nx-red-text);
}

body.customers .customer-top-submenu > li > a svg {
  color: var(--nx-red);
}

/* --------------------------------------------------------------------------
   Contenu : panneaux, tableaux, formulaires, boutons
   -------------------------------------------------------------------------- */
body.customers #wrapper {
  background: var(--nx-bg);
}

body.customers .panel_s,
body.customers .panel {
  background: var(--nx-surface);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  box-shadow: none;
}

body.customers .panel_s .panel-heading,
body.customers .panel .panel-heading {
  background: var(--nx-surface);
  border-bottom: 1px solid var(--nx-line);
  border-radius: var(--nx-radius) var(--nx-radius) 0 0;
  font-family: var(--nx-ff-display);
  font-weight: 700;
}

body.customers .panel_s .panel-body {
  padding: 24px;
}

body.customers hr {
  border-top: 1px solid var(--nx-line);
}

body.customers .well,
body.customers .alert-info,
body.customers .kb-search-jumbotron {
  background: var(--nx-surface);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  color: var(--nx-text);
}

/* Boutons : mono capitales, rouge plein pour l'action principale */
body.customers .btn {
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--nx-radius);
  padding: 10px 18px;
  transition:
    background-color 150ms var(--nx-ease),
    border-color 150ms var(--nx-ease),
    color 150ms var(--nx-ease);
}

body.customers .btn-sm,
body.customers .btn-xs {
  padding: 6px 12px;
  font-size: 0.6875rem;
}

body.customers .btn-primary,
body.customers .btn-info,
body.customers .btn-success {
  color: var(--nx-black);
  background: var(--nx-red);
  border-color: var(--nx-red);
}

body.customers .btn-primary:hover,
body.customers .btn-primary:focus,
body.customers .btn-primary:active,
body.customers .btn-info:hover,
body.customers .btn-success:hover {
  color: var(--nx-black);
  background: #ff5a5a;
  border-color: #ff5a5a;
}

body.customers .btn-default {
  color: var(--nx-text);
  background: transparent;
  border-color: var(--nx-text);
}

body.customers .btn-default:hover,
body.customers .btn-default:focus {
  color: var(--nx-surface);
  background: var(--nx-text);
  border-color: var(--nx-text);
}

body.customers .btn-danger {
  color: #fff;
  background: var(--nx-red-dark);
  border-color: var(--nx-red-dark);
}

/* Formulaires */
body.customers label,
body.customers .control-label {
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nx-text-2);
}

body.customers .form-control,
body.customers .bootstrap-select > .dropdown-toggle {
  height: 44px;
  padding: 8px 12px;
  font-family: var(--nx-ff-body);
  font-size: 0.9375rem;
  color: var(--nx-text);
  background: var(--nx-surface);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  box-shadow: none;
  transition: border-color 150ms var(--nx-ease);
}

body.customers textarea.form-control {
  height: auto;
}

/* Listes déroulantes bootstrap-select : le bouton interne doit ressembler à un champ,
   pas à un bouton d'action (police de texte, casse normale, alignement à gauche). */
body.customers .bootstrap-select.form-control {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.customers .bootstrap-select > .btn.dropdown-toggle {
  height: 44px;
  padding: 8px 12px;
  font-family: var(--nx-ff-body);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  color: var(--nx-text);
  background: var(--nx-surface);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  box-shadow: none;
}

body.customers .bootstrap-select > .btn.dropdown-toggle:hover {
  color: var(--nx-text);
  background: var(--nx-surface);
  border-color: var(--nx-text-2);
}

body.customers .bootstrap-select > .btn.dropdown-toggle:focus,
body.customers .bootstrap-select.open > .btn.dropdown-toggle {
  border-color: var(--nx-red);
  box-shadow: 0 0 0 3px var(--nx-red-glow);
  outline: none;
}

body.customers .bootstrap-select .dropdown-menu {
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

body.customers .bootstrap-select .dropdown-menu > li > a {
  color: var(--nx-text);
}

body.customers .bootstrap-select .dropdown-menu > li.selected > a,
body.customers .bootstrap-select .dropdown-menu > li > a:hover {
  color: var(--nx-black);
  background: var(--nx-red);
}

body.customers .form-control:focus,
body.customers .bootstrap-select > .dropdown-toggle:focus {
  border-color: var(--nx-red);
  box-shadow: 0 0 0 3px var(--nx-red-glow);
  outline: none;
}

body.customers .checkbox input[type='checkbox'],
body.customers .radio input[type='radio'] {
  accent-color: var(--nx-red);
}

body.customers .checkbox label,
body.customers .radio label {
  font-family: var(--nx-ff-body);
  font-size: 0.9375rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--nx-text);
}

body.customers .has-error .form-control {
  border-color: var(--nx-red-dark);
}

body.customers .alert-validation,
body.customers .text-danger,
body.customers .help-block.text-danger {
  color: var(--nx-red-text);
}

/* Tableaux (dont DataTables) */
body.customers .table > thead > tr > th,
body.customers table.dataTable thead th,
body.customers table.dataTable thead td {
  background: transparent;
  border-bottom: 1px solid var(--nx-line);
  font-family: var(--nx-ff-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-text-2);
}

body.customers .table > tbody > tr > td {
  border-top: 1px solid var(--nx-line);
  vertical-align: middle;
  color: var(--nx-text);
}

/* Numéros et sujets dans les listes : liens lisibles, en gras */
body.customers a.invoice-number,
body.customers a.estimate-number,
body.customers a.proposal-number,
body.customers a.td-contract-url,
body.customers table a.tw-text-neutral-700,
body.customers table a.tw-text-neutral-600 {
  color: var(--nx-text);
  font-weight: 600;
}

body.customers a.invoice-number:hover,
body.customers a.estimate-number:hover,
body.customers a.proposal-number:hover,
body.customers a.td-contract-url:hover,
body.customers table a.tw-text-neutral-700:hover,
body.customers table a.tw-text-neutral-600:hover {
  color: var(--nx-red-text);
}

body.customers .text-muted,
body.customers .dataTables_wrapper .dataTables_info,
body.customers .tw-text-neutral-500 {
  color: var(--nx-text-2);
}

/* Le build Tailwind de Perfex cible « .dataTables_wrapper table tbody a:not(…) » : spécificité
   supérieure à une simple classe, d'où ce sélecteur plus précis. */
body.customers .dataTables_wrapper table tbody a:not(.btn):not(.label) {
  color: var(--nx-text);
  font-weight: 600;
}

body.customers .dataTables_wrapper table tbody a:not(.btn):not(.label):hover {
  color: var(--nx-red-text);
}

body.customers .panel-footer {
  background: var(--nx-surface);
  border-top: 1px solid var(--nx-line);
  border-radius: 0 0 var(--nx-radius) var(--nx-radius);
}

body.customers .table-hover > tbody > tr:hover,
body.customers .table-striped > tbody > tr:nth-of-type(odd) {
  background: #fafafa;
}

body.customers .dataTables_wrapper .dataTables_filter input,
body.customers .dataTables_length select {
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  padding: 6px 10px;
}

body.customers table.dataTable thead .sorting_asc,
body.customers table.dataTable thead .sorting_desc {
  color: var(--nx-red-text);
}

/* Pagination, onglets */
body.customers .pagination > li > a,
body.customers .pagination > li > span {
  color: var(--nx-text);
  border-color: var(--nx-line);
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
}

body.customers .pagination > .active > a,
body.customers .pagination > .active > a:hover,
body.customers .pagination > .active > span {
  color: var(--nx-black);
  background: var(--nx-red);
  border-color: var(--nx-red);
}

body.customers .nav-tabs {
  border-bottom: 1px solid var(--nx-line);
}

body.customers .nav-tabs > li > a {
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nx-text-2);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-right: 8px;
}

body.customers .nav-tabs > li > a:hover {
  background: transparent;
  color: var(--nx-text);
}

body.customers .nav-tabs > li.active > a,
body.customers .nav-tabs > li.active > a:hover,
body.customers .nav-tabs > li.active > a:focus {
  color: var(--nx-text);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--nx-red);
}

/* Étiquettes de statut : conservées (payée, en retard…) mais aplaties, sans dégradé */
body.customers .label {
  font-family: var(--nx-ff-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--nx-radius);
  padding: 4px 8px;
}

body.customers .label-default {
  background: var(--nx-text);
  color: var(--nx-surface);
}

body.customers .label-danger {
  background: var(--nx-red);
  color: var(--nx-black);
}

body.customers .badge {
  font-family: var(--nx-ff-mono);
  background: var(--nx-text);
  color: var(--nx-surface);
  border-radius: var(--nx-radius);
}

/* Barres de progression (projets, tâches, synthèse de facturation) : fines, sans le
   pourcentage que Perfex injecte dans la barre (les compteurs « 3 / 3 » sont déjà affichés). */
body.customers .progress {
  height: 6px;
  overflow: hidden;
  background: var(--nx-line);
  border-radius: 0;
  box-shadow: none;
}

body.customers .progress-bar {
  font-size: 0;
  line-height: 6px;
  color: transparent;
  background: var(--nx-red);
  box-shadow: none;
}

body.customers .progress-bar-success {
  background: #2e8b57;
}

body.customers .progress-bar-warning {
  background: #d9822b;
}

body.customers .progress-bar-danger {
  background: var(--nx-red);
}

/* Couleurs utilitaires Tailwind de Perfex (bleu « primary ») ramenées à la charte */
body.customers .tw-text-primary-600,
body.customers .tw-text-primary-500,
body.customers .tw-text-blue-600 {
  color: var(--nx-text);
}

body.customers a[class*='tw-text-neutral-'] {
  color: var(--nx-text-2);
}

body.customers a[class*='tw-text-neutral-']:hover,
body.customers a[class*='tw-text-neutral-']:focus {
  color: var(--nx-text);
}

body.customers .tw-bg-primary-600,
body.customers .tw-bg-blue-600 {
  background-color: var(--nx-red);
  color: var(--nx-black);
}

/* Tuiles du sommaire (projets, tickets) : blanches, bordées, chiffres en Space Grotesk */
body.customers .section-client-dashboard dl a,
body.customers dl.tw-grid > a.tw-border {
  background: var(--nx-surface);
  border-color: var(--nx-line);
  border-radius: var(--nx-radius);
  text-decoration: none;
  transition: border-color 150ms var(--nx-ease);
}

body.customers .section-client-dashboard dl a:hover,
body.customers dl.tw-grid > a.tw-border:hover {
  background: var(--nx-surface);
  border-color: var(--nx-text);
}

body.customers dl.tw-grid dd .tw-font-semibold {
  font-family: var(--nx-ff-display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

/* Zone de dépôt de fichiers et boutons FullCalendar */
body.customers .dropzone .dz-message,
body.customers .dropzone .dz-message span {
  color: var(--nx-text-2);
  font-family: var(--nx-ff-body);
}

/* FullCalendar : Perfex fixe ses couleurs par variables et règles prioritaires — variables
   redéfinies sur .fc et !important sur les boutons (thème d'un composant tiers). */
body.customers .fc {
  --fc-button-bg-color: var(--nx-black);
  --fc-button-border-color: var(--nx-black);
  --fc-button-text-color: var(--nx-text-dark);
  --fc-button-hover-bg-color: var(--nx-surface-dark);
  --fc-button-hover-border-color: var(--nx-surface-dark);
  --fc-button-active-bg-color: var(--nx-red);
  --fc-button-active-border-color: var(--nx-red);
  --fc-today-bg-color: var(--nx-red-glow);
  --fc-border-color: var(--nx-line);
}

body.customers .fc .fc-button-primary {
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nx-text-dark) !important;
  background-color: var(--nx-black) !important;
  border-color: var(--nx-black) !important;
  border-radius: var(--nx-radius);
}

body.customers .fc .fc-button-primary:hover {
  background-color: var(--nx-surface-dark) !important;
  border-color: var(--nx-surface-dark) !important;
}

body.customers .fc .fc-button-primary:not(:disabled).fc-button-active,
body.customers .fc .fc-button-primary:not(:disabled):active {
  color: var(--nx-black) !important;
  background-color: var(--nx-red) !important;
  border-color: var(--nx-red) !important;
}

body.customers .fc .fc-toolbar-title {
  font-family: var(--nx-ff-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.customers .fc .fc-daygrid-day.fc-day-today {
  background: var(--nx-red-glow);
}

body.customers .fc .fc-day-today .fc-daygrid-day-number {
  color: var(--nx-black) !important;
  background-color: var(--nx-red) !important;
  border-radius: 50%;
}

body.customers .fc .fc-col-header-cell-cushion {
  font-family: var(--nx-ff-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-text-2);
}

body.customers .section-client-dashboard dl dd .tw-font-semibold {
  font-family: var(--nx-ff-display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

/* Tableau de bord : tuiles de statistiques (factures, projets) */
body.customers .list-status h3 {
  font-family: var(--nx-ff-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.customers .list-status a {
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nx-text-2);
}

body.customers .list-status a.active,
body.customers .list-status a:hover {
  color: var(--nx-red-text);
}

body.customers #greeting {
  margin-bottom: 8px;
}

/* Fil d'activité, commentaires, modales */
body.customers .activity-feed .feed-item .date {
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  color: var(--nx-text-2);
}

body.customers .modal-content {
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

body.customers .modal-header,
body.customers .modal-footer {
  border-color: var(--nx-line);
}

body.customers .modal-title {
  font-family: var(--nx-ff-display);
  font-weight: 700;
}

body.customers .dropzone {
  border: 1px dashed var(--nx-line);
  border-radius: var(--nx-radius);
  background: var(--nx-surface);
}

/* Alertes */
body.customers .alert {
  border-radius: var(--nx-radius);
  border-width: 1px;
}

body.customers .alert-success {
  background: #f0faf0;
  border-color: #bfe3bf;
  color: #1c5b1c;
}

body.customers .alert-danger,
body.customers .alert-warning {
  background: #fff3f3;
  border-color: #f5c2c2;
  color: var(--nx-red-text);
}

/* --------------------------------------------------------------------------
   Vues « document » : facture, devis, contrat, abonnement, proposition
   (body.viewinvoice, .viewestimate, .contract-view, .subscriptionhtml, .proposal-view)
   Structure Perfex : .preview-top-wrapper > .row (logo) + .top (numéro, statut, actions,
   collant au défilement) puis .panel_s (le document).
   -------------------------------------------------------------------------- */
body.customers .preview-top-wrapper {
  margin-top: 0 !important;
}

/* Bandeau noir : logo typographique à gauche */
body.customers .preview-top-wrapper > .row:first-child {
  margin: 24px 0 0;
  padding: 14px 24px;
  background: var(--nx-black);
  border-radius: var(--nx-radius);
}

body.customers .preview-top-wrapper > .row:first-child > .col-md-3 {
  width: auto;
  padding: 0;
}

body.customers .preview-top-wrapper .mbot30 {
  margin-bottom: 0 !important;
}

body.customers .nx-doc-brand {
  display: inline-flex;
  text-decoration: none !important;
}

/* Barre d'actions : blanche, bordée, collante par CSS. Le script Sticky de Perfex la passe en
   `position: fixed` (styles en ligne) : la barre sortait du flux, la page raccourcissait de sa
   hauteur et le navigateur recalait le défilement en bas de page (« remontée » spontanée).
   `position: sticky` la garde dans le flux ; `display: contents` sur le conteneur pour que la
   barre colle sur toute la hauteur de la page et non dans son seul bloc d'origine. */
body.customers .preview-top-wrapper {
  display: contents;
}

body.customers .preview-top-wrapper .top {
  position: sticky !important;
  top: 0 !important;
  left: auto !important;
  width: auto !important;
  z-index: 20;
  margin-top: 16px;
  padding: 16px 24px;
  background: var(--nx-surface);
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
}

/* Classe posée par le script une fois le seuil passé : on ne change que l'ombre */
body.customers .preview-top-wrapper .top.preview-sticky-header {
  border-radius: 0 0 var(--nx-radius) var(--nx-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.customers .preview-top-wrapper .top .container {
  width: auto;
  padding: 0;
}

body.customers [class*='-html-number'] {
  font-family: var(--nx-ff-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.customers .preview-top-wrapper .action-button {
  margin-left: 8px;
}

body.customers .preview-top-wrapper .action-button.btn-success {
  color: var(--nx-black);
  background: var(--nx-red);
  border-color: var(--nx-red);
}

/* Le document */
body.customers .preview-top-wrapper + .clearfix + .panel_s,
body.customers .panel_s.tw-mt-6 {
  margin-top: 24px !important;
}

body.customers .viewinvoice .panel_s .panel-body,
body.customers .viewestimate .panel_s .panel-body,
body.customers .subscriptionhtml .panel_s .panel-body {
  padding: 40px 24px;
}

body.customers [class*='-html-company-info'],
body.customers [class*='-html-customer-billing-info'],
body.customers [class*='-html-customer-shipping-info'] {
  font-style: normal;
  line-height: 1.6;
  color: var(--nx-text-2);
}

body.customers [class*='-html-bill-to'],
body.customers [class*='-html-ship-to'],
body.customers [class*='-html-date'] > span:first-child,
body.customers [class*='-html-duedate'] > span:first-child,
body.customers [class*='-html-sale-agent'] > span:first-child,
body.customers [class*='-html-project'] > span:first-child {
  font-family: var(--nx-ff-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nx-text-2);
}

body.customers .panel_s .table thead,
body.customers .panel_s .table > thead > tr > th {
  background: transparent !important;
}

body.customers .panel_s .table > tbody > tr > td.total,
body.customers .panel_s .table .total,
body.customers .panel_s .table .subtotal {
  font-weight: 600;
}

body.customers .panel_s .table .total .bold,
body.customers .panel_s .table .total .tw-text-neutral-700 {
  font-family: var(--nx-ff-display);
  font-size: 1.125rem;
  color: var(--nx-text);
}

body.customers .panel_s .text-danger.bold {
  color: var(--nx-red-text);
}

body.customers .viewinvoice h4,
body.customers .viewestimate h4,
body.customers .contract-view h4,
body.customers .proposal-view h4 {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--nx-line);
}

/* Onglets latéraux des contrats et propositions (Résumé / Discussion) */
body.customers .contract-view .nav-tabs > li > a,
body.customers .proposal-view .nav-tabs > li > a {
  padding: 10px 12px;
}

@media (max-width: 767px) {
  body.customers .preview-top-wrapper > .row:first-child {
    margin: 12px 0 0;
    padding: 12px 16px;
  }

  body.customers .preview-top-wrapper .top {
    padding: 12px 16px;
  }

  body.customers .preview-top-wrapper .action-button {
    margin: 0 8px 8px 0;
  }

  body.customers .viewinvoice .panel_s .panel-body,
  body.customers .viewestimate .panel_s .panel-body,
  body.customers .subscriptionhtml .panel_s .panel-body {
    padding: 24px 16px;
  }
}

/* --------------------------------------------------------------------------
   Pied de page : noir, mono
   -------------------------------------------------------------------------- */
body.customers .footer {
  height: auto; /* le thème de base fixe 50px : nos deux lignes débordaient du fond noir */
  margin-top: 64px;
  padding: 32px 0;
  background: var(--nx-black);
  border-top: 1px solid var(--nx-line-dark);
  color: var(--nx-text-dark-2);
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

body.customers .footer a {
  color: var(--nx-text-dark);
}

body.customers .footer a:hover {
  color: var(--nx-red);
}

body.customers .footer .nx-footer__links {
  margin-top: 8px;
}

body.customers .footer .nx-footer__links a + a::before {
  content: '·';
  margin: 0 10px;
  color: var(--nx-text-dark-2);
}

/* --------------------------------------------------------------------------
   Connexion, inscription, mot de passe oublié : ton sombre, comme le hero du site
   -------------------------------------------------------------------------- */
/* Perfex pose une classe par page sur <body> (customers_login, customers_register,
   customers_forgot_password, customers_reset_password) ; :has() en repli. */
body.customers.customers_login,
body.customers.customers_register,
body.customers.customers_forgot_password,
body.customers.customers_reset_password,
body.customers:has(.nx-auth) {
  background: var(--nx-black);
  color: var(--nx-text-dark);
}

body.customers.customers_login #wrapper,
body.customers.customers_register #wrapper,
body.customers.customers_forgot_password #wrapper,
body.customers.customers_reset_password #wrapper,
body.customers:has(.nx-auth) #wrapper {
  background: var(--nx-black);
}

/* Pages d'authentification sans gabarit nx-auth (inscription, mot de passe) : panneau sombre */
body.customers.customers_register .panel_s,
body.customers.customers_forgot_password .panel_s,
body.customers.customers_reset_password .panel_s {
  background: var(--nx-surface-dark);
  border-color: var(--nx-line-dark);
  color: var(--nx-text-dark);
}

body.customers.customers_register h1,
body.customers.customers_forgot_password h1,
body.customers.customers_reset_password h1,
body.customers.customers_register label,
body.customers.customers_forgot_password label,
body.customers.customers_reset_password label {
  color: var(--nx-text-dark);
}

body.customers.customers_register .form-control,
body.customers.customers_forgot_password .form-control,
body.customers.customers_reset_password .form-control {
  color: var(--nx-text-dark);
  background: var(--nx-black);
  border-color: var(--nx-line-dark);
}

.nx-auth {
  max-width: 440px;
  margin: 56px auto 0;
  padding: 0 15px;
}

.nx-auth__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  letter-spacing: var(--nx-tracking-caps);
  text-transform: uppercase;
  color: var(--nx-red);
}

.nx-auth__eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--nx-red);
}

body.customers .nx-auth h1.login-heading,
body.customers .nx-auth h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  color: var(--nx-text-dark);
  text-align: left;
}

.nx-auth__lead {
  margin: 0 0 32px;
  color: var(--nx-text-dark-2);
}

body.customers .nx-auth .panel_s {
  background: var(--nx-surface-dark);
  border: 1px solid var(--nx-line-dark);
}

body.customers .nx-auth label,
body.customers .nx-auth .checkbox label {
  color: var(--nx-text-dark-2);
}

body.customers .nx-auth .form-control {
  color: var(--nx-text-dark);
  background: var(--nx-black);
  border-color: var(--nx-line-dark);
}

body.customers .nx-auth .form-control:focus {
  border-color: var(--nx-red);
}

body.customers .nx-auth .bootstrap-select > .btn.dropdown-toggle,
body.customers .nx-auth .bootstrap-select > .btn.dropdown-toggle:hover {
  color: var(--nx-text-dark);
  background: var(--nx-black);
  border-color: var(--nx-line-dark);
}

body.customers .nx-auth .bootstrap-select .dropdown-menu {
  background: var(--nx-surface-dark);
  border-color: var(--nx-line-dark);
}

body.customers .nx-auth .bootstrap-select .dropdown-menu > li > a {
  color: var(--nx-text-dark);
}

body.customers .nx-auth a {
  color: var(--nx-text-dark);
}

body.customers .nx-auth a:hover {
  color: var(--nx-red);
}

body.customers .nx-auth .text-muted {
  color: var(--nx-text-dark-2);
}

body.customers .nx-auth .btn-default {
  color: var(--nx-text-dark);
  border-color: var(--nx-text-dark);
}

body.customers .nx-auth .btn-default:hover {
  color: var(--nx-black);
  background: var(--nx-text-dark);
}

.nx-auth__back {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--nx-ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Accessibilité et confort
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body.customers *,
  body.customers *::before,
  body.customers *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  body.customers .navbar-default .navbar-toggle .icon-bar {
    background: CanvasText;
  }

  body.customers .btn-primary {
    border: 1px solid ButtonText;
  }
}
