/* ==========================================================================
   Progerance UI — espace client
   ========================================================================== */

html body.customers {
  background: var(--pg-bg);
  color: var(--pg-text);
}
body.customers > * { font-size: 14.5px; }

/* ---------- Barre de navigation ---------- */
body.customers .navbar-default {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--pg-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 72px;
}
body.customers .navbar a.navbar-brand { padding: 19px 0; }
body.customers .navbar a.navbar-brand img { height: 34px; }

@media (min-width: 768px) {
  body.customers .navbar-default .navbar-nav > li > a {
    line-height: 1.4;
    padding: 9px 14px;
    margin: 17px 2px;
    display: block;
  }
}
body.customers .navbar-default .navbar-nav > li > a {
  color: var(--pg-text-2);
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  transition: background-color .15s ease, color .15s ease;
}
body.customers .navbar-default .navbar-nav > li > a:hover,
body.customers .navbar-default .navbar-nav > li > a:focus {
  background: var(--pg-bg);
  color: var(--pg-navy);
  border-radius: 999px;
}
body.customers .navbar-default .navbar-nav > .active > a,
body.customers .navbar-default .navbar-nav > .active > a:hover,
body.customers .navbar-default .navbar-nav > .active > a:focus {
  background: var(--pg-indigo-50);
  color: var(--pg-indigo-700);
  border-radius: 999px;
}
body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a {
  background: var(--pg-indigo) !important;
  border-radius: 999px !important;
  padding: 9px 18px;
  font-weight: 600;
  box-shadow: 0 6px 16px -6px rgba(91, 74, 232, .55);
}
body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a:hover {
  background: var(--pg-indigo-700) !important;
}
body.customers .navbar-default .navbar-nav > li.customers-nav-item-profile > a {
  background: transparent !important;
}
body.customers .client-profile-image-small {
  border-radius: 999px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--pg-indigo-100);
}
body.customers .navbar-default .navbar-toggle {
  border-color: var(--pg-border);
  border-radius: var(--pg-radius);
  margin-top: 18px;
}
body.customers .navbar-default .navbar-toggle .icon-bar { background-color: var(--pg-text-2); }

/* ---------- Contenu ---------- */
body.customers #content { padding-top: 28px; }

body.customers .submenu li a {
  font-size: 14px;
  font-weight: 600;
  color: var(--pg-text-2) !important;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--pg-border);
  background: var(--pg-surface);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
body.customers .submenu li a:hover {
  color: var(--pg-indigo-700) !important;
  border-color: var(--pg-indigo-200);
  background: var(--pg-indigo-50);
}
body.customers .submenu li { margin-right: 8px; }

body.customers #greeting {
  font-size: 26px;
  font-weight: 700;
  color: var(--pg-navy);
  letter-spacing: -0.02em;
}
body.customers h3.tw-text-neutral-700,
body.customers .section-heading,
body.customers h4.tw-font-semibold {
  color: var(--pg-navy) !important;
  font-weight: 700;
}

/* Statistiques (factures, devis…) */
body.customers .invoice-quick-info,
body.customers .tw-rounded-lg.tw-border {
  border-color: var(--pg-border) !important;
  border-radius: var(--pg-radius-lg) !important;
}

/* ---------- Connexion / inscription ---------- */
body.customers.customers_login,
body.customers.register,
body.customers.forgot_password,
body.customers.reset_password {
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(139, 92, 246, .14) 0%, rgba(139, 92, 246, 0) 70%),
    radial-gradient(50% 45% at 90% 10%, rgba(47, 107, 255, .10) 0%, rgba(47, 107, 255, 0) 70%),
    var(--pg-bg);
}
body.customers .login-heading,
body.customers .register-heading {
  font-size: 28px;
  font-weight: 800;
  color: var(--pg-navy);
  letter-spacing: -0.012em;
  line-height: 1.25;
}
body.customers .login-form .panel_s > .panel-body,
body.customers #register-form .panel_s > .panel-body {
  padding: 28px;
  border-radius: var(--pg-radius-xl);
  box-shadow: 0 20px 50px -24px rgba(12, 10, 58, .28);
}
body.customers .login-form .btn-block + .btn-block { margin-top: 10px; }
body.customers .login-form .btn-block,
body.customers #register-form button[type="submit"] { padding-top: 10px; padding-bottom: 10px; height: auto; }

/* ---------- Pied de page ---------- */
body.customers footer {
  background: transparent;
  border-top: 1px solid var(--pg-border);
  color: var(--pg-muted);
  font-size: 13px;
  height: auto;
  padding: 18px 15px;
}

/* ---------- Documents publics (facture, devis, proposition) ---------- */
body.viewinvoice .panel_s > .panel-body,
body.viewestimate .panel_s > .panel-body,
body.viewproposal .panel_s > .panel-body {
  border-radius: var(--pg-radius-xl);
}
/* Barre d'actions (Revenir au portail / Télécharger / Signer / Payer).
   « Télécharger » est seul dans un <form> : sa hauteur dépend alors de la
   ligne de texte et le bouton se décale. On neutralise le formulaire. */
body.customers .tw-flex > form:has(> .action-button) {
  display: flex;
  align-items: center;
  margin: 0;
}
body.customers .tw-flex.tw-items-end:has(> form > .action-button),
body.customers .tw-flex.tw-items-end:has(> .action-button) {
  align-items: center;
}

/* Statut d'une facture / d'un devis (Payée, Impayée…) : même gabarit que
   les boutons d'action voisins (hauteur, taille de texte), avec pastille. */
body.customers .invoice-html-status > .label,
body.customers .estimate-html-status > .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 33px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px currentColor;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent);
  vertical-align: middle;
}
body.customers .invoice-html-status > .label::before,
body.customers .estimate-html-status > .label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
  flex-shrink: 0;
}

/* Tableau des articles : même esprit que la facture PDF —
   pas d'aplat, intitulés discrets en capitales soulignés d'indigo. */
body.customers .table.items thead,
body.customers .table.items thead tr,
body.customers .table.items thead th {
  background: transparent !important;
}
/* Le thème Perfex encadre chaque intitulé (bordures haut/droite/gauche) :
   on ne garde qu'un filet fin sous la ligne d'en-tête. */
body.customers .table.items thead th,
body.customers .table.items > thead:first-child > tr:first-child > th,
body.customers .table.items thead th:first-child {
  border-top: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 1px solid var(--pg-border-strong) !important;
  color: var(--pg-muted) !important;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  vertical-align: bottom;
  padding-top: 8px;
  padding-bottom: 9px;
}
body.customers .table.items tbody td {
  border-top: 1px solid #efeff6;
  padding-top: 14px;
  padding-bottom: 14px;
}
body.customers .table.items tbody td.description span:first-child strong {
  color: var(--pg-text);
}
body.customers .table.items tbody td.amount {
  font-weight: 700;
  color: var(--pg-text);
}

/* ---------- Tickets ---------- */
body.customers .ticket-reply,
body.customers .ticket-info,
body.customers .single-ticket-project-area {
  border-radius: var(--pg-radius-lg);
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  body.customers .navbar-default .navbar-collapse {
    border-top: 1px solid var(--pg-border);
    padding-bottom: 10px;
  }
  body.customers .navbar-default .navbar-nav > li > a {
    border-radius: var(--pg-radius);
    margin: 2px 0;
  }
  body.customers .submenu {
    float: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  body.customers .submenu li { margin: 0; }
}
