/*********************************************************************
* C:/Apache24/sites/apptemplate/v1/assets/foundation/css/style.css
 * @title 🎨 Design system Foundation premium et navigation compacte
 * @description Définit la charte graphique commune, les ambiances tenant, la navigation compacte et le centre de commande responsive.
*********************************************************************/

/* ===========================
   RESET
=========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  background: var(--bg-main);
  color: var(--text-main);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ===========================
   THEME LIGHT
=========================== */
:root {
  --bg-main: #f4f8fb;
  --bg-soft: #ebf3f8;
  --bg-card: #ffffff;
  --bg-card-2: #f9fcfe;
  --bg-header: #14384f;
  --bg-header-2: #1f5678;
  --bg-sidebar: #102f43;
  --bg-footer: #0d2636;

  --text-main: #153244;
  --text-soft: #365365;
  --text-muted: #6b8393;
  --text-light: #ffffff;

  --primary: #4f5bff;
  --primary-strong: #303bcc;
  --primary-soft: rgba(79, 91, 255, 0.13);

  --secondary: #67b6de;
  --secondary-strong: #3d91bc;
  --secondary-soft: rgba(103, 182, 222, 0.14);

  --bg-sidebar-2: #24496d;
  --hero-gradient-from: #355f8f;
  --hero-gradient-to: #82c7d4;
  --hero-orb: rgba(255, 255, 255, 0.12);
  --ambient-1: rgba(79, 91, 255, 0.10);
  --ambient-2: rgba(103, 182, 222, 0.12);
  --focus-ring: rgba(79, 91, 255, 0.14);
  --shadow-theme: rgba(31, 54, 87, 0.16);

  --success: #23835d;
  --success-soft: #dff6eb;
  --danger: #c63f53;
  --danger-soft: #fde7eb;
  --warning: #b67d28;
  --warning-soft: #fdf1dc;
  --info: #2464b5;
  --info-soft: #e6effd;

  --border: #d9e6ee;
  --border-strong: #bfd2de;

  --shadow-sm: 0 10px 24px rgba(16, 47, 67, 0.06);
  --shadow-md: 0 18px 42px rgba(16, 47, 67, 0.1);
  --shadow-lg: 0 26px 58px rgba(16, 47, 67, 0.16);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;

  --content-max: 1320px;
}

/* ===========================
   THEME DARK
=========================== */
html[data-theme="dark"] {
  --bg-main: #08131c;
  --bg-soft: #0d1d29;
  --bg-card: #102330;
  --bg-card-2: #132938;
  --bg-header: #051019;
  --bg-header-2: #0b2332;
  --bg-sidebar: #071621;
  --bg-footer: #050d14;

  --text-main: #e9f2f7;
  --text-soft: #cadbe5;
  --text-muted: #97adba;
  --text-light: #ffffff;

  --primary: #67b6de;
  --primary-strong: #8ccbe9;
  --primary-soft: rgba(103, 182, 222, 0.14);

  --secondary: #67d8da;
  --secondary-strong: #86e7e9;
  --secondary-soft: rgba(103, 216, 218, 0.14);

  --success: #4cc48e;
  --success-soft: rgba(76, 196, 142, 0.14);
  --danger: #f07d8a;
  --danger-soft: rgba(240, 125, 138, 0.14);
  --warning: #edc26c;
  --warning-soft: rgba(237, 194, 108, 0.14);
  --info: #88baff;
  --info-soft: rgba(136, 186, 255, 0.14);

  --border: #254050;
  --border-strong: #35586d;

  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 26px 58px rgba(0, 0, 0, 0.36);
}

/* ===========================
   GLOBAL
=========================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at top left,
      rgba(72, 188, 200, 0.08),
      transparent 28%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(42, 108, 146, 0.08),
      transparent 30%
    );
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  line-height: 1.2;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

h3 {
  font-size: 1.06rem;
}

p {
  margin: 0 0 14px;
  color: var(--text-soft);
}

ul,
ol {
  margin: 0;
  padding-left: 18px;
}

.list-clean {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.list-clean--spaced {
  margin-top: 14px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.text-muted {
  color: var(--text-muted);
}

/* ===========================
   BUTTONS
=========================== */
.btn,
button,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
}

button,
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(42, 108, 146, 0.22);
}

button:hover,
.btn-primary:hover {
  background: var(--primary-strong);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-soft);
  color: var(--text-main);
  border-color: var(--border-strong);
  text-decoration: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(1.04);
}

/* ===========================
   TOPBAR
=========================== */
.site-header {
  background: linear-gradient(135deg, var(--bg-header), var(--bg-header-2));
  color: var(--text-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
}

.site-header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-header-left {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.08)
  );
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 800;
  letter-spacing: 0.05em;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  display: block;
  color: #fff;
  font-size: 1.04rem;
}

.brand-copy small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.86rem;
}

.site-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-chip strong,
.user-chip small {
  display: block;
  color: #fff;
}

.user-chip small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.layout-sidebar-toggle {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.layout-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.layout-sidebar-toggle i {
  font-size: 1rem;
}

/* ===========================
   MAIN LAYOUT
=========================== */
.layout {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 24px 34px;
  min-height: calc(100vh - 170px);
}

.layout--guest {
  grid-template-columns: 1fr;
}

.content-main {
  min-width: 0;
}

.content-stack,
.page-stack {
  display: grid;
  gap: 24px;
}

/* ===========================
   SIDEBAR SAAS
=========================== */
.sidebar {
  position: sticky;
  top: 22px;
  height: fit-content;
  background: linear-gradient(
    180deg,
    rgba(16, 47, 67, 0.98),
    rgba(24, 73, 102, 0.95)
  );
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 5px 18px 18px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.sidebar::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-scroll {
  position: relative;
  z-index: 1;
  min-height: 0;
}

/* Scroll interne du menu latéral ouvert en tiroir */
body.layout-has-collapsed-sidebar .sidebar--collapsible .sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 104, 242, 0.45) transparent;
}

/* Chrome / Edge / Safari : scrollbar propre, sans flèches */
body.layout-has-collapsed-sidebar
  .sidebar--collapsible
  .sidebar-scroll::-webkit-scrollbar {
  width: 8px;
}

body.layout-has-collapsed-sidebar
  .sidebar--collapsible
  .sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 12px 0;
}

body.layout-has-collapsed-sidebar
  .sidebar--collapsible
  .sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(85, 104, 242, 0.38);
  border-radius: 999px;
}

body.layout-has-collapsed-sidebar
  .sidebar--collapsible
  .sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(85, 104, 242, 0.58);
}

body.layout-has-collapsed-sidebar
  .sidebar--collapsible
  .sidebar-scroll::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

.sidebar-top,
.sidebar-footer {
  position: relative;
  z-index: 1;
}

.sidebar-top {
  margin-bottom: 18px;
  padding: 0 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-top h3 {
  color: #fff;
  margin-bottom: 6px;
}

.sidebar-top p {
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 0;
  font-size: 0.92rem;
}

.sidebar-top__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-close-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.88);
  padding: 12px 14px;
  border-radius: 14px;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.sidebar a i {
  width: 18px;
  text-align: center;
  flex: 0 0 18px;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateX(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-footer {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.sidebar-footer strong {
  color: #fff;
}

.sidebar-divider {
  height: 1px;
  margin: 18px 0;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-top--business {
  margin-top: 6px;
}

.sidebar-section {
  margin-bottom: 18px;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  margin-bottom: 8px;
}

.sidebar-section-description {
  margin: 0 0 10px 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(203, 213, 245, 0.7);
}

.sidebar-nav--business {
  margin-top: 8px;
}

.sidebar-module-link {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-module-link__main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sidebar-module-link__main i {
  width: 18px;
  text-align: center;
  flex: 0 0 18px;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

/* ===========================
   COLLAPSIBLE SIDEBAR MODE
=========================== */
.layout-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 16, 25, 0.48);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  z-index: 90;
}

body.layout-has-collapsed-sidebar .layout {
  grid-template-columns: minmax(0, 1fr);
}

body.layout-has-collapsed-sidebar .sidebar--collapsible {
  position: fixed;
  top: 18px;
  left: 18px;
  bottom: 18px;
  width: min(340px, calc(100vw - 36px));
  max-width: calc(100vw - 36px);
  border-radius: 24px;
  transform: translateX(calc(-100% - 24px));
  transition: transform 0.24s ease;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 104, 242, 0.45) transparent;
  height: auto;
  z-index: 100;
}

body.layout-sidebar-open .sidebar--collapsible {
  transform: translateX(0);
}

body.layout-sidebar-open .layout-sidebar-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: var(--bg-footer);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
}

.site-footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 18px 24px 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
  color: inherit;
  font-size: 0.92rem;
}

/* ===========================
   PANELS
=========================== */
.page-hero {
  background: linear-gradient(
    135deg,
    rgba(32, 88, 121, 1),
    rgba(72, 188, 200, 0.9)
  );
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.page-hero h1,
.page-hero h2,
.page-hero h3,
.page-hero p {
  color: #fff;
  position: relative;
  z-index: 1;
}

.page-hero p {
  max-width: 860px;
  color: rgba(255, 255, 255, 0.92);
}

.page-section,
.surface-card,
.form-card,
.info-card,
.table-card,
.metric-card,
.feature-card,
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.page-section,
.surface-card,
.info-card,
.metric-card,
.timeline-card {
  padding: 24px;
}

.surface-card--spaced {
  margin-top: 18px;
}

.form-card {
  padding: 26px;
  max-width: 900px;
}

.table-card {
  overflow: hidden;
}

.section-title {
  margin-bottom: 16px;
}

.section-title p:last-child {
  margin-bottom: 0;
}

/* ===========================
   GRIDS
=========================== */
.section-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card-grid,
.dashboard-cards,
.kpi-grid,
.business-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.business-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.business-grid-2 > * {
  min-width: 0;
}

/* ===========================
   CARDS / KPI
=========================== */
.card,
.kpi-card,
.feature-card,
.metric-card {
  padding: 22px;
}

.card,
.kpi-card,
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.card:hover,
.kpi-card:hover,
.feature-card:hover,
.dashboard-cards a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.dashboard-cards a.card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-title,
.kpi-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-value,
.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.card-description {
  margin-top: 10px;
  color: var(--text-soft);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.metric-inline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.metric-inline strong {
  font-size: 2.1rem;
  color: var(--primary);
}

/* ===========================
   BADGES / ALERTS
=========================== */
.badge-row,
.hero-actions,
.button-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-row--centered {
  justify-content: center;
  margin-top: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.badge--secondary {
  background: rgba(255, 255, 255, 0.24);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.status-pill--success {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill--info {
  background: var(--info-soft);
  color: var(--info);
}

.message,
.auth-form-status {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.message--info,
.auth-form-status--info {
  background: var(--info-soft);
  color: var(--info);
  border-color: rgba(36, 100, 181, 0.16);
}

.message--success,
.auth-form-status--success {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(35, 131, 93, 0.16);
}

.message--danger,
.auth-form-status--error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(198, 63, 83, 0.16);
}

.message--warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(182, 125, 40, 0.18);
}

.table-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
}

.is-blue {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.18);
}

.is-blue-soft {
  background: rgba(96, 165, 250, 0.16);
  color: #1e40af;
  border-color: rgba(96, 165, 250, 0.18);
}

.is-amber {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.18);
}

.is-amber-soft {
  background: rgba(251, 191, 36, 0.16);
  color: #92400e;
  border-color: rgba(251, 191, 36, 0.18);
}

.is-violet {
  background: rgba(139, 92, 246, 0.16);
  color: #6d28d9;
  border-color: rgba(139, 92, 246, 0.18);
}

.is-green {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.18);
}

.is-green-soft {
  background: rgba(74, 222, 128, 0.16);
  color: #166534;
  border-color: rgba(74, 222, 128, 0.18);
}

.is-orange {
  background: rgba(249, 115, 22, 0.16);
  color: #c2410c;
  border-color: rgba(249, 115, 22, 0.18);
}

.is-red {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.18);
}

.is-slate {
  background: rgba(100, 116, 139, 0.14);
  color: #334155;
  border-color: rgba(100, 116, 139, 0.18);
}

/* ===========================
   FORMS
=========================== */
form {
  background: transparent;
  padding: 0;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}

label {
  display: block;
  font-weight: 700;
  color: var(--text-main);
}

.field-label-inline {
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text-main);
  padding: 12px 14px;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(42, 108, 146, 0.1);
  background: var(--bg-card);
}

input[readonly],
textarea[readonly] {
  background: var(--bg-soft);
  color: var(--text-muted);
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.checkbox-inline input {
  width: auto;
  min-height: auto;
}

.field-help,
.inline-note {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

#themeToggle {
  min-width: 52px;
  min-height: 46px;
  font-size: 1.1rem;
}

#colorPicker {
  width: 56px;
  min-width: 56px;
  min-height: 46px;
  padding: 6px;
  border-radius: 12px;
  cursor: pointer;
}

/* ===========================
   TABLES
=========================== */
.table-wrap {
  overflow: auto;
}

.app-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.app-table thead {
  background: var(--bg-soft);
}

.app-table th,
.app-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.app-table th {
  color: var(--text-main);
  font-size: 0.92rem;
}

.app-table td {
  color: var(--text-soft);
}

.table-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.table-actions a {
  font-weight: 700;
  text-decoration: none;
}

.table-actions a:hover {
  text-decoration: underline;
}

.table-action-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.table-action-link:hover {
  text-decoration: underline;
}

.table-action-link--danger {
  color: var(--danger);
}

.table-title-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.table-title-cell small {
  color: var(--text-muted);
}

/* ===========================
   DETAIL / DEFINITIONS
=========================== */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.detail-item {
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  padding: 18px;
}

.detail-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-value {
  font-size: 16px;
  line-height: 1.6;
}

.detail-notes {
  white-space: normal;
  line-height: 1.7;
}

.definition-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 14px 18px;
  margin: 0;
  padding: 0;
}

.definition-grid dt,
.definition-grid dd {
  margin: 0;
}

.definition-grid dt {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.definition-grid dd {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-card-2);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--text-main);
}

/* ===========================
   AUTH
=========================== */
.auth-login-shell {
  display: grid;
  gap: 26px;
  align-items: stretch;
}

.auth-login-shell--branded {
  grid-template-columns: minmax(300px, 430px) minmax(320px, 1fr);
}

.auth-login-shell--generic {
  max-width: 620px;
}

.auth-brand-panel {
  position: relative;
  min-height: 560px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(20, 56, 79, 1),
    rgba(72, 188, 200, 0.88)
  );
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
}

.auth-brand-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 20, 29, 0.16),
    rgba(8, 20, 29, 0.56)
  );
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}

.auth-brand-content h1 {
  color: #fff;
  margin-bottom: 12px;
}

.auth-brand-content p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 440px;
}

.auth-brand-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-size: 0.84rem;
  font-weight: 800;
}

.auth-brand-logo-wrap {
  margin-bottom: 24px;
}

.auth-brand-logo {
  max-width: 180px;
  max-height: 82px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.94);
  padding: 10px 14px;
  border-radius: 14px;
}

.auth-form-panel {
  display: flex;
  align-items: center;
}

.auth-form-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.auth-form-header {
  margin-bottom: 18px;
}

.auth-form-header p {
  color: var(--text-muted);
}

.auth-login-form > button,
.auth-login-form > .auth-submit-btn {
  margin-top: 22px;
}

.auth-login-form .auth-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-login-form .auth-submit-btn i {
  font-size: 1rem;
  line-height: 1;
}

.auth-login-footer {
  margin-top: 22px;
}

.auth-login-footer a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
}

.auth-login-footer a i {
  font-size: 0.95rem;
  line-height: 1;
  flex: 0 0 auto;
}

.auth-login-footer a:hover {
  text-decoration: underline;
}

/* ===========================
   WORKSPACE TOGGLE
=========================== */
.workspace-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  margin: 12px 0 6px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--primary-soft);
  cursor: pointer;
}

.workspace-toggle-switch {
  position: relative;
  width: 54px;
  min-width: 54px;
  height: 30px;
}

.workspace-toggle-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.workspace-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c7d8e2;
  transition: background 0.2s ease;
}

.workspace-toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.workspace-toggle-switch input:checked + .workspace-toggle-slider {
  background: var(--primary);
}

.workspace-toggle-switch input:checked + .workspace-toggle-slider::before {
  transform: translateX(24px);
}

.workspace-toggle-copy strong {
  display: block;
  margin-bottom: 4px;
}

.workspace-toggle-copy small {
  display: block;
  color: var(--text-muted);
}

.workspace-field-wrapper {
  display: none;
  margin-top: 8px;
}

.workspace-field-wrapper.is-visible {
  display: block;
}

/* ===========================
   LANDING / UI KIT
=========================== */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.hero-metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-metric strong {
  display: block;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 4px;
}

.hero-metric span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
}

.pitch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.pitch-card h3 {
  margin-bottom: 10px;
}

.pitch-card p:last-child {
  margin-bottom: 0;
}

.ui-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.filter-bar .filter-item {
  min-width: 180px;
  flex: 1;
}

.business-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.business-panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-2);
}

.business-panel-body {
  padding: 20px;
}

.empty-state {
  padding: 30px;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  background: var(--bg-card);
}

.empty-state p:last-child {
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  position: relative;
  padding: 16px 16px 16px 18px;
  border-radius: 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 999px;
  background: var(--secondary);
}

.timeline-item h4 {
  margin-bottom: 6px;
}

.kpi-inline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.kpi-inline strong {
  font-size: 2rem;
  color: var(--primary);
}

.module-callout {
  border-left: 5px solid var(--secondary);
  background: var(--secondary-soft);
  color: #0f626c;
  padding: 18px 20px;
  border-radius: 16px;
}

.module-callout p {
  color: inherit;
  margin-bottom: 0;
}

/* ===========================
   USER PROFILES SELECTOR
=========================== */
.user-profiles-selector {
  display: grid;
  gap: 18px;
  margin-top: 8px;
}

.user-profiles-selector__header h2 {
  margin-bottom: 8px;
}

.user-profiles-selector__header p {
  margin-bottom: 0;
}

.user-profiles-selector__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.user-profile-card {
  display: block;
  margin: 0;
  cursor: pointer;
}

.user-profile-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.user-profile-card__body {
  height: 100%;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.user-profile-card:hover .user-profile-card__body {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(42, 108, 146, 0.28);
}

.user-profile-card input[type="checkbox"]:checked + .user-profile-card__body {
  border-color: var(--primary);
  background: linear-gradient(
    180deg,
    rgba(42, 108, 146, 0.05),
    rgba(72, 188, 200, 0.06)
  );
  box-shadow: 0 16px 34px rgba(42, 108, 146, 0.12);
}

.user-profile-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.user-profile-card__top strong {
  color: var(--text-main);
}

.user-profile-card__body p {
  margin-bottom: 14px;
  color: var(--text-soft);
}

.user-profile-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-profile-chips-panel {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.user-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.user-profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.16);
  color: #6d28d9;
  font-size: 13px;
  font-weight: 700;
}

.user-profile-chip--empty {
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.14);
  color: #475569;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  body.layout-has-collapsed-sidebar .sidebar--collapsible {
    position: fixed;
    top: 14px;
    left: 14px;
    bottom: 14px;
    width: min(340px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    overflow: hidden;
  }

  .section-grid-2,
  .card-grid,
  .dashboard-cards,
  .kpi-grid,
  .business-grid-2,
  .business-grid-3,
  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-login-shell--branded {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: 280px;
  }
}

@media (max-width: 900px) {
  .detail-grid,
  .user-profiles-selector__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header-inner,
  .layout,
  .site-footer-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-header-inner {
    align-items: flex-start;
  }

  .site-header-left,
  .site-header-right {
    width: 100%;
  }

  .site-header-right {
    justify-content: flex-start;
  }

  .page-hero,
  .page-section,
  .surface-card,
  .form-card,
  .table-card,
  .metric-card,
  .timeline-card,
  .feature-card,
  .auth-form-card,
  .card,
  .kpi-card {
    padding: 20px;
  }

  .section-grid-2,
  .card-grid,
  .dashboard-cards,
  .kpi-grid,
  .business-grid-2,
  .business-grid-3,
  .hero-metrics,
  .definition-grid {
    grid-template-columns: 1fr;
  }

  .workspace-toggle {
    align-items: flex-start;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .definition-grid {
    display: grid;
  }

  body.layout-has-collapsed-sidebar .sidebar--collapsible {
    border-radius: 20px;
  }

  .auth-login-form .auth-submit-btn {
    width: 100%;
  }

  .auth-login-footer a {
    width: fit-content;
    flex-wrap: wrap;
  }
}

/* ===========================
   DARK MODE ADJUSTMENTS
=========================== */
html[data-theme="dark"] .definition-grid dt {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .definition-grid dd {
  background: rgba(19, 41, 56, 0.9);
  border-color: rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] .user-profile-card__body {
  background: var(--bg-card);
  border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"]
  .user-profile-card
  input[type="checkbox"]:checked
  + .user-profile-card__body {
  background: linear-gradient(
    180deg,
    rgba(103, 182, 222, 0.14),
    rgba(103, 216, 218, 0.08)
  );
  border-color: rgba(103, 182, 222, 0.46);
}

html[data-theme="dark"] .user-profile-chips-panel {
  background: rgba(19, 41, 56, 0.9);
  border-color: rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] .user-profile-chip {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.22);
  color: #d8b4fe;
}

html[data-theme="dark"] .user-profile-chip--empty {
  background: rgba(100, 116, 139, 0.18);
  border-color: rgba(100, 116, 139, 0.22);
  color: #cbd5e1;
}

/* ======================================================
   💳 Aide Stripe Connect — Paramètres Foundation
   ====================================================== */

.foundation-payment-connect-section .payment-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.foundation-payment-connect-section .payment-help-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.foundation-payment-connect-section .payment-help-card h4 {
  margin: 0 0 8px;
  color: var(--primary);
}

.foundation-payment-connect-section .payment-help-card p {
  margin: 0;
}

.foundation-payment-connect-section .payment-help-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.18);
  color: #166534;
}

@media (max-width: 800px) {
  .foundation-payment-connect-section .payment-help-grid {
    grid-template-columns: 1fr;
  }
}

/* ======================================================
   Abonnement public application
   À coller à la fin de :
   C:\Apache24\sites\apptemplate\v1\assets\foundation\css\style.css
====================================================== */

.foundation-home-page__plans,
.foundation-subscribe-page {
  margin-top: 24px;
}

.foundation-subscribe-plans {
  align-items: stretch;
}

.pitch-card--featured,
.pitch-card--selected {
  border-color: color-mix(
    in srgb,
    var(--primary-color, #2563eb) 45%,
    rgba(255, 255, 255, 0.12)
  );
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.14);
}

.plan-price {
  margin: 14px 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.foundation-subscribe-checkout {
  align-items: start;
}

.foundation-subscribe-form {
  display: grid;
  gap: 12px;
}

.foundation-subscribe-form .form-actions {
  margin-top: 10px;
}

.foundation-subscribe-steps {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding-left: 22px;
}

.foundation-subscribe-steps li {
  padding-left: 4px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .foundation-subscribe-plans,
  .foundation-subscribe-checkout {
    grid-template-columns: 1fr;
  }

  .plan-price {
    font-size: 1.35rem;
  }
}

/* ===========================
   PUBLIC CHANGELOG
=========================== */
.changelog-public-page {
  gap: 26px;
}

.changelog-public-hero .badge {
  background: var(--secondary-soft);
  color: var(--secondary-strong);
  border-color: rgba(72, 188, 200, 0.24);
}

.changelog-public-section {
  display: grid;
  gap: 18px;
}

.changelog-public-list {
  display: grid;
  gap: 16px;
}

.changelog-public-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  box-shadow: var(--shadow-sm);
}

.changelog-public-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--primary);
}

.changelog-public-card--bug::before,
.changelog-public-card--fix::before {
  background: var(--success);
}

.changelog-public-card--module::before {
  background: var(--secondary);
}

.changelog-public-card--ux::before {
  background: var(--info);
}

.changelog-public-card--technical_debt::before {
  background: var(--warning);
}

.changelog-public-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.changelog-public-card h2 {
  margin: 6px 0 0;
}

.changelog-public-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.changelog-public-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.changelog-public-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.changelog-empty {
  padding: 42px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  text-align: center;
}

.changelog-empty .empty-state-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

@media (max-width: 760px) {
  .changelog-public-card-head {
    display: grid;
  }

  .changelog-public-meta {
    justify-content: flex-start;
  }
}

/* ===========================
   SUPPORT / TICKETS CLIENT
=========================== */
.support-page {
  gap: 22px;
}

.support-hero .badge {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 22px;
  align-items: start;
}

.support-form-card {
  max-width: none;
}

.support-ticket-form textarea {
  resize: vertical;
  min-height: 180px;
}

.support-side-card {
  display: grid;
  gap: 16px;
}

.support-tips {
  display: grid;
  gap: 10px;
  color: var(--text-soft);
}

.support-user-box {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card-2);
}

.support-user-box span {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.support-user-box strong {
  word-break: break-word;
}

@media (max-width: 900px) {
  .support-layout {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   CHANGELOG / NOUVEAUTÉS BADGE
=========================== */
.changelog-header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: none;
}

.changelog-header-link:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
}

.changelog-header-link.has-unseen {
  background: rgba(237, 194, 108, 0.18);
  border-color: rgba(237, 194, 108, 0.36);
}

.changelog-header-link strong,
.changelog-dashboard-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--warning);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1;
}

.changelog-dashboard-btn {
  position: relative;
}

.changelog-dashboard-btn.has-unseen {
  border-color: var(--warning);
  background: var(--warning-soft);
  color: var(--text-main);
}

html[data-theme="dark"] .changelog-dashboard-btn.has-unseen {
  color: var(--text-main);
}

.sidebar a .nav-badge {
  margin-left: auto;
}

/* ===========================
   CHANGELOG / PROMPT SESSION
=========================== */
.changelog-session-prompt {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 22px;
}

.changelog-session-prompt.is-closing {
  animation: changelogPromptFadeOut 0.18s ease forwards;
}

.changelog-session-prompt__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 16, 25, 0.58);
  backdrop-filter: blur(6px);
}

.changelog-session-prompt__card {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 18px;
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(237, 194, 108, 0.36);
  background:
    radial-gradient(
      circle at top left,
      rgba(237, 194, 108, 0.2),
      transparent 38%
    ),
    var(--bg-card);
  box-shadow: var(--shadow-lg);
  animation: changelogPromptIn 0.24s ease both;
}

.changelog-session-prompt__icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.changelog-session-prompt__eyebrow {
  margin: 0 0 6px;
  color: var(--warning);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.changelog-session-prompt__content h2 {
  margin-bottom: 10px;
}

.changelog-session-prompt__content p {
  margin-bottom: 0;
}

.changelog-session-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

@keyframes changelogPromptIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes changelogPromptFadeOut {
  to {
    opacity: 0;
  }
}

html[data-theme="dark"] .changelog-session-prompt__card {
  background:
    radial-gradient(
      circle at top left,
      rgba(237, 194, 108, 0.16),
      transparent 38%
    ),
    var(--bg-card);
  border-color: rgba(237, 194, 108, 0.42);
}

@media (max-width: 640px) {
  .changelog-session-prompt__card {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .changelog-session-prompt__icon {
    width: 56px;
    height: 56px;
    font-size: 1.7rem;
  }

  .changelog-session-prompt__actions .btn,
  .changelog-session-prompt__actions button {
    width: 100%;
  }
}

/* ======================================================
   🎫 Support client — Suivi des tickets
   ====================================================== */

.support-page {
  scroll-behavior: smooth;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
  gap: 22px;
  align-items: start;
}

.support-ticket-form,
.support-ticket-reply-form {
  display: grid;
  gap: 12px;
}

.support-tips {
  display: grid;
  gap: 10px;
  margin: 14px 0 22px;
}

.support-user-box {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: var(--primary-soft);
  border: 1px solid rgba(42, 108, 146, 0.14);
}

.support-user-box span {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.support-user-box strong {
  color: var(--text-main);
  word-break: break-word;
}

.support-tickets-section {
  display: grid;
  gap: 18px;
}

.support-ticket-list {
  display: grid;
  gap: 16px;
}

.support-ticket-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.support-ticket-card--critical,
.support-ticket-card--open {
  border-left-color: var(--info);
}

.support-ticket-card--waiting_client {
  border-left-color: var(--warning);
}

.support-ticket-card--resolved {
  border-left-color: var(--success);
}

.support-ticket-card--closed,
.support-ticket-card--archived {
  border-left-color: var(--text-muted);
  opacity: 0.88;
}

.support-ticket-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.support-ticket-card__id {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.support-ticket-card__header h3 {
  margin-bottom: 0;
}

.support-ticket-card__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.support-ticket-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 800;
}

.support-ticket-badge--open,
.support-ticket-badge--in_progress,
.support-ticket-badge--linked_devboard {
  background: var(--info-soft);
  color: var(--info);
}

.support-ticket-badge--waiting_client {
  background: var(--warning-soft);
  color: var(--warning);
}

.support-ticket-badge--resolved {
  background: var(--success-soft);
  color: var(--success);
}

.support-ticket-badge--closed,
.support-ticket-badge--archived {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
}

.support-ticket-thread {
  display: grid;
  gap: 12px;
}

.support-ticket-message {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
}

.support-ticket-message--initial {
  background: var(--primary-soft);
  border-color: rgba(42, 108, 146, 0.16);
}

.support-ticket-message--support {
  background: var(--info-soft);
  border-color: rgba(36, 100, 181, 0.14);
}

.support-ticket-message--client {
  background: var(--success-soft);
  border-color: rgba(35, 131, 93, 0.14);
}

.support-ticket-message__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.support-ticket-message__meta strong {
  color: var(--text-main);
}

.support-ticket-message p {
  margin: 0;
  white-space: normal;
}

.support-ticket-reply-form {
  padding-top: 4px;
}

.support-ticket-closed-note {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .support-layout {
    grid-template-columns: 1fr;
  }

  .support-ticket-card {
    padding: 16px;
  }

  .support-ticket-card__badges {
    justify-content: flex-start;
  }
}

/* ======================================================
   Support : badge, accès rapide et limitation des demandes
   ====================================================== */
.support-header-link,
.changelog-header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.support-header-link:hover,
.changelog-header-link:hover {
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

.support-header-link strong,
.changelog-header-link strong,
.support-dashboard-btn span,
.changelog-dashboard-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1;
}

.support-header-link.has-unseen,
.support-dashboard-btn.has-unseen {
  box-shadow: 0 0 0 3px rgba(198, 63, 83, 0.12);
}

.support-active-ticket-notice {
  margin-bottom: 0;
}

.support-ticket-card--waiting_client {
  border-color: rgba(36, 100, 181, 0.25);
  box-shadow: 0 16px 34px rgba(36, 100, 181, 0.1);
}

.support-ticket-badge--waiting_client {
  background: var(--info-soft);
  color: var(--info);
  border-color: rgba(36, 100, 181, 0.18);
}
/* ======================================================
   Aide : regroupement Nouveautés / Support / Ressources
   ====================================================== */
.header-help-alerts {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sidebar-section--help {
  margin-bottom: 18px;
}

.sidebar-nav--help {
  margin-top: 10px;
}

.sidebar-help-disabled {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.045);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
}

.sidebar-help-disabled i {
  width: 18px;
  text-align: center;
  flex: 0 0 18px;
}

.sidebar-help-disabled span {
  min-width: 0;
}

.sidebar-help-disabled em {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-help-card {
  border-color: rgba(72, 188, 200, 0.24);
  background:
    linear-gradient(135deg, rgba(72, 188, 200, 0.08), transparent 42%),
    var(--bg-card);
}

.dashboard-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-help-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.dashboard-help-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.dashboard-help-item.has-unseen {
  border-color: rgba(198, 63, 83, 0.28);
  background:
    linear-gradient(135deg, rgba(198, 63, 83, 0.08), transparent 52%),
    var(--bg-card-2);
}

.dashboard-help-item__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--primary-soft);
  font-size: 1.2rem;
}

.dashboard-help-item__copy {
  min-width: 0;
}

.dashboard-help-item__copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-main);
}

.dashboard-help-item__copy small {
  display: block;
  color: var(--text-muted);
  line-height: 1.4;
}

.dashboard-help-item__badge,
.dashboard-help-item__soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.dashboard-help-item__badge {
  background: var(--danger);
  color: #fff;
}

.dashboard-help-item__soon {
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-help-item--disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.dashboard-help-item--disabled:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

@media (max-width: 760px) {
  .dashboard-help-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-help-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-help-item__badge,
  .dashboard-help-item__soon {
    grid-column: 2;
    justify-self: start;
  }
}

/* =========================================================
   Billing existant / régularisation licence
========================================================= */
.foundation-billing-page .foundation-billing-summary {
  align-items: stretch;
}

.billing-detail-grid {
  margin-top: 1rem;
}

.billing-detail-grid div {
  min-width: 0;
}

.foundation-billing-checkout {
  max-width: 920px;
}

.foundation-billing-form {
  margin-top: 1rem;
}

.foundation-billing-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

/* Mise en avant de l'action recommandée sur la page licence bloquée */
.license-expired-actions .license-action-featured {
  order: -1;
  position: relative;
  box-shadow: 0 18px 36px rgba(79, 91, 255, 0.22);
  transform: translateY(-1px);
}

.license-expired-actions .license-action-featured::after {
  content: "Action recommandée";
  position: absolute;
  top: -11px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

/* =========================================================
   Licence bloquée — bloc paiement attendu
========================================================= */

.license-payment-panel {
  position: relative;
  overflow: hidden;
}

.license-payment-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary, #4f5bff), #22c55e);
}

.license-payment-client-message {
  margin-bottom: 1rem;
}

.license-payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.2rem;
}

.license-payment-summary-card {
  padding: 1rem;
  border-radius: 18px;
  background: var(--bg-soft, rgba(15, 23, 42, 0.04));
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  box-shadow: var(--shadow-sm, 0 10px 28px rgba(15, 23, 42, 0.06));
}

.license-payment-summary-card span {
  display: block;
  margin-bottom: 0.38rem;
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.license-payment-summary-card strong {
  display: block;
  color: var(--text, #0f172a);
  font-size: 1.05rem;
  line-height: 1.35;
  word-break: break-word;
}

.license-payment-bank-layout,
.license-payment-online-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  align-items: stretch;
}

.license-payment-steps,
.license-payment-bank-box,
.license-payment-online-card {
  padding: 1.15rem;
  border-radius: 20px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  box-shadow: var(--shadow-sm, 0 10px 28px rgba(15, 23, 42, 0.06));
}

.license-payment-steps h3,
.license-payment-bank-box h3,
.license-payment-online-card h3 {
  margin: 0 0 0.8rem;
  color: var(--text, #0f172a);
  font-size: 1.1rem;
}

.license-payment-steps ol {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--text-muted, #64748b);
  line-height: 1.65;
}

.license-payment-bank-box {
  background:
    radial-gradient(
      circle at top right,
      rgba(79, 91, 255, 0.12),
      transparent 36%
    ),
    var(--surface, #fff);
}

.license-payment-bank-box__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.license-payment-bank-box__head p {
  margin: 0.2rem 0 0;
  color: var(--text-muted, #64748b);
}

.license-payment-bank-box__head i {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 16px;
  color: var(--primary, #4f5bff);
  background: rgba(79, 91, 255, 0.1);
}

.license-payment-bank-details {
  display: grid;
  grid-template-columns: minmax(130px, 0.32fr) minmax(0, 1fr);
  gap: 0.7rem 1rem;
  margin: 0;
}

.license-payment-bank-details dt {
  color: var(--text-muted, #64748b);
  font-weight: 800;
}

.license-payment-bank-details dd {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  color: var(--text, #0f172a);
  font-weight: 700;
}

.license-payment-bank-details code {
  display: inline-block;
  max-width: 100%;
  padding: 0.38rem 0.55rem;
  border-radius: 10px;
  background: var(--bg-soft, rgba(15, 23, 42, 0.04));
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  color: inherit;
  white-space: normal;
  word-break: break-all;
}

.license-payment-bank-details .btn-copy {
  width: auto;
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  font-size: 0.82rem;
}

.license-payment-bank-raw {
  margin-top: 1rem;
  padding: 0.95rem;
  border-radius: 16px;
  background: rgba(79, 91, 255, 0.06);
  border: 1px dashed rgba(79, 91, 255, 0.24);
}

.license-payment-bank-raw strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text, #0f172a);
}

.license-payment-bank-raw p {
  margin: 0.35rem 0 0;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
}

.license-payment-online-card p {
  margin: 0 0 1rem;
  color: var(--text-muted, #64748b);
  line-height: 1.6;
}

.license-payment-online-card .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 980px) {
  .license-payment-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .license-payment-bank-layout,
  .license-payment-online-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .license-payment-summary-grid {
    grid-template-columns: 1fr;
  }

  .license-payment-bank-details {
    grid-template-columns: 1fr;
  }

  .license-payment-bank-details dd {
    align-items: stretch;
  }

  .license-payment-bank-details .btn-copy {
    width: 100%;
    justify-content: center;
  }
}

/* ======================================================
   🧭 SIDEBAR COMPACTE — NAVIGATION CLIENT RÉELLE
   ====================================================== */

@media (min-width: 1081px) {
  .layout:not(.layout--guest) {
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 24px;
  }

  .layout.layout--guest {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sidebar {
  max-height: calc(100vh - 44px);
  padding: 14px 8px 14px 12px;
  border-radius: 24px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.sidebar-scroll::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

.sidebar-top--compact {
  margin-bottom: 8px;
  padding: 2px 7px 12px;
}

.sidebar-top__row--compact {
  align-items: center;
}

.sidebar-top__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.sidebar-top__identity h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.sidebar-workspace-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
  font-weight: 750;
}

.sidebar-workspace-chip i {
  flex: 0 0 auto;
  font-size: 0.68rem;
}

.sidebar-workspace-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-close-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 11px;
}

.sidebar-nav {
  gap: 3px;
}

.sidebar a,
.sidebar-help-menu__summary {
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.2;
}

.sidebar a {
  gap: 11px;
}

.sidebar a i,
.sidebar-help-menu__summary-main > i,
.sidebar-help-disabled > i {
  width: 20px;
  flex: 0 0 20px;
  text-align: center;
  font-size: 0.93rem;
}

.sidebar a:hover,
.sidebar a.active {
  transform: none;
  background: rgba(255, 255, 255, 0.13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(3, 15, 24, 0.08);
}

.sidebar a.active {
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
}

.sidebar-divider {
  margin: 10px 7px;
  background: rgba(255, 255, 255, 0.09);
}

.sidebar-nav--business {
  margin-top: 0;
}

.sidebar-module-link {
  justify-content: flex-start;
}

.sidebar-module-link > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-badge {
  min-width: 22px;
  min-height: 22px;
  margin-left: auto;
  padding: 2px 7px;
  font-size: 0.7rem;
}

.sidebar-help-menu {
  margin-top: 3px;
}

.sidebar-help-menu > summary {
  list-style: none;
}

.sidebar-help-menu > summary::-webkit-details-marker {
  display: none;
}

.sidebar-help-menu__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  user-select: none;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.sidebar-help-menu__summary:hover,
.sidebar-help-menu__summary.active,
.sidebar-help-menu[open] > .sidebar-help-menu__summary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-help-menu__summary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.sidebar-help-menu__summary-main,
.sidebar-help-menu__summary-side {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.sidebar-help-menu__summary-side {
  gap: 7px;
  margin-left: auto;
}

.sidebar-help-menu__chevron {
  width: 14px;
  flex: 0 0 14px;
  text-align: center;
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.sidebar-help-menu[open] .sidebar-help-menu__chevron {
  transform: rotate(180deg);
}

.sidebar-help-menu__content {
  display: grid;
  gap: 3px;
  margin: 5px 0 3px 20px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-help-menu__content a,
.sidebar-help-disabled {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 0.86rem;
}

.sidebar-help-disabled {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.44);
  background: transparent;
  border: 0;
}

.sidebar-help-disabled em {
  margin-left: auto;
  padding: 2px 6px;
  font-size: 0.59rem;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav--logout a {
  color: rgba(255, 255, 255, 0.72);
}

.sidebar-nav--logout a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

body.layout-has-collapsed-sidebar .sidebar--collapsible {
  width: min(306px, calc(100vw - 36px));
}

@media (max-width: 1080px) {
  .sidebar {
    max-height: none;
  }

  body.layout-has-collapsed-sidebar .sidebar--collapsible {
    width: min(306px, calc(100vw - 28px));
    max-height: none;
  }
}

@media (max-width: 480px) {
  .sidebar-top__identity {
    gap: 7px;
  }

  .sidebar-workspace-chip {
    max-width: 150px;
  }
}

/* ======================================================
   🧭 SIDEBAR MOBILE/TABLETTE — TIROIR MODERNE
   ====================================================== */

/* Sécurité anti-flash : le backdrop mobile est invisible tant que le menu n'est pas ouvert. */
.layout-sidebar-backdrop[hidden] {
  display: none !important;
}

.layout-sidebar-toggle--mobile,
.sidebar-close-btn--mobile {
  display: none;
}

@media (max-width: 1080px) {
  .layout-sidebar-toggle--mobile {
    display: inline-flex;
  }

  .sidebar-close-btn--mobile {
    display: inline-flex;
  }

  .layout-sidebar-backdrop {
    background: rgba(6, 18, 30, 0.54);
    backdrop-filter: blur(8px);
  }

  body.layout-sidebar-open {
    overflow: hidden;
  }

  .layout .sidebar[data-layout-sidebar-drawer] {
    position: fixed;
    top: 14px;
    left: 14px;
    bottom: 14px;
    width: min(330px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    max-height: none;
    height: auto;
    z-index: 100;
    transform: translateX(calc(-100% - 24px));
    opacity: 0;
    visibility: hidden;
    transition:
      transform 0.24s ease,
      opacity 0.2s ease,
      visibility 0.2s ease;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(6, 18, 30, 0.34);
  }

  body.layout-sidebar-open .sidebar[data-layout-sidebar-drawer] {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .sidebar[data-layout-sidebar-drawer] .sidebar-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    padding-right: 4px;
  }

  body.layout-sidebar-open .layout-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .layout > .content-main {
    grid-column: 1;
  }
}

@media (max-width: 520px) {
  .layout .sidebar[data-layout-sidebar-drawer] {
    top: 10px;
    left: 10px;
    bottom: 10px;
    width: min(318px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    border-radius: 22px;
  }

  .site-header-inner {
    gap: 12px;
  }

  .layout-sidebar-toggle--mobile {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    border-radius: 14px;
  }
}

/* ======================================================
   📊 DASHBOARD — CENTRE DE COMMANDE COMPACT
   ====================================================== */

.foundation-command-dashboard {
  display: grid;
  gap: 16px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

.foundation-command-dashboard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 126px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at top right,
      rgba(72, 188, 200, 0.16),
      transparent 36%
    ),
    linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
  box-shadow: var(--shadow-sm);
}

.foundation-command-dashboard__heading {
  min-width: 0;
}

.foundation-command-dashboard__eyebrow,
.foundation-command-panel__kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foundation-command-dashboard__heading h1 {
  margin: 6px 0 5px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
}

.foundation-command-dashboard__heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.foundation-command-dashboard__workspace {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 750;
  box-shadow: var(--shadow-sm);
}

.foundation-command-dashboard__workspace span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foundation-command-dashboard__layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.foundation-command-dashboard__main,
.foundation-command-dashboard__side {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.foundation-command-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.foundation-command-panel--primary {
  min-height: 0;
}

.foundation-command-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.foundation-command-panel__header h2 {
  margin: 3px 0 0;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.foundation-command-panel__count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 850;
}

.foundation-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.foundation-command-grid--business {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-command-tile {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 62px;
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: var(--bg-card-2);
  color: var(--text-main);
  text-decoration: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.foundation-command-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(42, 108, 146, 0.28);
  background: var(--bg-card);
  color: var(--text-main);
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(16, 47, 67, 0.08);
}

.foundation-command-tile:focus-visible {
  outline: 2px solid rgba(42, 108, 146, 0.36);
  outline-offset: 2px;
}

.foundation-command-tile__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.92rem;
}

.foundation-command-tile__label {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.foundation-command-tile__arrow {
  color: var(--text-muted);
  font-size: 0.68rem;
  transition: transform 0.16s ease;
}

.foundation-command-tile:hover .foundation-command-tile__arrow {
  transform: translateX(2px);
  color: var(--primary);
}

.foundation-command-dashboard__empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 13px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  color: var(--text-muted);
  background: var(--bg-card-2);
  font-size: 0.88rem;
}

html[data-theme="dark"] .foundation-command-tile {
  border-color: rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] .foundation-command-tile:hover {
  border-color: rgba(103, 182, 222, 0.34);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.foundation-command-dashboard__side .foundation-command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-command-dashboard__side .foundation-command-tile {
  grid-template-columns: 36px minmax(0, 1fr) 12px;
}

.foundation-command-tile__label {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .foundation-command-dashboard__layout {
    grid-template-columns: 1fr;
  }

  .foundation-command-dashboard__side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .foundation-command-dashboard__side .foundation-command-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .foundation-command-dashboard__header {
    min-height: 0;
    padding: 18px;
    border-radius: 20px;
    align-items: flex-start;
  }

  .foundation-command-panel {
    padding: 15px;
    border-radius: 19px;
  }

  .foundation-command-dashboard__side {
    grid-template-columns: 1fr;
  }

  .foundation-command-dashboard__side .foundation-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .foundation-command-dashboard__header {
    display: grid;
  }

  .foundation-command-dashboard__workspace {
    max-width: 100%;
    width: fit-content;
  }

  .foundation-command-grid,
  .foundation-command-grid--business,
  .foundation-command-dashboard__side .foundation-command-grid {
    grid-template-columns: 1fr;
  }

  .foundation-command-tile {
    min-height: 58px;
  }
}

/* ======================================================
   🎨 AMBIANCES TENANT ET AFFICHAGE PERSONNEL
   ====================================================== */

body::before {
  background:
    radial-gradient(circle at top left, var(--ambient-1), transparent 30%),
    radial-gradient(circle at bottom right, var(--ambient-2), transparent 32%);
}

.site-header {
  background: linear-gradient(135deg, var(--bg-header), var(--bg-header-2));
}

.sidebar {
  background: linear-gradient(180deg, var(--bg-sidebar), var(--bg-sidebar-2, var(--bg-sidebar)));
}

.page-hero,
.auth-brand-panel {
  background: linear-gradient(135deg, var(--hero-gradient-from), var(--hero-gradient-to));
}

.page-hero::after {
  background: var(--hero-orb);
}

.foundation-command-dashboard__header {
  background:
    radial-gradient(circle at top right, var(--ambient-2), transparent 38%),
    linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

button,
.btn-primary {
  box-shadow: 0 10px 20px var(--shadow-theme);
}

.header-theme-toggle {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  box-shadow: none;
}

.header-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.19);
}

.header-theme-toggle i {
  font-size: 1rem;
}

.foundation-appearance-section .section-title h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.foundation-appearance-section .section-title h2 i {
  color: var(--primary);
}

.foundation-appearance-section--compact {
  padding: 0;
  overflow: hidden;
}

.foundation-appearance-disclosure {
  display: block;
}

.foundation-appearance-disclosure > summary {
  list-style: none;
}

.foundation-appearance-disclosure > summary::-webkit-details-marker {
  display: none;
}

.foundation-appearance-summary {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto auto auto;
  gap: 18px;
  align-items: center;
  min-height: 118px;
  padding: 22px;
  cursor: pointer;
  user-select: none;
  background:
    radial-gradient(circle at top right, var(--ambient-1), transparent 38%),
    linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.foundation-appearance-summary:hover {
  background:
    radial-gradient(circle at top right, var(--ambient-2), transparent 38%),
    linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
}

.foundation-appearance-summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -4px;
}

.foundation-appearance-summary__preview {
  position: relative;
  width: 86px;
  height: 74px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 14%, var(--preview-orb), transparent 34%),
    linear-gradient(135deg, var(--preview-from), var(--preview-to));
  box-shadow: 0 16px 32px var(--shadow-theme);
}

.foundation-appearance-summary__preview span {
  position: absolute;
  left: 13px;
  bottom: 15px;
  width: 54%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 -18px 0 rgba(255, 255, 255, 0.22);
}

.foundation-appearance-summary__content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.foundation-appearance-summary__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foundation-appearance-summary__content strong {
  color: var(--text-main);
  font-size: clamp(1.24rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.foundation-appearance-summary__content small {
  color: var(--text-muted);
  font-weight: 700;
}

.foundation-appearance-summary__swatches {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.foundation-appearance-summary__swatches span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.foundation-appearance-summary__display {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--text-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  font-size: 0.84rem;
  font-weight: 750;
}

.foundation-appearance-summary__display i {
  color: var(--primary);
}

.foundation-appearance-summary__display span {
  display: inline-flex;
  gap: 5px;
  align-items: baseline;
}

.foundation-appearance-summary__display strong {
  color: var(--text-main);
}

.foundation-appearance-summary__action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 12px 24px var(--shadow-theme);
}

.foundation-appearance-summary__action i {
  font-size: 0.78rem;
  transition: transform 0.18s ease;
}

.foundation-appearance-disclosure[open] .foundation-appearance-summary__action i {
  transform: rotate(180deg);
}

.foundation-appearance-disclosure__content {
  padding: 0 22px 22px;
  border-top: 1px solid var(--border);
}

.foundation-appearance-section-title {
  padding-top: 22px;
}

.foundation-appearance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 22px;
  align-items: start;
}

.foundation-appearance-main,
.foundation-display-panel {
  min-width: 0;
}

.foundation-appearance-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}

.foundation-appearance-heading--compact {
  grid-template-columns: 44px minmax(0, 1fr);
}

.foundation-appearance-heading__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.08rem;
}

.foundation-appearance-heading--compact .foundation-appearance-heading__icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.foundation-appearance-heading h3 {
  margin-bottom: 6px;
}

.foundation-appearance-heading p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.foundation-appearance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.foundation-appearance-palette {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 210px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  text-align: left;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.foundation-appearance-palette:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
  box-shadow: var(--shadow-md);
}

.foundation-appearance-palette.is-selected {
  border-color: var(--primary);
  box-shadow: 0 18px 42px var(--shadow-theme);
}

.foundation-appearance-palette__preview {
  position: relative;
  min-height: 84px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 10%, var(--preview-orb), transparent 34%),
    linear-gradient(135deg, var(--preview-from), var(--preview-to));
}

.foundation-appearance-palette__preview span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 54%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 -22px 0 rgba(255, 255, 255, 0.22);
}

.foundation-appearance-palette__body {
  display: grid;
  gap: 4px;
}

.foundation-appearance-palette__body strong {
  font-size: 1rem;
  color: var(--text-main);
}

.foundation-appearance-palette__body small {
  color: var(--primary);
  font-weight: 850;
}

.foundation-appearance-palette__body em {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-style: normal;
  line-height: 1.45;
}

.foundation-appearance-palette__swatches {
  display: flex;
  gap: 7px;
  align-items: center;
}

.foundation-appearance-palette__swatches span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.foundation-appearance-palette__check {
  position: absolute;
  right: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  opacity: 0;
  transform: scale(0.84);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.foundation-appearance-palette.is-selected .foundation-appearance-palette__check {
  opacity: 1;
  transform: scale(1);
}

.foundation-appearance-status {
  min-height: 24px;
  margin-top: 14px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-weight: 750;
}

.foundation-appearance-status.is-success {
  color: var(--success);
}

.foundation-appearance-status.is-error {
  color: var(--danger);
}

.foundation-display-panel {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, var(--ambient-1), transparent 42%),
    var(--bg-card-2);
  box-shadow: var(--shadow-sm);
}

.foundation-display-modes {
  display: grid;
  gap: 10px;
}

.foundation-display-mode {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: none;
  text-align: left;
}

.foundation-display-mode i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
}

.foundation-display-mode span {
  font-weight: 850;
}

.foundation-display-mode:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
}

.foundation-display-mode.is-selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-soft), var(--bg-card));
}

html[data-theme="dark"] .foundation-appearance-summary__swatches {
  background: rgba(19, 41, 56, 0.9);
}

@media (max-width: 980px) {
  .foundation-appearance-summary {
    grid-template-columns: 74px minmax(0, 1fr) auto;
  }

  .foundation-appearance-summary__preview {
    width: 74px;
    height: 64px;
    border-radius: 19px;
  }

  .foundation-appearance-summary__swatches {
    grid-column: 2 / 3;
    width: fit-content;
  }

  .foundation-appearance-summary__display {
    grid-column: 1 / 3;
    width: fit-content;
  }

  .foundation-appearance-summary__action {
    grid-row: 1 / 3;
    grid-column: 3 / 4;
    align-self: center;
  }
}

@media (max-width: 640px) {
  .foundation-appearance-summary {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .foundation-appearance-summary__preview {
    width: 64px;
    height: 58px;
    border-radius: 18px;
  }

  .foundation-appearance-summary__swatches,
  .foundation-appearance-summary__display,
  .foundation-appearance-summary__action {
    grid-column: 1 / -1;
  }

  .foundation-appearance-summary__action {
    width: 100%;
    justify-content: space-between;
  }

  .foundation-appearance-disclosure__content {
    padding: 0 18px 18px;
  }
}

html[data-theme="dark"] .foundation-appearance-palette,
html[data-theme="dark"] .foundation-display-panel,
html[data-theme="dark"] .foundation-display-mode {
  border-color: rgba(148, 163, 184, 0.16);
}

@media (max-width: 980px) {
  .foundation-appearance-layout {
    grid-template-columns: 1fr;
  }

  .foundation-display-modes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .foundation-appearance-grid,
  .foundation-display-modes {
    grid-template-columns: 1fr;
  }

  .foundation-appearance-palette {
    min-height: 0;
  }
}
/* ======================================================
   👥 UTILISATEURS FOUNDATION — INTERFACE PREMIUM
   ====================================================== */

.foundation-users-page {
  gap: 18px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

.foundation-users-hero,
.foundation-users-card,
.foundation-users-filter-card,
.foundation-users-empty-card,
.foundation-users-row,
.foundation-users-kpi-card {
  border: 1px solid color-mix(in srgb, var(--primary) 10%, var(--border));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--primary-soft) 54%, transparent), transparent 38%),
    var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.foundation-users-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: clamp(22px, 3vw, 42px);
  border-radius: 32px;
  overflow: hidden;
}

.foundation-users-hero--show {
  grid-template-columns: 128px minmax(0, 1fr);
}

.foundation-users-hero__body {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.foundation-users-hero h1 {
  margin: 0;
  color: var(--primary-strong);
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.foundation-users-hero p {
  max-width: 900px;
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.35vw, 1.28rem);
  line-height: 1.55;
  font-weight: 650;
}

.foundation-users-hero__actions,
.foundation-users-filter-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.foundation-users-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.foundation-users-badge {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  background: color-mix(in srgb, var(--bg-card) 84%, var(--primary-soft) 16%);
  color: var(--primary-strong);
  font-size: 0.92rem;
  font-weight: 900;
  white-space: nowrap;
}

.foundation-users-badge--secondary {
  color: var(--text-main);
  background: color-mix(in srgb, var(--bg-card-2) 84%, var(--primary-soft) 16%);
}

.foundation-users-badge i {
  color: currentColor;
}

.foundation-users-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
  color: var(--primary-strong);
  font-size: 1.2rem;
  font-weight: 950;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--shadow-theme) 60%, transparent);
  flex: 0 0 auto;
}

.foundation-users-avatar--large {
  width: 118px;
  height: 118px;
  border-radius: 30px;
  font-size: 2.15rem;
}

/* KPIs */
.foundation-users-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
}

.foundation-users-kpi-card {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 22px;
}

.foundation-users-kpi-card span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foundation-users-kpi-card strong {
  color: var(--primary-strong);
  font-size: 2rem;
  line-height: 1;
}

.foundation-users-kpi-card small {
  color: var(--text-soft);
  font-weight: 750;
}

.foundation-users-kpi-card.is-positive strong {
  color: #237a3b;
}

.foundation-users-kpi-card.is-warning strong {
  color: #b45309;
}

/* Cards */
.foundation-users-card,
.foundation-users-filter-card,
.foundation-users-empty-card {
  border-radius: 28px;
  padding: clamp(18px, 2vw, 26px);
}

.foundation-users-card__title {
  margin-bottom: 16px;
}

.foundation-users-card__title h2 {
  margin: 0 0 6px;
  color: var(--text-main);
  font-size: clamp(1.28rem, 1.8vw, 1.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.foundation-users-card__title p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
}

/* Filtres */
.foundation-users-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.34fr) minmax(170px, 0.3fr) auto;
  gap: 16px;
  align-items: end;
}

.foundation-users-filter-grid label,
.foundation-users-field,
.foundation-user-profile-search {
  min-width: 0;
  display: grid;
  gap: 9px;
  align-content: start;
}

.foundation-users-filter-grid label > span,
.foundation-users-field > span,
.foundation-user-profile-search > span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foundation-users-field em {
  color: #b42318;
  font-style: normal;
}

.foundation-users-filter-grid input,
.foundation-users-filter-grid select,
.foundation-users-field input,
.foundation-users-field select,
.foundation-users-field textarea,
.foundation-user-profile-search input {
  width: 100%;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, var(--border));
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-main);
  font: inherit;
  font-weight: 650;
  box-shadow: none;
}

.foundation-users-filter-grid input,
.foundation-users-filter-grid select,
.foundation-users-field input,
.foundation-users-field select,
.foundation-user-profile-search input {
  min-height: 48px;
  padding: 0 14px;
}

.foundation-users-field textarea {
  min-height: 112px;
  padding: 14px;
  resize: vertical;
}

.foundation-users-filter-grid input:focus,
.foundation-users-filter-grid select:focus,
.foundation-users-field input:focus,
.foundation-users-field select:focus,
.foundation-users-field textarea:focus,
.foundation-user-profile-search input:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-soft) 70%, transparent);
}

/* Liste */
.foundation-users-list {
  display: grid;
  gap: 14px;
}

.foundation-users-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(220px, 0.55fr) minmax(250px, 0.58fr) 172px;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: 26px;
}

.foundation-users-row[hidden] {
  display: none !important;
}

.foundation-users-row__main {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.foundation-users-row__main:hover {
  text-decoration: none;
}

.foundation-users-row__identity {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.foundation-users-row__identity strong {
  color: var(--text-main);
  font-size: 1.15rem;
  line-height: 1.18;
}

.foundation-users-row__identity small {
  color: var(--text-soft);
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.foundation-users-row__badges,
.foundation-users-row__profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.foundation-users-row__details {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.foundation-users-row__details span {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--text-soft);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.foundation-users-row__details i {
  color: var(--primary);
  text-align: center;
}

.foundation-users-row__actions {
  width: 172px;
  min-width: 172px;
  justify-self: end;
  display: grid;
  gap: 9px;
}

.foundation-users-action {
  width: 100%;
  min-height: 42px;
  display: grid !important;
  grid-template-columns: 20px minmax(0, auto);
  justify-content: center;
  align-items: center;
  column-gap: 9px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--primary-strong) !important;
  background: color-mix(in srgb, var(--bg-card) 88%, var(--primary-soft) 12%);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  text-decoration: none !important;
  font-weight: 900;
}

.foundation-users-action i {
  width: 20px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.foundation-users-action.is-danger {
  color: #b42318 !important;
  background: rgba(254, 243, 242, 0.92);
  border-color: rgba(180, 35, 24, 0.22);
}

/* Show */
.foundation-users-show-layout,
.foundation-users-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.foundation-users-info-grid,
.foundation-users-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.foundation-users-form-grid--single {
  grid-template-columns: 1fr;
}

.foundation-users-field--full {
  grid-column: 1 / -1;
}

.foundation-users-info,
.foundation-users-status-list > div,
.foundation-users-note-box {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--bg-card-2);
  border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
}

.foundation-users-info span,
.foundation-users-status-list span,
.foundation-users-note-box span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foundation-users-info strong,
.foundation-users-status-list strong,
.foundation-users-note-box strong {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.foundation-users-note-box small {
  color: var(--text-muted);
  font-weight: 700;
}

.foundation-users-status-list {
  display: grid;
  gap: 10px;
}

.foundation-users-status-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.foundation-users-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.foundation-users-profile-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--bg-card-2);
  border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
}

.foundation-users-profile-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary-soft) 62%, var(--bg-card));
  color: var(--primary-strong);
}

.foundation-users-profile-card strong {
  display: block;
  color: var(--text-main);
  font-weight: 950;
}

.foundation-users-profile-card small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-weight: 800;
}

.foundation-users-empty-inline {
  padding: 18px;
  border-radius: 20px;
  background: var(--bg-card-2);
  border: 1px dashed color-mix(in srgb, var(--primary) 18%, var(--border));
}

.foundation-users-empty-inline h3 {
  margin: 0 0 6px;
  color: var(--text-main);
}

.foundation-users-empty-inline p {
  margin: 0;
  color: var(--text-soft);
}

/* Form */
.foundation-users-editor-form {
  display: grid;
  gap: 18px;
  padding-bottom: 150px;
}

.foundation-users-switch {
  min-height: 58px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: var(--bg-card-2);
  border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
  cursor: pointer;
}

.foundation-users-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.foundation-users-switch span {
  position: relative;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 24%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--text-muted) 18%, var(--border));
  transition: background 0.18s ease, border-color 0.18s ease;
}

.foundation-users-switch span::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
  transition: transform 0.18s ease;
}

.foundation-users-switch input:checked + span {
  background: var(--success);
  border-color: var(--success);
}

.foundation-users-switch input:checked + span::before {
  transform: translateX(26px);
}

.foundation-users-switch strong {
  color: var(--text-main);
  font-weight: 900;
}

/* Sélecteur profils */
.foundation-user-profiles-selector {
  display: grid;
  gap: 18px;
}

.foundation-user-profiles-selector__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.foundation-user-profiles-selector__header h2 {
  margin: 0 0 6px;
  color: var(--text-main);
  font-size: clamp(1.28rem, 1.8vw, 1.75rem);
}

.foundation-user-profiles-selector__header p {
  max-width: 860px;
  margin: 0;
  color: var(--text-soft);
}

.foundation-user-profiles-selector__count {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-soft) 62%, var(--bg-card));
  color: var(--primary-strong);
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border));
  font-weight: 900;
  white-space: nowrap;
}

.foundation-user-profiles-selector__grid {
  max-height: 420px;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  display: grid;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary) 40%, var(--border)) transparent;
}

.foundation-user-profile-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: var(--bg-card-2);
  border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.foundation-user-profile-card[hidden] {
  display: none !important;
}

.foundation-user-profile-card:hover {
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
  box-shadow: var(--shadow-sm);
}

.foundation-user-profile-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.foundation-user-profile-card__check {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  color: transparent;
}

.foundation-user-profile-card input:checked + .foundation-user-profile-card__check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.foundation-user-profile-card:has(input:checked) {
  background: color-mix(in srgb, var(--primary-soft) 48%, var(--bg-card));
  border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
}

.foundation-user-profile-card__content {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.foundation-user-profile-card__content strong {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 950;
}

.foundation-user-profile-card__content small {
  color: var(--text-soft);
  line-height: 1.35;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.foundation-user-profile-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.foundation-user-profile-card__avatar {
  justify-self: end;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
  color: var(--primary-strong);
  font-weight: 950;
}

.foundation-user-profile-chips-panel {
  padding: 16px;
  border-radius: 18px;
  background: var(--bg-card-2);
  border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
}

.foundation-user-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.foundation-user-profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.16);
  color: #6d28d9;
  font-size: 13px;
  font-weight: 800;
}

.foundation-user-profile-chip--empty {
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.14);
  color: #475569;
}

/* Submitbar */
.foundation-users-editor-submitbar {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: var(--foundation-users-submitbar-bottom, 18px);
  z-index: 120;
  width: fit-content;
  max-width: calc(100vw - 36px);
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--bg-card) 94%, transparent),
      color-mix(in srgb, var(--bg-card-2) 88%, transparent)
    );
  box-shadow: 0 18px 46px color-mix(in srgb, var(--shadow-theme) 92%, transparent);
  backdrop-filter: blur(18px);
}

.foundation-users-editor-submitbar .btn {
  min-width: 132px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  text-shadow: none !important;
}

.foundation-users-hero__actions .btn,
.foundation-users-editor-submitbar .btn,
.foundation-users-filter-card .btn {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  text-shadow: none !important;
}

.foundation-users-hero__actions .btn-secondary,
.foundation-users-editor-submitbar .btn-secondary,
.foundation-users-filter-card .btn-secondary {
  color: var(--primary-strong) !important;
  background: color-mix(in srgb, var(--bg-card) 86%, var(--primary-soft) 14%) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border)) !important;
}

.foundation-users-hero__actions .btn-ghost,
.foundation-users-editor-submitbar .btn-ghost,
.foundation-users-filter-card .btn-ghost {
  color: var(--primary-strong) !important;
  background: color-mix(in srgb, var(--bg-card) 92%, var(--primary-soft) 8%) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border)) !important;
}

.foundation-users-hero__actions .btn i,
.foundation-users-editor-submitbar .btn i,
.foundation-users-filter-card .btn i {
  color: currentColor !important;
}

/* Mode sombre */
html[data-theme="dark"] .foundation-users-hero,
html[data-theme="dark"] .foundation-users-card,
html[data-theme="dark"] .foundation-users-filter-card,
html[data-theme="dark"] .foundation-users-empty-card,
html[data-theme="dark"] .foundation-users-row,
html[data-theme="dark"] .foundation-users-kpi-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 34%),
    var(--bg-card);
}

html[data-theme="dark"] .foundation-users-badge,
html[data-theme="dark"] .foundation-users-action,
html[data-theme="dark"] .foundation-user-profiles-selector__count {
  background: color-mix(in srgb, var(--bg-card-2) 78%, var(--primary-soft) 22%);
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .foundation-users-hero__actions .btn-secondary,
html[data-theme="dark"] .foundation-users-editor-submitbar .btn-secondary,
html[data-theme="dark"] .foundation-users-filter-card .btn-secondary {
  color: #ffffff !important;
  background: color-mix(in srgb, var(--primary) 68%, var(--bg-card-2) 32%) !important;
  border-color: color-mix(in srgb, var(--primary) 55%, rgba(255, 255, 255, 0.18)) !important;
}

html[data-theme="dark"] .foundation-users-hero__actions .btn-ghost,
html[data-theme="dark"] .foundation-users-editor-submitbar .btn-ghost,
html[data-theme="dark"] .foundation-users-filter-card .btn-ghost {
  color: #ffffff !important;
  background: color-mix(in srgb, var(--bg-card-2) 72%, rgba(255, 255, 255, 0.12) 28%) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

html[data-theme="dark"] .foundation-users-editor-submitbar {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--bg-card-2) 88%, transparent),
      color-mix(in srgb, var(--bg-card) 76%, transparent)
    );
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .foundation-user-profile-card {
  background: color-mix(in srgb, var(--bg-card-2) 86%, rgba(255, 255, 255, 0.06) 14%);
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .foundation-user-profile-card:has(input:checked) {
  background: color-mix(in srgb, var(--primary-soft) 32%, var(--bg-card-2));
}

html[data-theme="dark"] .foundation-user-profile-chip {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.22);
  color: #d8b4fe;
}

html[data-theme="dark"] .foundation-user-profile-chip--empty {
  background: rgba(100, 116, 139, 0.18);
  border-color: rgba(100, 116, 139, 0.22);
  color: #cbd5e1;
}

/* Responsive */
@media (max-width: 1280px) {
  .foundation-users-row {
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 0.55fr) 172px;
  }

  .foundation-users-row__details {
    grid-column: 1 / 3;
  }

  .foundation-users-row__actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .foundation-users-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .foundation-users-hero,
  .foundation-users-hero--show,
  .foundation-users-show-layout,
  .foundation-users-editor-layout {
    grid-template-columns: 1fr;
  }

  .foundation-users-hero__actions {
    justify-content: flex-start;
  }

  .foundation-users-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foundation-users-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .foundation-users-row__details,
  .foundation-users-row__actions {
    grid-column: auto;
    grid-row: auto;
  }

  .foundation-users-row__actions {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }
}

@media (max-width: 760px) {
  .foundation-users-card,
  .foundation-users-filter-card,
  .foundation-users-empty-card,
  .foundation-users-row,
  .foundation-users-hero {
    border-radius: 22px;
    padding: 16px;
  }

  .foundation-users-filter-grid,
  .foundation-users-info-grid,
  .foundation-users-form-grid {
    grid-template-columns: 1fr;
  }

  .foundation-users-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foundation-users-row__main {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .foundation-users-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .foundation-users-avatar--large {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    font-size: 1.55rem;
  }

  .foundation-users-editor-form {
    padding-bottom: 190px;
  }

  .foundation-users-editor-submitbar {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    display: grid;
    grid-template-columns: 1fr;
  }

  .foundation-users-editor-submitbar .btn {
    width: 100%;
  }

  .foundation-user-profile-card {
    grid-template-columns: 28px minmax(0, 1fr) 46px;
  }

  .foundation-user-profile-card__avatar {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 520px) {
  .foundation-users-kpi-grid {
    grid-template-columns: 1fr;
  }

  .foundation-users-row__actions {
    grid-template-columns: 1fr;
  }

  .foundation-user-profile-card {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .foundation-user-profile-card__avatar {
    grid-column: 2;
    justify-self: start;
  }
}

/* ===========================
   SETTINGS PREMIUM PAGE
=========================== */
.foundation-settings-premium {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.foundation-settings-premium *,
.foundation-settings-premium *::before,
.foundation-settings-premium *::after {
  min-width: 0;
}

.foundation-settings-hero,
.foundation-settings-panel,
.foundation-settings-status-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 96% 0%, var(--ambient-1), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.74));
  border: 1px solid rgba(191, 210, 222, 0.92);
  border-radius: 28px;
  box-shadow: 0 20px 55px rgba(31, 54, 87, 0.08);
}

.foundation-settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: clamp(26px, 4vw, 46px);
}

.foundation-settings-hero::after,
.foundation-settings-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -100px;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  background: rgba(79, 91, 255, 0.045);
  pointer-events: none;
}

.foundation-settings-hero__content,
.foundation-settings-hero__nav,
.foundation-settings-panel > *,
.foundation-settings-disclosure {
  position: relative;
  z-index: 1;
}

.foundation-settings-eyebrows,
.foundation-settings-hero__nav,
.foundation-settings-section-heading--split,
.foundation-settings-actions,
.foundation-settings-swatches,
.foundation-settings-display-summary,
.foundation-settings-disclosure__summary,
.foundation-settings-payment-grid,
.foundation-settings-inline-info {
  display: flex;
  align-items: center;
}

.foundation-settings-eyebrows,
.foundation-settings-hero__nav,
.foundation-settings-actions,
.foundation-settings-swatches {
  flex-wrap: wrap;
  gap: 10px;
}

.foundation-settings-pill,
.foundation-settings-soft-badge,
.foundation-settings-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  width: fit-content;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(79, 91, 255, 0.18);
  background: rgba(79, 91, 255, 0.08);
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.foundation-settings-pill--muted,
.foundation-settings-soft-badge {
  color: var(--text-soft);
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.16);
}

.foundation-settings-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(3rem, 6vw, 5.6rem);
  letter-spacing: -0.07em;
  color: var(--primary-strong);
}

.foundation-settings-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.4vw, 1.22rem);
}

.foundation-settings-hero__nav {
  justify-content: flex-end;
  max-width: 520px;
}

.foundation-settings-hero__nav a,
.foundation-settings-btn,
.foundation-settings-disclosure__action,
.foundation-settings-display-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(79, 91, 255, 0.22);
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary-strong);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(31, 54, 87, 0.06);
}

.foundation-settings-hero__nav a:hover,
.foundation-settings-btn:hover,
.foundation-settings-display-mode:hover {
  transform: translateY(-1px);
  background: #fff;
  color: var(--primary-strong);
  border-color: rgba(79, 91, 255, 0.36);
  text-decoration: none;
}

.foundation-settings-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid transparent;
  font-weight: 700;
}

.foundation-settings-message--success {
  background: rgba(34, 197, 94, 0.11);
  border-color: rgba(34, 197, 94, 0.22);
  color: #166534;
}

.foundation-settings-message--danger {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.20);
  color: #991b1b;
}

.foundation-settings-message--info {
  background: rgba(79, 91, 255, 0.08);
  border-color: rgba(79, 91, 255, 0.18);
  color: var(--primary-strong);
}

.foundation-settings-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.foundation-settings-status-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 136px;
  padding: 20px;
}

.foundation-settings-status-card__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(79, 91, 255, 0.10);
  color: var(--primary-strong);
  font-size: 1.2rem;
}

.foundation-settings-status-card span:not(.foundation-settings-status-card__icon) {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foundation-settings-status-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text-main);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.15;
}

.foundation-settings-status-card small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-weight: 700;
}

.foundation-settings-status-card--success .foundation-settings-status-card__icon,
.foundation-settings-status-pill--success {
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.22);
  color: #166534;
}

.foundation-settings-status-card--warning .foundation-settings-status-card__icon,
.foundation-settings-status-pill--warning {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.24);
  color: #92400e;
}

.foundation-settings-status-card--neutral .foundation-settings-status-card__icon,
.foundation-settings-status-pill--neutral {
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.22);
  color: #334155;
}

.foundation-settings-panel {
  padding: clamp(22px, 3vw, 34px);
}

.foundation-settings-section-heading {
  margin-bottom: 24px;
}

.foundation-settings-section-heading--split {
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.foundation-settings-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(79, 91, 255, 0.08);
  color: var(--primary-strong);
  border: 1px solid rgba(79, 91, 255, 0.18);
  font-weight: 900;
  font-size: 0.82rem;
}

.foundation-settings-section-heading h2 {
  margin: 14px 0 8px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.04em;
}

.foundation-settings-section-heading p {
  max-width: 820px;
  margin: 0;
  font-size: 1.05rem;
}

.foundation-settings-disclosure {
  border: 0;
}

.foundation-settings-disclosure__summary {
  gap: 18px;
  list-style: none;
  cursor: pointer;
  padding: 4px;
}

.foundation-settings-disclosure__summary::-webkit-details-marker {
  display: none;
}

.foundation-settings-appearance-preview,
.foundation-settings-palette__preview {
  position: relative;
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--preview-from), var(--preview-to));
  box-shadow: 0 18px 34px rgba(31, 54, 87, 0.14);
}

.foundation-settings-appearance-preview span,
.foundation-settings-palette__preview span {
  position: absolute;
  right: -16px;
  top: -16px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: var(--preview-orb);
}

.foundation-settings-disclosure__body {
  display: grid;
  gap: 5px;
  min-width: 220px;
}

.foundation-settings-disclosure__body strong {
  color: var(--text-main);
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  font-weight: 900;
  line-height: 1.1;
}

.foundation-settings-disclosure__body small {
  color: var(--text-muted);
  font-weight: 700;
}

.foundation-settings-swatches {
  margin-left: auto;
}

.foundation-settings-swatches span,
.foundation-settings-palette__swatches span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 18px rgba(31, 54, 87, 0.12);
}

.foundation-settings-display-summary {
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(191, 210, 222, 0.8);
  color: var(--text-soft);
  font-weight: 800;
}

.foundation-settings-display-summary strong {
  color: var(--primary-strong);
}

.foundation-settings-disclosure__action {
  flex: 0 0 auto;
}

.foundation-settings-disclosure[open] .foundation-settings-disclosure__action i {
  transform: rotate(180deg);
}

.foundation-settings-disclosure__content {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(191, 210, 222, 0.7);
}

.foundation-settings-appearance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 22px;
  align-items: start;
}

.foundation-settings-palette-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.foundation-settings-palette {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
  min-height: 158px;
  padding: 16px;
  text-align: left;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(191, 210, 222, 0.9);
  box-shadow: none;
  color: var(--text-main);
}

.foundation-settings-palette.is-selected {
  border-color: rgba(79, 91, 255, 0.46);
  background: rgba(79, 91, 255, 0.055);
  box-shadow: 0 18px 36px rgba(79, 91, 255, 0.10);
}

.foundation-settings-palette__preview {
  width: 70px;
  height: 70px;
  border-radius: 20px;
}

.foundation-settings-palette__body {
  display: grid;
  gap: 4px;
}

.foundation-settings-palette__body strong {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 900;
}

.foundation-settings-palette__body small {
  color: var(--primary-strong);
  font-weight: 850;
}

.foundation-settings-palette__body em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 0.88rem;
  line-height: 1.35;
}

.foundation-settings-palette__swatches {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
}

.foundation-settings-palette__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.foundation-settings-palette.is-selected .foundation-settings-palette__check {
  opacity: 1;
  transform: scale(1);
}

.foundation-settings-display-card,
.foundation-settings-payment-main,
.foundation-settings-payment-action,
.foundation-settings-help-grid article,
.foundation-settings-link-grid article,
.foundation-settings-field,
.foundation-settings-note {
  border: 1px solid rgba(191, 210, 222, 0.78);
  background: rgba(255, 255, 255, 0.70);
  border-radius: 22px;
}

.foundation-settings-display-card {
  padding: 22px;
  position: sticky;
  top: 24px;
}

.foundation-settings-display-card h3 {
  margin-top: 14px;
  font-size: 1.45rem;
}

.foundation-settings-display-modes {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.foundation-settings-display-mode {
  width: 100%;
  justify-content: flex-start;
  box-shadow: none;
}

.foundation-settings-display-mode.is-selected {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: transparent;
}

.foundation-settings-appearance-status {
  min-height: 24px;
  margin: 14px 0 0;
  font-weight: 800;
}

.foundation-settings-appearance-status.is-success {
  color: var(--success);
}

.foundation-settings-appearance-status.is-error {
  color: var(--danger);
}

.foundation-settings-form {
  display: grid;
  gap: 18px;
}

.foundation-settings-form-grid {
  display: grid;
  gap: 16px;
}

.foundation-settings-form-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-settings-field {
  padding: 18px;
}

.foundation-settings-field--wide {
  grid-column: 1 / -1;
}

.foundation-settings-field label {
  margin: 0 0 9px;
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.foundation-settings-field input,
.foundation-settings-field select {
  min-height: 54px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.82);
}

.foundation-settings-field p {
  margin: 9px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.foundation-settings-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  color: var(--text-soft);
  font-weight: 700;
}

.foundation-settings-note i {
  margin-top: 4px;
  color: var(--primary-strong);
}

.foundation-settings-actions {
  justify-content: flex-end;
}

.foundation-settings-btn {
  min-width: 0;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  cursor: pointer;
}

.foundation-settings-btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 16px 30px rgba(79, 91, 255, 0.18);
}

.foundation-settings-payment-grid {
  align-items: stretch;
  gap: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
}

.foundation-settings-payment-main {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
}

.foundation-settings-payment-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 1.55rem;
}

.foundation-settings-payment-main h3 {
  font-size: 1.5rem;
}

.foundation-settings-inline-info {
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.foundation-settings-payment-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 22px;
}

.foundation-settings-payment-action small,
.foundation-settings-link-grid small {
  color: var(--text-muted);
  font-weight: 700;
}

.foundation-settings-help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.foundation-settings-help-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.foundation-settings-help-grid i {
  color: var(--primary-strong);
  font-size: 1.25rem;
}

.foundation-settings-help-grid strong,
.foundation-settings-link-grid strong {
  color: var(--text-main);
  font-weight: 900;
}

.foundation-settings-help-grid span {
  color: var(--text-soft);
}

.foundation-settings-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.foundation-settings-link-grid article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.foundation-settings-link-grid article > span:first-child {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.foundation-settings-link-grid a {
  display: block;
  margin-top: 4px;
  color: var(--primary-strong);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.foundation-settings-link-grid small {
  display: block;
  margin-top: 5px;
}

html[data-theme="dark"] .foundation-settings-hero,
html[data-theme="dark"] .foundation-settings-panel,
html[data-theme="dark"] .foundation-settings-status-card {
  background:
    radial-gradient(circle at 96% 0%, rgba(255, 255, 255, 0.06), transparent 30%),
    linear-gradient(135deg, rgba(16, 35, 48, 0.98), rgba(19, 41, 56, 0.88));
  border-color: rgba(53, 88, 109, 0.88);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .foundation-settings-hero h1,
html[data-theme="dark"] .foundation-settings-section-heading h2,
html[data-theme="dark"] .foundation-settings-disclosure__body strong,
html[data-theme="dark"] .foundation-settings-status-card strong,
html[data-theme="dark"] .foundation-settings-palette__body strong,
html[data-theme="dark"] .foundation-settings-help-grid strong,
html[data-theme="dark"] .foundation-settings-link-grid strong,
html[data-theme="dark"] .foundation-settings-payment-main h3,
html[data-theme="dark"] .foundation-settings-display-card h3 {
  color: var(--text-main);
}

html[data-theme="dark"] .foundation-settings-hero p,
html[data-theme="dark"] .foundation-settings-section-heading p,
html[data-theme="dark"] .foundation-settings-palette__body em,
html[data-theme="dark"] .foundation-settings-help-grid span,
html[data-theme="dark"] .foundation-settings-field p,
html[data-theme="dark"] .foundation-settings-payment-action small,
html[data-theme="dark"] .foundation-settings-link-grid small {
  color: var(--text-soft);
}

html[data-theme="dark"] .foundation-settings-hero__nav a,
html[data-theme="dark"] .foundation-settings-disclosure__action,
html[data-theme="dark"] .foundation-settings-display-summary,
html[data-theme="dark"] .foundation-settings-palette,
html[data-theme="dark"] .foundation-settings-display-card,
html[data-theme="dark"] .foundation-settings-payment-main,
html[data-theme="dark"] .foundation-settings-payment-action,
html[data-theme="dark"] .foundation-settings-help-grid article,
html[data-theme="dark"] .foundation-settings-link-grid article,
html[data-theme="dark"] .foundation-settings-field,
html[data-theme="dark"] .foundation-settings-note {
  background: rgba(16, 35, 48, 0.72);
  border-color: rgba(53, 88, 109, 0.82);
}

html[data-theme="dark"] .foundation-settings-field input,
html[data-theme="dark"] .foundation-settings-field select {
  background: rgba(8, 19, 28, 0.62);
  border-color: rgba(53, 88, 109, 0.82);
  color: var(--text-main);
}

html[data-theme="dark"] .foundation-settings-btn--primary {
  color: #fff;
}

html[data-theme="dark"] .foundation-settings-status-card--neutral .foundation-settings-status-card__icon,
html[data-theme="dark"] .foundation-settings-status-pill--neutral {
  color: var(--text-soft);
}

@media (max-width: 1180px) {
  .foundation-settings-hero,
  .foundation-settings-appearance-layout,
  .foundation-settings-payment-grid {
    grid-template-columns: 1fr;
  }

  .foundation-settings-hero__nav {
    justify-content: flex-start;
    max-width: none;
  }

  .foundation-settings-status-grid,
  .foundation-settings-help-grid,
  .foundation-settings-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foundation-settings-display-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .foundation-settings-hero,
  .foundation-settings-panel {
    border-radius: 22px;
    padding: 22px;
  }

  .foundation-settings-hero h1 {
    font-size: clamp(2.7rem, 14vw, 4rem);
  }

  .foundation-settings-status-grid,
  .foundation-settings-help-grid,
  .foundation-settings-link-grid,
  .foundation-settings-form-grid--two,
  .foundation-settings-palette-grid {
    grid-template-columns: 1fr;
  }

  .foundation-settings-disclosure__summary {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
  }

  .foundation-settings-swatches,
  .foundation-settings-display-summary,
  .foundation-settings-disclosure__action {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .foundation-settings-payment-main {
    grid-template-columns: 1fr;
  }

  .foundation-settings-actions {
    justify-content: stretch;
  }

  .foundation-settings-actions .foundation-settings-btn,
  .foundation-settings-payment-action .foundation-settings-btn,
  .foundation-settings-hero__nav a {
    width: 100%;
  }
}
/* ======================================================
   🆘 AIDE FOUNDATION — NOUVEAUTÉS ET SUPPORT PREMIUM
   ====================================================== */

.foundation-help-page {
  gap: 18px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

.foundation-help-hero,
.foundation-help-card,
.foundation-help-filter-card,
.foundation-help-empty-card,
.foundation-help-kpi-card,
.foundation-changelog-card {
  border: 1px solid color-mix(in srgb, var(--primary) 10%, var(--border));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--primary-soft) 54%, transparent), transparent 38%),
    var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.foundation-help-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: clamp(22px, 3vw, 42px);
  border-radius: 32px;
  overflow: hidden;
}

.foundation-help-hero__body {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.foundation-help-hero h1 {
  margin: 0;
  color: var(--primary-strong);
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.foundation-help-hero p {
  max-width: 900px;
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.35vw, 1.28rem);
  line-height: 1.55;
  font-weight: 650;
}

.foundation-help-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.foundation-help-badge {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  background: color-mix(in srgb, var(--bg-card) 84%, var(--primary-soft) 16%);
  color: var(--primary-strong);
  font-size: 0.92rem;
  font-weight: 900;
  white-space: nowrap;
}

.foundation-help-badge--secondary {
  color: var(--text-main);
  background: color-mix(in srgb, var(--bg-card-2) 84%, var(--primary-soft) 16%);
}

.foundation-help-badge--warning {
  color: #92400e;
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.22);
}

.foundation-help-badge i {
  color: currentColor;
}

.foundation-help-hero__actions,
.foundation-support-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.foundation-help-hero__actions .btn,
.foundation-support-form-actions .btn,
.foundation-help-filter-card .btn {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  text-shadow: none !important;
}

.foundation-help-hero__actions .btn-secondary,
.foundation-support-form-actions .btn-secondary,
.foundation-help-filter-card .btn-secondary {
  color: var(--primary-strong) !important;
  background: color-mix(in srgb, var(--bg-card) 86%, var(--primary-soft) 14%) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border)) !important;
}

.foundation-help-hero__actions .btn-ghost,
.foundation-support-form-actions .btn-ghost,
.foundation-help-filter-card .btn-ghost {
  color: var(--primary-strong) !important;
  background: color-mix(in srgb, var(--bg-card) 92%, var(--primary-soft) 8%) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border)) !important;
}

.foundation-help-hero__actions .btn i,
.foundation-support-form-actions .btn i,
.foundation-help-filter-card .btn i {
  color: currentColor !important;
}

/* KPI */
.foundation-help-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
}

.foundation-help-kpi-card {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 22px;
}

.foundation-help-kpi-card span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foundation-help-kpi-card strong {
  color: var(--primary-strong);
  font-size: 2rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.foundation-help-kpi-card small {
  color: var(--text-soft);
  font-weight: 750;
}

.foundation-help-kpi-card.is-positive strong {
  color: #237a3b;
}

.foundation-help-kpi-card.is-warning strong {
  color: #b45309;
}

.foundation-help-kpi-card.is-info strong {
  color: #1d4ed8;
}

/* Cards / fields */
.foundation-help-card,
.foundation-help-filter-card,
.foundation-help-empty-card {
  border-radius: 28px;
  padding: clamp(18px, 2vw, 26px);
}

.foundation-help-card__title {
  margin-bottom: 16px;
}

.foundation-help-card__title h2 {
  margin: 0 0 6px;
  color: var(--text-main);
  font-size: clamp(1.28rem, 1.8vw, 1.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.foundation-help-card__title p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.foundation-help-field,
.foundation-help-filter-grid label {
  min-width: 0;
  display: grid;
  gap: 9px;
  align-content: start;
}

.foundation-help-field > span,
.foundation-help-filter-grid label > span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foundation-help-field em {
  color: #b42318;
  font-style: normal;
}

.foundation-help-field input,
.foundation-help-field select,
.foundation-help-field textarea,
.foundation-help-filter-grid input,
.foundation-help-filter-grid select {
  width: 100%;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, var(--border));
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-main);
  font: inherit;
  font-weight: 650;
  box-shadow: none;
}

.foundation-help-field input,
.foundation-help-field select,
.foundation-help-filter-grid input,
.foundation-help-filter-grid select {
  min-height: 48px;
  padding: 0 14px;
}

.foundation-help-field textarea {
  min-height: 132px;
  padding: 14px;
  resize: vertical;
}

.foundation-help-field input:focus,
.foundation-help-field select:focus,
.foundation-help-field textarea:focus,
.foundation-help-filter-grid input:focus,
.foundation-help-filter-grid select:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-soft) 70%, transparent);
}

/* Filtres Nouveautés */
.foundation-help-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 0.32fr) auto;
  gap: 16px;
  align-items: end;
}

/* Empty */
.foundation-help-empty-card,
.foundation-help-empty-inline {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.foundation-help-empty-card__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: color-mix(in srgb, var(--primary-soft) 66%, var(--bg-card));
  color: var(--primary-strong);
  font-size: 1.35rem;
}

.foundation-help-empty-card h2,
.foundation-help-empty-inline h3 {
  margin: 0 0 6px;
  color: var(--text-main);
}

.foundation-help-empty-card p,
.foundation-help-empty-inline p {
  margin: 0;
  color: var(--text-soft);
}

.foundation-help-empty-inline {
  grid-template-columns: 1fr;
  padding: 18px;
  border-radius: 20px;
  background: var(--bg-card-2);
  border: 1px dashed color-mix(in srgb, var(--primary) 18%, var(--border));
}

/* Nouveautés */
.foundation-changelog-timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

.foundation-changelog-card {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 0;
  border-radius: 28px;
  overflow: hidden;
}

.foundation-changelog-card[hidden] {
  display: none !important;
}

.foundation-changelog-card.is-unseen {
  border-color: rgba(245, 158, 11, 0.32);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.12);
}

.foundation-changelog-card__rail {
  display: flex;
  justify-content: center;
  padding-top: 22px;
  background: color-mix(in srgb, var(--primary-soft) 48%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--primary) 10%, var(--border));
}

.foundation-changelog-card__rail span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--bg-card);
  color: var(--primary-strong);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  box-shadow: var(--shadow-sm);
}

.foundation-changelog-card--bug .foundation-changelog-card__rail span,
.foundation-changelog-card--fix .foundation-changelog-card__rail span {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
}

.foundation-changelog-card--technical_debt .foundation-changelog-card__rail span {
  color: #92400e;
  background: rgba(251, 191, 36, 0.16);
}

.foundation-changelog-card--module .foundation-changelog-card__rail span {
  color: #1d4ed8;
  background: rgba(96, 165, 250, 0.16);
}

.foundation-changelog-card__body {
  min-width: 0;
  padding: 20px;
}

.foundation-changelog-card__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.foundation-changelog-card__header h2 {
  margin: 9px 0 0;
  color: var(--text-main);
  font-size: clamp(1.18rem, 1.8vw, 1.55rem);
  line-height: 1.15;
}

.foundation-changelog-type {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary-soft) 62%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border));
  font-size: 0.8rem;
  font-weight: 900;
}

.foundation-changelog-type--new {
  color: #92400e;
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.22);
}

.foundation-changelog-card__meta {
  min-width: fit-content;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.foundation-changelog-card__meta span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--bg-card-2);
  border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
  font-size: 0.86rem;
  font-weight: 800;
}

.foundation-changelog-card__meta i {
  color: var(--primary);
}

.foundation-changelog-card__content {
  color: var(--text-soft);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

/* Support */
.foundation-support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.foundation-support-ticket-form,
.foundation-support-ticket-reply-form {
  display: grid;
  gap: 14px;
}

.foundation-support-priority-help {
  padding: 13px 14px;
  border-radius: 16px;
  color: var(--text-soft);
  background: var(--bg-card-2);
  border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
  font-weight: 700;
}

.foundation-support-active-notice {
  margin-bottom: 0;
}

.foundation-support-side-card {
  display: grid;
  gap: 14px;
}

.foundation-support-tips {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foundation-support-tips li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  background: var(--bg-card-2);
  border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
  color: var(--text-soft);
  font-weight: 750;
}

.foundation-support-tips i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 62%, var(--bg-card));
}

.foundation-support-user-box {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--primary-soft) 42%, var(--bg-card-2));
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--border));
}

.foundation-support-user-box span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foundation-support-user-box strong {
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.foundation-support-tickets-section {
  display: grid;
  gap: 16px;
}

.foundation-support-ticket-list {
  display: grid;
  gap: 14px;
}

.foundation-support-ticket-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  background: var(--bg-card-2);
  border: 1px solid color-mix(in srgb, var(--primary) 10%, var(--border));
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--primary);
}

.foundation-support-ticket-card--waiting_client {
  border-left-color: var(--warning);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.1);
}

.foundation-support-ticket-card--resolved {
  border-left-color: var(--success);
}

.foundation-support-ticket-card--closed,
.foundation-support-ticket-card--archived {
  border-left-color: var(--text-muted);
  opacity: 0.88;
}

.foundation-support-ticket-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.foundation-support-ticket-card__id {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.foundation-support-ticket-card__id i {
  color: var(--primary);
}

.foundation-support-ticket-card__id span {
  font-weight: 750;
}

.foundation-support-ticket-card h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 1.18rem;
  line-height: 1.18;
}

.foundation-support-ticket-card__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.foundation-support-ticket-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 900;
}

.foundation-support-ticket-badge--open,
.foundation-support-ticket-badge--in_progress,
.foundation-support-ticket-badge--linked_devboard,
.foundation-support-ticket-badge--priority-high {
  background: var(--info-soft);
  color: var(--info);
  border-color: rgba(36, 100, 181, 0.18);
}

.foundation-support-ticket-badge--waiting_client,
.foundation-support-ticket-badge--priority-critical {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(182, 125, 40, 0.18);
}

.foundation-support-ticket-badge--resolved {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(35, 131, 93, 0.16);
}

.foundation-support-ticket-badge--closed,
.foundation-support-ticket-badge--archived,
.foundation-support-ticket-badge--priority-low,
.foundation-support-ticket-badge--priority-normal {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
  border-color: rgba(100, 116, 139, 0.14);
}

.foundation-support-ticket-thread {
  display: grid;
  gap: 12px;
}

.foundation-support-ticket-message {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
  background: var(--bg-card);
}

.foundation-support-ticket-message--initial {
  background: color-mix(in srgb, var(--primary-soft) 44%, var(--bg-card));
  border-color: color-mix(in srgb, var(--primary) 15%, var(--border));
}

.foundation-support-ticket-message--support {
  background: var(--info-soft);
  border-color: rgba(36, 100, 181, 0.14);
}

.foundation-support-ticket-message--client {
  background: var(--success-soft);
  border-color: rgba(35, 131, 93, 0.14);
}

.foundation-support-ticket-message__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.foundation-support-ticket-message__meta strong {
  color: var(--text-main);
}

.foundation-support-ticket-message p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.foundation-support-ticket-note {
  margin-bottom: 0;
}

/* Dark */
html[data-theme="dark"] .foundation-help-hero,
html[data-theme="dark"] .foundation-help-card,
html[data-theme="dark"] .foundation-help-filter-card,
html[data-theme="dark"] .foundation-help-empty-card,
html[data-theme="dark"] .foundation-help-kpi-card,
html[data-theme="dark"] .foundation-changelog-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 34%),
    var(--bg-card);
}

html[data-theme="dark"] .foundation-help-badge,
html[data-theme="dark"] .foundation-changelog-type,
html[data-theme="dark"] .foundation-support-ticket-badge {
  background: color-mix(in srgb, var(--bg-card-2) 78%, var(--primary-soft) 22%);
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .foundation-help-hero__actions .btn-secondary,
html[data-theme="dark"] .foundation-support-form-actions .btn-secondary,
html[data-theme="dark"] .foundation-help-filter-card .btn-secondary {
  color: #ffffff !important;
  background: color-mix(in srgb, var(--primary) 68%, var(--bg-card-2) 32%) !important;
  border-color: color-mix(in srgb, var(--primary) 55%, rgba(255, 255, 255, 0.18)) !important;
}

html[data-theme="dark"] .foundation-help-hero__actions .btn-ghost,
html[data-theme="dark"] .foundation-support-form-actions .btn-ghost,
html[data-theme="dark"] .foundation-help-filter-card .btn-ghost {
  color: #ffffff !important;
  background: color-mix(in srgb, var(--bg-card-2) 72%, rgba(255, 255, 255, 0.12) 28%) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

html[data-theme="dark"] .foundation-support-ticket-card,
html[data-theme="dark"] .foundation-support-priority-help,
html[data-theme="dark"] .foundation-support-tips li,
html[data-theme="dark"] .foundation-support-ticket-message {
  background: color-mix(in srgb, var(--bg-card-2) 86%, rgba(255, 255, 255, 0.06) 14%);
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .foundation-support-ticket-message--support {
  background: rgba(136, 186, 255, 0.12);
}

html[data-theme="dark"] .foundation-support-ticket-message--client {
  background: rgba(76, 196, 142, 0.12);
}

/* Responsive */
@media (max-width: 1040px) {
  .foundation-help-hero,
  .foundation-support-layout {
    grid-template-columns: 1fr;
  }

  .foundation-help-hero__actions,
  .foundation-support-form-actions {
    justify-content: flex-start;
  }

  .foundation-help-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foundation-changelog-card__header {
    display: grid;
  }

  .foundation-changelog-card__meta {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .foundation-help-hero,
  .foundation-help-card,
  .foundation-help-filter-card,
  .foundation-help-empty-card,
  .foundation-changelog-card,
  .foundation-support-ticket-card {
    border-radius: 22px;
  }

  .foundation-help-hero,
  .foundation-help-card,
  .foundation-help-filter-card,
  .foundation-help-empty-card,
  .foundation-support-ticket-card {
    padding: 16px;
  }

  .foundation-help-filter-grid,
  .foundation-help-kpi-grid {
    grid-template-columns: 1fr;
  }

  .foundation-changelog-card {
    grid-template-columns: 1fr;
  }

  .foundation-changelog-card__rail {
    justify-content: flex-start;
    padding: 16px 16px 0;
    background: transparent;
    border-right: 0;
  }

  .foundation-changelog-card__body {
    padding: 16px;
  }

  .foundation-help-empty-card {
    grid-template-columns: 1fr;
  }

  .foundation-support-ticket-card__badges {
    justify-content: flex-start;
  }

  .foundation-support-form-actions .btn,
  .foundation-help-hero__actions .btn {
    width: 100%;
  }
}
/* ======================================================
   📊 DASHBOARD — LIENS DYNAMIQUES PORTAIL & PAGES
   ====================================================== */

.foundation-command-panel--portal {
  overflow: visible;
}

.foundation-command-grid--portal {
  position: relative;
}

.foundation-command-tile--muted .foundation-command-tile__icon {
  background: color-mix(in srgb, var(--bg-card) 72%, var(--primary-soft) 28%);
}

.foundation-command-more-pages {
  position: relative;
  min-width: 0;
}

.foundation-command-more-pages > summary {
  list-style: none;
  cursor: pointer;
}

.foundation-command-more-pages > summary::-webkit-details-marker {
  display: none;
}

.foundation-command-more-pages[open] > summary {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
  background: var(--bg-card);
  box-shadow: 0 12px 26px rgba(16, 47, 67, 0.08);
}

.foundation-command-more-pages[open] .foundation-command-tile__arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.foundation-command-more-pages__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: min(420px, calc(100vw - 48px));
  max-height: min(520px, calc(100vh - 180px));
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--primary-soft) 58%, transparent), transparent 34%),
    var(--bg-card);
  box-shadow: 0 24px 58px color-mix(in srgb, var(--shadow-theme) 92%, transparent);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary) 42%, var(--border)) transparent;
}

.foundation-command-more-pages__title {
  display: grid;
  gap: 3px;
  padding: 4px 4px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
}

.foundation-command-more-pages__title strong {
  color: var(--text-main);
  font-size: 0.98rem;
  font-weight: 900;
}

.foundation-command-more-pages__title small {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.foundation-command-more-pages__list {
  display: grid;
  gap: 7px;
}

.foundation-command-more-pages__list a {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 14px;
  color: var(--text-main);
  background: var(--bg-card-2);
  border: 1px solid color-mix(in srgb, var(--primary) 8%, var(--border));
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
}

.foundation-command-more-pages__list a:hover {
  color: var(--primary-strong);
  background: var(--bg-card);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
  text-decoration: none;
}

.foundation-command-more-pages__list i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

.foundation-command-more-pages__list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

html[data-theme="dark"] .foundation-command-more-pages[open] > summary {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .foundation-command-more-pages__panel {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 34%),
    var(--bg-card);
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .foundation-command-more-pages__list a {
  background: color-mix(in srgb, var(--bg-card-2) 84%, rgba(255, 255, 255, 0.06) 16%);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .foundation-command-more-pages__list a:hover {
  background: var(--bg-card);
  border-color: rgba(103, 182, 222, 0.34);
}

@media (max-width: 980px) {
  .foundation-command-more-pages__panel {
    left: 0;
    right: auto;
  }
}

@media (max-width: 560px) {
  .foundation-command-more-pages__panel {
    position: fixed;
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 18px;
    width: auto;
    max-height: min(62vh, 520px);
  }
}

/* ======================================================
   📐 EN-TÊTES COMPACTS — STANDARD BACK-OFFICE
   ====================================================== */

.app-compact-header {
  min-height: 126px !important;
  padding: 20px 24px !important;
  border-radius: 24px !important;
  gap: 20px !important;
  align-items: center !important;
  background:
    radial-gradient(circle at top right, var(--ambient-2), transparent 38%),
    linear-gradient(135deg, var(--bg-card), var(--bg-card-2)) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  overflow: hidden;
}

.app-compact-header h1 {
  margin: 6px 0 5px !important;
  color: var(--text-main) !important;
  font-size: clamp(1.75rem, 3vw, 2.35rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.035em !important;
}

.app-compact-header p {
  max-width: 900px !important;
  margin: 0 !important;
  color: var(--text-muted) !important;
  font-size: 0.94rem !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
}

.app-compact-header > :first-child,
.app-compact-header__content {
  min-width: 0;
}

.app-compact-header .hero-actions,
.app-compact-header .foundation-users-hero__actions,
.app-compact-header .foundation-settings-hero__nav,
.app-compact-header .foundation-help-hero__actions,
.app-compact-header .group-index-hero__actions,
.app-compact-header .people-index-hero__actions,
.app-compact-header .portal-pages-index-hero__actions,
.app-compact-header .profiles-hero__actions {
  align-self: center !important;
  justify-content: flex-end !important;
  margin: 0 !important;
}

/* La vue Benefits conserve un HTML historique sans wrapper de contenu. */
.page-hero.app-compact-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto auto !important;
  column-gap: 20px !important;
  row-gap: 4px !important;
}

.page-hero.app-compact-header > .badge-row,
.page-hero.app-compact-header > h1,
.page-hero.app-compact-header > p {
  grid-column: 1 !important;
}

.page-hero.app-compact-header > .hero-actions {
  grid-column: 2 !important;
  grid-row: 1 / 4 !important;
}

html[data-theme="dark"] .app-compact-header {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.07), transparent 36%),
    linear-gradient(135deg, var(--bg-card), var(--bg-card-2)) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}

@media (max-width: 1180px) {
  .app-compact-header,
  .page-hero.app-compact-header {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
  }

  .page-hero.app-compact-header > .hero-actions {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .app-compact-header .hero-actions,
  .app-compact-header .foundation-users-hero__actions,
  .app-compact-header .foundation-settings-hero__nav,
  .app-compact-header .foundation-help-hero__actions,
  .app-compact-header .group-index-hero__actions,
  .app-compact-header .people-index-hero__actions,
  .app-compact-header .portal-pages-index-hero__actions,
  .app-compact-header .profiles-hero__actions {
    justify-content: flex-start !important;
  }
}

@media (max-width: 760px) {
  .app-compact-header {
    padding: 18px !important;
    border-radius: 20px !important;
  }

  .app-compact-header h1 {
    font-size: clamp(1.7rem, 9vw, 2.2rem) !important;
  }

  .app-compact-header .hero-actions .btn,
  .app-compact-header .foundation-users-hero__actions .btn,
  .app-compact-header .foundation-settings-hero__nav a,
  .app-compact-header .foundation-help-hero__actions .btn,
  .app-compact-header .group-index-hero__actions .btn,
  .app-compact-header .people-index-hero__actions .btn,
  .app-compact-header .portal-pages-index-hero__actions .btn,
  .app-compact-header .profiles-hero__actions .btn {
    width: 100%;
  }
}

/* ======================================================
   📱 MOBILE-UX-IOS-1 — STABILITÉ DU VIEWPORT ET DES FORMULAIRES
   Empêche le zoom automatique de Safari au focus d'un champ
   et conserve un comportement tactile proche d'une application.
   ====================================================== */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  touch-action: pan-x pan-y;
}

@media (max-width: 900px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

