@charset "UTF-8";
/* Dialog header style */
/* ==========================================================================
   Tokens semantiques — alias vers le Design System.

   La source unique des couleurs est desormais tokens.css, alimente par le
   fichier de marque actif (brands/*.css). Ces variables ne portent plus de
   valeur : elles ne font que nommer, dans le vocabulaire du socle, un role du
   Design System. Deux consequences :

     - une couleur ne se corrige plus ici mais dans la marque, et le changement
       se propage partout, composants MudBlazor compris ;
     - le SCSS existant continue de fonctionner sans etre relu.

   Ne pas remettre de valeur en dur dans ce bloc : elle echapperait au
   changement de marque, et l'ecart ne se verrait qu'a l'ecran.
   ========================================================================== */
:root {
  --app-bg: var(--my-surface-page);
  --app-surface: var(--my-surface-card);
  --app-border: var(--my-border-subtle);
  --app-divider: var(--my-border-subtle);
  --app-text: var(--my-text-heading);
  --app-text-muted: var(--my-text-muted);
  --app-primary: var(--my-action-primary);
  --app-primary-contrast: var(--my-action-primary-text);
  /* L'accent clair reste decoratif (bordures, carre de titre, fills) : son
     contraste sur fond blanc n'atteint pas 4.5:1. Pour un texte ou une icone
     porteuse de sens, utiliser --app-accent-text. */
  --app-accent: var(--my-brand-secondary-light);
  --app-accent-text: var(--my-brand-secondary);
  /* Alias de compatibilite : anciens tokens du socle (--cp-*), encore
     references par des composants partages. Sans eux leurs styles cassent
     (ex. survol blanc sur blanc). */
  --cp-primary: var(--my-action-primary);
  --cp-primary-tint: var(--my-brand-primary-subtle);
  --cp-border: var(--my-border-subtle);
  --cp-dark: var(--my-text-heading);
  --cp-white: var(--my-neutral-0);
  --cp-success: var(--my-success-500);
  --cp-success-tint: var(--my-success-100);
  --cp-success-border: var(--my-success-300);
  --cp-danger: var(--my-error-500);
  --cp-danger-tint: var(--my-error-100);
  --cp-danger-border: var(--my-error-300);
  --cp-warning: var(--my-warning-500);
  --cp-warning-tint: var(--my-warning-100);
  --cp-warning-border: var(--my-warning-300);
  --cp-radius-md: var(--my-radius-md);
}

/* Colonne marge dans les tableaux de tarification */
.pricing-margin-col {
  background-color: #f0f6ff;
}

:root {
  /*    --mud-input-border-radius: 0px;
  --mud-chip-border-radius: 8px;
  --mud-button-border-radius: 8px;
  --mud-dialog-close-button-color: white;
  --table-pager-height: 48px;
  --table-toolbar-height: 40px;
  --table-toolbar-margin: 5px;
  --highliter-color: var(--mud-palette-secondary);
  --datagrid-header-height: 32px;
  --form-spacing: 10px;
  --form-padding: 7px;
  --main-content-padding: 15px;
  --mud-drawer-width-left: 190px;*/
  --chips-primary-1: #DC2626;
  --chips-secondary-1: #FECCCF;
  --chips-primary-2: #EA580C;
  --chips-secondary-2: #FFEDD5;
  --chips-primary-3: #BE9000;
  --chips-secondary-3: #FEF6C6;
  --chips-primary-4: #5D9A06;
  --chips-secondary-4: #ecfccc;
  --chips-primary-5: #16A34A;
  --chips-secondary-5: #DCFCE7;
  --chips-primary-6: #0D9488;
  --chips-secondary-6: #CCFBF1;
  --chips-primary-7: #0991B2;
  --chips-secondary-7: #CFFAFE;
  --chips-primary-8: #208A9E;
  --chips-secondary-8: #DBEAFE;
  --chips-primary-9: #8C46E5;
  --chips-secondary-9: #EBE1FF;
  --chips-primary-10: #C027D3;
  --chips-secondary-10: #F8EAFD;
  --chips-primary-11: #FF099C;
  --chips-secondary-11: #FBDBFE;
  --chips-primary-12: #676767;
  --chips-secondary-12: #D8D8D8;
}

.icon-small {
  font-size: 1rem;
  align-self: center;
}

/* --------- Modification de style qui concerne les Datagrids ------------ */
/* Réduction des padding des datagrid dense */
.mud-table-dense * .mud-table-row .mud-table-cell {
  padding: 1px 24px 1px 16px;
}

.mud-card-header {
  padding: 10px 16px 2px 16px;
}

/* Mise en gris du fond des headers de data-grid */
.background-grey {
  background-color: var(--mud-palette-background-gray);
}
.background-grey .mud-table-row *:not(.mud-resizer) {
  background-color: var(--mud-palette-gray-lighter) !important;
  padding-bottom: 2px !important;
}
.background-grey *:not(.mud-resizer) {
  background-color: var(--mud-palette-gray-lighter);
}

.section-bg {
  background-color: white;
  padding: 16px;
  border-radius: 8px;
}

/* Fond flou de TOUS les dialogues : applique globalement par le
   MudDialogProvider du MainLayout (BackgroundClass) - ne pas le repasser
   dialogue par dialogue. */
.blury-background-dialog {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.fullwidth-table .mud-table-container {
  width: 100% !important;
  overflow: hidden;
}

.role-assign {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-assign-label {
  font-size: 12px;
  color: var(--app-text-muted);
}

.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-empty {
  font-size: 13px;
  font-style: italic;
  color: var(--app-text-muted);
}

.role-add {
  max-width: 360px;
  margin-top: 4px;
}

.minwidthtable-column .mud-table .mud-table-container {
  width: auto !important;
  white-space: nowrap;
}

.minwidthtable-column .mud-table-dense * .mud-table-row .mud-table-cell {
  padding: 4px 1px 4px 5px;
}

.my-fixed-grid {
  height: 400px !important;
  display: flex;
  flex-direction: column;
}

.my-fixed-grid .mud-data-grid {
  height: 100% !important;
}

.my-fixed-grid .mud-table-cell {
  white-space: normal !important;
}

.my-fixed-grid .mud-table-container {
  overflow-x: hidden !important;
}

.my-fixed-grid .mud-table-head .mud-table-cell {
  white-space: nowrap !important;
}

.my-fixed-grid .mud-table-body .mud-table-cell {
  white-space: normal !important;
}

.uppercase-input input {
  text-transform: uppercase;
}

.TabPanelClass-bg-White {
  background-color: var(--mud-palette-surface);
}

.mud-table-sticky-header * .mud-table-root .mud-table-head.mud-table-dense .filter-header-cell {
  top: 37px;
  padding-top: 5px;
}

.mud-data-grid {
  /*.mud-table-root {
      table-layout: fixed;
  }*/
}
.mud-data-grid .text-truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 0;
}
.mud-data-grid {
  /*.mud-table-cell .mud-resizer {
      bottom: 0;
      z-index: 2;
  }*/
  /*.cell-truncate {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
  }*/
}
.mud-data-grid .mud-table-root {
  width: 100% !important;
}
.mud-data-grid thead tr th.mud-table-cell:last-child,
.mud-data-grid tbody tr td.mud-table-cell:last-child {
  width: auto !important;
}
.mud-data-grid .mud-table {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.mud-data-grid .mud-table-container {
  flex: 1;
  min-height: 0;
  height: unset !important;
  overflow-y: auto !important;
  width: 100% !important;
}
.mud-data-grid td.mud-table-cell:has(.mud-chip) {
  min-width: 10em;
}
.mud-data-grid th.mud-table-cell .mud-resizer {
  opacity: 0;
  transition: opacity 0.1s;
}
.mud-data-grid th.mud-table-cell:hover .mud-resizer {
  opacity: 1;
}
.mud-data-grid th.mud-table-cell .column-header {
  overflow: hidden;
  width: inherit;
  min-width: 40px;
}
.mud-data-grid th.mud-table-cell .column-header .sortable-column-header {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 2em;
}

/* ── Pages avec MyMainContentStack : page fixe, contenu scrolle en interne ──
   Le marker `.app-list-page` est ajoute par MyMainContentStack. Active la
   contrainte page-fixe meme quand le stack est imbrique (ex : SalesQuoteDetail
   ou MyMainContentStack est dans un MyTabPanel). */
.app-content:has(.app-list-page) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-content > .app-list-page {
  height: auto !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}
.app-content > .app-list-page > .mud-stack:has(> .mud-data-grid) {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
}

.app-list-page .mud-stack > .mud-data-grid {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: auto !important;
  display: flex;
  flex-direction: column;
}

.app-list-page .mud-stack > .mud-data-grid .mud-table-container {
  flex: 1 1 auto;
  min-height: 0;
}

.app-list-page:has(> .mud-tabs),
.app-list-page:has(> .mud-form > .mud-tabs) {
  margin: 0 !important;
}

.app-list-page > .mud-form,
.app-list-page > form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-list-page .mud-tabs {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-list-page .mud-tabs > .mud-tabs-toolbar {
  flex: 0 0 auto;
}

.app-list-page .mud-tabs .mud-tabs-panels {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-list-page .mud-tabs .mud-tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-list-page .mud-tabs .mud-tabs-panels > .mud-tab-panel > * {
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
}

/* ── Master listes (MyDataGrid) — look back-office sobre ────────────────── */
.mud-data-grid {
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px #e6e6e6;
}
.mud-data-grid .background-grey,
.mud-data-grid .background-grey *:not(.mud-resizer) {
  background-color: #f7f7f7 !important;
}
.mud-data-grid .mud-table-head {
  border-bottom: 1px solid #e6e6e6;
}
.mud-data-grid .mud-table-head .mud-table-cell {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  vertical-align: middle;
}
.mud-data-grid .mud-table-head .filter-header-cell {
  top: 50px !important;
}
.mud-data-grid .mud-table-head .column-header {
  font-weight: 600;
  color: var(--cp-dark, #37474F);
}
.mud-data-grid tbody .mud-table-cell {
  border-bottom: 1px solid #f0f0f0;
}
.mud-data-grid tbody .mud-table-row:nth-of-type(even) > .mud-table-cell {
  background-color: #fafbfc;
}
.mud-data-grid tbody .mud-table-row:hover > .mud-table-cell {
  background-color: rgba(55, 71, 79, 0.05) !important;
}
.mud-data-grid tbody .mud-table-row.selected > .mud-table-cell {
  background-color: rgba(55, 71, 79, 0.1) !important;
}
.mud-data-grid .mud-table-pagination {
  border-top: 1px solid #e6e6e6;
  background-color: #f7f7f7;
}
.mud-data-grid .mud-table-container::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.mud-data-grid .mud-table-container::-webkit-scrollbar-track {
  background: transparent;
}
.mud-data-grid .mud-table-container::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 5px;
  border: 2px solid #fff;
}
.mud-data-grid .mud-table-container::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

.grid-lines-table tr:not(:hover) .row-actions-hover {
  visibility: hidden;
}

/* ==========================================================================
   Layout neutre — app-shell, sidebar, topbar
   Couleurs : primaire #37474F / #263238, texte #2D2D2D, tint #ECEFF1
   ========================================================================== */
/* La police vient de la marque active, pas d'une liste ecrite ici : une valeur en
   dur echapperait au changement de marque. Roboto etait de surcroit demande sans
   jamais etre telecharge, et le navigateur y substituait ce qu'il voulait. */
.app-shell,
.app-shell input,
.app-shell button,
.app-shell a {
  font-family: var(--my-font-sans);
}

.app-shell {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  color: var(--app-text);
}

/* ---------- Sidebar ---------- */
.app-sidebar {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #FFFFFF;
  border-right: 1px solid #d8dbe2;
  box-shadow: 4px 0 18px rgba(45, 45, 45, 0.06);
  transition: width 220ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
  z-index: 60;
  position: relative;
}

.app-sidebar.is-open {
  width: 270px;
}

.app-sidebar.is-mini {
  width: 76px;
}

.app-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  padding: 0 14px;
  border-bottom: 1px solid #ecedf2;
  background: linear-gradient(180deg, #ECEFF1 0%, #FFFFFF 100%);
}

.app-brand-img {
  width: auto;
  height: auto;
  max-width: 80%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.app-brand-img-mini {
  height: 38px;
  width: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 0 50%;
  display: block;
}

.app-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px 12px;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}

.app-nav::-webkit-scrollbar {
  width: 6px;
}

.app-nav::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.app-sidebar.is-mini .app-nav {
  padding: 16px 0;
}

/* Section labels */
.app-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 8px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 1.8px;
  color: var(--app-primary);
  text-transform: uppercase;
  user-select: none;
}

.app-section-label:not(:first-child) {
  padding-top: 18px;
}

.app-section-bullet {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #37474F 0%, #263238 100%);
  box-shadow: 0 0 0 3px rgba(55, 71, 79, 0.15);
}

/* Nav links */
.app-navlink {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 3px 0;
  padding: 12px 14px;
  border: none;
  background: transparent;
  border-radius: 12px;
  color: var(--app-text);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.1px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  box-sizing: border-box;
}

.app-navlink .mud-icon-root.app-navlink-icon {
  flex: 0 0 auto;
  color: var(--app-text-muted);
  font-size: 22px !important;
  width: 22px;
  height: 22px;
  transition: color 0.18s ease;
}

.app-navlink-text {
  flex: 1 1 auto;
  color: inherit;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-navlink:hover {
  background-color: #ECEFF1;
  color: var(--app-primary);
  transform: translateX(2px);
}

.app-navlink:hover .mud-icon-root.app-navlink-icon {
  color: #37474F;
}

.app-navlink.active {
  background: linear-gradient(135deg, #37474F 0%, #263238 100%);
  color: #FFFFFF !important;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(55, 71, 79, 0.4);
  transform: none;
}

.app-navlink.active .app-navlink-text {
  color: #FFFFFF !important;
}

.app-navlink.active .mud-icon-root.app-navlink-icon {
  color: #FFFFFF !important;
}

.app-navlink.active:hover {
  transform: none;
}

/* Group with submenu */
.app-group {
  display: block;
}

.app-group-trigger.has-active {
  color: #37474F;
}

.app-group-trigger.has-active .mud-icon-root.app-navlink-icon {
  color: #37474F;
}

.app-group-trigger .mud-icon-root.app-group-chev {
  flex: 0 0 auto;
  color: var(--app-text-muted);
  font-size: 18px !important;
  width: 18px;
  height: 18px;
  transition: transform 0.22s ease, color 0.18s ease;
}

.app-group.is-expanded .app-group-trigger .mud-icon-root.app-group-chev {
  transform: rotate(180deg);
  color: var(--app-primary);
}

.app-submenu {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  margin-left: 22px;
  padding-left: 12px;
  border-left: 2px solid #ECEFF1;
  transition: grid-template-rows 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* L'enfant unique de la grille masque son overflow pour que le contenu
   soit reellement clippe pendant que la ligne passe de 0fr a 1fr. */
.app-submenu-inner {
  min-height: 0;
  overflow: hidden;
}

.app-group.is-expanded .app-submenu {
  grid-template-rows: 1fr;
  padding-top: 4px;
  padding-bottom: 6px;
}

.app-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 2px 0;
  border-radius: 10px;
  color: var(--app-text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s ease;
}

.app-sublink-bullet {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #d4d6e0;
  flex: 0 0 auto;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.app-sublink-text {
  color: inherit;
}

.app-sublink:hover {
  background-color: #ECEFF1;
  color: var(--app-primary);
  transform: translateX(2px);
}

.app-sublink:hover .app-sublink-bullet {
  background-color: #37474F;
  transform: scale(1.3);
}

.app-sublink.active {
  background: linear-gradient(135deg, #37474F 0%, #263238 100%);
  color: #FFFFFF !important;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(55, 71, 79, 0.35);
  transform: none;
}

.app-sublink.active .app-sublink-text {
  color: #FFFFFF !important;
}

.app-sublink.active .app-sublink-bullet {
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

/* Mini mode
   Ancre sur .my-sidebar : depuis la fusion du Design System, MyNavSidebar rend
   .my-sidebar et non plus .app-sidebar. Les entrees du menu de cette application
   restent en .app-navlink tant que NavMenu n'est pas passe a MyNavGroup. */
.my-sidebar.is-mini .app-navlink {
  width: 52px;
  height: 52px;
  margin: 4px auto;
  padding: 0;
  border-radius: 14px;
  justify-content: center;
}

.my-sidebar.is-mini .app-navlink:hover {
  transform: none;
}

.my-sidebar.is-mini .app-navlink.active {
  transform: none;
}

.app-mini-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

/* Footer : carte utilisateur */
.app-footer {
  flex: 0 0 auto;
  padding: 12px;
  border-top: 1px solid #ecedf2;
  background-color: #fafbfd;
  position: relative;
}

.app-sidebar.is-mini .app-footer {
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-user-wrap {
  position: relative;
}

.app-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background-color: #FFFFFF;
  border: 1.5px solid #e0e2e8;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(45, 45, 45, 0.04);
  box-sizing: border-box;
}

.app-user-card:hover {
  border-color: #37474F;
  background-color: #ECEFF1;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(55, 71, 79, 0.16);
}

.app-user-card.mini {
  width: 52px;
  height: 52px;
  padding: 0;
  justify-content: center;
  border-radius: 14px;
}

.app-user-text {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  align-items: flex-start;
}

.app-user-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--app-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.app-user-mail {
  font-size: 0.72rem;
  color: var(--app-text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 1px;
}

.app-user-card .mud-icon-root.app-user-chev {
  color: var(--app-text-muted);
  font-size: 18px !important;
  flex: 0 0 auto;
  transition: color 0.18s ease;
}

.app-user-card:hover .mud-icon-root.app-user-chev {
  color: #37474F;
}

.app-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #37474F 0%, #263238 100%);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.4px;
  flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(55, 71, 79, 0.3);
}

.app-avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(55, 71, 79, 0.35);
}

.app-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 6px 2px;
}

.app-version-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--app-text-muted);
  text-transform: uppercase;
}

.app-version-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background-color: #ECEFF1;
  color: var(--app-primary);
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 999px;
  letter-spacing: 0.2px;
  border: 1px solid rgba(55, 71, 79, 0.25);
}

/* User popover */
.app-user-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background-color: #FFFFFF;
  border: 1px solid #e0e2e8;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(45, 45, 45, 0.22);
  overflow: hidden;
  z-index: 1000;
}

.app-user-popover-mini {
  left: calc(100% + 12px);
  right: auto;
  bottom: 0;
  width: 280px;
}

.app-user-popover-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 16px;
  background: linear-gradient(135deg, #ECEFF1 0%, #FFFFFF 100%);
  border-bottom: 1px solid #f5f5f5;
}

.app-user-popover-info {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
}

.app-user-popover-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--app-text);
  line-height: 1.25;
}

.app-user-popover-mail {
  font-size: 0.8rem;
  color: var(--app-text-muted);
  margin-top: 2px;
  font-weight: 500;
}

.app-user-popover-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  background-color: #37474F;
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(55, 71, 79, 0.3);
}

.app-user-popover-body {
  padding: 6px;
}

.app-popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  color: var(--app-text);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.app-popover-item .mud-icon-root.app-popover-icon {
  color: var(--app-text-muted);
  font-size: 18px !important;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.app-popover-item:hover {
  background-color: #ECEFF1;
  color: #37474F;
}

.app-popover-item:hover .mud-icon-root.app-popover-icon {
  color: #37474F;
}

.app-popover-danger {
  color: #dc3545 !important;
}

.app-popover-danger .mud-icon-root.app-popover-icon {
  color: #dc3545 !important;
}

.app-popover-danger:hover {
  background-color: #fef2f2 !important;
  color: #dc3545 !important;
}

.app-popover-danger:hover .mud-icon-root.app-popover-icon {
  color: #dc3545 !important;
}

.app-popover-sep {
  height: 1px;
  margin: 6px 4px;
  background-color: #ecedf2;
}

.app-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  /* Sous le sidebar (z-index 60) pour ne pas recouvrir le popover utilisateur
     (dont le z-index 1000 est confine au contexte d'empilement du sidebar),
     mais au-dessus du contenu principal pour fermer le menu au clic exterieur. */
  z-index: 59;
}

/* Edge toggle */
.app-edge-toggle {
  position: absolute;
  top: 56px;
  right: -14px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e0e2e8;
  border-radius: 50%;
  background-color: #FFFFFF;
  color: var(--app-text);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45, 45, 45, 0.12);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  z-index: 70;
  padding: 0;
}

.app-sidebar:hover .app-edge-toggle,
.app-edge-toggle:focus-visible {
  opacity: 1;
  transform: translateX(0);
}

.app-edge-toggle:hover {
  background-color: #ECEFF1;
  border-color: #37474F;
  color: var(--app-primary);
}

/* Main column */
.app-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  background-color: #f4f5f8;
}

/* Topbar */
.app-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 72px;
  background-color: #ffffff;
  z-index: 50;
  border-bottom: 1px solid #d8dbe2;
  box-shadow: 0 6px 18px rgba(45, 45, 45, 0.06);
  position: sticky;
  top: 0;
}

.app-title-block {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 2px;
  margin-left: 8px;
}

.app-subtitle {
  margin: 2px 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--app-text-muted);
  letter-spacing: 0;
}

.app-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--app-text);
  margin: 0;
  letter-spacing: -0.4px;
}

.app-spacer {
  flex: 1 1 auto;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Boutons topbar */
.app-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid #e0e2e8;
  border-radius: 10px;
  background-color: #ffffff;
  color: var(--app-text);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--my-font-sans);
}

.app-action-btn:hover:not(:disabled) {
  background-color: #ECEFF1;
  border-color: #37474F;
  color: var(--app-primary);
  transform: translateY(-1px);
}

.app-action-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.app-action-btn-primary {
  background: linear-gradient(135deg, #37474F 0%, #263238 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(55, 71, 79, 0.3);
}

.app-action-btn-primary:hover:not(:disabled) {
  color: #ffffff;
  background: linear-gradient(135deg, #455a64 0%, #1c272b 100%);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(55, 71, 79, 0.4);
}

.app-action-btn .mud-icon-root {
  font-size: 18px !important;
  width: 18px;
  height: 18px;
}

/* Content area */
.app-content {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ===========================================================================
   Champs MudBlazor "outlined" — l'encoche (legend) ne doit JAMAIS afficher
   son texte : il ne sert qu'a reserver la largeur du trou dans la bordure.
   Sans ca, le libelle du legend chevauche le trait du haut (trait barrant
   le label, ex. "Identifiant").
   =========================================================================== */
.mud-input-outlined-border legend {
  visibility: hidden;
}

/* Le libelle flottant masque le trait de bordure derriere lui (fond = surface).
   Sur fond blanc (cartes, paper de login) c'est invisible sauf l'effet de masque. */
.mud-input-control .mud-input-label-outlined {
  background-color: var(--mud-palette-surface);
  padding-left: 4px;
  padding-right: 4px;
}

/* ===========================================================================
   Cartes (composant MyCard) — design system harmonise
   Accent teal herite du socle AllMight.
   =========================================================================== */
.acc-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(45, 45, 45, 0.04), 0 6px 20px rgba(45, 45, 45, 0.05);
  padding: 22px 24px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.acc-card:hover {
  border-color: #DDE2E4;
  box-shadow: 0 1px 2px rgba(45, 45, 45, 0.05), 0 10px 28px rgba(45, 45, 45, 0.07);
}

.acc-card--row {
  padding: 16px 20px;
}

/* Titre de section d'une carte */
.acc-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--app-text);
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--app-divider);
}

.acc-card-title::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--app-accent);
  flex: 0 0 auto;
}

/* ==========================================================================
   Contraste — label des champs MudBlazor "outlined" lisible (>=4.5:1).
   ========================================================================== */
.mud-input-label,
.mud-input-label-outlined {
  color: var(--app-text-muted);
}

/* ==========================================================================
   Accessibilite — respect de prefers-reduced-motion.
   Coupe transitions, animations et scroll anime pour les utilisateurs
   ayant demande une reduction des mouvements.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
