/* =========================================================================
   Suite Projet — compléments au Kit de style QVCT (docs/Kit_Style_QVCT/)

   theme.css (copie non modifiée du kit) fixe l'apparence de tout ce qui a un
   équivalent dans la Suite QVCT (coque, boutons, badges, cartes, formulaires,
   tableaux, tiroir/modale, filtres, onglets). Ce fichier ne contient QUE la
   mise en page des familles de composants propres à la gestion de projet que
   le kit ne couvre pas (GANTT, calendrier, Kanban, matrice de risques, barre
   de filtres globale, palette de commandes, menus de la coque) — voir
   CONSIGNES-NOUVEAUX-SITES.md §3 : accord explicite obtenu pour ce fichier,
   à la condition qu'il n'emploie QUE des variables déjà définies par theme.css
   (aucune couleur, police, ombre ou arrondi en dur).

   Quelques compositions génériques manquantes au kit (paire clé/valeur .kv,
   mention de champ .form-hint, pastille lecture seule .readonly-note, point
   de légende .dot-lg) sont ajoutées ici pour la même raison : rôle réel dans
   l'outil, aucune valeur nouvelle, uniquement des var(--…) du kit.
   ========================================================================= */

/* ======================= Utilitaires de mise en page ======================= */

/* Bascule des 9 panneaux de premier niveau (un par onglet de la barre latérale) :
   pas de composant du kit pour ça (QVCT n'a qu'une page) — mise en page pure. */
.panel { display: none; }
.panel.is-active { display: block; animation: fade 0.16s ease; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 7px 12px; font-size: 0.84rem; }
.kv dt { color: var(--text-tertiary); }
.kv dd { margin: 0; }

.form-hint { font-size: 0.72rem; color: var(--text-tertiary); margin-top: 4px; line-height: 1.4; }

.readonly-note {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--text-tertiary);
  padding: 3px 9px; border-radius: var(--radius-pill); background: var(--surface-well);
}
.readonly-note .nav-ic { width: 12px; height: 12px; }

.dot-lg { width: 9px; height: 9px; border-radius: var(--radius-round); display: inline-block; flex-shrink: 0; }

/* Le badge neutre du kit (.badge seul) porte une ombre interne (rôle « catégorie,
   dimension »). Utilisé comme 4e valeur d'un jeu de statuts à côté de .badge-accent/
   -ok/-warn/-danger (toutes plates), cette ombre le fait ressortir à tort. Même
   couleur, juste l'ombre en moins pour rester au même niveau que ses 3 voisins. */
.badge-neutral { box-shadow: none; }

/* Petit avatar (liste, tableau, carte Kanban) : le kit ne définit que 28px
   (identité) et 40px (photo) ; 22px est une variante de taille, mêmes couleurs. */
.avatar.avatar-sm { width: 22px; height: 22px; font-size: 0.6rem; }
/* Photo dans un avatar 22/28px (le kit ne prévoit la photo qu'à 40px, .avatar-photo) :
   même traitement (couverture, cadrage) à nos deux autres tailles existantes. */
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

hr.sep { border: none; box-shadow: inset 0 1px 0 var(--hairline); margin: 16px 0; height: 0; }

.multi-add { display: flex; gap: 6px; }
.multi-add select, .multi-add input { flex: 1; }

/* icônes inline (mêmes proportions que .nav-ic du kit, hors barre latérale) */
.nav-ic { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; }
.nav-ic svg { width: 100%; height: 100%; }

/* ======================= En-tête du tableau de bord ======================= */
/* Composition propre à Suite Projet (objectif du projet, méta-données, état
   déclaré) : QVCT n'a pas cet en-tête. Card standard du kit + rôles de texte
   du kit (.card-label, .text-intro, .text-fine) pour tout ce qui est nommé ;
   seul .dash-meta (ligne de mini-stats) est une mise en page ajoutée ici. */

.dash-meta { display: flex; flex-wrap: wrap; gap: 22px; padding-top: 12px; margin-top: 10px; box-shadow: inset 0 1px 0 var(--hairline); }
.dm-item { display: flex; flex-direction: column; gap: 2px; font-size: 0.86rem; }
.dm-item small { font-size: 0.68rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.03em; }

/* ======================= Cartes cliquables (décisions, équipe) ======================= */

.card-clickable { cursor: pointer; transition: box-shadow 0.2s var(--ease-soft); }
.card-clickable:hover { box-shadow: var(--shadow-control); }
.team-card { padding: 16px; }

.team-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 6px; }
.team-metrics > div { background: var(--surface-well); border-radius: var(--radius-card-compact); padding: 9px 11px; box-shadow: var(--shadow-inset); }
.team-metrics b { display: block; font-size: 1rem; margin: 2px 0; }
.team-metrics small { font-size: 0.68rem; color: var(--text-tertiary); }
.team-note { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; color: var(--status-warn); margin-top: 6px; }
.team-note .nav-ic { width: 13px; height: 13px; flex-shrink: 0; }
@media (max-width: 700px) { .team-metrics { grid-template-columns: 1fr; } }

/* ======================= Barre de filtres globale ======================= */
/* Composition propre à Suite Projet (Horizon / Lot / Service / Responsable),
   sous le bandeau. Surface « en relief » comme la barre latérale : c'est une
   commande, pas un bloc de contenu. Les <select> restent ordinaires : theme.js
   les transforme. */

.filterbar {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  background: var(--surface-raised); border-radius: var(--radius-card); box-shadow: var(--shadow-raised);
  padding: 12px 16px; margin: 0 6px;
}
.fb-situation { font-size: 0.76rem; font-weight: 600; color: var(--text-accent); padding-bottom: 9px; white-space: nowrap; }
.fb-field { display: flex; flex-direction: column; gap: 4px; }
.fb-field .fb-label { padding: 0; }
@media (max-width: 900px) { .filterbar { margin: 0; border-radius: var(--radius-card-compact); } }

/* ======================= Palette de commandes (Ctrl+K) ======================= */

.palette-overlay {
  position: fixed; inset: 0; z-index: 92; background: var(--surface-scrim);
  display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; animation: fade 0.15s ease;
}
.palette {
  width: 100%; max-width: 560px; max-height: 70vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface-popover); border-radius: var(--radius-panel); box-shadow: var(--shadow-overlay);
}
.palette-search { display: flex; align-items: center; gap: 9px; padding: 13px 15px; box-shadow: inset 0 -1px 0 var(--hairline); }
.palette-search .nav-ic { width: 16px; height: 16px; color: var(--text-tertiary); flex-shrink: 0; }
.palette-search input {
  flex: 1; padding: 2px 0; border: none; background: none; box-shadow: none;
  font-family: inherit; font-size: 0.9rem; color: var(--text-primary);
}
.palette-search input:focus { outline: none; box-shadow: none; }
.palette-search kbd { font-family: inherit; font-size: 0.66rem; padding: 2px 6px; border-radius: 5px; background: var(--surface-well); color: var(--text-tertiary); }
.palette-list { overflow-y: auto; padding: 6px; }
.palette-empty { padding: 26px; text-align: center; color: var(--text-tertiary); font-size: 0.86rem; }
.palette-group { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); padding: 10px 10px 4px; }
.palette-item { display: flex; align-items: baseline; gap: 10px; padding: 9px 10px; border-radius: var(--radius-menu-option); cursor: pointer; }
.palette-item[aria-selected="true"] { background: var(--accent-soft); }
.palette-item-label { font-size: 0.85rem; font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.palette-item-sub { font-size: 0.72rem; color: var(--text-tertiary); white-space: nowrap; flex-shrink: 0; }

/* ======================= Compteur de menu (sidebar) ======================= */
/* QVCT n'a pas de compteur sur ses entrées de menu ; rendu identique à un
   badge du kit, réduit pour tenir dans la ligne de navigation. */
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--text-on-accent); font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-badge-warn { background: var(--status-warn); }
@media (min-width: 1081px) { .app-shell.sidebar-collapsed .nav-badge { display: none; } }

/* ======================= Pied de barre latérale cliquable ======================= */
/* Le kit affiche une identité statique en pied de barre ; Suite Projet en fait un
   bouton (ouvre le choix de rôle). Même rendu que .nav-item au survol. */

.user-chip-btn {
  display: flex; align-items: center; gap: 9px; width: 100%; min-width: 0;
  border: none; background: transparent; padding: 4px; border-radius: var(--radius-card);
  color: inherit; font-family: inherit; text-align: left; cursor: pointer;
}
.user-chip-btn:hover { background: var(--surface-nav-hover); box-shadow: var(--shadow-control); }
.user-chip-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; flex: 1; max-width: 150px; opacity: 1; overflow: hidden; transition: max-width 0.22s var(--ease-soft), opacity 0.15s ease 0.08s; }
.user-name { font-size: 0.76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.68rem; color: var(--text-tertiary); }
.brand-caret { margin-left: auto; flex-shrink: 0; width: 13px; height: 13px; color: var(--text-tertiary); transform: rotate(-90deg); }
/* En rail replié, la règle du kit ramène .sidebar-foot à un carré de --rail-item :
   le bouton n'a plus qu'à remplir ce carré et à masquer son texte. */
@media (min-width: 1081px) {
  .app-shell.sidebar-collapsed .user-chip-btn { width: 100%; height: 100%; padding: 0; gap: 0; justify-content: center; }
  .app-shell.sidebar-collapsed .user-chip-text, .app-shell.sidebar-collapsed .brand-caret { display: none; }
}

/* ======================= Menus de la coque (personne, export) ======================= */
/* Popovers ancrés au pied de la barre latérale / au bandeau : mêmes valeurs
   que .dropdown-menu / .filter-popover du kit (surface menu, ombre overlay). */

.sidebar-foot { position: relative; }
.project-menu {
  position: absolute; left: 4px; right: 4px; bottom: calc(100% + 6px); z-index: 60;
  background: var(--surface-menu); border-radius: var(--radius-card); box-shadow: var(--shadow-overlay);
  padding: 6px; display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow-y: auto; animation: fade 0.15s ease;
}
.project-menu-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 9px; border-radius: var(--radius-menu-option); border: none;
  background: transparent; color: inherit; font-family: inherit; font-size: 0.82rem; font-weight: 500; text-align: left; cursor: pointer; width: 100%;
}
.project-menu-item:hover { background: var(--surface-menu-option-hover); }
.project-menu-item.is-active { background: var(--accent-soft); color: var(--text-accent); }
.project-menu-item .pm-check { width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.project-menu-item .pm-name { flex: 1; min-width: 0; }
.project-menu-item .pm-sub { display: block; font-size: 0.68rem; color: var(--text-tertiary); font-weight: 400; margin-top: 1px; }

.topbar-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 240px;
  background: var(--surface-menu); border-radius: var(--radius-card); box-shadow: var(--shadow-overlay);
  padding: 6px; display: flex; flex-direction: column; gap: 2px; animation: fade 0.15s ease;
}
.topbar-menu-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: var(--radius-menu-option); border: none; background: transparent; color: inherit; font-family: inherit; font-size: 0.82rem; font-weight: 500; text-align: left; cursor: pointer; width: 100%; }
.topbar-menu-item:hover { background: var(--surface-menu-option-hover); }
.topbar-menu-item .tm-ic { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; color: var(--text-tertiary); }
.topbar-menu-item .tm-name { flex: 1; min-width: 0; }
.topbar-menu-item .tm-sub { display: block; font-size: 0.68rem; color: var(--text-tertiary); font-weight: 400; margin-top: 1px; }

/* ======================= Commandes du bandeau (recherche, statut) ======================= */

.topbar-actions { display: flex; align-items: center; gap: 8px; position: relative; }
.topbar-search {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 9px 0 10px;
  border-radius: var(--radius-button-sm); border: none; background: var(--btn-icon-bg); box-shadow: var(--shadow-control);
  color: var(--text-tertiary); font-family: inherit; font-size: 0.82rem; cursor: pointer;
}
.topbar-search:hover { box-shadow: var(--shadow-control-hover); }
.topbar-search .nav-ic { width: 14px; height: 14px; }
.topbar-search kbd { font-family: inherit; font-size: 0.66rem; padding: 1px 5px; border-radius: 5px; background: var(--surface-well); color: var(--text-tertiary); }
@media (max-width: 760px) { .topbar-search-label, .topbar-search kbd { display: none; } .topbar-search { padding: 0; width: 34px; justify-content: center; } }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--radius-pill);
  background: var(--surface-well); box-shadow: var(--shadow-inset); font-size: 0.72rem; color: var(--text-tertiary); white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: var(--radius-round); background: var(--text-tertiary); }
.status-dot-connecting { background: var(--status-warn); }
.status-dot-ok { background: var(--status-ok); }
.status-dot-error { background: var(--status-danger); }

/* ======================= Calendrier ======================= */

.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-title { font-size: 0.98rem; font-weight: 600; text-transform: capitalize; min-width: 160px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-tertiary); text-align: center; padding: 4px 0; }
.cal-cell {
  min-height: 96px; border-radius: var(--radius-card-compact); padding: 6px 7px; background: var(--surface-well);
  display: flex; flex-direction: column; gap: 3px; cursor: pointer; box-shadow: var(--shadow-inset); transition: box-shadow 0.15s ease;
}
.cal-cell:hover { box-shadow: var(--shadow-inset), 0 0 0 2px var(--accent-soft); }
.cal-cell.is-out { opacity: 0.45; }
.cal-cell.is-today { box-shadow: var(--shadow-inset), 0 0 0 2px var(--accent); }
.cal-daynum { font-size: 0.72rem; font-weight: 600; color: var(--text-tertiary); }
.cal-ev { font-size: 0.62rem; padding: 1px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--surface-raised); box-shadow: inset 2px 0 0 var(--accent); }
.cal-ev.ev-meeting { box-shadow: inset 2px 0 0 var(--accent-2); }
.cal-ev.ev-due { box-shadow: inset 2px 0 0 var(--status-warn); }
.cal-ev.ev-milestone { box-shadow: inset 2px 0 0 var(--chart-5); font-weight: 600; }
.cal-ev.ev-resource { box-shadow: inset 2px 0 0 var(--status-danger); }
.cal-ev.ev-manual { box-shadow: inset 2px 0 0 var(--chart-1); }

/* ======================= GANTT ======================= */

.gantt-wrap { border-radius: var(--radius-card); background: var(--surface-card); overflow: hidden; }
.gantt-scroll { overflow-x: auto; }
.gantt-inner { position: relative; min-width: 720px; }
.gantt-headrow { display: grid; background: var(--surface-well); position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--hairline); }
.gantt-corner { padding: 8px 12px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-tertiary); box-shadow: inset -1px 0 0 var(--hairline); }
.gantt-weeks { display: flex; }
.gantt-week { flex: 0 0 auto; font-size: 10px; color: var(--text-tertiary); text-align: center; padding: 8px 0; box-shadow: inset -1px 0 0 var(--hairline); }
.gantt-row { display: grid; align-items: center; min-height: 38px; box-shadow: inset 0 -1px 0 var(--hairline); }
.gantt-row:hover { background: var(--surface-well); }
.gantt-label { padding: 6px 12px; font-size: 0.78rem; box-shadow: inset -1px 0 0 var(--hairline); display: flex; align-items: center; gap: 7px; overflow: hidden; }
.gantt-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-label .dot-lg, .gantt-label .gantt-ref { flex: 0 0 auto; }
.gantt-label .gantt-ref { font-size: 0.7rem; }
.gantt-legend-secure { display: inline-block; padding: 0 4px; border-radius: 3px; box-shadow: 0 0 0 2px var(--status-warn); }
.gantt-track { position: relative; height: 100%; }
.gantt-bar {
  position: absolute; top: 50%; transform: translateY(-50%); height: 19px; border-radius: 6px;
  background: var(--accent); display: flex; align-items: center; padding: 0 6px;
  font-size: 9.5px; color: var(--text-on-accent); overflow: hidden; cursor: default; box-shadow: var(--shadow-control);
}
.gantt-bar.is-done { background: var(--status-ok); }
.gantt-bar.is-blocked { background: var(--status-danger); }
.gantt-bar.is-secure { box-shadow: var(--shadow-control), 0 0 0 2px var(--status-warn); }
.gantt-bar.is-dragging { cursor: grabbing; opacity: 0.9; z-index: 5; box-shadow: var(--shadow-overlay); }
.gantt-bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,0.32); border-radius: inherit; }
.gantt-bar-handle { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 2; }
.gantt-bar-handle.gh-l { left: 0; }
.gantt-bar-handle.gh-r { right: 0; }
.gantt-bar.is-editable:hover .gantt-bar-handle { background: rgba(255,255,255,0.4); }
.gantt-group-label { padding: 7px 12px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-accent); background: var(--accent-soft); grid-column: 1 / -1; }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--status-danger); opacity: 0.7; z-index: 3; }
.gantt-dep { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: visible; }
.gantt-dep path { stroke: var(--text-tertiary); stroke-width: 1.25; fill: none; opacity: 0.5; }
.gantt-bar.is-editable { cursor: grab; touch-action: none; }
.gantt-ms-line { position: absolute; top: 0; width: 2px; background: var(--chart-5); opacity: 0.35; z-index: 3; pointer-events: none; }
.gantt-ms-mark {
  position: absolute; top: 4px; transform: translateX(-50%); width: 18px; height: 18px; z-index: 4;
  border: none; background: var(--surface-raised); color: var(--chart-5); border-radius: 5px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 11px; box-shadow: var(--shadow-control);
}
.gantt-ms-mark.ms-done { color: var(--status-ok); }
.gantt-ms-mark.ms-risk { color: var(--status-danger); box-shadow: var(--shadow-control), 0 0 0 2px var(--status-danger-soft); }
.gantt-ms-mark:hover { box-shadow: var(--shadow-control-hover); }

/* ======================= Kanban ======================= */

.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; margin-top: 4px; }
.kanban-col { background: var(--surface-well); border-radius: var(--radius-card); padding: 9px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; box-shadow: var(--shadow-inset); }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 4px; }
.kanban-count { font-size: 0.7rem; color: var(--text-tertiary); }
.kanban-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 56px; border-radius: var(--radius-card-compact); transition: background 0.12s ease, outline-color 0.12s ease; outline: 2px dashed transparent; outline-offset: 2px; }
.kanban-col-body.drag-over { background: var(--accent-soft); outline-color: var(--accent); }
.kanban-empty { font-size: 0.72rem; color: var(--text-tertiary); text-align: center; padding: 12px 0; }
.kanban-card { position: relative; background: var(--surface-raised); border-radius: var(--radius-card-compact); padding: 10px 11px; display: flex; flex-direction: column; gap: 7px; cursor: pointer; box-shadow: var(--shadow-control); transition: box-shadow 0.15s ease, opacity 0.12s ease; }
.kanban-card:hover { box-shadow: var(--shadow-control-hover); }
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card.is-dragging { opacity: 0.45; cursor: grabbing; }
.kanban-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kanban-ref { font-size: 0.68rem; color: var(--text-tertiary); }
.kanban-card-title { font-size: 0.82rem; font-weight: 500; line-height: 1.35; }
.kanban-card-meta { display: flex; align-items: center; gap: 8px; font-size: 0.68rem; color: var(--text-tertiary); }
.kanban-due.is-late { color: var(--status-danger); font-weight: 600; }
.kanban-prog { margin-left: auto; }
.kanban-lock { position: absolute; top: 8px; right: 8px; width: 12px; height: 12px; color: var(--text-tertiary); opacity: 0.6; }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .kanban { grid-template-columns: 1fr; } }

/* ======================= Matrice de risques ======================= */

.risk-matrix-block { display: inline-grid; grid-template-columns: 16px auto; grid-template-rows: auto 20px; gap: 4px; align-items: center; }
.risk-axis { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); }
.risk-axis.y { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.risk-axis.x { grid-column: 2; text-align: center; }
.risk-matrix { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: 22px repeat(5, 46px); grid-auto-rows: 46px; gap: 3px; }
.rm-head { display: flex; align-items: center; justify-content: center; font-size: 0.66rem; font-weight: 700; color: var(--text-tertiary); }
.risk-cell { border-radius: 7px; display: flex; flex-wrap: wrap; gap: 2px; align-content: flex-start; padding: 3px; background: var(--surface-well); }
.risk-cell.lvl-low { background: var(--status-ok-soft); }
.risk-cell.lvl-mid { background: var(--status-warn-soft); }
.risk-cell.lvl-high { background: var(--status-danger-soft); }
.risk-dot { min-width: 18px; height: 18px; padding: 0 2px; border-radius: 6px; border: none; cursor: pointer; background: var(--surface-raised); color: var(--text-primary); font-size: 9.5px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: var(--shadow-control); }
.risk-dot:hover { background: var(--accent); color: var(--text-on-accent); }
@media (max-width: 1080px) { .risk-matrix { grid-template-columns: 20px repeat(5, 38px); grid-auto-rows: 38px; } }

/* ======================= Rapport imprimable ======================= */
/* Généré par js/core/exporter.js dans #print-report, visible seulement à l'impression.
   Palette et tailles propres au support papier (aucun lien avec l'écran ci-dessus). */

#print-report { display: none; }
@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; }
  .app-shell, .filterbar, .toast-host, .drawer-overlay, .palette-overlay, .project-menu, .topbar-menu { display: none !important; }
  #print-report { display: block !important; color: #111; font-size: 11px; }

  .pr-doc { max-width: 100%; }
  .pr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 14px; }
  .pr-eyebrow { font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: #666; margin: 0 0 2px; }
  .pr-head h1 { font-size: 18px; margin: 0 0 3px; }
  .pr-sub { font-size: 10px; color: #444; margin: 0; }
  .pr-weather { text-align: right; font-size: 10px; max-width: 240px; }
  .pr-weather strong { display: block; font-size: 12px; }
  .pr-weather span { color: #444; }

  .pr-section { margin-bottom: 14px; break-inside: avoid; }
  .pr-section h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid #bbb; padding-bottom: 3px; margin: 0 0 8px; }

  .pr-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .pr-kpi { border: 1px solid #ccc; border-radius: 4px; padding: 6px 8px; }
  .pr-kpi-label { display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.04em; color: #666; }
  .pr-kpi-value { display: block; font-size: 15px; font-weight: 700; margin: 1px 0; }
  .pr-kpi-sub { display: block; font-size: 8.5px; color: #555; }

  .pr-chart { color: #333; margin-bottom: 4px; max-width: 460px; }
  .pr-chart .chart, .pr-chart .trendchart { color: #333; width: 100%; height: auto; }
  .pr-chart .area-line, .pr-chart .line-path { stroke: #222; }
  .pr-chart .ideal-line, .pr-chart .target-line { stroke: #999; }
  .pr-chart .area-fill, .pr-chart .area-path { fill: #ddd; }
  .pr-chart .grid-line { stroke: #ddd; }
  .pr-chart .axis-label { fill: #666; }

  .pr-table { width: 100%; border-collapse: collapse; font-size: 9.5px; }
  .pr-table th, .pr-table td { border: 1px solid #ccc; padding: 3px 5px; text-align: left; vertical-align: top; }
  .pr-table th { background: #eee; font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.03em; }
  .pr-empty { color: #777; font-style: italic; }

  .pr-kv { display: grid; grid-template-columns: 180px 1fr; gap: 2px 12px; font-size: 10px; margin: 0; }
  .pr-kv dt { color: #555; }
  .pr-kv dd { margin: 0; }

  .pr-agenda { margin: 0; padding-left: 16px; font-size: 10px; }
  .pr-agenda li { margin-bottom: 2px; }
  .pr-tag { display: inline-block; border: 1px solid #bbb; border-radius: 3px; padding: 0 4px; font-size: 8px; text-transform: uppercase; letter-spacing: 0.03em; color: #555; }

  .pr-foot { margin-top: 16px; border-top: 1px solid #bbb; padding-top: 6px; font-size: 8.5px; color: #777; }
}

/* ======================= Burndown : survol ======================= */
/* Info-bulle + repère vertical = .tc-mark du kit. La courbe n'affichait pas de
   points au repos : ils n'apparaissent qu'au survol de leur échéance. */
.trendchart .tc-pt { opacity: 0; transition: opacity 0.15s ease, r 0.15s var(--ease-soft); }
.trendchart .tc-mark:hover .tc-pt { opacity: 1; }
@media print { .trendchart .tc-mark { display: none; } }
