/* ===== Proco Light System – palette & font ============================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Montserrat:wght@600;700&display=swap');
:root{
  --brand-900: #05495c;
  /* Bleu-vert hiérarchisé, du profond au clair */
  --brand-600: #086b85;
  --brand-500: #0a93b0;
  --brand-400: #32b9d6;
  --brand-300: #6fd2e3;
  --brand-200: #a6e0eb;
  --brand-150: #c8ecf3;
  --brand-100: #e3f4f8;
  --ink-900:#0e1726;
  --ink-800:#172033;
  --ink-700:#253045;
  --ink-600:#2f3b52;
  --ink-500:#43526f;
  --ink-400:#6b7a94;
  --ink-300:#94a3b8;
  --ink-200:#c8d1e1;
  --ink-100:#e7ecf6;
  --bg-0:#ffffff;
  --bg-50:#f7f9fc;
  --bg-100:#f1f5fb;
  --bg-200:#e9eef8;
  --ok-500:#2fb179;
  --warn-500:#f59e0b;
  --err-500:#ef4444;
  --radius:14px;
  --shadow:0 8px 24px rgba(14,23,38,.08);
  /* hauteurs globales */
  --topbar-height:64px;
  --submenu-height:40px;     /* hauteur approx. barre niveau 2 */
  --subsubmenu-height:40px;  /* hauteur approx. barre niveau 3 */
  --section-strip-height:40px; /* hauteur approx. de la barre orange */
  /* Validation tokens */
  --val-emission-bg: var(--brand-300);
  --val-emission-bd: var(--brand-400);
  --val-categorie-bg: var(--brand-200);
  --val-categorie-bd: var(--brand-300);
  --val-article-bg: var(--brand-150);
  --val-article-bd: var(--brand-200);
  --accent-strip: #f0c570;  /* orange punché */
  --text: var(--ink-900);
}
*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  background:var(--bg-50);
  color:var(--ink-700);
  font:400 16px/1.5 "Inter",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
/* ======================================================================== */
/* ============================ TOPBAR (Niveau 1) ========================= */
/* ======================================================================== */
.topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:1000;
  background:var(--brand-600);
  border-bottom:1px solid var(--ink-100);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 18px;
  height:var(--topbar-height);
}
/* Logo + produit */
.topbar .brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:140px;
}
/* Logo directement sur la topbar (plus de cercle blanc) */
.topbar .brand-logo-circle{
  width:45px;
  height:45px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:4px;
  background:var(--ink-100);
  box-shadow:none;
}
.topbar .brand-logo-circle img{
  height:32px;
  width:auto;
}
/* (On ne montre plus le titre de page dans la topbar) */
.topbar .product-name{
  display:none;
}
.topbar .brand img{height:34px;}
/* Liens principaux */
.topbar-nav{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:center;
  justify-self:center;
}
.topbar-link{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 14px;
  border-radius:999px;
  font-size:0.9rem;
  font-weight:600;
  line-height:1;          /* évite les différences entre <a> et <button> */
  min-height:32px;        /* même hauteur pour Accueil / Outils / Formulaires */
  text-decoration:none;
  color:var(--bg-0);
  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.20);  /* contraste plus fort sur brand-600 */
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
}
.topbar-link:hover{
  background:var(--brand-150);
  border-color:var(--brand-200);
  color:var(--ink-700);
}
.topbar-link--static{
  cursor:default;
  pointer-events:none;
}
.topbar-link:active{
  background:var(--brand-200);
}

/* Recherche */
.topbar-search{
  display:flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius:999px;
  background:var(--bg-0);
  border:1px solid var(--ink-100);
  min-width:220px;
  max-width:320px;
  justify-self:end;
}
.topbar-search .ico{
  width:16px;
  height:16px;
  color:var(--ink-400);
}
.topbar-search input{
  border:none;
  outline:none;
  background:transparent;
  font-size:0.9rem;
  flex:1;
}
.topbar-search input::placeholder{
  color:var(--ink-300);
}
/* Icônes à droite */
.topbar-actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}
.icon-btn,
.avatar-btn{
  border:1px solid var(--ink-100);
  background:var(--bg-100);
  border-radius:999px;
  padding:6px 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background-color .2s ease, box-shadow .2s ease, transform .05s ease;
}
.icon-btn:hover,
.avatar-btn:hover{
  background:var(--brand-100);
  box-shadow:0 2px 4px rgba(0,0,0,.1);
}
.icon-btn:active,
.avatar-btn:active{
  transform:translateY(1px);
  box-shadow:none;
}
.icon-btn i{
  width:18px;
  height:18px;
}
.topbar-actions .avatar{
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid var(--ink-200);
  display:grid;
  place-items:center;
  color:var(--ink-500);
  background:var(--bg-0);
  font-weight:700;
  font-size:0.85rem;
}
/* ======================================================================== */
/* ========================== NIVEAU 2 & 3 MENUS ========================== */
/* ======================================================================== */
/* Style commun des barres sous la topbar */
.topbar-sub{
  position:fixed;
  left:0;
  right:0;
  background:var(--brand-100);
  border-bottom:1px solid var(--ink-100);
  padding:8px 18px;
  display:none;
  z-index:950;
}
/* NIVEAU 2 : barre principale (Outils / Formulaires) */
#submenu-bar{
  top:var(--topbar-height);
}
#submenu-bar.is-open{
  display:flex;
  align-items:center;
}
/* Chaque "ligne" de sous-menu (Outils OU Formulaires) */
.submenu-row{
  display:none;
  align-items:center;
  gap:16px;
  width:100%;
}
.submenu-row.is-active{
  display:flex;
}
/* NIVEAU 3 : barre de sous-sous-menu */
#subsubmenu-bar{
  top:calc(var(--topbar-height) + var(--submenu-height));
  background:var(--brand-100);
}
#subsubmenu-bar.is-open{
  display:flex;
  align-items:center;
}
/* Chaque "ligne" de sous-sous-menu (pour une catégorie donnée) */
.subsubmenu-row{
  display:none;
  align-items:center;
  gap:16px;
  width:100%;
}
.subsubmenu-row.is-active{
  display:flex;
}
/* Label “Outils”, “Formulaires”, etc. */
.topbar-sub-label{
  font-weight:700;
  color:var(--ink-700);
  margin-right:8px;
}
/* Conteneurs d’items */
.submenu-items{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.subsubmenu-items{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
  width:100%;
}
/* Sous-menu aligné à droite (Paramètres / Utilisateur) */
.submenu-items--right{
  margin-left:auto;
}
/* Lien / bouton dans les barres */
.topbar-sub-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:0.85rem;
  font-weight:600;
  text-decoration:none;
  color:var(--ink-700);
  background:var(--bg-0);
  border:1px solid var(--ink-100);
  white-space:nowrap;
}
.topbar-sub-link:hover{
  background:var(--brand-150);
}
.topbar-sub-inline-form{
  display:inline;
}
.breadcrumb-link {
  color:var(--brand-900);         /* noir (ou quasi noir) */
  text-decoration: none; /* enlève le soulignement */
}
.breadcrumb-link:hover {
  text-decoration: underline; /* si tu veux un soulignement au survol, sinon enlève cette règle */
}
/* Puis réappliquer la "capsule" comme pour les liens */
button.topbar-sub-link {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-700);
  background: var(--bg-0);
  border: 1px solid var(--ink-100);
  white-space: nowrap;
  cursor: pointer; /* comme un lien cliquable */
}
/* Bouton de catégorie (niveau 2) */
.submenu-item-btn{
  border:none;
  background:var(--bg-0);
  cursor:pointer;
}
.submenu-item-btn.is-active{
  background:var(--brand-300);
  border-color:var(--brand-400);
}
/* NIVEAU 2 simple : Paramètres / Utilisateur (popups à droite) */
#submenu-settings,
#submenu-user{
  top:var(--topbar-height);
  right:18px;
  left:auto;
  width:auto;
  min-width:200px;
  border-radius:12px;
  box-shadow:var(--shadow);
  background:var(--bg-0);
}
#submenu-settings .topbar-sub-label,
#submenu-user .topbar-sub-label{
  margin-right:0;
  margin-bottom:4px;
  display:block;
}
#submenu-settings .topbar-sub-link,
#submenu-user .topbar-sub-link{
  margin-top:4px;
  width:100%;
  justify-content:flex-start;
}
/* Sur mobile, repasser le sous-sous-menu en 1 colonne */
@media (max-width:900px){
  .subsubmenu-items{
    grid-template-columns:1fr;
  }
}
/* ======================================================================== */
/* ====================== BARRE ORANGE FIXE DE TITRE ====================== */
/* ======================================================================== */
/* ===== BARRE ORANGE FIXE DE TITRE ====================== */
.section-strip{
  position:fixed;
  left:0;
  right:0;
  z-index:940;
  /* le top va être géré en JS, on met une valeur par défaut */
  top:var(--topbar-height);
  padding:0;
  background:var(--accent-strip);
  box-shadow:0 4px 10px rgba(0,0,0,.18);
}
.section-strip-inner{
  /* on enlève le max-width pour qu’elle fasse toute la largeur, comme la topbar */
  max-width:none;
  margin:0;
  padding:8px 18px; /* hauteur de la barre */
}
.section-strip-label{
  display:inline-block;
  margin:0;
  padding:0;
  border-radius:0;
  background:none;
  color:var(--brand-900);
  font-weight:700;
  font-size:0.95rem;
  text-align:left;    /* aligné à gauche */
  box-shadow:none;
}

/* Quand un sous-menu est ouvert (niveau 2) : la barre "snap" plus bas */
body.has-submenu-lvl1 .section-strip{
  top:calc(var(--topbar-height) + var(--submenu-height));
}
/* Quand un sous-sous-menu est ouvert (niveau 3) : encore plus bas */
body.has-submenu-lvl2 .section-strip{
  top:calc(var(--topbar-height) + var(--submenu-height) + var(--subsubmenu-height));
}
/* ======================================================================== */
/* =========================== SHELL LAYOUT =============================== */
/* ======================================================================== */
.shell{
  max-width:1440px;
  margin:0 auto;
  padding:18px 18px 28px;
  /* valeur de base, surchargée ensuite en JS */
  padding-top:calc(var(--topbar-height) + var(--section-strip-height));
}
.shell--with-sidebar{
  display:grid;
  grid-template-columns:minmax(260px, 320px) minmax(0, 1fr);
  gap:18px;
  max-width:none;
  margin:0;
  padding-left:0;
  transition:grid-template-columns .22s ease, gap .22s ease;
}
/* Ancienne sidebar (si réutilisée ailleurs) */
.sidebar{
  background:var(--bg-0);
  border:1px solid var(--ink-100);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  position:sticky;
  top:calc(var(--topbar-height) + 8px);
  height:max-content;
}
.app-sidebar{
  min-width:0;
  max-height:calc(100vh - var(--topbar-height) - 24px);
  overflow:auto;
  border-left:none;
  border-top-left-radius:0;
  border-bottom-left-radius:0;
  transition:
          opacity .22s ease,
          transform .22s ease,
          padding .22s ease,
          border-width .22s ease;
}
.app-sidebar__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:4px 4px 0;
}
.app-sidebar__close{
  width:34px;
  height:34px;
  flex:0 0 auto;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  border:1px solid var(--ink-100);
  border-radius:999px;

  background:var(--bg-0);
  color:var(--ink-500);

  cursor:pointer;

  transition:
          background-color .18s ease,
          color .18s ease,
          border-color .18s ease,
          transform .08s ease;
}

.app-sidebar__close:hover{
  background:var(--brand-100);
  color:var(--brand-600);
  border-color:var(--brand-200);
}

.app-sidebar__close:active{
  transform:translateY(1px);
}

.app-sidebar__close i,
.app-sidebar__close svg{
  width:18px;
  height:18px;
  stroke-width:2.2;
}
.app-sidebar__eyebrow{
  font:600 11px/1 "Inter",sans-serif;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--ink-400);
}
.app-sidebar__title{
  margin-top:4px;
  font:700 1.15rem/1.2 "Montserrat",sans-serif;
  color:var(--ink-700);
}
.app-sidebar__search{
  position:relative;
  display:flex;
  align-items:center;
  padding:0 2px;
}
.app-sidebar__search-icon{
  position:absolute;
  left:14px;
  width:16px;
  height:16px;
  color:var(--ink-400);
}
.app-sidebar__search-input{
  width:100%;
  border:1px solid var(--ink-100);
  background:var(--bg-50);
  border-radius:12px;
  padding:10px 12px 10px 36px;
  font:500 .95rem/1 "Inter",sans-serif;
  color:var(--ink-700);
  outline:none;
}
.app-sidebar__search-input:focus{
  border-color:var(--brand-300);
  box-shadow:0 0 0 3px rgba(50,185,214,.16);
}
.menu-tree{
  display:flex;
  flex-direction:column;
  gap:0px;
}
.menu-node{
  display:flex;
  flex-direction:column;
  gap:0px;
}
.menu-node[hidden]{
  display:none !important;
}
.menu-node__row{
  display:flex;
  align-items:center;
  gap:8px;
}
.menu-node__row--level-0{padding-left:0;}
.menu-node__row--level-1{padding-left:14px;}
.menu-node__row--level-2{padding-left:28px;}
.menu-node__row--level-3{padding-left:42px;}
.menu-node__row--level-4,
.menu-node__row--level-5,
.menu-node__row--level-6{padding-left:56px;}
.menu-node__link{
  min-width:0;
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 10px;
  border-radius:12px;
  color:var(--ink-700);
  text-decoration:none;
  transition:background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.menu-node__link:hover{
  background:var(--bg-100);
}
.menu-node__link--static{
  cursor:default;
}
.menu-node__icon{
  width:16px;
  height:16px;
  color:var(--ink-400);
  flex:0 0 16px;
}
.menu-node__icon--placeholder{
  border-radius:999px;
  background:var(--ink-200);
  width:8px;
  height:8px;
  margin:0 4px;
  flex:0 0 8px;
}
.menu-node__text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font:500 .95rem/1.2 "Inter",sans-serif;
}
.menu-node__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;

  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;

  color: var(--muted, #64748b);
  cursor: pointer;
}

.menu-node__toggle:hover {
  background: transparent;
  color: var(--text, #0f172a);
}

.menu-node__toggle svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.25;
}

.menu-node__toggle-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

/* Fermé : chevron vers la droite */
.menu-node__toggle[aria-expanded="false"] .menu-node__toggle-icon {
  transform: rotate(-90deg);
}

/* Ouvert : chevron vers le bas */
.menu-node__toggle[aria-expanded="true"] .menu-node__toggle-icon {
  transform: rotate(0deg);
}
.menu-node__children{
  display:none;
  padding-top:0px;
}
.menu-node__children.is-open{
  display:block;
}
.menu-node.is-active-path > .menu-node__row > .menu-node__link{
  background:var(--brand-100);
}
.menu-node.is-current > .menu-node__row > .menu-node__link{
  background:var(--brand-150);
  color:var(--ink-900);
  box-shadow:inset 0 0 0 1px var(--brand-300);
  font-weight:600;
}
.menu-node.is-current > .menu-node__row > .menu-node__link .menu-node__icon,
.menu-node.is-active-path > .menu-node__row > .menu-node__link .menu-node__icon{
  color:var(--brand-600);
}
.section-strip{
  display:none;
}
.sidebar .controls{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:6px 8px 10px;
}
.nav-section{
  border-top:1px dashed var(--ink-100);
  padding-top:8px;
  margin-top:6px;
}
.nav-title{
  font:600 12px/1 "Inter";
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--ink-400);
  padding:8px 10px 6px;
}
/* Item de nav */
.nav-item{
  display:flex;
  align-items:center;
  gap:10px;
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
  color:var(--ink-700);
  border:1px solid transparent;
  transition:background-color .2s ease, border-color .2s ease;
}
.nav-item:hover{background:var(--brand-100);}
.nav-item.active{
  background:var(--brand-300);
  border-color:var(--brand-400);
  color:var(--ink-700);
  font-weight:600;
  box-shadow:inset 0 0 0 1px var(--brand-200);
}
.nav-item .ico{width:20px; height:20px; color:var(--ink-500);}
/* style simple pour indiquer le bouton mode actif */
.nav-item--active {
  background: var(--brand-300);
  border-color: var(--brand-400);
  color: var(--ink-700);
}
/* Sous-menu accordéon dans la sidebar */
.sub{
  display:grid;
  grid-template-rows:0fr;
  transition:grid-template-rows .2s ease;
}
.sub[aria-expanded="true"]{grid-template-rows:1fr;}
.sub-wrap{overflow:hidden;}
.sub a{
  display:flex;
  align-items:center;
  gap:10px;
  margin:6px 0 0 30px;
  padding:8px 10px;
  border-radius:10px;
  color:var(--ink-600);
  text-decoration:none;
}
.sub a:hover{background:var(--bg-100);}
.sub a.active{
  background:var(--brand-150);
  color:var(--ink-700);
  font-weight:600;
}
/* ======================================================================== */
/* ============================ CONTENU GLOBAL ============================ */
/* ======================================================================== */
.page{
  min-height:60vh;
  min-width:0;
  background:var(--bg-0);
  border:1px solid var(--ink-100);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.page h1{
  font:700 28px/1.2 "Montserrat",sans-serif;
  color:var(--ink-700);
  margin:6px 0 14px;
}
/* ===== Accueil : sections + cartes des accès disponibles =============== */
.home-section {
  max-width: 1100px;
  margin: 24px auto 0;
}
.home-section + .home-section {
  margin-top: 32px;
}
.home-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 10px;
  /* Bleu PROCO pâle avec une bordure plus foncée */
  background: var(--brand-150);
  border-left: 13px solid var(--brand-400);
  color: var(--ink-700);
  letter-spacing: .2px;
}
.home-subsection {
  margin-top: 24px;
}
/* Sous-section : Outils > KPI, Formulaires > SSE, etc. */
.home-section-subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 18px 0 8px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--brand-100);
  border-left: 4px solid var(--brand-400);
  color: var(--ink-700);
}
.home-grid {
  max-width: 1100px;
  margin: 16px auto 0;
  display: grid;
  gap: 16px;
}
/* 1 colonne sur mobile, 2 sur medium, 3 sur desktop */
@media (min-width: 640px) {
  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.home-card {
  display: block;
  background: var(--bg-50);
  border: 1px solid var(--ink-100);
  border-radius: 14px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink-700);
  box-shadow: var(--shadow);
  border-bottom:1px solid var(--ink-500);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease;
}
.home-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--brand-300);
  background: var(--bg-0);
}
.home-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink-700);
  border-bottom: 1px solid var(--ink-100);
}
.home-card-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-500);
}
.header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
  margin-bottom:1rem;
}
.header-row h1{margin:0; font-size:1.5rem; font-weight:700;}
/* Boutons génériques */
.btn-primary,.btn-add{
  background-color:var(--brand-500);
  color:#fff;
  font-weight:600;
  padding:8px 16px;
  border-radius:10px;
  text-decoration:none;
  border:1px solid var(--brand-600);
  transition:.2s background-color,.1s transform;
  display:inline-flex;
  align-items:center;
  gap:6px;
  box-shadow:0 2px 4px rgba(0,0,0,.1);
}
.btn-primary:hover,.btn-add:hover{
  background-color:var(--brand-400);
  transform:translateY(-1px);
}
.btn-primary:active,.btn-add:active{
  background-color:var(--brand-600);
  transform:translateY(0);
}
.btn-back{
  background:var(--bg-100);
  color:var(--ink-700);
  text-decoration:none;
  padding:8px 14px;
  border:1px solid var(--ink-100);
  border-radius:10px;
  font-weight:600;
}
/* ======================================================================== */
/* ================================ TABLES =================================*/
/* ======================================================================== */
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:var(--bg-0);
  border:1px solid var(--ink-100);
  border-radius:12px;
  overflow:hidden;
}
.table th,
.table td{
  padding:12px 14px;
  border-bottom:1px solid var(--ink-100);
}
.table th{
  text-align:left;
  font:600 13px/1 "Inter";
  color:var(--ink-500);
  background:var(--brand-150);
  white-space:nowrap;
}
.table tr:last-child td{border-bottom:none;}
.num{font-weight:700; color:var(--ink-700);}
.badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font:700 13px/1 "Inter";
  background:var(--brand-400);
  color:#fff;
  border:1px solid var(--brand-500);
}
.badge.badge-num{
  font-size:.875rem;
  line-height:1.2;
  font-weight:700;
  padding:2px 8px;
}
.actions a{
  margin-left:8px;
  text-decoration:none;
  color:var(--brand-500);
}
.table td.num{
  white-space:nowrap;
  width:1%;
  min-width:90px;
  text-align:right;
  font-family:"Roboto Mono",monospace;
  letter-spacing:.5px;
}
.table td.numeric,
.table td[data-type="float"]{
  text-align:right;
}
/* ======================================================================== */
/* ================================ FOOTER =================================*/
/* ======================================================================== */
.footer{
  margin-top:18px;
  color:var(--ink-500);
  font-weight:600;
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:center;
}
.footer .heart{color:var(--err-500);}
/* ======================================================================== */
/* =============================== RESPONSIVE ==============================*/
/* ======================================================================== */
@media (max-width:900px){
  .shell{grid-template-columns:1fr;}
}
/* ======================================================================== */
/* ========================== Icônes & Feedback =========================== */
/* ======================================================================== */
.sq{
  width:10px;
  height:10px;
  border-radius:3px;
  display:inline-block;
  border:2px solid var(--ink-300);
  background:transparent;
}
.sq-brand,.sq-ok,.sq-warn,.sq-ink{
  border-color:var(--ink-300);
  background:transparent;
}
/* Feedback messages (succès / erreur) */
.feedback{
  margin-top:4px;
  font-size:0.9rem;
  border-radius:8px;
  padding:6px 10px;
}
.feedback--ok{
  background:#dcfce7;
  border:1px solid #16a34a;
  color:#14532d;
}
.feedback--error{
  background:#fee2e2;
  border:1px solid #dc2626;
  color:#7f1d1d;
}
/* ======================================================================== */
/* ========================= Formulaire compact =========================== */
/* ======================================================================== */
.form-wrap{
  background:transparent;
  border:none;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.section-card{
  background:var(--brand-150);
  border:1px solid var(--ink-100);
  border-radius:10px;
  padding:10px 12px;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.section-card h2{
  border-radius:5px;
  margin:0;
  padding:3px 0 3px 10px;
  font-size:1rem;
  font-weight:800;
  color:var(--bg-0);
  background:var(--ink-300);
}
.form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(180px,1fr));
  gap:6px 12px;
}
.form-col label{
  display:block;
  font-weight:600;
  margin-bottom:2px;
  font-size:.85rem;
}
.form-col input,
.form-col select,
.form-col textarea{
  width:100%;
  border:1px solid var(--ink-100);
  border-radius:8px;
  padding:4px 6px;
  height:30px;
  font-size:.9rem;
}
.form-col textarea{min-height:60px;}
.form-col.span-2{grid-column:span 2;}
.form-actions{
  display:flex;
  gap:10px;
  margin-top:6px;
  padding-top:4px;
}
.btn-cancel{
  background:var(--bg-100);
  color:var(--ink-700);
  text-decoration:none;
  padding:6px 14px;
  border:1px solid var(--ink-100);
  border-radius:8px;
  font-weight:700;
}
.form-actions--split{justify-content:space-between;width:100%;}
.form-actions--ends{justify-content:space-between;width:100%;}
.auth-page{
  max-width:560px;
  margin:40px auto;
}
.auth-card{
  padding:24px;
  border:1px solid var(--ink-100);
  border-radius:12px;
  background:var(--bg-0);
  box-shadow:var(--shadow);
}
.auth-title{
  margin:0 0 16px 0;
}
.auth-copy{
  margin:0 0 24px 0;
  color:var(--ink-400);
}
.stack-top-md{
  margin-top:1rem;
}
/* ======================================================================== */
/* ========================= KPI & microbar etc. ========================== */
/* ======================================================================== */
.seg-sse{background:#22c55e33;}
.seg-qual{background:#10a6c833;}
.seg-prod{background:#a855f733;}
.seg-cout{background:#f59e0b33;}
.seg-rh{background:#ef444433;}
@media (prefers-color-scheme: dark){
  .microbar{background:#1f2937; border-color:#334155;}
}
.pill-muted{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-weight:700;
  font-size:.875rem;
  line-height:1.2;
  background:var(--bg-200);
  border:1px solid var(--ink-100);
  color:var(--ink-700);
}
.seg-kpi{background:var(--brand-400);}
.microbar{
  position:relative;
  width:50%;
  height:21px;
  background:var(--bg-100);
  border-radius:999px;
  overflow:hidden;
  border:1px solid var(--ink-100);
}
.microbar .seg{
  display:flex;
  align-items:center;
  justify-content:left;
  height:100%;
  border-radius:999px;
  background:var(--brand-400);
  color:var(--ink-500);
  font-size:11px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
}
.microbar .seg[style*="width:0%"]{
  width:3%;
  opacity:.4;
}
.kpi-label{padding:0 3px;}
/* ======================================================================== */
/* ===================== Listes de pièces & Validation ==================== */
/* ======================================================================== */
#details .pieces-groups{margin-top:12px;}
.categorie-block{
  margin-top:24px !important;
  margin-bottom:16px !important;
  padding-top:12px;
  border-top:1px solid var(--ink-100);
  background:var(--bg-0);
  padding:10px 12px;
  border-radius:8px;
  box-shadow:var(--shadow);
}
.article-block{
  margin-top:16px !important;
  margin-bottom:20px !important;
  padding:12px 0;
  border-radius:8px;
  background-color:var(--bg-0);
  box-shadow:0 1px 3px rgba(0,0,0,.05);
}
.article-block table{margin-top:8px !important;}
.article-title{
  margin-bottom:8px !important;
  color:var(--ink-700);
  font-weight:700;
}
.pieces-groups{
  margin-top:20px !important;
  margin-bottom:40px !important;
}
.categorie-block h3{
  background-color:color-mix(in srgb, var(--brand-400) 35%, transparent);
  border-radius:6px;
  padding:6px 10px;
  font-weight:700;
  color:var(--ink-700);
  margin:0 0 10px 0 !important;
}
.article-title{
  background-color:color-mix(in srgb, #f3e3c3 88%, var(--bg-0));
  border-radius:6px;
  padding:6px 10px;
  font-weight:800;
  color:var(--ink-700);
  margin:8px 0 10px 0 !important;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
  border:1px solid color-mix(in srgb, #e0cfa7 60%, var(--bg-0));
}
/* Bloc émission */
#emission-block{
  padding:12px;
  background:var(--bg-0);
  border:1px solid var(--ink-100);
  border-radius:10px;
  box-shadow:var(--shadow);
  margin-top:16px;
}
#emission-block .emission-subtitle{
  margin:14px 0 8px 0;
  font-weight:800;
  color:var(--ink-700);
  font-size:1.05rem;
}
#emission-block .val-stack-top{margin-top:8px;}
#emission-block .pieces-groups{margin-top:8px;}
#emission-block .categorie-block{margin-top:16px !important;}
#emission-block .article-block{margin-top:12px !important;}
#emission-block .table{margin-top:8px;}
#emission-block h2{margin:4px 0 8px 0;}
/* Validation – classes val-* (acc, pièces, etc.) */
.val-flex{display:flex; align-items:center;}
.val-flex-gap-8{gap:8px;}
.val-flex-gap-12{gap:8px;}
.val-flex-gap-16{gap:10px;}
.val-justify-between{justify-content:space-between;}
.val-nowrap{white-space:nowrap;}
.val-num{font-variant-numeric:tabular-nums;}
.val-chip-row{display:flex; align-items:center; gap:8px; white-space:nowrap;}
.val-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:22px;
  padding:0 8px;
  margin-left:6px;
  border:1px solid var(--ink-200);
  border-radius:999px;
  font-size:12px;
  line-height:1;
  background:#eef2f7;
  color:#606a7a;
  user-select:none;
}
.val-chip.is-on{
  background:#22c55e;
  border-color:#22c55e;
  color:#0b3b1e;
}
.val-acc{
  border:1px solid var(--ink-200);
  border-radius:10px;
  padding:6px 10px;
  font-weight:700;
}
.val-acc-btn{cursor:pointer;}
.val-acc-caret{text-align:right; font-size:13px; line-height:1;}
.val-acc--emission{background:var(--val-emission-bg); border-color:var(--val-emission-bd);}
.val-acc--categorie{background:var(--val-categorie-bg); border-color:var(--val-categorie-bd);}
.val-acc--article{background:var(--val-article-bg); border-color:var(--val-article-bd);}
.val-grid-piece{
  display:grid;
  grid-template-columns:140px 260px 60px 1fr 260px 20px;
  align-items:center;
  gap:8px;
}
.val-piece{
  background:#fff;
  border:1px solid #e6eaef;
  border-radius:10px;
  padding:6px 10px;
  margin:1px 0;
}
.val-piece--main{
  border-color:#0ea5e9;
  border-width:2px;
  box-shadow:0 0 0 2px rgba(14,165,233,.15) inset;
}
.val-piece-code{font-weight:700; cursor:help; color:#0a58ca;}
.val-piece-desc{
  width:260px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  opacity:.9;
}
.val-piece-m2{width:60px; text-align:right;}
.val-piece-files{
  width:260px;
  display:flex;
  align-items:center;
  gap:16px;
}
.val-acc-body{padding:2px 0 4px 8px;}
.val-filter-msg{margin:4px 2px 0 2px; font-weight:600; color:var(--ink-600);}
/* Hovercard info */
.val-hovercard{
  position: fixed;
  z-index: 90;
  max-width: 420px;
  background: var(--bg-0);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow);
  border-radius: 10px;
  padding: 12px;
  max-height: 60vh;
  overflow-y: auto;
  pointer-events: none;
  font-size: 0.9rem;
  box-sizing: border-box;
  flex-direction: column;
}
.hovercard-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.val-hovercard .kv{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px;
  margin: 2px 0;
}
.val-hovercard .k{
  font-weight: 600;
  color: var(--ink-800);
}
.val-hovercard .v{
  color: var(--ink-600);
  opacity: .9;
}
.val-badge{
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  height: 18px;
  line-height: 18px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-100);
  background-color: var(--brand-500);
  border: 1px solid var(--brand-600);
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  vertical-align: middle;
}
/* Pièces en écrasement */
.val-piece.is-overwrite{
  background-color:color-mix(in srgb, #fff4b0 60%, var(--brand-150) 40%) !important;
  border-color:color-mix(in srgb, #ffd966 60%, var(--brand-300) 40%);
  box-shadow:0 0 0 1px color-mix(in srgb, #ffe890 40%, var(--brand-200) 60%) inset;
}
.val-piece-alert{
  grid-column:6 / 7;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
.val-piece-alert .pill-warning{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  border-radius:999px;
  background:linear-gradient(180deg, #fff973 0%, #ffe14d 100%);
  border:1px solid #e6b800;
  box-shadow:0 1px 3px rgba(0,0,0,0.15);
  cursor:help;
  position:relative;
}
.val-piece-alert .pill-warning i{
  width:18px;
  height:18px;
  color:#7a5c00;
  stroke-width:2.5;
}
.val-piece-alert .pill-warning::after{
  content:"Écrasement!";
  white-space:pre-line;
  position:absolute;
  bottom:110%;
  right:0;
  transform:translateY(-4px);
  background:var(--ink-700);
  color:#fff;
  font-size:0.72rem;
  font-weight:600;
  padding:6px 8px;
  border-radius:6px;
  max-width:160px;
  text-align:right;
  box-shadow:0 2px 6px rgba(0,0,0,0.25);
  opacity:0;
  pointer-events:none;
  transition:opacity .15s ease-out, transform .15s ease-out;
  line-height:1.2;
  z-index:20;
}
.val-piece-alert .pill-warning::before{
  content:"";
  position:absolute;
  bottom:124%;
  right:6px;
  border:6px solid transparent;
  border-top-color:var(--ink-700);
  opacity:0;
  transition:opacity .15s ease-out;
}
.val-piece-alert .pill-warning:hover::after,
.val-piece-alert .pill-warning:hover::before{
  opacity:1;
  transform:translateY(-6px);
}
/* Ajustements d’espacements dans le bloc émission */
#emission-block .val-acc-body{
  padding:8px 0 4px 8px !important;
}
#emission-block .val-acc--emission{
  margin-bottom:8px !important;
}
#emission-block .acc-body{padding-top:0 !important;}
#emission-block .acc-body > .val-acc--article:first-child{
  margin-top:8px !important;
}
/* ======================================================================== */
/* =================== Tableau requisitions (autofab-table) =============== */
/* ======================================================================== */
.autofab-table{
  width:100%;
  border-collapse:collapse;
  margin-top:12px;
  font-size:14px;
}
.autofab-table thead th{
  background-color:var(--brand-300);
  color:#fff;
  font-weight:600;
  padding:10px;
  text-align:left;
  border-bottom:2px solid var(--brand-500);
}
.autofab-table tbody td{
  padding:8px 10px;
  vertical-align:top;
}
.autofab-table .center{text-align:center;}
.autofab-table .row-light{background-color:#e5f8ff;}
.autofab-table .row-dark{background-color:#d0edf7;}
.autofab-table .col-small{width:70px; text-align:center;}
.autofab-table .col-medium{width:150px;}

/* ======================================================================== */
/* ======================= Sidebar desktop fermable ======================= */
/* ======================================================================== */

@media (min-width:901px){
  body.sidebar-collapsed .shell--with-sidebar{
    grid-template-columns:0 minmax(0, 1fr);
    gap:0;
  }

  body.sidebar-collapsed #app-sidebar{
    width:0;
    min-width:0;
    padding-left:0;
    padding-right:0;
    border-left-width:0;
    border-right-width:0;
    opacity:0;
    pointer-events:none;
    overflow:hidden;
    transform:translateX(-12px);
  }

  body.sidebar-collapsed .page{
    width:100%;
  }

  body.sidebar-collapsed .topbar-burger {
    display:inline-flex;
  }

  body:not(.sidebar-collapsed) .topbar-burger {
    display:none;
  }
}
/* ======================================================================== */
/* ==================== Burger + sidebar mobile =========================== */
/* ======================================================================== */
.topbar-burger {
  display:none;
  width:32px;
  height:32px;
  border-radius:999px;
  border:1px solid var(--ink-100);
  background:var(--bg-0);
  align-items:center;
  justify-content:center;
  padding:0;
  margin-right:8px;
  cursor:pointer;
}

/* Nouveau : style de l’icône Lucide */
.topbar-burger i {
  width:18px;
  height:18px;
  color:var(--ink-600);
}

/* Optionnel : couleur différente quand la sidebar est ouverte */
body.sidebar-open .topbar-burger i {
  color:var(--brand-100);
}

@media (max-width:900px){
  .topbar-burger{display:inline-flex;}
  body.sidebar-open .topbar-burger{display:none;}
  .shell,
  .shell--with-sidebar{display:block;}
  .app-sidebar.sidebar{
    position:fixed;
    top:var(--topbar-height);
    left:0;
    width:min(280px, 80vw);
    height:calc(100% - var(--topbar-height));
    background:var(--bg-0);
    transform:translateX(-100%);
    transition:transform .25s ease;
    z-index:1001;
    border-radius:0 16px 16px 0;
    max-height:none;
  }
  body.sidebar-open .app-sidebar.sidebar{
    transform:translateX(0);
    box-shadow:0 0 0 1px var(--ink-100),0 20px 40px rgba(15,23,42,.45);
  }
  body.sidebar-open::before{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.35);
    z-index:900;
  }
}
/* ======================================================================== */
/* ======================= Page-toolbar (filtres) ========================= */
/* ======================================================================== */
.page-toolbar{
  position:sticky;
  top:0;
  z-index:20;
  margin:-18px -18px 12px;
  padding:10px 18px;
  background:var(--bg-0);
  border-bottom:1px solid var(--ink-100);
}
.page-toolbar .filters-card{
  margin-top:0;
  box-shadow:none;
}
.page-toolbar .filters-card-header{
  background:var(--brand-150);
}
/* Carte filtres (validation) */
.filters-card{
  margin-top:8px;
  border:1px solid var(--ink-100);
  border-radius:12px;
  background:var(--brand-150);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.filters-card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  background:var(--brand-200);
  border-bottom:1px solid var(--ink-100);
}
.filters-card-title{
  font:700 13px/1 "Inter";
  color:var(--ink-700);
  letter-spacing:.02em;
}
.filters-card-body{
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.filters-group{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.filters-title{
  font-weight:700;
  color:var(--ink-600);
}
.ck{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:.95rem;
  color:var(--ink-700);
}
@media (max-width:900px){
  .filters-card{position:static;}
}
/* Conteneur sous la barre orange, pleine largeur */
.global-messages {
  position: relative;
  z-index: 800;            /* au-dessus du contenu, sous le topbar si besoin */
}
/* Message individuel */
.global-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
/* Couleur par type (Django utilise: debug, info, success, warning, error) */
.global-message--success {
  background: #16a34a20;  /* vert très pâle */
  color: #166534;
  border-top: 2px solid #16a34a;
}
.global-message--error {
  background: #dc262620;  /* rouge très pâle */
  color: #7f1d1d;
  border-top: 2px solid #dc2626;
}
.global-message--warning {
  background: #f9731620;
  color: #7c2d12;
  border-top: 2px solid #f97316;
}
.global-message--info {
  background: #0ea5e920;
  color: #075985;
  border-top: 2px solid #0ea5e9;
}
/* Bouton X */
.global-message__close {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 0.75rem;
}
/* Icônes dans les cartes de l'accueil */
.home-card-title {
  display: flex;
  align-items: flex-end;   /* 👈 texte aligné au bas de l'icône */
  gap: 8px;
}
.home-card-icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  flex-shrink: 0;          /* empêche l'icône de rapetisser */
  margin-bottom: 1px;      /* petit tweak pour un alignement parfait */
}
.lot-card {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.lot-header {
  font-size: 18px;
  margin-bottom: 10px;
}
.progress-bar-wrapper {
  height: 10px;
  background: #eee;
  border-radius: 8px;
  margin-bottom: 12px;
}
.progress-bar {
  height: 100%;
  border-radius: 8px;
  background: #5a4ce3;
}
.text-red {
  color: #cc0000;
}
.text-green {
  color: #008800;
}
.hidden { display: none !important; }

/* ======================================================================== */
/* ========================= PAGE PROFIL UTILISATEUR ====================== */
/* ======================================================================== */

/* Page profil : plus de marge intérieure */
.page--profile {
  padding: 24px 32px 26px;  /* gauche/droite = 32px au lieu de 18 */
}

/* Optionnel : laisser un peu plus de marge sous le header */
.profile-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 20px;     /* ← plus d’air avant la grille */
  border-bottom: 1px solid var(--ink-100);
}

.profile-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--bg-0);
  background: radial-gradient(circle at 30% 20%, var(--brand-300), var(--brand-600));
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}

.page--profile .page-title {
  margin: 0;
  font: 700 24px/1.2 "Montserrat", sans-serif;
  color: var(--ink-700);
}

.profile-subtitle {
  margin: 2px 0 0;
  font-size: 0.95rem;
  color: var(--ink-500);
}

.profile-subtitle--muted {
  font-style: italic;
  color: var(--ink-400);
}

.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Layout 2 colonnes */
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 0.9fr);
  gap: 18px;
}

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

/* Carte principale */
.profile-card {
  padding-left: 28px;
  padding-right: 28px;
}

.profile-card .card-body {
  padding-left: 28px;
  padding-right: 28px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 10px;
}

@media (max-width: 700px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

.profile-field {
  padding: 8px 0;
  margin-bottom: 10px;  /* ← espace entre les blocs */
  border-bottom: 1px solid rgba(226,232,240,0.8);
}

.profile-field.profile-field--full .profile-value {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.profile-pill,
.profile-role {
  margin: 0 4px 4px 0;
}

.profile-field:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

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

.profile-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 4px;
}

.profile-value {
  font-size: 0.97rem;
  color: var(--ink-700);
}

/* Liens / puces */
.profile-mail-link {
  color: var(--brand-600);
  text-decoration: none;
  font-weight: 500;
}
.profile-mail-link:hover {
  text-decoration: underline;
}

.profile-pill {
  margin: 0 4px 4px 0;
}

/* Indicateur "vide" */
.profile-empty {
  font-style: italic;
  color: var(--ink-400);
}

/* Rôles / statuts */
.profile-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Capsule de rôle */
.profile-role {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-100);
  border: 1px solid var(--ink-100);
  color: var(--ink-700);
}

.profile-role.role--superuser {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}
.profile-role.role--staff {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #075985;
}
.profile-role.role--user {
  background: var(--bg-100);
}

/* Colonne latérale */
.profile-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-side-card {
  border-radius: 12px;
  border: 1px solid var(--ink-100);
  background: linear-gradient(135deg, var(--brand-150), var(--bg-0));
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
}

.profile-side-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-600);
}

.profile-side-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-side-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
}

.profile-side-label {
  color: var(--ink-500);
}

.profile-side-value {
  font-weight: 600;
  color: var(--ink-700);
}

.profile-status {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.profile-status--ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #16a34a;
}
.profile-status--err {
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #dc2626;
}

/* Bouton-lien clair */
.btn-link {
  color: var(--brand-600);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}
.btn-link:hover {
  text-decoration: underline;
}

/* ======================================================================== */
/* ======================= APPLICATION INFO DRAWER ======================== */
/* ======================================================================== */

.app-card {
  position: relative;
  overflow: hidden;
  min-height: 80px;
}

.app-card__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.app-card__link:hover {
  color: inherit;
  text-decoration: none;
}

.app-card__link--disabled {
  cursor: default;
}

.app-card__body {
  padding-right: 42px;
}

.app-card__info {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;

  width: 30px;
  height: 30px;
  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: 1px solid var(--ink-100);

  background: var(--bg-0);
  color: var(--brand-600);

  cursor: pointer;
  box-shadow: 0 2px 8px rgba(14,23,38,.12);

  transition:
          transform .15s ease,
          background-color .15s ease,
          color .15s ease,
          border-color .15s ease,
          box-shadow .15s ease;
}

.app-card__info:hover {
  transform: scale(1.06);
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-600);
  box-shadow: 0 4px 12px rgba(10,147,176,.35);
}

.app-card__info:focus-visible {
  outline: 3px solid rgba(50,185,214,.35);
  outline-offset: 2px;
}

.app-card__info i,
.app-card__info svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.app-info-extra-template {
  display: none;
}

/* Backdrop */
.info-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;

  opacity: 0;
  pointer-events: none;

  background: rgba(14,23,38,.38);

  transition: opacity .2s ease;
}

.info-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer */
.app-info-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1100;

  width: min(460px, calc(100vw - 28px));
  height: 100vh;

  display: flex;
  flex-direction: column;

  background: var(--bg-0);
  color: var(--ink-700);

  border-left: 1px solid var(--ink-100);
  box-shadow: -14px 0 34px rgba(14,23,38,.25);

  transform: translateX(110%);
  transition: transform .25s ease;
}

.app-info-drawer.is-open {
  transform: translateX(0);
}

.app-info-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 18px 18px 14px;

  background: linear-gradient(135deg, var(--brand-150), var(--bg-0));
  border-bottom: 1px solid var(--ink-100);
}

.app-info-drawer__heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-info-drawer__icon {
  width: 42px;
  height: 42px;

  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  color: #fff;
  background: var(--brand-600);
  box-shadow: 0 4px 10px rgba(8,107,133,.25);
}

.app-info-drawer__icon i,
.app-info-drawer__icon svg {
  width: 21px;
  height: 21px;
}

.app-info-drawer__eyebrow {
  margin-bottom: 2px;

  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;

  color: var(--brand-600);
}

.app-info-drawer__title {
  margin: 0;

  font: 700 1.15rem/1.25 "Montserrat", sans-serif;
  color: var(--ink-700);

  overflow-wrap: anywhere;
}

.app-info-drawer__close {
  width: 34px;
  height: 34px;

  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--ink-100);
  border-radius: 999px;

  background: var(--bg-0);
  color: var(--ink-500);

  font-size: 1.45rem;
  line-height: 1;

  cursor: pointer;
}

.app-info-drawer__close:hover {
  background: var(--brand-100);
  color: var(--ink-700);
}

.app-info-drawer__body {
  padding: 18px;
  overflow-y: auto;
}

.app-info-drawer__screenshot-wrap {
  margin: 0 0 18px;
}

.app-info-drawer__screenshot {
  display: block;

  width: 320px;
  max-width: 100%;
  aspect-ratio: 16 / 9;

  object-fit: cover;

  border-radius: 12px;
  border: 1px solid var(--ink-100);
  background: var(--bg-100);
  box-shadow: var(--shadow);
}

.app-info-drawer__section {
  margin-bottom: 18px;
}

.app-info-drawer__section h3,
.app-info-extra-section h3 {
  margin: 0 0 8px;

  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;

  color: var(--ink-500);
}

.app-info-drawer__app-name {
  margin: 0;

  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink-700);
}

.app-info-drawer__description {
  margin: 0;
  color: var(--ink-600);
  font-size: .95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.app-info-meta {
  margin: 0;

  border: 1px solid var(--ink-100);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-50);
}

.app-info-meta__row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 10px;

  padding: 10px 12px;

  border-bottom: 1px solid var(--ink-100);
}

.app-info-meta__row:last-child {
  border-bottom: none;
}

.app-info-meta dt {
  margin: 0;

  font-size: .82rem;
  font-weight: 800;
  color: var(--ink-500);
}

.app-info-meta dd {
  margin: 0;

  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-700);
  text-align: right;
}

.app-info-drawer__extra {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.app-info-rich-text {
  padding: 12px;

  border-radius: 12px;
  border: 1px solid var(--ink-100);

  background: var(--brand-100);
  color: var(--ink-700);

  font-size: .92rem;
  line-height: 1.55;
}

.app-info-history {
  margin: 0;
  padding-left: 0;

  list-style: none;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-info-history__item {
  padding: 12px;

  border-radius: 12px;
  border: 1px solid var(--ink-100);

  background: var(--bg-50);
}

.app-info-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  margin-bottom: 4px;
}

.app-info-history__version {
  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;

  padding: 2px 8px;

  border-radius: 999px;

  font-size: .75rem;
  font-weight: 800;

  background: var(--brand-150);
  color: var(--brand-600);
  border: 1px solid var(--brand-300);
}

.app-info-history__date {
  margin-bottom: 6px;

  font-size: .8rem;
  font-weight: 700;
  color: var(--ink-400);
}

.app-info-history__description {
  font-size: .9rem;
  line-height: 1.5;
  color: var(--ink-600);
}

.app-info-drawer__link {
  margin-top: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 9px 14px;

  border-radius: 10px;
  border: 1px solid var(--brand-600);

  background: var(--brand-500);
  color: #fff;

  font-weight: 700;
  text-decoration: none;
}

.app-info-drawer__link:hover {
  background: var(--brand-400);
  color: #fff;
  text-decoration: none;
}

body.info-drawer-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .app-info-drawer {
    width: min(92vw, 460px);
  }

  .app-info-meta__row {
    grid-template-columns: 1fr;
  }

  .app-info-meta dd {
    text-align: left;
  }
}

.app-sidebar__favorites {
  padding: 0.75rem 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.app-sidebar__favorites-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.25rem 0.15rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  cursor: pointer;
}

.app-sidebar__favorites-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #64748b);
}

.app-sidebar__favorites-chevron {
  width: 14px;
  height: 14px;
}

.app-sidebar__favorites-chevron {
  transition: transform 0.18s ease;
}

.app-sidebar__favorites.is-collapsed .app-sidebar__favorites-chevron {
  transform: rotate(-90deg);
}

.app-sidebar__favorites-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-sidebar__favorite-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.app-sidebar__favorite-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.5rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.875rem;
}

.app-sidebar__favorite-link:hover {
  background: rgba(148, 163, 184, 0.16);
}

.app-sidebar__favorite-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar__favorite-link.is-current {
  background: var(--brand-150);
  color: var(--ink-900);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--brand-300);
}

.app-sidebar__favorite-remove {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #64748b);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.app-sidebar__favorite-remove:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.app-sidebar__favorite-remove i {
  width: 14px;
  height: 14px;
}

.app-sidebar__favorite-remove:disabled {
  opacity: 0.45;
  cursor: wait;
}

.app-sidebar__favorites-list[hidden],
.app-sidebar__favorites.is-collapsed .app-sidebar__favorites-list {
  display: none !important;
}

/* ======================================================================== */
/* ==================== ÉTAT ACTIF DU MENU DE GAUCHE ====================== */
/* ======================================================================== */

/*
  Ces règles complètent les anciennes règles :
  - .menu-node.is-current
  - .menu-node.is-active-path
  - .menu-node__link.is-current
  - .menu-node__link.is-active-path

  Objectif :
  Voir clairement où l'utilisateur est rendu,
  et garder ouverte la bonne branche du menu.
*/

/* Branche active : parent ou ancêtre de la page courante */
.menu-node.is-active-path > .menu-node__row > .menu-node__link,
.menu-node__link.is-active-path {
  background: var(--brand-100);
  color: var(--ink-800, var(--ink-700));
}

/* Élément courant exact */
.menu-node.is-current > .menu-node__row > .menu-node__link,
.menu-node__link.is-current {
  background: var(--brand-150);
  color: var(--ink-900);
  box-shadow: inset 0 0 0 1px var(--brand-300);
  font-weight: 700;
}

/* Petite barre visuelle à gauche sur l'item courant */
.menu-node.is-current > .menu-node__row > .menu-node__link,
.menu-node__link.is-current {
  position: relative;
}

.menu-node.is-current > .menu-node__row > .menu-node__link::before,
.menu-node__link.is-current::before {
  content: "";
  width: 4px;
  align-self: stretch;
  border-radius: 999px;
  background: var(--brand-600);
  margin-right: 2px;
}

/* Icône colorée quand actif */
.menu-node.is-current > .menu-node__row > .menu-node__link .menu-node__icon,
.menu-node.is-active-path > .menu-node__row > .menu-node__link .menu-node__icon,
.menu-node__link.is-current .menu-node__icon,
.menu-node__link.is-active-path .menu-node__icon {
  color: var(--brand-600);
}

/* Texte plus visible quand actif */
.menu-node.is-current > .menu-node__row > .menu-node__link .menu-node__text,
.menu-node__link.is-current .menu-node__text {
  font-weight: 700;
}

/* Les enfants sont fermés par défaut */
.menu-node__children {
  display: none;
}

/* Les enfants s'ouvrent quand Django/JS ajoute is-open */
.menu-node__children.is-open {
  display: block;
}

/* Chevron ouvert/fermé */
.menu-node__toggle[aria-expanded="false"] .menu-node__toggle-icon {
  transform: rotate(-90deg);
}

.menu-node__toggle[aria-expanded="true"] .menu-node__toggle-icon {
  transform: rotate(0deg);
}

/* Mettre le bouton d'ouverture en évidence dans une branche active */
.menu-node.is-active-path > .menu-node__row > .menu-node__toggle {
  color: var(--brand-600);
}

/* Focus clavier plus visible */
.menu-node__link:focus-visible,
.menu-node__toggle:focus-visible {
  outline: 3px solid rgba(50, 185, 214, 0.28);
  outline-offset: 2px;
}

/* Pas de barre à gauche sur le menu courant */
.menu-node.is-current > .menu-node__row > .menu-node__link::before,
.menu-node__link.is-current::before {
  display: none !important;
  content: none !important;
}

/* Sécurité : aucun point sur les dossiers */
.menu-node--folder > .menu-node__row .menu-node__app-dot {
  display: none !important;
}

/* Menu dans le chemin actif */
.menu-node.is-active-path > .menu-node__row > .menu-node__link,
.menu-node__link.is-active-path {
  background: var(--brand-100);
  color: var(--ink-700);
}

/* Menu courant exact */
.menu-node.is-current > .menu-node__row > .menu-node__link,
.menu-node__link.is-current {
  background: var(--brand-150);
  color: var(--ink-900);
  box-shadow: inset 0 0 0 1px var(--brand-300);
  font-weight: 700;
}

/* Icône du menu actif */
.menu-node.is-current > .menu-node__row > .menu-node__link .menu-node__icon,
.menu-node.is-active-path > .menu-node__row > .menu-node__link .menu-node__icon,
.menu-node__link.is-current .menu-node__icon,
.menu-node__link.is-active-path .menu-node__icon {
  color: var(--brand-600);
}

/* Aucun trait/barre à gauche */
.menu-node.is-current > .menu-node__row > .menu-node__link::before,
.menu-node__link.is-current::before {
  display: none !important;
  content: none !important;
}

/* ======================================================================== */
/* ===================== MENU POINTS + FAVORIS SANS ÉTOILES =============== */
/* ======================================================================== */

/* Point des applications dans le menu principal */
.menu-node__app-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.65;
  flex: 0 0 auto;
  margin-inline: 0.35rem;
}

/* Point plus visible quand l'application est active */
.menu-node__link.is-current .menu-node__app-dot,
.menu-node.is-current > .menu-node__row > .menu-node__link .menu-node__app-dot,
.menu-node__link.is-active-path .menu-node__app-dot,
.menu-node.is-active-path > .menu-node__row > .menu-node__link .menu-node__app-dot {
  opacity: 1;
  color: var(--brand-600);
}

/* ======================================================================== */
/* ============================ BLOC FAVORIS ============================== */
/* ======================================================================== */

/* Le bouton complet, incluant le mot Favoris, est cliquable */
.app-sidebar__favorites-toggle {
  cursor: pointer;
}

.app-sidebar__favorites-title {
  cursor: pointer;
}

/* Liste des favoris */
.app-sidebar__favorites-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Lien favori avec point */
.app-sidebar__favorite-link {
  flex: 1;
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 0.55rem;

  padding: 0.45rem 0.55rem;
  border-radius: 0.5rem;

  color: inherit;
  text-decoration: none;
  font-size: 0.875rem;
}

/* Point dans la liste des favoris */
.app-sidebar__favorite-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.65;
  flex: 0 0 auto;
}

/* Favori courant */
.app-sidebar__favorite-link.is-current .app-sidebar__favorite-dot {
  color: var(--brand-600);
  opacity: 1;
}

/* Texte dans les favoris */
.app-sidebar__favorite-link span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Message quand aucun favori */
.app-sidebar__favorites-empty {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-400);
  opacity: 0.85;
}

/* Bouton supprimer favori */
.app-sidebar__favorite-remove {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-400);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  flex-shrink: 0;
}

.app-sidebar__favorite-remove:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.app-sidebar__favorite-remove i,
.app-sidebar__favorite-remove svg {
  width: 14px;
  height: 14px;
}

.app-sidebar__favorite-remove:disabled,
.app-sidebar__favorite-remove.is-loading {
  opacity: 0.45;
  cursor: wait;
}

/* ======================================================================== */
/* ============================ FAVORIS MENU ============================== */
/* ======================================================================== */

.app-sidebar__favorites {
  padding: 0.5rem 0.25rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.app-sidebar__favorites-toggle {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0.45rem 0.55rem;

  border: 1px solid var(--ink-200);
  border-radius: 0.45rem;

  background: var(--bg-0);
  color: var(--ink-700);

  cursor: pointer;
}

.app-sidebar__favorites-toggle:hover {
  background: var(--brand-100);
  border-color: var(--brand-300);
}

.app-sidebar__favorites-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-700);
  cursor: pointer;
}

.app-sidebar__favorites-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.app-sidebar__favorites.is-collapsed .app-sidebar__favorites-chevron {
  transform: rotate(-90deg);
}

.app-sidebar__favorites-list {
  margin-top: 0.35rem;

  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-sidebar__favorites-list[hidden],
.app-sidebar__favorites.is-collapsed .app-sidebar__favorites-list {
  display: none !important;
}

.app-sidebar__favorite-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.app-sidebar__favorite-link {
  flex: 1;
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 0.55rem;

  padding: 0.45rem 0.55rem;
  border-radius: 0.5rem;

  color: var(--ink-700);
  text-decoration: none;
  font-size: 0.875rem;
}

.app-sidebar__favorite-link:hover {
  background: var(--bg-100);
}

.app-sidebar__favorite-link.is-current {
  background: var(--brand-150);
  color: var(--ink-900);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--brand-300);
}

.app-sidebar__favorite-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.65;
  flex: 0 0 auto;
}

.app-sidebar__favorite-link.is-current .app-sidebar__favorite-dot {
  color: var(--brand-600);
  opacity: 1;
}

.app-sidebar__favorite-link span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar__favorite-remove {
  width: 26px;
  height: 26px;

  border: 0;
  border-radius: 999px;

  background: transparent;
  color: var(--ink-400);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  flex-shrink: 0;
}

.app-sidebar__favorite-remove:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.app-sidebar__favorite-remove i,
.app-sidebar__favorite-remove svg {
  width: 14px;
  height: 14px;
}

.app-sidebar__favorites-empty {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-400);
  opacity: 0.85;
}

/* ======================================================================== */
/* ======================= FAVORITES MANAGER MODAL ======================== */
/* ======================================================================== */

.favorites-manager-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;

  background: rgba(14, 23, 38, 0.38);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.2s ease;
}

.favorites-manager-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.favorites-manager {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1090;

  width: min(720px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));

  display: flex;
  flex-direction: column;

  background: var(--bg-0);
  color: var(--ink-700);

  border: 1px solid var(--ink-100);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(14, 23, 38, 0.32);

  transform: translate(-50%, -48%) scale(0.96);
  opacity: 0;
  pointer-events: none;

  transition:
          opacity 0.2s ease,
          transform 0.2s ease;
}

.favorites-manager.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.favorites-manager__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 18px 20px 14px;

  background: linear-gradient(135deg, var(--brand-150), var(--bg-0));
  border-bottom: 1px solid var(--ink-100);
  border-radius: 18px 18px 0 0;
}

.favorites-manager__eyebrow {
  margin-bottom: 3px;

  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: var(--brand-600);
}

.favorites-manager__title {
  margin: 0;

  font: 700 1.15rem/1.25 "Montserrat", sans-serif;
  color: var(--ink-700);
}

.favorites-manager__close {
  width: 34px;
  height: 34px;

  border: 1px solid var(--ink-100);
  border-radius: 999px;

  background: var(--bg-0);
  color: var(--ink-500);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 1.45rem;
  line-height: 1;

  cursor: pointer;
}

.favorites-manager__close:hover {
  background: var(--brand-100);
  color: var(--ink-700);
}

.favorites-manager__body {
  padding: 0 20px 20px;
  overflow: auto;
  background: var(--bg-0);
}

.favorites-manager__search {
  position: sticky;
  top: 0;
  z-index: 20;

  display: flex;
  align-items: center;
  gap: 8px;

  margin: 0 -20px 14px;
  padding: 14px 20px;

  border-bottom: 1px solid var(--ink-100);

  background: var(--bg-0);
  box-shadow: 0 8px 14px rgba(14, 23, 38, 0.10);
}

.favorites-manager__search i,
.favorites-manager__search svg {
  width: 16px;
  height: 16px;
  color: var(--ink-400);
}

.favorites-manager__search input {
  flex: 1;

  border: 1px solid var(--ink-100);
  border-radius: 12px;
  outline: 0;
  background: var(--bg-50);

  padding: 9px 12px;

  font: 500 0.95rem/1 "Inter", sans-serif;
  color: var(--ink-700);
}

.favorites-manager__search input:focus {
  border-color: var(--brand-300);
  box-shadow: 0 0 0 3px rgba(50, 185, 214, 0.16);
}

.favorites-manager__search i,
.favorites-manager__search svg {
  width: 16px;
  height: 16px;
  color: var(--ink-400);
}

.favorites-manager__search input {
  flex: 1;

  border: 0;
  outline: 0;
  background: transparent;

  font: 500 0.95rem/1 "Inter", sans-serif;
  color: var(--ink-700);
}

.favorites-manager__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.favorites-manager__item {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px;

  border: 1px solid var(--ink-100);
  border-radius: 12px;

  background: var(--bg-50);
}

.favorites-manager__item:hover {
  background: var(--bg-0);
  border-color: var(--brand-200);
}

.favorites-manager__app {
  flex: 1;
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 10px;

  color: var(--ink-700);
  text-decoration: none;
}

.favorites-manager__app:hover {
  color: var(--brand-600);
}

.favorites-manager__dot {
  width: 0.5rem;
  height: 0.5rem;

  flex: 0 0 auto;

  border-radius: 999px;
  background: currentColor;
  opacity: 0.65;
}

.favorites-manager__app-label {
  min-width: 0;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  font-weight: 600;
}

.favorites-manager__favorite-btn {
  flex: 0 0 auto;

  min-width: 88px;

  padding: 6px 10px;

  border: 1px solid var(--ink-200);
  border-radius: 999px;

  background: var(--bg-0);
  color: var(--ink-600);

  font-weight: 700;
  font-size: 0.82rem;

  cursor: pointer;
}

.favorites-manager__favorite-btn:hover {
  background: var(--brand-100);
  border-color: var(--brand-300);
  color: var(--brand-600);
}

.favorites-manager__favorite-btn.is-favorite {
  background: var(--brand-500);
  border-color: var(--brand-600);
  color: #fff;
}

.favorites-manager__favorite-btn.is-favorite:hover {
  background: var(--brand-600);
  color: #fff;
}

.favorites-manager__favorite-btn.is-loading,
.favorites-manager__favorite-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.favorites-manager__empty {
  padding: 18px;

  text-align: center;
  color: var(--ink-400);

  border: 1px dashed var(--ink-200);
  border-radius: 12px;

  background: var(--bg-50);
}

body.favorites-manager-open {
  overflow: hidden;
}

/* ======================================================================== */
/* ===================== TYPOGRAPHIE MENU GAUCHE ========================== */
/* ======================================================================== */

/* ======================================================================== */
/* Parent racine : parent qui n'a pas de parent                             */
/* Exemple : Production, Qualité, SSE, Administration                       */
/* ======================================================================== */

.menu-node--root-folder > .menu-node__row > .menu-node__link .menu-node__text,
.menu-node--root-folder > .menu-node__row > .menu-node__link--static .menu-node__text {
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--brand-600);
}

/* Parent racine dans le chemin actif */
.menu-node--root-folder.is-active-path > .menu-node__row > .menu-node__link .menu-node__text,
.menu-node--root-folder.is-active-path > .menu-node__row > .menu-node__link--static .menu-node__text {
  color: var(--brand-600);
  font-weight: 800;
}

/* Parent racine au hover */
.menu-node--root-folder > .menu-node__row > .menu-node__link:hover .menu-node__text,
.menu-node--root-folder > .menu-node__row > .menu-node__link--static:hover .menu-node__text {
  color: var(--brand-600);
}

/* ======================================================================== */
/* Sous-parent : parent qui a lui-même un parent                            */
/* Exemple : Production > Rapports, Qualité > Audits                        */
/* ======================================================================== */

.menu-node--sub-folder > .menu-node__row > .menu-node__link .menu-node__text,
.menu-node--sub-folder > .menu-node__row > .menu-node__link--static .menu-node__text {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.015em;
  color: var(--ink-700);
}

/* Sous-parent dans le chemin actif */
.menu-node--sub-folder.is-active-path > .menu-node__row > .menu-node__link .menu-node__text,
.menu-node--sub-folder.is-active-path > .menu-node__row > .menu-node__link--static .menu-node__text {
  color: var(--brand-600);
  font-weight: 900;
}

/* Sous-parent au hover */
.menu-node--sub-folder > .menu-node__row > .menu-node__link:hover .menu-node__text,
.menu-node--sub-folder > .menu-node__row > .menu-node__link--static:hover .menu-node__text {
  color: var(--ink-900);
}

/* ======================================================================== */
/* Applications                                                             */
/* ======================================================================== */

.menu-node--app > .menu-node__row > .menu-node__link .menu-node__text {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-600);
}

/* Application au hover */
.menu-node--app > .menu-node__row > .menu-node__link:hover .menu-node__text {
  color: var(--ink-900);
}

/* Application courante */
.menu-node--app.is-current > .menu-node__row > .menu-node__link .menu-node__text,
.menu-node--app > .menu-node__row > .menu-node__link.is-current .menu-node__text {
  font-weight: 700;
  color: var(--ink-900);
}

/* Application dans le chemin actif, si applicable */
.menu-node--app.is-active-path > .menu-node__row > .menu-node__link .menu-node__text,
.menu-node--app > .menu-node__row > .menu-node__link.is-active-path .menu-node__text {
  color: var(--ink-900);
}