@font-face {
  font-family: 'Mulish';
  src: url('fonts/mulish/mulish-latin-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Mulish';
  src: url('fonts/mulish/mulish-latin-600.woff2') format('woff2');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Mulish';
  src: url('fonts/mulish/mulish-latin-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Mulish';
  src: url('fonts/mulish/mulish-latin-800.woff2') format('woff2');
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('fonts/noto-sans-arabic/noto-sans-arabic-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('fonts/noto-sans-arabic/noto-sans-arabic-600.woff2') format('woff2');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('fonts/noto-sans-arabic/noto-sans-arabic-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ══════════════════════════════════════════════════════════════════════
   NSX Kompetenz — Charte 2026
   Navy #094268 (structure/texte) · Orange #F68712 (accent + CTA figé) ·
   Bleu clair #738BC9 · Vert/teal #37A37B · Jaune #FEEB58
   Fond de page : blanc chaud #FBFAF7 (jamais #fff ni gris froid)
   Police : Mulish principale, Noto Sans Arabic pour le RTL, system-ui en secours
   ══════════════════════════════════════════════════════════════════════ */
:root {
  /* Police : charte 2026 (DOC-NSX-VITRW-002-RDS, 20.08.2026) — Mulish principale,
     Noto Sans Arabic pour le RTL, system-ui en secours. */
  --nsx-font-body: 'Mulish', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nsx-font-brand: 'Mulish', var(--nsx-font-body);

  --nsx-page: #FBFAF7;          /* blanc chaud de la charte, jamais #fff ni gris froid */
  --nsx-card: #ffffff;
  /* Fond du QR code 2FA : toujours blanc, jamais redefini en theme sombre. */
  --nsx-qr-bg: #ffffff;
  --nsx-surface: #FDFCFA;
  --nsx-nav: #FFFFFF;           /* bandeau clair, comme le site */
  --nsx-nav-text: #15212B;
  --nsx-text: #15212B;          /* encre charte */
  /* 0.63 : 4.5:1 minimum sur la page, les cartes et toutes les teintes pastel.
     L'ancien 0.58 tombait a 3.95 sur --surface-alt. */
  --nsx-text-muted: rgba(21, 33, 43, 0.63);
  --nsx-text-hint: rgba(21, 33, 43, 0.38);
  --nsx-border: rgba(9, 66, 104, 0.12);
  --nsx-nav-border: rgba(9, 66, 104, 0.10);
  --nsx-brand: #F68712;
  --nsx-brand-hover: #d9740a;
  --nsx-brand-soft: rgba(246, 135, 18, 0.1);
  --nsx-brand-strong: rgba(246, 135, 18, 0.2);
  --nsx-success: #37A37B;
  /* Derive du jaune de marque et non de l'ambre generique. #F4D62E est reserve au
     texte SUR aplat jaune ; en texte sur fond clair il tombe a 1.39 de contraste.
     #8A6B08 tient 4.80 sur #FBFAF7, donc AA. */
  --nsx-warning: #8A6B08;
  --nsx-danger: #cf4d43;
  /* Ex-violet #6d5bd0, hors charte, remappe sur le bleu clair du pole Governance. */
  --nsx-purple: #738BC9;
  --nsx-blue-light: #738BC9;
  --nsx-yellow: #FEEB58;
  /* Jamais pour du texte : 1.19:1 sur --nsx-yellow, illisible. Sert de bord
     d'encadre d'alerte. Le texte sur aplat jaune est --nsx-text (13.4:1). */
  --nsx-yellow-text: #F4D62E;

  /* Teintes pastel de la charte : fonds de cartes, badges, encadres */
  --nsx-navy-tint: #EEF3F7;
  --nsx-orange-tint: #FEF1E2;
  --nsx-blue-tint: #F1F3FB;
  --nsx-green-tint: #E9F6F1;
  --nsx-yellow-tint: #FFFCE6;

  /* Nuances foncees : survol, niveaux avances, mode sombre */
  --nsx-orange-dark: #8A4206;
  --nsx-green-dark: #17543C;
  /* Jaune assombri, seule declinaison du jaune de marque lisible sur fond clair :
     #FEEB58 tient 1.22 et #F4D62E 1.45, la ou un objet graphique exige 3.0. */
  --nsx-yellow-dark: #8A6B08;

  /* Palette de DECORATION : camemberts, barres, jauges, icones de categorie.
     Sept teintes distinctes, toutes de la charte ou derivees documentees.
     Volontairement separee des jetons de statut : --nsx-danger signale une
     erreur, il ne sert jamais a colorer une septieme part de camembert. */
  --nsx-chart-1: #094268;   /* navy */
  --nsx-chart-2: #F68712;   /* orange de marque */
  --nsx-chart-3: #8A6B08;   /* jaune assombri */
  --nsx-chart-4: #738BC9;   /* bleu clair */
  --nsx-chart-5: #37A37B;   /* vert */
  --nsx-chart-6: #8A4206;   /* orange fonce */
  --nsx-chart-7: #17543C;   /* vert fonce */

  /* Teintes d'alerte derivees de --nsx-danger #cf4d43, seule couleur de statut
     qui n'appartient pas aux cinq de base. Documentees ici pour qu'aucune valeur
     affichee ne soit orpheline. */
  --nsx-danger-tint: #FBEEED;
  /* Texte d'erreur : rouge assombri vers l'encre, 5.3:1 sur --nsx-danger-tint,
     5.7:1 sur la page. --nsx-danger seul tombe a 3.9 et 4.2. */
  --nsx-danger-text: color-mix(in srgb, var(--nsx-danger) 78%, var(--nsx-text) 22%);
  /* Texte de succes : --nsx-success ne tient que 2.8 sur sa teinte. */
  --nsx-success-text: var(--nsx-green-dark);
  --nsx-danger-border: #E5A19B;

  /* Couleurs nommees des composants partages (decision 7c de Rayen, 31.10.2026) :
     nsx_components.css et les pages n'ecrivent jamais de code couleur, seulement
     ces noms. Valeurs reprises telles quelles des composants : aucun changement
     visible. */
  /* Bleu ardoise : bord des champs, piste d'interrupteur eteinte, pastille d'une
     etape a venir. 3,2:1 sur --input-bg, le seuil d'un objet graphique. */
  --nsx-field-border: #6D8DA1;
  /* Bleu tres pale : fond des bandeaux et des badges d'information. Le bord des
     bandeaux info est --nsx-blue-light. */
  --nsx-info-soft: #EEF2FA;
  /* Jaune soutenu : bord des bandeaux d'alerte. */
  --nsx-warning-border: #D9B200;
  /* Titres des bandeaux : jaune et rouge assombris vers l'encre (5,9:1 et
     6,4:1 sur leur teinte). */
  --nsx-warning-strong: #7A5E05;
  --nsx-danger-strong: #8E3530;

  /* Code couleur par pole (mapping du 20.08.2026) */
  --nsx-pole-elite: #094268;        /* Talents, Employeurs, Administration */
  --nsx-pole-academy: #37A37B;      /* formations, cours, PRISM / BRIDGE */
  --nsx-pole-governance: #738BC9;   /* demarches, visa, mobilite, onboarding */
  --nsx-pole-accueil: #F68712;      /* accueil, contact */
  --nsx-pole-apropos: #FEEB58;      /* a-propos */
  --nsx-shadow: 0 10px 30px rgba(9, 66, 104, 0.12), 0 2px 6px rgba(9, 66, 104, 0.06);
  --nsx-shadow-soft: 0 4px 12px rgba(9, 66, 104, 0.1), 0 1px 3px rgba(9, 66, 104, 0.07);
  --nsx-shadow-raised: 0 20px 50px rgba(9, 66, 104, 0.16), 0 4px 12px rgba(9, 66, 104, 0.07);
  --nsx-radius-sm: 6px;
  --nsx-radius-md: 10px;
  --nsx-radius-lg: 14px;
  --nsx-radius-xl: 18px;
  --nsx-content-max: 1120px;
  --nsx-content-pad: 32px;
  --nsx-nav-height: 64px;
  --nsx-tab-height: 48px;

  --page-bg: var(--nsx-page);
  --card-bg: var(--nsx-card);
  --section-bg: var(--nsx-surface);
  --nav-bg: var(--nsx-nav);
  --nav-border: var(--nsx-nav-border);
  --nav-text: var(--nsx-nav-text);
  --nav-sub: rgba(238, 244, 249, 0.45);
  --text: var(--nsx-text);
  --text-muted: var(--nsx-text-muted);
  --muted: var(--nsx-text-muted);
  --hint: var(--nsx-text-hint);
  --border: var(--nsx-border);
  --accent: var(--nsx-brand);
  --accent-h: var(--nsx-brand-hover);
  --accent-hover: var(--nsx-brand-hover);
  --green: var(--nsx-success);
  /* --orange pointait sur l'ambre --nsx-warning : un alias qui mentait sur son nom.
     Il designe desormais l'orange de marque. Le jaune d'alerte est sous --warning. */
  --orange: var(--nsx-brand);
  --warning: var(--nsx-warning);
  --red: var(--nsx-danger);
  --purple: var(--nsx-purple);
  --blue-light: var(--nsx-blue-light);
  --yellow: var(--nsx-yellow);
  --bg: var(--nsx-page);
  --card: var(--nsx-card);
  /* Ces deux valeurs etaient en gris froid en dur : elles echappaient a --nsx-page
     et gardaient le rendu "admin generique" meme apres passage au blanc chaud. */
  --surface-alt: #F3F1EC;
  /* Fonds doux : les teintes pastel de la charte remplacent les melanges au blanc. */
  --success-soft: var(--nsx-green-tint);
  --warning-soft: var(--nsx-yellow-tint);
  --accent-soft: var(--nsx-orange-tint);
  --navy-soft: var(--nsx-navy-tint);
  --blue-soft: var(--nsx-blue-tint);
  --danger-soft: color-mix(in srgb, var(--nsx-danger) 12%, var(--nsx-page) 88%);
  --input-bg: #F6F4F0;
  --input-bd: var(--nsx-border);
  /* Bandeau clair, a l'image de nsx-kompetenz.com : logo couleur sur fond clair,
     nom de marque en navy, tagline orange. L'ancienne barre pleine navy donnait
     l'aspect "PaaS bleu" qui ne ressemblait pas au site. */
  --nsx-nav-brand-color: #094268;
  --nsx-nav-subtext: var(--nsx-brand);
  --nsx-lang-bd: rgba(9, 66, 104, 0.18);
  --nsx-lang-txt: rgba(9, 66, 104, 0.72);
  --nsx-lang-bg: rgba(9, 66, 104, 0.04);
  --nsx-user-bg: rgba(9, 66, 104, 0.05);
  --nsx-user-bd: rgba(9, 66, 104, 0.14);
  --nsx-user-txt: #094268;
  --nsx-toggle-bg: rgba(9, 66, 104, 0.05);
  --nsx-toggle-bd: rgba(9, 66, 104, 0.16);
  --nsx-toggle-txt: rgba(9, 66, 104, 0.78);
  /* 0.72 : 4.5:1, comme --nsx-lang-txt. L'ancien 0.5 tenait 2.7:1. */
  --nsx-footer-txt: rgba(9, 66, 104, 0.72);
  /* Le logo est un SVG couleur : tout filtre le detruirait. */
  --nsx-logo-filter: none;
  --nsx-dropdown-bg: #ffffff;
  --nsx-dropdown-border: rgba(0, 0, 0, 0.08);
  --nsx-dropdown-item-hover: rgba(0, 0, 0, 0.03);
  --nsx-dropdown-danger-hover: rgba(248, 113, 113, 0.08);
  --nsx-dropdown-text: #15212B;
  --nsx-dropdown-muted: rgba(29, 29, 31, 0.55);
  /* Voile du drawer de navigation mobile : navy de charte, jamais du noir pur. */
  --nsx-scrim: rgba(9, 66, 104, 0.5);
}

/* Mode sombre supprime le 27.08.2026 : nsx-kompetenz.com n'en a pas,
   KIMOS s'aligne. Un seul theme, celui de :root ci-dessus. */

html,
body {
  font-family: var(--nsx-font-body) !important;
}

body,
button,
input,
select,
textarea {
  font-family: var(--nsx-font-body) !important;
}

.brand-name,
.hero-title,
.auth-title,
h1,
h2,
h3 {
  font-family: var(--nsx-font-brand);
}

body {
  background: var(--nsx-page);
  color: var(--nsx-text);
}

a {
  color: inherit;
}

input,
select,
textarea {
  background: var(--input-bg);
  color: var(--nsx-text);
  border-color: var(--input-bd);
}

input::placeholder,
textarea::placeholder {
  color: var(--nsx-text-muted);
}

.nsx-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.nsx-app-shell {
  /* Sur telephone, 100vh inclut la zone sous la barre du navigateur : dvh suit
     la hauteur visible. 100vh reste en repli pour les anciens navigateurs. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Zone de contenu d'une page serveur simple (ex. cockpit Notion) : la meme
   mise en page que le <main> en ligne d'employers/base.html, en classe. */
.nsx-page-main {
  flex: 1;
  width: 100%;
  max-width: var(--nsx-content-max);
  margin: 0 auto;
  padding: 24px var(--nsx-content-pad) 48px;
  box-sizing: border-box;
}

.nsx-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--nsx-nav);
  border-bottom: 1px solid var(--nsx-nav-border);
}

.nsx-topbar-inner {
  width: min(100%, calc(100% - calc(var(--nsx-content-pad) * 2)));
  margin: 0 auto;
  min-height: var(--nsx-nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nsx-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nsx-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  background: #094268;
}

.nsx-brand-logo {
  width: auto;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  /* Aucun filtre : le SVG porte les cinq couleurs de la charte. Sur fond navy,
     c'est la variante logo-mark-blanc.svg qui est servie, pas un filtre. */
}

/* Nom de marque : gras, navy. Pas de text-transform : cet element porte
   KIMOS™, une marque deposee qui ne s'altere jamais. Les minuscules du site
   valent pour "nsx kompetenz", qui n'est pas ce qui est affiche ici. */
.nsx-brand-copy strong {
  display: block;
  font-family: var(--nsx-font-brand);
  font-size: 17px;
  font-weight: 800;
  color: var(--nsx-nav-brand-color);
  letter-spacing: 0.01em;
  line-height: 1;
}

.nsx-brand-copy span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nsx-nav-subtext);
  white-space: nowrap;
}

.nsx-shell-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nsx-dropdown {
  position: relative;
}

.nsx-dropdown summary {
  list-style: none;
}

.nsx-dropdown summary::-webkit-details-marker {
  display: none;
}

.nsx-dropdown-trigger,
.nsx-user-trigger,
.nsx-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--nsx-lang-bd);
  background: var(--nsx-lang-bg);
  color: var(--nsx-lang-txt);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all 160ms ease;
}

.nsx-quick-link {
  border-color: var(--nsx-toggle-bd);
  background: var(--nsx-toggle-bg);
  color: var(--nsx-toggle-txt);
}

.nsx-dropdown-trigger:hover,
.nsx-user-trigger:hover,
.nsx-quick-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--nsx-shadow-soft);
}

.nsx-dropdown-flag {
  font-size: 0.875rem;
  line-height: 1;
}

.nsx-dropdown-chevron {
  width: 0.625rem;
  height: 0.625rem;
  opacity: 0.5;
  transition: transform 160ms ease;
}

.nsx-dropdown[open] .nsx-dropdown-chevron {
  transform: rotate(180deg);
}

.nsx-separator {
  width: 1px;
  height: 28px;
  background: var(--nsx-nav-border);
  margin: 0 0.25rem;
}

.nsx-user-trigger {
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border-radius: 10px;
  border-color: var(--nsx-user-bd);
  background: var(--nsx-user-bg);
  color: var(--nsx-user-txt);
}

.nsx-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #F68712, #d9740a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.nsx-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.nsx-user-meta strong {
  color: var(--nsx-user-txt);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.nsx-user-meta span {
  color: var(--nsx-nav-subtext);
  font-size: 10px;
  line-height: 1;
}

.nsx-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 120px;
  padding: 0;
  background: var(--nsx-dropdown-bg);
  border: 1px solid var(--nsx-dropdown-border);
  border-radius: var(--nsx-radius-md);
  box-shadow: var(--nsx-shadow-raised);
  overflow: hidden;
  z-index: 400;
}

.nsx-dropdown-menu-user {
  min-width: 230px;
  padding-top: 0;
}

/* Menu de langue des barres d'en-tete : le nom de chaque langue dans sa
   langue (« Français » … « العربية »), meme largeur que sur les connexions. */
.nsx-shell-controls .nsx-dropdown-menu {
  min-width: 11rem;
}

.nsx-dropdown-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--nsx-dropdown-border) 80%, transparent 20%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nsx-dropdown-header-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nsx-dropdown-header-copy strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--nsx-dropdown-text);
}

.nsx-dropdown-header-copy span {
  font-size: 11px;
  color: var(--nsx-dropdown-muted);
}

.nsx-dropdown-section + .nsx-dropdown-section {
  border-top: 1px solid color-mix(in srgb, var(--nsx-dropdown-border) 80%, transparent 20%);
}

.nsx-dropdown-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--nsx-dropdown-text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  font-family: inherit;
}

.nsx-dropdown-item:hover {
  background: var(--nsx-dropdown-item-hover);
}

.nsx-dropdown-item.is-active {
  background: var(--nsx-brand-soft);
  color: var(--nsx-brand);
  font-weight: 700;
}

.nsx-dropdown-item.is-danger {
  color: var(--nsx-danger-text);
  font-weight: 700;
}

.nsx-dropdown-item.is-danger:hover {
  background: var(--nsx-dropdown-danger-hover);
}

/* Coche de l'element selectionne : le caractere "✓" des templates est masque
   (font-size: 0) et remplace par le trace de icon-check du sprite, en SVG.
   Une regle ici plutot que 80 balises a reecrire dans les templates.
   Navy : 10:1, la ou l'orange ne tenait que 2.4:1 pour une icone (3:1 requis).
   margin-inline-start : la coche passe a gauche en arabe. */
.nsx-dropdown-check {
  display: inline-block;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-inline-start: auto;
  font-size: 0;
  color: var(--nsx-pole-elite);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* display: inline-block l'emporterait sur l'attribut hidden : les scripts de
   langue et de KIMOS masquent la coche des elements non selectionnes. */
.nsx-dropdown-check[hidden] {
  display: none;
}

.nsx-tabbar {
  background: var(--nsx-card);
  border-bottom: none;
  /* min-height et non height : une barre de defilement classique (souris)
     prenait sa place dans les 48 px et coupait le texte des onglets. */
  min-height: var(--nsx-tab-height);
  display: flex;
  align-items: stretch;
  overflow-x: auto;
}

.nsx-tabbar-inner {
  width: min(100%, calc(100% - calc(var(--nsx-content-pad) * 2)));
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  padding: 0;
}

.nsx-tablink {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--nsx-tab-height);
  padding: 0.75rem 1rem;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  color: var(--nsx-text-muted);
  transition: color 160ms ease;
}

.nsx-tabicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.nsx-tablink::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  transition: background 160ms ease;
}

.nsx-tablink:hover {
  color: var(--nsx-text);
}

/* Talents, Employeurs et Administration relevent du pole Elite : navy en actif.
   Les sections Academy et Governance surchargent avec leur propre couleur. */
.nsx-tablink.is-active {
  color: var(--nsx-pole-elite);
  background: transparent;
  box-shadow: none;
  font-weight: 700;
}
.nsx-tablink.pole-academy.is-active    { color: var(--nsx-pole-academy); }
.nsx-tablink.pole-governance.is-active { color: var(--nsx-pole-governance); }

.nsx-tablink.is-active::after {
  background: currentColor;
}

.nsx-hero-card {
  position: relative;
  overflow: hidden;
  padding: 1.375rem 1.625rem;
  border-radius: var(--nsx-radius-lg);
  background: var(--nsx-card);
  border: 1px solid var(--nsx-border);
  color: var(--nsx-text);
  box-shadow: var(--nsx-shadow-soft);
}

.nsx-hero-card > * {
  position: relative;
  z-index: 1;
}

.nsx-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nsx-text-muted);
}

.nsx-hero-title {
  margin-top: 6px;
  font-family: var(--nsx-font-brand);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.nsx-footer {
  margin-top: auto;
  border-top: 1px solid var(--nsx-nav-border);
  background: var(--nsx-nav);
}

.nsx-footer-inner {
  width: min(100%, calc(100% - calc(var(--nsx-content-pad) * 2)));
  margin: 0 auto;
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--nsx-footer-txt);
  font-size: 0.75rem; /* plancher 12 px (opencode.md §5) ; etait 11 px */
}

.nsx-auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.nsx-auth-grid {
  width: min(1120px, 100%);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
}

.nsx-auth-card {
  padding: 2rem;
  border-radius: var(--nsx-radius-xl);
  border: 1px solid var(--nsx-border);
  background: var(--nsx-card);
  box-shadow: var(--nsx-shadow-soft);
}

.nsx-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--nsx-brand-strong);
  background: var(--nsx-brand-soft);
  color: var(--nsx-brand);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nsx-auth-title {
  margin: 1rem 0 0;
  font-family: var(--nsx-font-brand);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--nsx-text);
}

.nsx-auth-subtitle {
  margin: 0.7rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--nsx-text-muted);
}

.nsx-ghost-link {
  display: inline-flex;
  width: 100%;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.1rem;
  border-radius: var(--nsx-radius-sm);
  border: 1px solid var(--nsx-border);
  background: transparent;
  color: var(--nsx-text-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nsx-ghost-link:hover {
  transform: translateY(-1px);
  border-color: var(--nsx-brand);
  background: var(--nsx-brand-soft);
  color: var(--nsx-brand);
}

.nsx-auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--nsx-text-muted);
}

.nsx-inline-link {
  color: var(--nsx-brand);
  font-weight: 700;
  text-decoration: none;
}

.nsx-inline-link:hover {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .nsx-topbar-inner,
  .nsx-tabbar-inner,
  .nsx-footer-inner {
    width: min(100%, calc(100% - 1.25rem));
  }

  .nsx-topbar-inner {
    min-height: auto;
    padding: 0.875rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nsx-auth-grid,
  .nsx-kpi-grid {
    grid-template-columns: 1fr;
  }

  .nsx-page-header,
  .nsx-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nsx-shell-controls {
    width: 100%;
    justify-content: flex-end;
  }

  .nsx-separator {
    display: none;
  }
}

.nsx-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nsx-brand);
}

.nsx-subtitle {
  margin: 0.8rem 0 0;
  max-width: 52rem;
  color: var(--nsx-text-muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.nsx-card {
  background: var(--nsx-card);
  border: 1px solid var(--nsx-border);
  border-radius: var(--nsx-radius-md);
  box-shadow: var(--nsx-shadow-soft);
}

.nsx-panel-soft {
  background: var(--surface-alt);
  border: 1px solid var(--nsx-border);
  border-radius: var(--nsx-radius-md);
}

/* Padding standard des cartes de contenu (ajoute le 22.10.2026).
   Remplace les utilitaires Tailwind p-8 / p-4 dans le nouveau code. */
.nsx-card.is-padded {
  padding: 2rem;
}

.nsx-panel-soft.is-padded {
  padding: 1rem;
}

@media (max-width: 640px) {
  .nsx-card.is-padded {
    padding: 1.25rem;
  }
}

.nsx-notice {
  padding: 0.85rem 1rem;
  border-radius: var(--nsx-radius-md);
  border: 1px solid var(--nsx-border);
  background: var(--surface-alt);
  color: var(--nsx-text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.nsx-notice.is-success {
  border-color: color-mix(in srgb, var(--nsx-success) 25%, transparent 75%);
  background: var(--success-soft);
  color: var(--nsx-success-text);
}

.nsx-notice.is-danger {
  border-color: color-mix(in srgb, var(--nsx-danger) 25%, transparent 75%);
  background: var(--danger-soft);
  color: var(--nsx-danger-text);
}

.nsx-notice.is-warning {
  border-color: color-mix(in srgb, var(--nsx-warning) 25%, transparent 75%);
  background: var(--warning-soft);
  color: var(--nsx-warning);
}

.nsx-section-title {
  margin: 0;
  font-family: var(--nsx-font-brand);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--nsx-text);
}

.nsx-field-error {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--nsx-danger-text);
}

.nsx-stat-card {
  padding: 1.4rem;
}

.nsx-stat-card p {
  margin: 0;
  color: var(--nsx-text-muted);
  font-size: 0.9rem;
}

.nsx-stat-card strong {
  display: block;
  margin-top: 0.55rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nsx-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.625rem;
  margin-bottom: 1rem;
}

/* Sous 640 px, quatre (ou trois) cartes coupaient leurs legendes en majuscules
   (« DEMAND… ») et l'arabe debordait de la carte : deux colonnes. */
@media (max-width: 640px) {
  .nsx-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.nsx-kpi-card {
  padding: 14px 16px;
}

.nsx-kpi-label {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nsx-text-muted);
}

.nsx-kpi-value {
  margin-top: 0.35rem;
  font-family: var(--nsx-font-brand);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--nsx-text);
}

.nsx-kpi-sub {
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  line-height: 1.55;
  color: var(--nsx-text-muted);
}

.nsx-alert-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.nsx-field {
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.nsx-field label,
.nsx-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nsx-text-muted);
}

.nsx-input,
.nsx-field input,
.nsx-field select,
.nsx-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--input-bd);
  border-radius: var(--nsx-radius-sm);
  background: var(--input-bg);
  /* 1rem minimum : sous 16px, iOS Safari zoome la page au focus et y reste.
     Meme taille que les champs d'auth et du dashboard KIMOS. */
  font-size: 1rem;
  /* 44 px : le champ latin faisait 42 px (l'arabe passait grace a sa police). */
  min-height: 2.75rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

/* Focus : anneau navy, 9.6:1 sur le fond du champ, le meme que les boutons.
   L'ancien bord orange et son halo a 10 % restaient sous les 3:1 demandes
   pour un indicateur de focus. */
.nsx-input:focus,
.nsx-field input:focus,
.nsx-field select:focus,
.nsx-field textarea:focus {
  outline: 2px solid var(--nsx-pole-elite);
  outline-offset: 2px;
  border-color: var(--nsx-pole-elite);
}

/* Erreur : le champ lui-meme change, pas seulement le message. Le template
   pose aria-invalid="true" et relie le message par aria-describedby.
   Place apres :focus pour que le bord reste rouge pendant la saisie. */
.nsx-input[aria-invalid="true"],
.nsx-field input[aria-invalid="true"],
.nsx-field select[aria-invalid="true"],
.nsx-field textarea[aria-invalid="true"],
/* Repli visuel pour les formulaires rendus par {{ form.champ }} : Django 4.2
   n'y pose pas aria-invalid. Le lecteur d'ecran, lui, a besoin de l'attribut. */
.nsx-field:has(.nsx-field-error) input,
.nsx-field:has(.nsx-field-error) select,
.nsx-field:has(.nsx-field-error) textarea {
  border-color: var(--nsx-danger);
  background: var(--nsx-danger-tint);
}

/* Desactive : visiblement inerte, comme les boutons. */
.nsx-input:disabled,
.nsx-field input:disabled,
.nsx-field select:disabled,
.nsx-field textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nsx-button,
.nsx-button-secondary,
.nsx-button-danger,
.nsx-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--nsx-radius-sm);
}

/* Forme pilule des boutons d'action, comme "Se connecter" / "Creer un compte"
   sur nsx-kompetenz.com. Le badge garde son rayon d'origine. */
.nsx-button,
.nsx-button-secondary,
.nsx-button-danger {
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

/* 44 px de haut : cible tactile minimale. 0.875rem : plancher de 14 px du
   texte. Memes mesures que .btn dans le dashboard KIMOS. */
.nsx-button,
.nsx-button-secondary,
.nsx-button-danger {
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
}

/* Texte blanc sur l'orange de marque : choix de Rayen (30.10.2026), exception
   decidee a 2.50:1 (seuil AA 4.5:1), voir opencode.md §9.1. Aplat plat : pas
   d'ombre orange ni de grossissement, au repos comme au survol. */
.nsx-button {
  color: var(--nsx-card);
  background: var(--nsx-brand);
}

/* Navy de charte : 10:1. L'ancien gris rgba(128, 128, 128, 0.6) tenait 2.1:1. */
.nsx-button-secondary {
  color: var(--nsx-pole-elite);
  background: transparent;
  border-color: color-mix(in srgb, var(--nsx-brand) 25%, transparent 75%);
}

/* Texte d'erreur assombri vers l'encre (--nsx-danger-text), comme .badge-red de KIMOS. */
.nsx-button-danger {
  color: var(--nsx-danger-text);
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--nsx-danger) 22%, white 78%);
}

/* Survol reserve aux ecrans qui en ont un : sur tactile, il resterait colle
   apres le tap. Jamais sur un bouton desactive. */
@media (hover: hover) {
  .nsx-button:hover:not(:disabled):not([aria-disabled="true"]) {
    /* Orange de survol plein (blanc a 3.25:1), sans ombre ni grossissement. */
    background: var(--nsx-brand-hover);
  }

  .nsx-button-secondary:hover:not(:disabled):not([aria-disabled="true"]),
  .nsx-button-danger:hover:not(:disabled):not([aria-disabled="true"]) {
    transform: translateY(-2px);
  }

  .nsx-button-secondary:hover:not(:disabled):not([aria-disabled="true"]) {
    background: color-mix(in srgb, var(--nsx-brand) 6%, transparent 94%);
    border-color: color-mix(in srgb, var(--nsx-brand) 50%, transparent 50%);
    box-shadow: 0 4px 16px rgba(246, 135, 18, 0.19);
  }
}

/* Focus clavier : anneau navy, 10:1 sur la page. L'orange n'y tiendrait que
   2.4:1, sous les 3:1 demandes pour un indicateur. Meme anneau que KIMOS. */
.nsx-button:focus-visible,
.nsx-button-secondary:focus-visible,
.nsx-button-danger:focus-visible {
  outline: 2px solid var(--nsx-pole-elite);
  outline-offset: 2px;
}

/* Desactive : visiblement inerte, comme .btn:disabled de KIMOS. */
.nsx-button:disabled,
.nsx-button[aria-disabled="true"],
.nsx-button-secondary:disabled,
.nsx-button-secondary[aria-disabled="true"],
.nsx-button-danger:disabled,
.nsx-button-danger[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.nsx-badge {
  padding: 0.45rem 0.8rem;
  font-size: 0.76rem;
  border: 1px solid transparent;
}

.nsx-badge-neutral {
  background: var(--surface-alt);
  color: var(--nsx-text);
}

.nsx-badge-brand {
  background: var(--nsx-brand-soft);
  color: var(--nsx-brand);
}

.nsx-badge-success {
  background: var(--success-soft);
  color: var(--nsx-success-text);
}

.nsx-badge-warning {
  background: var(--warning-soft);
  color: var(--nsx-warning);
}

.nsx-badge-danger {
  background: var(--danger-soft);
  color: var(--nsx-danger-text);
}

.nsx-table-shell {
  overflow-x: auto;
  border-radius: var(--nsx-radius-lg);
  border: 1px solid var(--nsx-border);
  background: var(--nsx-card);
  box-shadow: var(--nsx-shadow-soft);
}

.nsx-table {
  width: 100%;
  border-collapse: collapse;
}

.nsx-table th,
.nsx-table td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--nsx-border) 82%, white 18%);
  text-align: left;
  vertical-align: top;
}

.nsx-table th {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nsx-text-muted);
  background: color-mix(in srgb, var(--nsx-surface) 60%, white 40%);
}

.nsx-table tbody tr:hover {
  background: color-mix(in srgb, var(--nsx-brand-soft) 32%, white 68%);
}

.nsx-empty-state {
  padding: 2.5rem;
  text-align: center;
  border: 1px dashed color-mix(in srgb, var(--nsx-border) 92%, white 8%);
  border-radius: var(--nsx-radius-lg);
  background: color-mix(in srgb, var(--nsx-surface) 56%, white 44%);
  color: var(--nsx-text-muted);
}

.nsx-empty-state h2,
.nsx-empty-state h3 {
  margin: 0;
  color: var(--nsx-text);
  font-family: var(--nsx-font-brand);
}

.nsx-stack-sm > * + * {
  margin-top: 0.75rem;
}

.nsx-stack-md > * + * {
  margin-top: 1rem;
}

.nsx-stack-lg > * + * {
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .nsx-page-header {
    flex-direction: column;
  }
}

/* Tous les boutons en pilule (decision 5 de Rayen, 31.10.2026). La regle forcait
   button[type='submit'] a 14 px (specificite 0,1,1), ce qui cassait la pilule des
   boutons kx-* d'envoi : button[type='submit'] ne recoit plus de rayon, chaque
   bouton garde celui de sa classe. Les anciennes classes passent en pilule. */
.btn,
.btn-primary,
.btn-submit,
.k-btn {
  border-radius: 999px;
}

/* Regle : pas d'ombre coloree (etape 20.5, 31.10.2026). L'ancienne ombre
   orange du survol devient l'ombre neutre du theme. Encore utilisees par
   totp_setup.html (.btn-submit) et les gabarits orphelins. */
.btn:hover,
.btn-primary:hover,
.btn-submit:hover,
.k-btn:hover {
  box-shadow: var(--nsx-shadow-soft);
}

.auth-card,
.card,
.modal,
section[class*='rounded'],
div[class*='rounded-3xl'],
div[class*='rounded-[2rem]'] {
  box-shadow: var(--nsx-shadow);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ── RTL Support (Arabic) ────────────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Root direction for RTL */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* Fix font for Arabic text */
[dir="rtl"] {
  --nsx-font-body: 'Noto Sans Arabic', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nsx-font-brand: 'Noto Sans Arabic', var(--nsx-font-body);
}

/* Navigation and sidebar */
[dir="rtl"] .nsx-sidebar,
[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
}

[dir="rtl"] .nsx-nav,
[dir="rtl"] nav {
  left: auto;
  right: 0;
}

/* Logical properties for padding and margins */
[dir="rtl"] .nsx-card,
[dir="rtl"] .card,
[dir="rtl"] .panel {
  padding-inline-start: var(--nsx-content-pad);
  padding-inline-end: var(--nsx-content-pad);
}

/* Flex directions - reverse row layouts */
[dir="rtl"] .row {
  flex-direction: row-reverse;
}

/* Dropdowns alignment */
[dir="rtl"] .nsx-dropdown,
[dir="rtl"] .dropdown {
  text-align: right;
}

[dir="rtl"] .nsx-dropdown-menu {
  right: 0;
  left: auto;
}

[dir="rtl"] .nsx-dropdown-chevron {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

/* Tables */
[dir="rtl"] table,
[dir="rtl"] .nsx-table {
  text-align: right;
}

[dir="rtl"] table th,
[dir="rtl"] table td,
[dir="rtl"] .nsx-table th,
[dir="rtl"] .nsx-table td {
  text-align: right;
  padding-inline-start: 1rem;
  padding-inline-end: 1rem;
}

/* Form labels and inputs */
[dir="rtl"] label,
[dir="rtl"] .nsx-label,
[dir="rtl"] .nsx-field label {
  text-align: right;
}

[dir="rtl"] input:not([type="tel"]):not([type="email"]):not([type="url"]):not([type="number"]),
[dir="rtl"] textarea,
[dir="rtl"] select {
  text-align: right;
  direction: rtl;
}

/* Button groups and actions */
[dir="rtl"] .actions {
  flex-direction: row-reverse;
}

/* List items with icons */
[dir="rtl"] li {
  padding-inline-start: 0;
  padding-inline-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
}

/* Modal dialogs */
[dir="rtl"] .modal,
[dir="rtl"] .dialog {
  text-align: right;
}

/* Pagination and navigation buttons */
[dir="rtl"] .pagination,
[dir="rtl"] .pager {
  flex-direction: row-reverse;
}

/* Breadcrumbs */
[dir="rtl"] .breadcrumb {
  flex-direction: row-reverse;
}

/* Sidebar menu items */
[dir="rtl"] .menu {
  text-align: right;
}

/* Tabs */
[dir="rtl"] .tabs {
  text-align: right;
}

/* Icons in buttons and links */
[dir="rtl"] .btn svg,
[dir="rtl"] button svg,
[dir="rtl"] a svg {
  margin-inline-start: 0;
  margin-inline-end: 0.5rem;
}

/* Toggle switches */
[dir="rtl"] .toggle,
[dir="rtl"] .switch {
  direction: rtl;
}

/* Placeholders should also be right-aligned */
[dir="rtl"] input::placeholder,
[dir="rtl"] textarea::placeholder {
  text-align: right;
  direction: rtl;
}

/* Close buttons (X) */
[dir="rtl"] .close {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

/* Info and alert messages */
[dir="rtl"] .alert,
[dir="rtl"] .message {
  text-align: right;
}

/* Checkboxes and radios */
[dir="rtl"] input[type="checkbox"],
[dir="rtl"] input[type="radio"] {
  margin-inline-start: 0.5rem;
  margin-inline-end: 0;
}

[dir="rtl"] input[type="checkbox"] + label,
[dir="rtl"] input[type="radio"] + label {
  margin-inline-start: 0;
  margin-inline-end: 0.5rem;
}

/* Page header and section headers */
[dir="rtl"] .nsx-page-header {
  flex-direction: row-reverse;
}

/* Empty states */
[dir="rtl"] .nsx-empty-state {
  text-align: center;
}

/* Progress bars */
[dir="rtl"] .progress {
  direction: rtl;
}

/* ── Header & footer MUST stay LTR even in Arabic ────────────────────────── */
[dir="rtl"] .nsx-topbar,
[dir="rtl"] .nsx-topbar-inner {
  direction: ltr;
}

[dir="rtl"] .nsx-footer,
[dir="rtl"] .nsx-footer-inner {
  direction: ltr;
}

/* ── Phone numbers, emails, URLs, codes MUST stay LTR ────────────────────── */
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="url"],
[dir="rtl"] input[type="number"] {
  direction: ltr;
  text-align: right;
  unicode-bidi: embed;
}

/* ── Tab underline: use logical properties for RTL ───────────────────────── */
[dir="rtl"] .nsx-tablink::after {
  left: 1rem;
  right: 1rem;
}

/* ── Tabbar centering: same center alignment in RTL ──────────────────────── */
[dir="rtl"] .nsx-tabbar-inner {
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* End of RTL Support */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════
   Bandeau et boutons — grammaire visuelle de nsx-kompetenz.com (27.08.2026)
   ══════════════════════════════════════════════════════════════════════ */

/* Tagline du verrou de marque : orange, espacee, sous le nom. */
.nsx-brand-copy span {
  color: var(--nsx-brand);
  letter-spacing: 0.14em;
}

/* Le logo blanc n'est servi que sur fond navy, jamais par un filtre. */
.nsx-logo-blanc { display: none; }

/* Boutons pilule : "Se connecter" en contour, "Creer un compte" en orange plein. */
.nsx-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--nsx-font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.nsx-pill-ghost {
  background: transparent;
  color: var(--nsx-nav-brand-color);
  border-color: var(--nsx-lang-bd);
}
.nsx-pill-ghost:hover {
  background: var(--nsx-navy-tint);
  border-color: var(--nsx-nav-brand-color);
}
.nsx-pill-solid {
  background: var(--nsx-brand);
  color: #ffffff;
  border-color: var(--nsx-brand);
}
.nsx-pill-solid:hover {
  background: var(--nsx-brand-hover);
  border-color: var(--nsx-brand-hover);
}

/* ══════════════════════════════════════════════════════════════════════
   Verrou de marque a trois lignes (decision du 28.08.2026)
   KIMOS™ en capitales : nom de produit, ce que l'utilisateur reconnait.
   nsx kompetenz en minuscules navy : rattachement a la marque mere.
   talent · academy · recruiting : tagline du site, orange, espacee.
   ══════════════════════════════════════════════════════════════════════ */
.nsx-brand-copy span.nsx-brand-org,
.nsx-brand-text span.nsx-brand-org,
.nsx-brand-text div.nsx-brand-org,
.nsx-brand-org {
  display: block;
  font-family: var(--nsx-font-brand);
  font-size: 11px;
  font-weight: 800;
  color: var(--nsx-nav-brand-color);
  letter-spacing: 0.01em;
  line-height: 1;
  margin-top: 2px;
  text-transform: lowercase;
}

.nsx-brand-copy span.nsx-brand-tag,
.nsx-brand-text span.nsx-brand-tag,
.nsx-brand-text div.nsx-brand-tag,
.nsx-brand-tag {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: none;   /* la tagline du site est en minuscules */
  color: var(--nsx-brand);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════
   Drawer de navigation mobile (26.10.2026)
   Sous 960 px, un bouton hamburger dans l'appbar ouvre la liste laterale
   des ecrans de l'espace et remplace la barre d'onglets horizontale.

   Amelioration progressive : les regles ne s'appliquent qu'une fois
   `html.is-drawer-ready` pose par nav-drawer.js. Sans JS, l'hamburger
   reste cache et la barre d'onglets assure toujours la navigation.
   ══════════════════════════════════════════════════════════════════════ */

/* Le bouton hamburger et la croix du drawer partagent leur geometrie :
   44 x 44 px, la cible tactile minimale de la charte. */
.nsx-nav-toggle,
.nsx-drawer-close {
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
  border: 1px solid var(--nsx-toggle-bd);
  /* Decision 20.1-5 : tous les boutons en pilule, y compris menu et fermeture. */
  border-radius: 999px;
  background: var(--nsx-toggle-bg);
  color: var(--nsx-toggle-txt);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.nsx-nav-toggle svg,
.nsx-drawer-close svg {
  width: 20px;
  height: 20px;
}

.nsx-nav-toggle:hover,
.nsx-drawer-close:hover {
  background: var(--nsx-navy-tint);
  color: var(--nsx-nav-brand-color);
}

.nsx-nav-toggle {
  display: none;
}

.nsx-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;   /* au-dessus de l'appbar sticky (200) */
}

.nsx-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: var(--nsx-scrim);
  opacity: 0;
  transition: opacity 220ms ease;
}

.nsx-drawer-panel {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  display: flex;
  flex-direction: column;
  width: min(86vw, 320px);
  max-width: 100%;
  background: var(--nsx-card);
  border-inline-end: 1px solid var(--nsx-border);
  box-shadow: var(--nsx-shadow-raised);
  transform: translateX(-100%);
  transition: transform 220ms ease;
}

[dir="rtl"] .nsx-drawer-panel {
  transform: translateX(100%);
}

.nsx-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.75rem 0.75rem 0.75rem 1rem;
  border-bottom: 1px solid var(--nsx-border);
}

.nsx-drawer-title {
  margin: 0;
  font-family: var(--nsx-font-brand);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nsx-text-muted);
}

/* La liste des ecrans : c'est elle qui defile quand l'espace en compte beaucoup. */
.nsx-drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.5rem 0;
}

.nsx-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 1rem;
  border: 0;
  background: transparent;
  font-family: var(--nsx-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: start;
  text-decoration: none;
  color: var(--nsx-text-muted);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.nsx-drawer-link:hover {
  background: var(--nsx-navy-tint);
  color: var(--nsx-text);
}

.nsx-drawer-link.is-active {
  color: var(--nsx-brand);
  font-weight: 700;
}

.nsx-drawer-link.is-danger,
.nsx-drawer-link.is-danger:hover {
  color: var(--nsx-danger-text);
}

/* La coche de l'onglet actif : logique, donc a la fin de la ligne en LTR
   comme en RTL. KIMOS bascule son `display` depuis kimos.jsx, d'ou la classe
   partagee avec les menus deroulants. */
.nsx-drawer-link .nsx-dropdown-check {
  display: none;
  margin-inline-start: auto;
  color: var(--nsx-brand);
  font-size: 0.6875rem;
}

.nsx-drawer-link.is-active .nsx-dropdown-check {
  display: inline-flex;
}

/* Le fond ne defile plus derriere le drawer ouvert. */
body.nsx-drawer-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  html.is-drawer-ready .nsx-nav-toggle {
    display: inline-flex;
  }

  html.is-drawer-ready .nsx-drawer {
    display: block;
    visibility: hidden;
    pointer-events: none;
  }

  html.is-drawer-ready .nsx-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
  }

  html.is-drawer-ready .nsx-drawer.is-open .nsx-drawer-backdrop {
    opacity: 1;
  }

  html.is-drawer-ready .nsx-drawer.is-open .nsx-drawer-panel {
    transform: translateX(0);
  }

  /* Un seul bandeau sur la premiere ligne : hamburger au coin, marque derriere.
     Les controles (langue, compte) passent sur la seconde ligne, inchangee. */
  html.is-drawer-ready .nsx-app-shell.has-nav-drawer .nsx-topbar-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
  }

  html.is-drawer-ready .nsx-app-shell.has-nav-drawer .nsx-brand-lockup {
    margin-inline-end: auto;
  }

  /* La bande d'onglets que le drawer remplace. Portee par la barre elle-meme :
     la barre React de Governance n'a pas de .nsx-app-shell autour d'elle. */
  html.is-drawer-ready .nsx-drawer-replaces {
    display: none;
  }
}

/* Couloir d'echappement documente : le drawer se deplace sans animation. */
@media (prefers-reduced-motion: reduce) {
  .nsx-drawer-backdrop,
  .nsx-drawer-panel,
  .nsx-nav-toggle,
  .nsx-drawer-close,
  .nsx-drawer-link {
    transition: none;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   Barre laterale partagee — Elite d'abord, puis KIMOS (29.10.2026).
   Meme systeme que la barre React de Governance (.k-sidebar) :
   - au-dela de 960 px : barre fixe sur le bord de debut (a droite en arabe),
     aplat orange de marque, texte blanc (choix du chef de projet, 2.50:1),
     anneaux de focus sombres pour rester visibles ;
   - en dessous : aucune barre, un bouton menu orange flottant ouvre le
     drawer (meme contenu), et le nom de la section est centre sur sa ligne.
   Contrat : .nsx-app-shell.has-sidebar > .nsx-sidebar--rail + .nsx-app-body.
   ══════════════════════════════════════════════════════════════════════ */
.nsx-sidebar {
  --nsx-sidebar-ink: var(--nsx-card);
  --nsx-sidebar-hover: color-mix(in srgb, var(--nsx-card) 14%, transparent);
  --nsx-sidebar-line: color-mix(in srgb, var(--nsx-card) 24%, transparent);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 0.75rem;
  background: var(--nsx-brand);
  color: var(--nsx-sidebar-ink);
}

.nsx-sidebar :focus-visible {
  outline: 2px solid var(--nsx-text);
  outline-offset: 2px;
}

.nsx-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-inline: 0.5rem;
  color: inherit;
  text-decoration: none;
}

/* Logo couleur d'origine : sa feuille orange disparaitrait sur l'aplat. */
.nsx-sidebar__logo-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--nsx-radius-sm);
  background: var(--nsx-card);
}

.nsx-sidebar__logo {
  width: 32px;
  height: 32px;
}

.nsx-sidebar__brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.nsx-sidebar__wordmark {
  font-family: var(--nsx-font-brand);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nsx-sidebar__org {
  font-size: 0.875rem;
  font-weight: 700;
}

.nsx-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Barre de defilement fine, presque invisible, demandee par Amine le 31.10.2026
   pour Elite et KIMOS : la barre par defaut du navigateur coupait le bandeau
   orange. Memes couleurs nommees que la barre de Governance (etape 20.3b,
   governance-dashboard.css) : encre de la charte en transparence, 25 % au
   repos et 40 % au survol, a la place du gris neutre qui n'a pas de jeton. */
/* Firefox seulement : dans Chrome, scrollbar-width / scrollbar-color font
   ignorer les regles ::-webkit-scrollbar ci-dessous, qui donnent le rendu exact.
   .k-sidebar__nav (barre laterale de Governance, qui charge aussi ce fichier) :
   Firefox y montrait la large barre claire par defaut sur le fond orange. */
@supports not selector(::-webkit-scrollbar) {
  .nsx-sidebar__nav,
  .nsx-drawer-body,
  .k-sidebar__nav {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--nsx-text) 25%, transparent) transparent;
  }
}

.nsx-sidebar__nav::-webkit-scrollbar,
.nsx-drawer-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.nsx-sidebar__nav::-webkit-scrollbar-track,
.nsx-drawer-body::-webkit-scrollbar-track {
  background: transparent;
}

.nsx-sidebar__nav::-webkit-scrollbar-thumb,
.nsx-drawer-body::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--nsx-text) 25%, transparent);
  border-radius: 99px;
}

.nsx-sidebar__nav::-webkit-scrollbar-thumb:hover,
.nsx-drawer-body::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--nsx-text) 40%, transparent);
}

/* Titre de groupe (KIMOS : Recrutement, Suivi, Administration). Capitales de
   12 px, la taille plancher ; pas un lien, donc hors du parcours au clavier. */
.nsx-sidebar__group {
  display: block;
  padding: 1rem 0.75rem 0.375rem;
  color: var(--nsx-sidebar-ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nsx-sidebar__group:first-child {
  padding-top: 0;
}

.nsx-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.75rem;
  border: 0;
  border-radius: var(--nsx-radius-sm);
  background: transparent;
  color: var(--nsx-sidebar-ink);
  font-family: var(--nsx-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.nsx-sidebar__link:hover {
  background: var(--nsx-sidebar-hover);
  color: var(--nsx-sidebar-ink);
}

/* Section active : pastille blanche, texte orange fonce (7.34:1). */
.nsx-sidebar__link.is-active,
.nsx-sidebar__link.is-active:hover {
  background: var(--nsx-card);
  color: var(--nsx-orange-dark);
  font-weight: 800;
}

/* La liste defile : un anneau exterieur serait rogne, on le rentre. */
.nsx-sidebar__link:focus-visible {
  outline-offset: -4px;
}

.nsx-sidebar__link .nsx-tabicon {
  display: inline-flex;
  flex-shrink: 0;
}

/* Compteur d'une entree du menu (phase 58 : paiements a verifier sur « A traiter »,
   design system valide par Rayen le 27.11.2026) : badge plein (§9.1), encre forte
   sur blanc, chiffres tabulaires ; le mot est dans un .kx-sr. */
.nsx-sidebar__count {
  margin-inline-start: auto;
  min-width: 1.5rem;
  padding: 0.125rem 0.45rem;
  border-radius: var(--nsx-radius-sm);
  background: var(--nsx-pole-elite);
  color: var(--nsx-card);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.33;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* L'espacement vient du `gap` : la regle RTL `[dir="rtl"] a svg` ajouterait
   une marge qui ecrase l'icone dans sa boite de 1rem. */
.nsx-sidebar__link .nsx-tabicon svg,
.nsx-sidebar__logout svg {
  margin: 0;
}

.nsx-sidebar__footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--nsx-sidebar-line);
}

.nsx-sidebar__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding-inline: 0.5rem;
}

.nsx-sidebar__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--nsx-card);
  color: var(--nsx-orange-dark);
  font-size: 0.875rem;
  font-weight: 800;
}

.nsx-sidebar__user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nsx-sidebar__user-name {
  overflow: hidden;
  font-size: 0.9375rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nsx-sidebar__user-role {
  font-size: 0.875rem;
  font-weight: 600;
}

.nsx-sidebar__logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 0.75rem;
  border-radius: var(--nsx-radius-sm);
  color: var(--nsx-sidebar-ink);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.nsx-sidebar__logout:hover {
  background: var(--nsx-sidebar-hover);
  color: var(--nsx-sidebar-ink);
}

/* Le meme contenu dans le panneau du drawer partage. */
.nsx-sidebar.nsx-drawer-panel {
  gap: 0;
  padding: 0;
  border-inline-end: 0;
}

.nsx-sidebar .nsx-drawer-header {
  padding-block: 1rem;
  padding-inline: 0.75rem;
  border-bottom-color: var(--nsx-sidebar-line);
}

.nsx-sidebar .nsx-drawer-close {
  border-color: var(--nsx-sidebar-line);
  background: transparent;
  color: var(--nsx-sidebar-ink);
}

.nsx-sidebar .nsx-drawer-close:hover {
  background: var(--nsx-sidebar-hover);
  color: var(--nsx-sidebar-ink);
}

.nsx-sidebar .nsx-drawer-body {
  padding: 0.75rem;
}

.nsx-sidebar.nsx-drawer-panel .nsx-sidebar__footer {
  padding: 1rem 0.75rem 1.25rem;
}

/* Sous 960 px, le bouton menu flotte au coin : aucune barre en haut. */
.nsx-menu-fab {
  position: fixed;
  top: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 250;
  border-color: transparent;
  background: var(--nsx-brand);
  color: var(--nsx-card);
  box-shadow: var(--nsx-shadow-raised);
}

.nsx-menu-fab:hover {
  background: var(--nsx-brand-hover);
  color: var(--nsx-card);
}

.nsx-app-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* Nom de la section sur la ligne du bouton menu, sans barre ni fond ;
   rempli par nav-drawer.js depuis le lien actif du drawer. */
.nsx-mobile-title {
  display: none;
}

@media (min-width: 961px) {
  .nsx-app-shell.has-sidebar {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    align-items: start;
  }

  .nsx-sidebar--rail {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
  }

  .nsx-app-shell.has-sidebar .nsx-app-body {
    grid-column: 2;
    grid-row: 1;
    min-height: 100vh;
    min-height: 100dvh;
  }
}

@media (max-width: 960px) {
  html.is-drawer-ready .nsx-mobile-title {
    display: block;
    margin: 0.75rem 0 0;
    padding-inline: calc(44px + 1.5rem);
    overflow: hidden;
    color: var(--nsx-pole-elite);
    font-family: var(--nsx-font-brand);
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 44px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ── Telephone international (30.10.2026) ──
   Indicatif obligatoire avant le numero ; voir static/shared/js/phone-field.js. */
.nsx-phone {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nsx-phone > .nsx-phone__code {
  flex: 1 1 11rem;
  min-width: 0;
}

.nsx-phone > input[type="tel"] {
  flex: 2 1 12rem;
  min-width: 0;
}
