/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   LE MENU COMPACT (js/184, 10.10.2026)
   Huit pôles à gauche, une page de cartes par pôle. Le fond du menu (marine, nuit, Bleu REX,
   ambiances) reste celui de css/99-menu.css : ce fichier ne touche qu'au contenu de #nav et aux
   pages de pôle. Les couleurs viennent des jetons et des variables redéfinies dans .sidebar
   (css/00), donc chaque thème est suivi sans règle de plus.
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── La barre de gauche ────────────────────────────────────────────────────────────────────────── */
html.menu-compact #nav { padding-top: 2px; }
/* 11.10.2026 : « il reste des vestiges de l'ancien affichage des menus ». En compact, le menu ne
   montre QUE la barre : la tête, les pôles, les raccourcis.
   — Le gros bouton « Agenda » (js/158) est posé hors de #nav, sous le logo : rien ne le retirait.
     L'agenda reste à un clic par le pôle Tâches et par les Raccourcis.
   — Garde-fou : tout autre enfant de #nav (rubriques, épinglés, récents, boutons solo de l'ancien
     menu) est masqué, au cas où un rendu complet passerait sans être remplacé par la barre.
   Le bloc MUSIQUE (#lsp-lecteur, js/173) et le pied (.sidebar-team) ne sont pas dans #nav : intacts.
   En mode complet, la classe est absente : rien ne change. */
html.menu-compact .sidebar > #rag-agenda { display: none; }
html.menu-compact #nav > :not(.pmc-tete):not(.pmc-poles):not(.pmc-raccourcis) { display: none !important; }
.pmc-tete { margin-bottom: var(--e-1, 4px); }
.pmc-tete .nav-chercher { margin-bottom: var(--e-2, 8px); }

.pmc-poles { display: flex; flex-direction: column; gap: 3px; }

.pmc-pole {
  --pmc-teinte: #CFE0FF;
  position: relative; display: flex; align-items: center; gap: var(--e-3, 12px);
  width: 100%; min-height: 44px; padding: 6px 10px 6px 7px;
  border: 0; border-radius: 12px; background: transparent; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0; text-align: left; cursor: pointer;
  transition: background var(--v-court, .15s) ease, box-shadow var(--v-court, .15s) ease;
}
/* Les deux écrans de travail principaux gardent leur couleur (css/99-surbrillance-notifs) :
   turquoise pour l'accueil, violet pour les affaires (le pipeline). */
.pmc-pole[data-pole="accueil"] { --pmc-teinte: #00CFFF; }
.pmc-pole[data-pole="affaires"] { --pmc-teinte: #A78BFA; }

.pmc-pole-ico {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
  color: var(--pmc-teinte);
  background: color-mix(in srgb, var(--pmc-teinte) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pmc-teinte) 22%, transparent), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.pmc-pole-ico svg { display: block; }
.pmc-pole-lib { flex: 1; min-width: 0; line-height: 1.2; }

/* Survol : le même creux que les entrées du menu complet (css/99-menu). */
.pmc-pole:hover:not(.actif) {
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(3, 14, 38, .22), inset 0 -1px 0 rgba(255, 255, 255, .08);
}
/* Le pôle de l'écran ouvert : en relief, barre turquoise à gauche — comme l'entrée active. */
.pmc-pole.actif {
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 207, 255, .20) 0%, rgba(0, 207, 255, .07) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .30), inset 0 -1px 0 rgba(2, 10, 30, .42),
    inset 3px 0 0 var(--brand-cyan, #00CFFF), 0 1px 3px rgba(2, 10, 30, .35);
}
.pmc-pole.actif .pmc-pole-ico { color: #7FE3FF; background: rgba(0, 207, 255, .22); box-shadow: inset 0 0 0 1px rgba(0, 207, 255, .45); }
.pmc-pole[data-pole="accueil"].actif .pmc-pole-ico,
.pmc-pole[data-pole="affaires"].actif .pmc-pole-ico { color: var(--pmc-teinte); }

/* « Ce bouton ouvre une page » : un chevron discret, plus net au survol. */
.pmc-pole-fleche { margin-left: auto; color: var(--text-dim); font-size: 16px; line-height: 1; opacity: .45;
  transition: opacity var(--v-court, .15s), transform var(--v-court, .15s); }
.pmc-pole:hover .pmc-pole-fleche, .pmc-pole:focus-visible .pmc-pole-fleche, .pmc-pole.actif .pmc-pole-fleche { opacity: 1; }
.pmc-pole:hover .pmc-pole-fleche { transform: translateX(2px); }

/* Les pastilles : tâches (rouge s'il y a du retard), demandes de l'espace client (orange). */
.pmc-pastille {
  margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; text-align: center;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .14); color: #fff;
}
.pmc-pastille + .pmc-pole-fleche { margin-left: 6px; }
.pmc-pastille.danger { background: var(--snb-tache, #EF4444); }
.pmc-pastille.client { background: var(--snb-client, #F97316); }
/* Le bouton entier s'éclaire, comme une entrée du menu complet qui porte une notification (js/125).
   Une classe posée par js/184 plutôt que :has() : l'insertion tardive de la pastille (demandes
   clients, js/108) n'était pas toujours réévaluée par le navigateur. */
.pmc-pole.pmc-notif-danger:not(.actif) { background: color-mix(in srgb, var(--snb-tache, #EF4444) 14%, transparent); box-shadow: inset 3px 0 0 var(--snb-tache, #EF4444); }
.pmc-pole.pmc-notif-client:not(.actif) { background: color-mix(in srgb, var(--snb-client, #F97316) 14%, transparent); box-shadow: inset 3px 0 0 var(--snb-client, #F97316); }

/* Texte réservé aux lecteurs d'écran. */
.pmc-lecteur { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Raccourcis : épinglés, puis les plus consultés ──────────────────────────────────────────────── */
.pmc-raccourcis {
  margin-top: var(--e-4, 16px); padding-top: var(--e-2, 8px);
  /* Le même sillon gravé que le pied du menu (css/99-menu). */
  box-shadow: inset 0 1px 0 rgba(3, 14, 38, .34), inset 0 2px 0 rgba(255, 255, 255, .07);
}
.pmc-intertitre {
  padding: 6px 10px 5px; font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-dim);
}
html.menu-compact #nav .pmc-racc {
  min-height: 34px; gap: 10px; padding: 4px 10px 4px 8px; margin-bottom: 1px;
  font-size: var(--t-s, 12.5px); border-radius: 9px;
}
html.menu-compact #nav .pmc-racc .nav-ico { width: 24px; height: 24px; border-radius: 7px; font-size: 12px; }
html.menu-compact #nav .pmc-racc .nav-ico svg { width: 15px; height: 15px; }
.pmc-epingle { margin-left: auto; padding-left: 6px; font-size: 11px; color: var(--m-or, #D4A94A); }

/* Sur téléphone, le menu est un tiroir sous lequel restent le lecteur et le pied : les huit pôles
   doivent y tenir sans défiler (vérifié à 375 × 812). 44 px = la cible tactile recommandée. */
@media (max-width: 768px) {
  .pmc-poles { gap: 2px; }
  .pmc-pole { min-height: 44px; padding-top: 5px; padding-bottom: 5px; }
  .pmc-tete .nav-chercher { margin-bottom: 6px; padding-top: 8px; padding-bottom: 8px; }
  html.menu-compact #nav .pmc-racc { min-height: 40px; }
}

/* ── La page d'un pôle ─────────────────────────────────────────────────────────────────────────── */
/* Le h1 et .pmc-intro partent dans le bandeau bleu (js/44) ; ce style ne sert que s'il est absent. */
.pmc-intro { margin: 0 0 var(--e-5, 20px); font-size: var(--t-m, 13.5px); color: var(--text-muted); }

.pmc-page { display: flex; flex-direction: column; gap: var(--e-6, 24px); max-width: 1240px; }
.pmc-groupe { min-width: 0; }
.pmc-groupe-titre {
  margin: 0 0 var(--e-2, 8px); font-size: var(--t-xs, 11px); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
}
.pmc-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--e-3, 12px); }

.pmc-carte {
  position: relative; display: flex; align-items: center; gap: var(--e-3, 12px);
  min-height: 76px; padding: 14px 16px; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--r-m, 14px);
  background: var(--surface); color: var(--text); box-shadow: var(--o-1);
  font: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--v-court, .15s) ease, box-shadow var(--v-court, .15s) ease, transform var(--v-court, .15s) ease;
}
.pmc-carte:hover { border-color: var(--accent); box-shadow: var(--o-2); transform: translateY(-1px); }
.pmc-carte:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pmc-carte-ico {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
  background: var(--accent-dim); color: var(--accent);
}
.pmc-carte-ico svg { display: block; }
.pmc-carte-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pmc-carte-texte b { font-size: var(--t-l, 15px); font-weight: 600; line-height: 1.25; color: var(--text); }
.pmc-carte-texte small { font-size: var(--t-s, 12.5px); line-height: 1.35; color: var(--text-muted); }

.pmc-compteur {
  align-self: flex-start; flex-shrink: 0; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  font-size: var(--t-xs, 11px); font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border);
}
.pmc-compteur.danger { background: var(--c-danger-fond); color: var(--c-danger-texte); border-color: transparent; }
.pmc-compteur.alerte { background: var(--c-alerte-fond); color: var(--c-alerte-texte); border-color: transparent; }
.pmc-compteur.client { background: color-mix(in srgb, #F97316 15%, transparent); color: #C2410C; border-color: transparent; }
/* En sombre (Sombre, Bleu REX, ambiances), les jetons « -texte » restent ceux du clair quand
   body.theme-sombre n'est pas posé : le rouge foncé disparaissait sur le fond nuit. */
html:not([data-theme="clair"]) .pmc-compteur.danger { color: #FCA5A5; background: rgba(248, 113, 113, .16); }
html:not([data-theme="clair"]) .pmc-compteur.alerte { color: #FBBF24; background: rgba(245, 158, 11, .18); }
html:not([data-theme="clair"]) .pmc-compteur.client { color: #FDBA74; }

/* Les créations : en tête, bordure en pointillé et un « + ». */
.pmc-action {
  min-height: 64px; box-shadow: none;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 60%, var(--border));
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.pmc-action:hover { background: var(--accent-dim); }
.pmc-action .pmc-carte-ico { width: 36px; height: 36px; background: transparent; border: 1.5px dashed var(--accent); border-radius: 50%; }
.pmc-action .pmc-carte-texte b { color: var(--accent); }

/* Archives OZ (OZ Assure est clôturée) : présentes pour la consultation, sans attirer l'œil. */
.pmc-groupe-note { margin-left: 6px; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--text-dim); }
.pmc-groupe-archives .pmc-grille { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--e-2, 8px); }
.pmc-groupe-archives .pmc-carte { min-height: 58px; padding: 10px 14px; background: transparent; box-shadow: none; }
.pmc-groupe-archives .pmc-carte-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-alt); color: var(--text-muted); }
.pmc-groupe-archives .pmc-carte-texte b { font-size: var(--t-m, 13.5px); font-weight: 500; color: var(--text-muted); }
.pmc-groupe-archives .pmc-carte:hover .pmc-carte-texte b { color: var(--text); }

/* Le pied : les autres pôles, la vue d'ensemble, et le chemin du réglage. */
.pmc-autres { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2, 8px); padding-top: var(--e-4, 16px); border-top: 1px solid var(--border); }
.pmc-autres-titre { margin-right: 4px; font-size: var(--t-xs, 11px); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pmc-autres button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: var(--t-s, 12.5px); cursor: pointer;
}
.pmc-autres button > span { display: inline-flex; color: var(--accent); }
.pmc-autres button:hover { border-color: var(--accent); color: var(--accent); }
.pmc-autres button:focus-visible, .pmc-note button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pmc-note { margin: calc(-1 * var(--e-3, 12px)) 0 0; font-size: var(--t-xs, 11px); color: var(--text-muted); }
.pmc-note button { padding: 0; border: 0; background: none; font: inherit; color: var(--accent); text-decoration: underline dotted; cursor: pointer; }

@media (max-width: 768px) {
  .pmc-page { gap: var(--e-5, 20px); }
  .pmc-grille { grid-template-columns: 1fr; gap: var(--e-2, 8px); }
  .pmc-carte { min-height: 64px; padding: 12px 14px; }
  .pmc-carte, .pmc-autres button { min-height: 44px; }
}

/* ── Le réglage, dans Paramètres › Apparence ───────────────────────────────────────────────────── */
.pmc-vignette {
  display: flex; flex-direction: column; gap: 3px; width: 64px; padding: 6px; margin-bottom: 4px;
  border-radius: 8px; background: linear-gradient(168deg, #0B2458, #1A4A9C);
}
.pmc-vignette i { display: block; border-radius: 3px; background: rgba(255, 255, 255, .6); }
.pmc-vignette.compact i { height: 8px; }
.pmc-vignette.complet { gap: 2px; }
.pmc-vignette.complet i { height: 3px; background: rgba(255, 255, 255, .42); }

@media (prefers-reduced-motion: reduce) {
  .pmc-pole, .pmc-pole-fleche, .pmc-carte { transition: none; }
  .pmc-carte:hover, .pmc-pole:hover .pmc-pole-fleche { transform: none; }
}
