/* ── Design system du portail ────────────────────────────────────────────── */



/* ── Mode sombre (défaut) ── */
:root {
  --bg:            #182439;
  --surface:       #1e2f4a;
  --surface-1:     #1e2f4a;
  --surface-2:     #243758;
  --border:        #2d4268;
  --text:          #e8edf5;
  --text-muted:    #93b2cb;
  --accent:        #4a9fd4;
  --accent-hover:  #3a8ec3;
  /* Fonds pleins en accent (texte blanc dessus) : assez sombres pour un
     contraste lisible (≥ 4,5), et dérivés de l'accent, que l'image de marque
     peut changer */
  --accent-fill:       color-mix(in srgb, var(--accent) 72%, #000);
  --accent-fill-hover: color-mix(in srgb, var(--accent) 62%, #000);
  /* Accent en petit texte sur une surface surélevée : un peu éclairci (≥ 4,5:1) */
  --accent-text:       color-mix(in srgb, var(--accent) 70%, #fff);
  /* Rouge, vert et ambre en petit texte (messages d'erreur, retards, pastilles) :
     assez clairs pour atteindre 4,5:1 sur toutes les surfaces (audit
     d'accessibilité 10/2026). Miroir de PALETTE_DARK dans settings.js. */
  --danger:        #f28585;
  --danger-bg:     rgba(242,133,133,0.12);
  --success:        #52cfa0;
  --success-bg:     rgba(82,207,160,0.15);
  --warning:        #d6b04f;
  --warning-bg:     rgba(214,176,79,0.12);
  --warning-border: rgba(214,176,79,0.30);
  --shadow:         rgba(0,0,0,0.35);
  /* Fonds pleins sous texte blanc (toasts, pastilles de compte, boutons) :
     assombris (≥ 4,5:1), le rouge vers un rouge profond pour rester vif */
  --success-fill:   color-mix(in srgb, var(--success) 60%, #000);
  --danger-fill:    color-mix(in srgb, var(--danger) 50%, #8b0000);
  /* Part de la teinte dans un texte coloré (.tint, .ink) : le reste est la
     couleur de texte du thème, ce qui garde 4,5:1 quelle que soit la teinte */
  --ink-mix:        50%;
  /* Contour des champs et boutons : assez net pour un contrôle (≥ 3:1), dérivé
     du thème pour suivre une palette personnalisée. --border reste pour le décor. */
  --control-mix:    60%;
  --control-border: color-mix(in srgb, var(--text-muted) var(--control-mix), var(--surface));
}

/* ── Mode clair ── */
[data-theme="light"] {
  --bg:            #f0f4f9;
  --surface:       #ffffff;
  --surface-1:     #ffffff;
  --surface-2:     #e6edf6;
  --border:        #ccd8e8;
  --text:          #19263d;
  --text-muted:    #4f6d8f;
  --accent:        #1f6a9a;
  --accent-hover:  #185a84;
  --accent-text:   color-mix(in srgb, var(--accent) 78%, #000);
  --danger:        #b03434;
  --danger-bg:     rgba(176,52,52,0.10);
  --success:        #136a4a;
  --success-bg:     rgba(19,106,74,0.12);
  --warning:        #9c4708;
  --warning-bg:     rgba(156,71,8,0.10);
  --warning-border: rgba(156,71,8,0.30);
  --shadow:         rgba(0,0,0,0.12);
  --ink-mix:        45%;
  --control-mix:    80%;
}

/* Pastille teintée, lisible dans les deux thèmes : la teinte (--c) colore le
   fond ; le texte la mêle à la couleur de texte du thème (--ink-mix) */
.tint { background: color-mix(in srgb, var(--c) 13%, transparent); color: color-mix(in srgb, var(--c) var(--ink-mix), var(--text)); }
.ink  { color: color-mix(in srgb, var(--c) var(--ink-mix), var(--text)); }

/* ── Transition douce au changement de thème ── */
body.theme-transitioning,
body.theme-transitioning *,
body.theme-transitioning *::before,
body.theme-transitioning *::after {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, fill 0.25s ease !important;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Liens : la couleur d'accent des deux thèmes, jamais le bleu du navigateur,
   illisible sur le fond sombre. Spécificité nulle : toute classe l'emporte. */
:where(a) { color: var(--accent-text); }

/* ── Typographie ── */
h1, h2, h3 {
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
}

/* ── Inputs, Selects & Textareas ── */
input,
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* Cases et boutons radio : pas la pleine largeur des champs (elle écrasait le
   libellé voisin), et les couleurs du thème plutôt que le blanc natif. Le
   :where garde la spécificité de « input » : toute classe l'emporte. */
input:where([type="checkbox"], [type="radio"]) {
  width: auto;
  flex: none;
  padding: 0;
  accent-color: var(--accent);
  color-scheme: dark;
}
[data-theme="light"] input:where([type="checkbox"], [type="radio"]) { color-scheme: light; }

textarea {
  resize: vertical;
  line-height: 1.55;
  min-height: 4rem;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7fa3' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}

select option {
  background: var(--surface);
  color: var(--text);
}

select option:disabled {
  color: var(--text-muted);
}

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

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74,159,212,0.18);
}

input.error,
select.error,
textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(224,82,82,0.15);
}

/* ── Focus clavier : toujours visible ── */
:where(a, button, [role="button"], [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Boutons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.4rem 1rem;
  background: var(--accent-fill);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-fill-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 38px;
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

a.btn-ghost { text-decoration: none; }
/* Dans la barre du haut, les liens d'administration restent discrets */
.nav-right .btn-ghost { border-color: var(--border); color: var(--text-muted); }
.nav-right .btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); }

/* Petit bouton : listes, lignes de tableau, actions secondaires */
.btn-sm { min-height: 28px; padding: 0.2rem 0.6rem; font-size: 0.78rem; }

/* Le rouge est réservé aux actions destructives, au repos comme au survol */
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover,
.btn-ghost.bk-danger:hover,
.btn-ghost.fm-danger:hover,
.btn-ghost.rr-danger:hover,
.btn-ghost[style*="--danger"]:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-bg);
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* ── Labels ── */
label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  margin-top: 1rem;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }
/* Toast avec un bouton (« Undo ») : cliquable, le temps qu'il est affiché */
.toast.has-action.show { pointer-events: auto; }
.toast-action { margin-left: 0.85rem; padding: 0.2rem 0.65rem; min-height: 28px; border: 1px solid rgba(255,255,255,0.7);
  border-radius: 4px; background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.toast-action:hover { background: rgba(255,255,255,0.15); }
.toast-action:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Ligne amenée à l'écran par un lien (action précise) : un fond qui s'estompe */
.row-flash > td { animation: rowFlash 2.6s ease-out; }
@keyframes rowFlash { from { background: color-mix(in srgb, var(--accent) 28%, transparent); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .row-flash > td { animation: none; background: color-mix(in srgb, var(--accent) 12%, transparent); }
}
.toast.ok    { background: var(--success-fill); color: #fff; }
.toast.error { background: var(--danger-fill);  color: #fff; }

/* ── Logo du portail ── */
.app-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.app-logo-link:hover { opacity: 0.75; }

/* ── Member profile links (in member table) ─────────────────────────────── */
a.member-profile-link {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
a.member-profile-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.app-logo img {
  height: 40px;
  width: auto;
}

.app-logo-text {
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
}

/* ══════════════════════════════════════════════════════
   RÉUNIONS — Calendrier
   ══════════════════════════════════════════════════════ */
.cal-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;            /* sur mobile, « Only what concerns me » et
                                 « Subscribe » passent sous le nom du mois
                                 plutôt que de sortir de l'écran */
}
.cal-month-label {
  /* Les flèches encadrent le mois : largeur fixe pour qu'elles ne bougent
     pas d'un mois à l'autre (« May » / « September »), le reste de la
     barre (Today, filtre, Subscribe) part à droite. */
  flex: 0 0 auto;
  min-width: 9.5em;
  text-align: center;
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.03em;
  color: var(--text);
}
.cal-nav {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.15rem 0.55rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.cal-nav:hover { color: var(--accent); border-color: var(--accent); }
.cal-monthnav { display: inline-flex; align-items: center; gap: 0.6rem; }
/* Outils regroupés : à droite du mois, ou sur la ligne suivante d'un bloc
   quand la place manque (calendrier étroit de l'accueil, téléphone) */
.cal-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; margin-left: auto; }
.cal-today-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.cal-today-btn:hover { color: var(--accent); border-color: var(--accent); }

.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 0.3rem;
}
.cal-dow-cell {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.2rem;
  border-radius: 6px;
  min-height: 44px;
  transition: background 0.12s;
}
.cal-day:not(.cal-empty):hover { background: var(--surface-2); }
.cal-day.has-meeting { cursor: pointer; }
.cal-day.today .cal-day-num {
  background: var(--accent-fill);
  color: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-day-num {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-empty .cal-day-num { visibility: hidden; }
.cal-dot {
  display: block;
  width: 7px;
  height: 7px;
  background: #e05252;
  border-radius: 50%;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════
   RÉUNIONS — Section titles & empty states
   ══════════════════════════════════════════════════════ */
.meetings-section-title {
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.meetings-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
  padding: 0.5rem 0;
}

/* ══════════════════════════════════════════════════════
   RÉUNIONS — Cartes
   ══════════════════════════════════════════════════════ */
.meeting-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.meeting-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74,159,212,0.25);
}
.mcard-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}
.mcard-main { flex: 1; min-width: 0; }

/* ── Carte cliquable sans commandes imbriquées ──
   Le titre est le lien de la carte (.card-link) ; son ::after la couvre
   entière, si bien qu'un clic n'importe où l'ouvre (et Cmd/Ctrl+clic ouvre un
   onglet). Les boutons et autres liens de la carte passent au-dessus. Un
   bouton ou un lien dans un autre bouton (l'ancienne carte entière cliquable)
   était inutilisable au clavier et confus pour les lecteurs d'écran. */
.mcard-head, .gcard-head, .my-meeting-row { position: relative; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ''; position: absolute; inset: 0; border-radius: 8px; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
.mcard-head :is(button, a):not(.card-link),
.gcard-head :is(button, a):not(.card-link),
.my-meeting-row :is(button, a):not(.card-link) { position: relative; z-index: 1; }
.mcard-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.mcard-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  text-transform: capitalize;
}
.mcard-actions { display: flex; align-items: center; gap: 0.3rem; }
.mcard-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.mcard-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}
.mcard-cr { margin-top: 0.75rem; }
.mcard-cr-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}
.mcard-cr-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
}
.mcard-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0.85rem 0 0.35rem;
}
.mcard-attend-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.attend-chip {
  background: #1a2e4a;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.78rem;
  padding: 0.15rem 0.55rem;
  color: var(--text);
}
.mcard-file-list { display: flex; flex-direction: column; gap: 0.3rem; }
.mcard-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--accent);
  font-size: 0.82rem;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  width: fit-content;
}
.mcard-file-btn:hover { background: var(--surface-2); border-color: var(--accent); }

/* ══════════════════════════════════════════════════════
   RÉUNIONS — Modale
   ══════════════════════════════════════════════════════ */
.mmodal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,18,30,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.mmodal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mmodal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mmodal-heading {
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.mmodal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.mmodal-close:hover { color: var(--danger); }
.mmodal-body {
  overflow-y: auto;
  padding: 1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mmodal-section {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.mmodal-section:last-child { border-bottom: none; margin-bottom: 0; }

/* ── Type cards (comm modal) ── */
/* Neutralise le hover rouge hérité de .btn-ghost */
.cm-type-btn:hover,
.cm-subtype-btn:hover { border-color: inherit; color: inherit; background: inherit; }

.cm-type-btn {
  transition: border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s;
}
.cm-type-btn.active {
  background: rgba(74,159,212,0.12);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(74,159,212,0.18);
}
.cm-type-btn.active span:last-child {
  color: var(--accent);
}
.cm-type-btn:hover:not(.active) {
  background: var(--surface-2);
  border-color: var(--text-muted);
  color: var(--text);
}
.cm-subtype-btn {
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.cm-subtype-btn.active {
  background: rgba(74,159,212,0.1);
  border-color: var(--accent);
  color: var(--accent);
}
.cm-subtype-btn:hover:not(.active) {
  background: var(--surface-2);
  border-color: var(--text-muted);
  color: var(--text);
}

/* ── Progressive reveal steps (comm modal) ─────────────── */
/* Technique grid 0fr→1fr : robuste même dans un parent flex */
.cm-step {
  display: grid;
  grid-template-rows: 0fr;
  align-self: start;   /* évite que le flex parent étire la hauteur */
  width: 100%;         /* assure que le step occupe toute la largeur du flex parent */
  opacity: 0;
  pointer-events: none;
  transition: grid-template-rows 0.4s cubic-bezier(0.4,0,0.2,1),
              opacity 0.3s ease 0.07s;
}
.cm-step.visible {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
}
/* Enfant direct : overflow hidden + min-height 0 obligatoires */
.cm-step > .cm-step-inner {
  overflow: hidden;
  min-height: 0;
  width: 100%;
}

/* Guidance hint inside modal step */
.cm-step-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  background: rgba(74,159,212,0.07);
  border: 1px solid rgba(74,159,212,0.15);
  border-radius: 7px;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}
.mmodal-sub {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
}
.mmodal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.attendee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.35rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.1rem;
}

/* ── Multi-select (groupes) ── */
.multi-sel {
  position: relative;
}
.multi-sel-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  min-height: 2.4rem;
  padding: 0.3rem 0.5rem;
  background: var(--input-bg, var(--surface));
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: text;
  transition: border-color 0.15s;
}
.multi-sel-box:focus-within { border-color: var(--accent); }
.multi-sel-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  background: rgba(74,159,212,0.15);
  border: 1px solid rgba(74,159,212,0.35);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
}
.multi-sel-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  padding: 0;
  font-size: 0.85rem;
  line-height: 1;
  opacity: 0.7;
}
.multi-sel-tag button:hover { opacity: 1; }
.multi-sel-input {
  border: none;
  background: none;
  outline: none;
  font-size: 0.85rem;
  color: var(--text);
  min-width: 120px;
  flex: 1;
  padding: 0.1rem 0;
}
.multi-sel-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 200;
  padding: 0.3rem 0;
  list-style: none;
  margin: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.multi-sel-list.open { display: block; }
.multi-sel-list li.is-highlighted { background: var(--surface-2); outline: 1px solid var(--accent); outline-offset: -1px; }
.multi-sel-list li {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
}
.multi-sel-list li:hover { background: var(--surface-2); }
.multi-sel-list li.selected { color: var(--text-muted); font-style: italic; }
.multi-sel-empty {
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.attend-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.83rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 5px;
  transition: background 0.12s;
}
.attend-check:hover { background: var(--surface-2); }
.attend-check input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.file-list { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.1rem; }
.mfile-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text);
  background: #1a2e4a;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.3rem 0.65rem;
}
.mfile-item.pending { opacity: 0.65; }
.mfile-del, .mfile-del-pending {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  margin-left: auto;
  padding: 0 0.15rem;
  transition: color 0.15s;
}
.mfile-del:hover, .mfile-del-pending:hover { color: var(--danger); }

/* ══════════════════════════════════════════════════════
   GROUPES DE TRAVAIL — Cartes
   ══════════════════════════════════════════════════════ */
.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s;
}
.group-card:hover { border-color: var(--accent); }

.gcard-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
}
/* Téléphone : le nom et la description sur toute la largeur, les actions dessous */
@media (max-width: 640px) {
  .gcard-head { flex-wrap: wrap; }
  .gcard-head > div:first-child { flex: 1 1 100% !important; }  /* le style en ligne dit flex:1 */
  .gcard-head .mcard-actions { flex-wrap: wrap; }
}
.gcard-name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.02em;
}
.gcard-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.gcard-body {
  border-top: 1px solid var(--border);
}
.gcard-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}
.gcard-coord {
  color: var(--accent-text);
  border-color: rgba(74,159,212,0.35);
  background: rgba(74,159,212,0.08);
}
.gcard-coord-chip {
  background: rgba(74,159,212,0.12);
  border: 1px solid rgba(74,159,212,0.3);
  border-radius: 4px;
  font-size: 0.78rem;
  padding: 0.15rem 0.55rem;
  color: var(--accent);
}

/* ── Theme sections (groups list) ── */
.theme-section {
  margin-bottom: 2rem;
}
.theme-section-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.theme-section-title {
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.theme-section-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}
a.theme-section-title { text-decoration: none; }
a.theme-section-title:hover { text-decoration: underline; }
.theme-section-leads {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}
.theme-section-open {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.theme-section-open:hover { text-decoration: underline; }
.theme-section-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
  margin-bottom: 0.6rem;
}

/* Feedback messages (réutilisé dans les modals) */
.feedback-msg { font-size: 0.82rem; min-height: 1.2em; }
.feedback-msg.error { color: var(--danger); }

/* ── Bouton aperçu visiteur ── */
.btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-preview:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.btn-preview.active {
  color: #F59E0B;
  border-color: rgba(245,158,11,0.55);
  background: rgba(245,158,11,0.1);
}

/* ── Bannière mode aperçu ── */
#preview-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 2rem;
  background: rgba(245,158,11,0.14);
  border-bottom: 1px solid rgba(245,158,11,0.4);
  color: #D97706;
  font-size: 0.83rem;
  font-family: inherit;
}

/* ══════════════════════════════════════════════════════
   TEMPLATES
   ══════════════════════════════════════════════════════ */
.template-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.template-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.template-item:hover { background: var(--surface-2); border-color: var(--accent); }
.template-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
}
.template-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.template-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.template-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.template-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.titem-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.titem-btn:hover { background: var(--surface-2); border-color: var(--text-muted); color: var(--text); }
.titem-btn-primary { color: var(--accent); border-color: rgba(74,159,212,0.4); }
.titem-btn-primary:hover { background: rgba(74,159,212,0.1); border-color: var(--accent); color: var(--accent); }
.titem-btn-danger:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }

/* ── Widget "Mes prochaines réunions" ── */
.my-meeting-row {
  display: flex;
  align-items: center;
  /* Le badge de visioconférence passe à la ligne quand la colonne est étroite
     (tableau de bord en trois colonnes) plutôt que d'écraser le titre. */
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.65rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.35rem;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.my-meeting-row:hover { border-color: var(--accent); background: var(--surface-2); }
.my-meeting-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 60%;
  /* Porte désormais le lien vers la réunion (voir renderMyMeetingsList) */
  text-decoration: none;
  color: inherit;
}
.my-meeting-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Préfixe « Workshop › » devant le titre d'une session */
.mtitle-ws {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.mtitle-ws:hover { text-decoration-thickness: 2px; }
.mtitle-sep { color: var(--text-muted); font-weight: 400; margin: 0 0.35rem; }
.my-meeting-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Workshop regroupé sur l'accueil : une entrée qui se déplie en sessions. */
.my-ws-group { margin-bottom: 0.35rem; }
.my-ws-group .my-ws-head { margin-bottom: 0; }
/* Colonne étroite de l'accueil : le nom du workshop passe à la ligne plutôt que d'être tronqué. */
.my-ws-head .my-meeting-title { white-space: normal; }
.my-ws-head.open { border-color: var(--accent); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* Le bouton qui déplie : habillé comme le reste de la ligne */
.my-ws-toggle { flex: 1 1 60%; min-width: 0; display: flex; padding: 0; border: none; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer; }
.my-ws-tag {
  display: inline-block; margin-right: 0.45rem; padding: 0.05rem 0.4rem;
  border-radius: 4px; background: rgba(74,159,212,0.14); color: var(--accent-text);
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: 1px;
}
/* « Join the workshop » sur la page du programme : plus visible qu'un badge de liste. */
.ws-join { display: flex; align-items: flex-start; margin-left: auto; }
.ws-join-btn { font-size: 0.86rem; padding: 0.4rem 0.9rem; }
.ws-join-btn svg { width: 14px; height: 14px; }
.ws-join-hint { font-size: 0.78rem; color: var(--text-muted); max-width: 22ch; text-align: right; }
.my-ws-programme { font-size: 0.78rem; color: var(--accent-text); text-decoration: none; white-space: nowrap; }
.my-ws-programme:hover { text-decoration: underline; }
.my-ws-chevron { color: var(--text-muted); flex-shrink: 0; transition: transform 0.15s; }
.my-ws-head.open .my-ws-chevron { transform: rotate(180deg); }
.my-ws-sessions {
  border: 1px solid var(--accent); border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 0.4rem 0.4rem 0.05rem 1.1rem;
  background: var(--surface-2);
}
.my-ws-sessions[hidden] { display: none; }
.my-ws-sessions .my-meeting-row { padding: 0.5rem 0.8rem; }

/* ── Zoom badge dans les cartes réunion ── */
.mcard-zoom-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  background: rgba(35,135,255,0.13);
  border: 1px solid rgba(35,135,255,0.35);
  border-radius: 20px;
  color: #4A9FD4;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.mcard-zoom-badge:hover { background: rgba(35,135,255,0.22); }
/* Visio du portail : réunion en cours, avec le nombre de personnes dans la salle */
.join-live {
  display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.45rem;
  font-weight: 600; font-size: 0.92em; color: var(--success);
}
.join-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  animation: join-live-pulse 1.8s ease-in-out infinite;
}
@keyframes join-live-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .join-live::before { animation: none; } }
/* Fenêtre d'accès au lien : avant, il est visible mais inerte ; pendant, il
   s'active ; après la fin prévue (plus trente minutes), il disparaît. */
/* Pas encore ouvert : gris lisible (4,5:1) plutôt qu'une opacité qui le rendait illisible */
[data-join-open].is-upcoming { pointer-events: none; cursor: default; background: var(--surface-2); border-color: var(--border); color: var(--text-muted); }
[data-join-open].is-over     { display: none; }
.mp-join { display: inline-flex; align-items: center; gap: 0.3rem; }
.mcard-groups { color: var(--accent); }
.ws-badge-group { color: var(--accent); border-color: currentColor; }

/* Sur écran étroit, le titre, le badge « Join the meeting » et les boutons
   d'action ne tiennent plus sur une ligne : on autorise le repli plutôt que
   de laisser la carte déborder de sa propre boîte. */
@media (max-width: 560px) {
  .mcard-head    { flex-wrap: wrap; row-gap: 0.5rem; }
  .mcard-main    { flex: 1 1 100%; }
  .mcard-actions { margin-left: auto; }
}

/* ── Modal édition réunion (grande) ── */
.medit-box {
  max-width: 820px;
  max-height: 92vh;
  transition: max-width 0.2s ease;
}
.medit-box.wide {
  max-width: 1180px;
}
.medit-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  padding: 0 1.25rem;
  background: var(--surface);
}
.medit-body {
  min-height: 0;
}
.medit-panel {
  padding: 0;
}

/* ── Split pane Minutes ── */
.medit-panel-cr-split {
  display: flex;          /* activé par JS via style.display='flex' */
  flex-direction: column;
}
.medit-cr-split {
  display: flex;
  flex-direction: row;
  height: calc(82vh - 130px); /* hauteur fixe = modal - header - onglets - footer */
  overflow: hidden;
}
.medit-cr-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.medit-cr-pane-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.medit-cr-divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}
.medit-cr-textarea {
  flex: 1;
  width: 100%;
  padding: 0.75rem;
  font-size: 0.87rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  line-height: 1.65;
  box-sizing: border-box;
  tab-size: 2;
  border: none;
  border-radius: 0;
  resize: none;
  background: var(--surface);
  color: var(--text);
  overflow-y: auto;
}
.medit-cr-textarea:focus { outline: none; }
.medit-cr-preview {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  background: var(--bg);
  box-sizing: border-box;
}
.medit-attendees-grid {
  max-height: none;
  margin-top: 0.6rem;
}
.medit-search {
  width: 100%;
  padding: 0.48rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 0.84rem;
  font-family: inherit;
  box-sizing: border-box;
  margin-top: 0.1rem;
}
.medit-search:focus { outline: none; border-color: var(--accent); }

/* ── Rendu markdown (preview + carte) ── */
.markdown-body { font-size: 0.88rem; line-height: 1.65; color: var(--text); }
.markdown-body h1,.markdown-body h2,.markdown-body h3 { font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif; font-weight:700; margin: 1rem 0 0.4rem; color: var(--text); }
.markdown-body h1 { font-size:1.3rem; }
.markdown-body h2 { font-size:1.1rem; }
.markdown-body h3 { font-size:0.95rem; }
.markdown-body p { margin: 0 0 0.6rem; }
.markdown-body ul,.markdown-body ol { padding-left: 1.4rem; margin: 0 0 0.6rem; }
.markdown-body li { margin-bottom: 0.2rem; }
.markdown-body code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius:3px; font-size:0.85em; font-family:monospace; }
.markdown-body pre { background: var(--surface-2); padding: 0.75rem; border-radius:6px; overflow-x:auto; margin: 0 0 0.6rem; }
.markdown-body pre code { background:none; padding:0; }
.markdown-body blockquote { border-left:3px solid var(--accent); padding-left:0.75rem; color:var(--text-muted); margin: 0 0 0.6rem; }
.markdown-body strong { font-weight: 700; }
.markdown-body em { font-style: italic; }
.markdown-body a { color: var(--accent); text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }
.markdown-body hr { border:none; border-top:1px solid var(--border); margin: 1rem 0; }
.markdown-body input[type="checkbox"] { margin-right: 0.35rem; }

/* ── Grille Présentations ── */
.pres-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 700px) { .pres-grid { grid-template-columns: 1fr; } }

.pres-tool-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow 0.2s, transform 0.18s;
  display: flex;
  flex-direction: column;
}
.pres-tool-box:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  transform: translateY(-2px);
}
.pres-tool-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.75rem 1rem 1.25rem;
  background: var(--pt-bg, var(--surface-2));
  border-bottom: 1px solid var(--pt-border, var(--border));
}
.pres-tool-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  /* drop shadow behind logo */
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.18));
}
.pres-tool-name {
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--pt-accent, var(--text)) var(--ink-mix), var(--text));
  text-align: center;
}
.pres-tool-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  justify-content: flex-end;
}

/* ── État vide ── */
.pres-empty-msg {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.83rem;
  padding: 0.75rem 0;
  margin: 0;
}

/* ── Zone d'upload ── */
.pres-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1.25rem 0.75rem;
  border: 1.5px dashed var(--pt-border, var(--border));
  border-radius: 9px;
  cursor: pointer;
  color: color-mix(in srgb, var(--pt-accent, var(--text-muted)) var(--ink-mix), var(--text));
  font-size: 0.82rem;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
  text-align: center;
  background: none;
}
.pres-upload-zone:hover {
  background: var(--pt-bg, var(--surface-2));
  border-color: var(--pt-accent, var(--accent));
}

/* ── Cellule remplie (fichier) ── */
.pres-file {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pres-file-meta {
  padding: 0 0.1rem;
}
.pres-file-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pres-file-size {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.pres-dl-btn {
  width: 100%;
  justify-content: center;
  padding: 0.58rem 1rem;
  font-size: 0.84rem;
}
.pres-admin-row {
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
}
.pres-admin-row .titem-btn {
  flex: 1;
  justify-content: center;
  align-items: center;
  font-family: inherit;
  box-sizing: border-box;
}

/* ── Bouton "Ouvrir" Google Slides ── */
.pres-open-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.62rem 1rem;
  background: var(--pt-accent, var(--accent-fill));
  color: var(--pt-ink, #fff);
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  height: 2.5rem;
  border: none;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  box-sizing: border-box;
}
.pres-open-btn:hover { opacity: 0.88; transform: scale(1.01); }

/* ── Formulaire URL Google Slides ── */
.pres-url-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pres-url-input {
  width: 100%;
  padding: 0.5rem 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pres-url-input:focus {
  outline: none;
  border-color: var(--pt-accent, var(--accent));
  box-shadow: 0 0 0 3px rgba(249,171,0,0.18);
}
.pres-url-form-btns {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}
.pres-url-save-btn { width: 100%; justify-content: center; }

/* ── Navbar partagée ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
/* Un libellé de l'en-tête ne se coupe jamais (« Public / site ») ; en
   fenêtre moyenne, le nom s'efface derrière l'avatar et les écarts se
   resserrent */
.nav-right > a, .nav-right > button, .nav-right .btn-ghost, .nav-right .btn-preview { white-space: nowrap; }
@media (max-width: 1180px) {
  .nav-right { gap: 0.6rem; }
  .nav-username { display: none; }
}

/* ── Dropdown compte ── */
.account-menu { position: relative; }

.account-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.account-trigger:hover { border-color: var(--text-muted); color: var(--text); }
.account-trigger svg { opacity: 0.5; }

.account-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-fill);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.account-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 100;
  overflow: hidden;
}
.account-dropdown.open { display: block; }

/* Reprises mobiles des commandes de la barre : masquées par défaut, révélées
   par la media query téléphone. Cette règle de base est indispensable — le JS
   retire le display:none inline pour les rôles autorisés, et sans elle les
   entrées réapparaîtraient en double sur grand écran. */
.account-dropdown .nav-mobile-only { display: none; }

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
}
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-bg); }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

/* ── Bouton aperçu visiteur ── */
.btn-preview {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-preview:hover { border-color: var(--accent); color: var(--accent); }
.btn-preview.active { background: rgba(74,159,212,0.15); border-color: var(--accent); color: var(--accent); }

/* ══════════════════════════════════════════════════════
   BADGES DE STATUT
   ══════════════════════════════════════════════════════ */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-member        { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }
/* En thème clair, gris sur gris : la pastille se fondait dans le fond du
   tableau. Une teinte ardoise lui rend un contour et un texte lisibles. */
[data-theme="light"] .status-member { background: rgba(51,65,85,0.07); border-color: rgba(51,65,85,0.28); color: #334155; }
.status-national-lead { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.35); color: color-mix(in srgb, #D97706 var(--ink-mix), var(--text)); }
.status-pi            { background: rgba(220,38,38,0.12); border: 1px solid rgba(220,38,38,0.35); color: color-mix(in srgb, #dc2626 var(--ink-mix), var(--text)); }
.status-admin         { background: rgba(74,159,212,0.15); border: 1px solid rgba(74,159,212,0.3); color: var(--accent-text); }
.status-wg-lead       { background: var(--success-bg); border: 1px solid rgba(61,189,142,0.35); color: var(--success); }
.status-pub-board     { background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.35); color: color-mix(in srgb, #9333ea var(--ink-mix), var(--text)); }
.status-conf-board    { background: rgba(236,72,153,0.12); border: 1px solid rgba(236,72,153,0.35); color: color-mix(in srgb, #db2777 var(--ink-mix), var(--text)); }
.status-web-editor    { background: rgba(20,184,166,0.12); border: 1px solid rgba(20,184,166,0.35); color: color-mix(in srgb, #0f766e var(--ink-mix), var(--text)); }
/* Ancien membre : volontairement neutre et discret, pour se distinguer des
   rôles actifs sans attirer l'œil comme le ferait un statut d'alerte. */
.status-former        { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }
.read-only-notice { margin: 0 0 1rem; padding: 0.6rem 0.85rem; border: 1px dashed var(--control-border); border-radius: 8px; font-size: 0.85rem; color: var(--text-muted); background: var(--surface); }
.status-external      { background: transparent; border: 1px dashed var(--control-border); color: var(--text-muted); }
/* « ✓ Member » (taskforces, thématiques) et validations : vert du thème, lisible
   en clair comme en sombre. Les couleurs étaient codées en dur pour le sombre,
   d'où un bloc vert très foncé sur fond blanc en thème clair. */
.member-pill { background: var(--success-bg); color: var(--success); border-color: rgba(61,189,142,0.4); }
span.member-pill.standalone {
  font-size: 0.82rem; font-weight: 600; border: 1px solid rgba(61,189,142,0.4);
  border-radius: 5px; padding: 0.3rem 0.75rem;
}
.btn-approve.member-pill { border: 1px solid rgba(61,189,142,0.4); }
.text-success { color: var(--success); }

/* Filtre des membres par étiquette */
.status-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: -0.35rem 0 1rem; }
.status-filter-btn {
  border: none; background: none; padding: 0; cursor: pointer; font: inherit;
  border-radius: 20px; transition: box-shadow 0.12s;
}
/* Pas d'opacité réduite sur les filtres inactifs : le texte passait sous 4,5:1.
   Le filtre actif se distingue par son anneau. */
.status-filter-btn:hover { box-shadow: 0 0 0 1px var(--border); }
.status-filter-btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.status-filter-btn .status-badge { font-size: 0.76rem; padding: 0.2rem 0.65rem; }
.status-filter-count { margin-left: 0.35rem; font-weight: 500; }
/* Communication status badges */
/* ── Communication filter pills + abstract mode tabs ── */
.comm-filter,
.comm-type-filter,
.cm-abs-mode,
.cd-abs-mode,
.cm-doc-type {
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.comm-filter.active,
.comm-type-filter.active,
.cm-abs-mode.active,
.cd-abs-mode.active,
.cd-pres-mode.active,
.cd-rec-btn.active,
.cm-doc-type.active {
  background: var(--accent-fill) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
.comm-filter:hover:not(.active),
.comm-type-filter:hover:not(.active),
.cm-abs-mode:hover:not(.active),
.cd-abs-mode:hover:not(.active),
.cd-pres-mode:hover:not(.active),
.cd-rec-btn:hover:not(.active),
.cm-doc-type:hover:not(.active) {
  background: var(--surface-2);
  border-color: var(--text-muted);
  color: var(--text);
}

.comm-status-draft      { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }
.comm-status-submitted  { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.35); color: color-mix(in srgb, #D97706 var(--ink-mix), var(--text)); }
.comm-status-in_review  { background: rgba(74,159,212,0.15); border: 1px solid rgba(74,159,212,0.3); color: var(--accent-text); }
.comm-status-review     { background: rgba(74,159,212,0.15); border: 1px solid rgba(74,159,212,0.3); color: var(--accent-text); }
.comm-status-revision   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35); color: color-mix(in srgb, #ef4444 var(--ink-mix), var(--text)); }
.comm-status-accepted   { background: var(--success-bg); border: 1px solid rgba(61,189,142,0.35); color: var(--success); }
.comm-status-rejected   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35); color: color-mix(in srgb, #ef4444 var(--ink-mix), var(--text)); }
.comm-status-closed     { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }

/* ── 3-Stage review stepper ──────────────────────────────────── */
.cd-stepper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cd-stage {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.15s;
}
.cd-stage.is-active  { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(74,159,212,0.15); }
.cd-stage.is-done    { border-color: rgba(61,189,142,0.4); }
.cd-stage.is-locked  { opacity: 0.55; }
.cd-stage.is-waived  { opacity: 0.7; border-style: dashed; }

.cd-stage-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  cursor: default;
}
.cd-stage.is-active .cd-stage-header { background: rgba(74,159,212,0.07); }
.cd-stage.is-done   .cd-stage-header { background: rgba(61,189,142,0.07); }

.cd-stage-num {
  flex-shrink: 0;
  width: 1.6rem; height: 1.6rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  background: var(--border); color: var(--text-muted);
}
.cd-stage.is-active .cd-stage-num { background: var(--accent-fill); color: #fff; }
.cd-stage.is-done   .cd-stage-num { background: var(--success-fill); color: #fff; }

.cd-stage-title { font-weight: 600; font-size: 0.9rem; flex: 1; }
.cd-stage-badge { margin-left: auto; }

.cd-stage-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cd-stage.is-locked .cd-stage-body { display: none; }

/* Guidance box */
.cd-guidance {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.65rem 0.85rem;
  border-radius: 7px;
  font-size: 0.82rem;
  line-height: 1.45;
  background: rgba(74,159,212,0.08);
  border: 1px solid rgba(74,159,212,0.2);
  color: var(--text);
}
.cd-guidance-icon { flex-shrink: 0; margin-top: 0.05rem; font-size: 0.9rem; }
.cd-guidance.warn   { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); }
.cd-guidance.danger { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3); }
.cd-guidance.success{ background: rgba(61,189,142,0.1); border-color: rgba(61,189,142,0.3); }

/* Stage action row */
.cd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Reviewers list inside stage */
.cd-reviewers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.cd-reviewer-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-size: 0.75rem;
  background: rgba(74,159,212,0.1);
  border: 1px solid rgba(74,159,212,0.25);
  color: var(--accent);
}

/* Relecteurs suggérés par les auteurs, dans le bloc d'assignation du board */
.cd-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin-bottom: 0.5rem; }
.cd-sugg-label { font-size: 0.72rem; color: var(--text-muted); margin-right: 0.15rem; }
.cd-sugg-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.15rem 0.55rem; border-radius: 20px; font-size: 0.75rem; font-family: inherit;
  background: transparent; border: 1px dashed var(--border); color: var(--text-muted);
}
button.cd-sugg-chip { cursor: pointer; }
button.cd-sugg-chip:hover, button.cd-sugg-chip:focus-visible { border-color: var(--accent); color: var(--accent); }
.cd-sugg-chip.done { border-style: solid; color: var(--success); }

/* Review form inside stage */
.cd-review-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.cd-review-form label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.cd-review-form select,
.cd-review-form textarea { width: 100%; }

/* Board decision buttons */
.btn-accept  { background: var(--success-fill); color: #fff; border: none; }
.btn-accept:hover  { background: color-mix(in srgb, var(--success) 50%, #000); }
.btn-revise  { background: color-mix(in srgb, #D97706 80%, #000); color: #fff; border: none; }
.btn-revise:hover  { background: #b45309; }
.btn-reject  { background: var(--danger-fill); color: #fff; border: none; }
.btn-reject:hover  { background: #b91c1c; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE — Global
   ══════════════════════════════════════════════════════ */

/* ── Hamburger button (shown only on mobile) ── */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.nav-hamburger:hover { color: var(--text); border-color: var(--text-muted); }

/* ── Notifications ── */
.notif-menu { position: relative; }

.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.notif-bell:hover { color: var(--text); border-color: var(--text-muted); }

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--danger-fill);
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--surface);
}

.admin-pending-badge {
  top: -8px;
  right: -10px;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px var(--shadow);
  z-index: 200;
  overflow: hidden;
}
.notif-dropdown.open { display: flex; flex-direction: column; }
.notif-dropdown.notif-dropdown-fixed {
  position: fixed;
  left: 16px;
  right: 16px;
  width: auto;
  max-width: 420px;
  max-height: 75vh;
}
.notif-dropdown.notif-dropdown-fixed .notif-list { flex: 1; min-height: 0; overflow-y: auto; }

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid var(--border);
}
.notif-desktop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.notif-desktop[hidden] { display: none; }
.notif-desktop[data-state="on"] .notif-desktop-text { color: var(--success, var(--text)); }
.notif-desktop-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.notif-desktop-btn:hover { border-color: var(--accent); }
.notif-desktop-btn[hidden] { display: none; }
.notif-header-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.notif-read-all {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.notif-read-all:hover { text-decoration: underline; }

.notif-list {
  max-height: 380px;
  overflow-y: auto;
}

.notif-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
  color: inherit;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: rgba(74,159,212,0.07); }
.notif-item.unread:hover { background: rgba(74,159,212,0.13); }

.notif-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}
.notif-icon.action    { background: rgba(74,159,212,0.15); color: var(--accent); }
.notif-icon.news      { background: rgba(61,189,142,0.15); color: var(--success); }
.notif-icon.group     { background: rgba(200,160,53,0.15); color: #c8a035; }
.notif-icon.join      { background: rgba(224,82,82,0.12);  color: var(--danger); }
.notif-icon.approved  { background: rgba(61,189,142,0.15); color: var(--success); }
.notif-icon.rejected  { background: rgba(224,82,82,0.12);  color: var(--danger); }

.notif-body { flex: 1; min-width: 0; }
.notif-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-msg {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.notif-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  align-self: center;
  margin-left: 0.25rem;
}
.notif-dismiss,
.notif-delete {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.notif-dismiss {
  color: var(--success);
  border-color: rgba(61,189,142,0.45);
}
.notif-dismiss:hover {
  background: rgba(61,189,142,0.15);
  border-color: var(--success);
}
.notif-delete {
  color: var(--text-muted);
  border-color: rgba(122,157,184,0.35);
}
.notif-delete:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

/* ── Bouton thème clair/sombre ── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-muted); }

/* icône soleil visible en mode sombre, lune en mode clair */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ── Sidebar overlay backdrop ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,18,30,0.65);
  z-index: 9998;
}
.sidebar-backdrop.open { display: block; }

@media (max-width: 768px) {
  /* Navbar */
  nav {
    padding: 0.65rem 1rem;
    gap: 0.5rem;
  }
  .nav-hamburger {
    display: inline-flex;
  }

  /* Hide username text in account trigger */
  .nav-username {
    display: none;
  }

  /* Le groupe de droite doit pouvoir se comprimer : sans min-width:0 un
     conteneur flex refuse de passer sous la largeur de son contenu et
     déborde hors de l'écran au lieu de s'adapter. */
  .nav-right {
    gap: 0.45rem;
    min-width: 0;
    flex-shrink: 1;
  }

  /* Le raccourci clavier n'a pas de sens sur un téléphone, et il élargit
     inutilement le champ de recherche. */
  .search-kbd {
    display: none;
  }
  /* La recherche se réduit à son icône. */
  .search-trigger {
    width: 38px;
    padding: 0.45rem;
    justify-content: center;
  }
  .search-trigger span {
    display: none;
  }

  /* Tables: horizontal scroll */
  .table-card {
    overflow-x: auto;
  }

  /* Presentation grid: 2 columns on tablet */
  .pres-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Barre de navigation : repli des commandes textuelles ────────────────────
   Admin, Instance configuration et Visitor Preview sont des libellés textuels
   qui coûtent à eux seuls près de 300 px. Barre complète, l'en-tête réclame
   646 px au minimum ; en dessous, les icônes sortaient de l'écran.
   Le seuil est donc fixé à 700 px — au-dessus de ce minimum, avec une marge —
   et non à 560 px, ce qui aurait laissé déborder les grands téléphones en
   paysage et les petites tablettes. Les trois commandes migrent dans le menu
   de compte, qui est déjà un menu et n'a aucune contrainte de largeur. */
@media (max-width: 700px) {
  #adminLink,
  #siteAdminLink,
  #superAdminLink,
  #previewBtn {
    display: none !important;
  }
  /* Leurs reprises n'apparaissent qu'ici, et seulement si le rôle les a
     révélées (le JS retire le display:none inline). */
  .account-dropdown .nav-mobile-only {
    display: block;
  }

  /* Pas d'overflow:hidden sur nav : les menus déroulants (compte,
     notifications) sont des enfants positionnés en absolu, il les tronquerait.
     La compression de .nav-right suffit à contenir la barre. */
  nav {
    max-width: 100vw;
  }
}

@media (max-width: 560px) {
  /* Presentation grid: 1 column on mobile */
  .pres-grid {
    grid-template-columns: 1fr;
  }

  /* Modal full screen on small devices */
  .mmodal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .mmodal-box {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 92vh;
  }
}

/* ── News ───────────────────────────────────────────────────────────────────── */

/* Colonne de lecture : en pleine largeur, une carte de 1 300 px laissait le
   texte sur la moitié gauche et l'image entre deux bandes grises */
#section-news > * { max-width: 780px; margin-inline: auto; }

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  scroll-margin-top: 5rem;
  transition: box-shadow 0.15s, border-color 0.3s;
}
.news-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.10); }
/* Arrivée par un lien (notification, recherche) */
.news-card.is-target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }

/* Image en tête : entière (une figure ne doit pas être rognée), sur un fond neutre */
/* Image sous le titre, à sa taille : alignée sur le texte, sans bandes autour
   d'une image plus haute que large */
.news-card-image { display: block; width: fit-content; max-width: 100%; margin: 0 0 0.9rem; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--border); }
.news-card-image img { display: block; max-width: 100%; max-height: 440px; width: auto; height: auto; }

.news-card-body { padding: 1.1rem 1.25rem 0.9rem; }
.news-card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.45rem; }
.news-card-tags .nk-pill { margin-bottom: 0; }
.news-public { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.12rem 0.5rem;
  border-radius: 20px; background: var(--success-bg); color: var(--success); }

.news-card-title {
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 0.35rem;
  overflow-wrap: anywhere;
}

.news-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.news-card-content {
  font-size: 0.9rem;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
/* Texte long : replié à une dizaine de lignes, « Show more » le déplie */
.news-card-content.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-more { margin-top: 0.35rem; padding: 0.2rem 0; border: none; background: none; color: var(--accent-text);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.news-more:hover { text-decoration: underline; }

/* Pied de carte : commentaires à gauche, modifier et supprimer à droite */
.news-card-actions { display: flex; align-items: center; gap: 0.25rem; padding: 0.4rem 0.75rem;
  border-top: 1px solid var(--border); }
.news-act-gap { flex: 1; }
.news-act { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 36px; padding: 0.3rem 0.65rem;
  border: none; border-radius: 8px; background: none; color: var(--text-muted); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.news-act:hover, .news-act:focus-visible { background: var(--surface-2); color: var(--text); }
.news-act-danger:hover, .news-act-danger:focus-visible { color: var(--danger); }

/* Filtre par type */
.news-filter { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.news-filter-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.75rem; min-height: 32px; border-radius: 20px; border: 1px solid var(--border); background: none;
  color: var(--text-muted); font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.news-filter-chip:hover { color: var(--text); border-color: var(--text-muted); }
.news-filter-chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text); }
.news-loading { color: var(--text-muted); font-size: 0.88rem; }
.news-error { color: var(--danger); font-size: 0.88rem; }

/* Formulaire : lien sur un mot */
.news-content-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem; }
.news-content-head .btn-ghost { margin-bottom: 0.3rem; }
.news-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.4rem; padding: 0.5rem;
  border-radius: 8px; background: var(--surface-2); }
.news-link-row[hidden] { display: none; }
.news-link-row input { flex: 1 1 14rem; min-width: 0; }
.news-link-hint { flex-basis: 100%; font-size: 0.75rem; color: var(--text-muted); }

/* Formulaire : image */
.news-optional { font-weight: 400; font-size: 0.74rem; color: var(--text-muted); margin-left: 0.25rem; }
.news-img-drop { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 1rem; border: 1.5px dashed var(--border);
  border-radius: 10px; text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.news-img-drop:hover, .news-img-drop.is-over, .news-img-drop:focus-within { border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent); }
.news-img-drop[hidden], .news-img-preview[hidden], #newsImageAltRow[hidden] { display: none; }
.news-img-drop-main { font-weight: 600; font-size: 0.88rem; color: var(--text); }
.news-img-drop-sub { font-size: 0.75rem; color: var(--text-muted); }
.news-img-preview { display: flex; flex-direction: column; gap: 0.5rem; }
.news-img-preview img { width: 100%; max-height: 220px; object-fit: contain; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--border); }
.news-img-actions { display: flex; gap: 0.4rem; }

@media (max-width: 600px) {
  .news-card-body { padding: 0.95rem 1rem 0.8rem; }
  .news-card-image img { max-height: 260px; }
  .news-card-actions { padding: 0.3rem 0.5rem; }
}

/* ── Conference list (agenda layout) ──────────────────────────────────────── */
.conf-year-group { margin-bottom: 2rem; }

.conf-year-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.conf-list { display: flex; flex-direction: column; gap: 0; }

.conf-row {
  display: grid;
  grid-template-columns: 170px 1px 1fr auto;
  gap: 0 1.25rem;
  align-items: start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.conf-row:first-child { border-top: 1px solid var(--border); }
.conf-row:hover { background: var(--surface-2); border-radius: 6px; }
.conf-row.conf-row-past { opacity: 0.6; }

.conf-row-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 0;
  padding-top: 0.05rem;
}
.conf-row-daterange {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  line-height: 1.35;
}

.conf-row-sep {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  min-height: 1rem;
}

.conf-row-body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }

.conf-row-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  line-height: 1.35;
}
.conf-row-name {
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--text);
}
.conf-row-acronym {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(74,159,212,0.1);
  border: 1px solid rgba(74,159,212,0.2);
  padding: 0.05rem 0.45rem;
  border-radius: 20px;
}
.conf-row-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.conf-row-desc {
  font-size: 0.79rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.4;
  white-space: pre-line;
}
/* Les notes s'affichent sur trois lignes ; au-delà, un lien les déplie. */
.conf-row-desc.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.conf-row-desc-more {
  display: inline-block;
  align-self: flex-start;
  margin-top: 0.15rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.conf-row-desc-more:hover { text-decoration: underline; }

/* Les jalons s'empilent sous la date, alignés à droite comme elle. */
.conf-row-deadlines {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  margin-top: 0.35rem;
}
.conf-dl-chip {
  font-size: 0.73rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.1rem 0.55rem;
  white-space: nowrap;
}
.conf-dl-chip b { color: var(--text); font-weight: 600; }
.conf-dl-chip.is-past { color: var(--text-muted); text-decoration: line-through; }
.conf-dl-chip.is-past b { color: var(--text-muted); }
.conf-dl-chip.is-next { border-color: var(--accent); color: var(--accent-text); }
.conf-dl-chip.is-next b { color: var(--accent-text); }

.conf-urgency {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  white-space: nowrap;
}
.conf-urgency.danger  { background: rgba(224,82,82,0.12);  color: var(--danger); border: 1px solid rgba(224,82,82,0.3); }
.conf-urgency.warn    { background: rgba(200,160,53,0.12); color: var(--warning);       border: 1px solid rgba(200,160,53,0.3); }
.conf-urgency.info    { background: rgba(74,159,212,0.1);  color: var(--accent); border: 1px solid rgba(74,159,212,0.2); }
.conf-urgency.muted   { background: var(--surface-2);      color: var(--text-muted); border: 1px solid var(--border); }

.conf-row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  padding-top: 0.05rem;
  min-width: 80px;
}
/* Téléphone : dates, puis texte, puis actions, l'un sous l'autre */
@media (max-width: 640px) {
  .conf-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .conf-row-sep { display: none; }
  .conf-row-date, .conf-row-deadlines { align-items: flex-start; }
  .conf-row-daterange { text-align: left; }
  .conf-row-deadlines { flex-direction: row; flex-wrap: wrap; }
  .conf-row-actions { flex-direction: row; align-items: center; min-width: 0; }
}
/* Le lien vers le site est l'action principale d'une ligne : il se voit. */
.conf-row-website {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  background: var(--accent-fill);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
}
.conf-row-website:hover { opacity: 0.88; transform: translateY(-1px); color: #fff; }
.conf-row-comms {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Conference hover tooltip ──────────────────────────────────────────────── */
.conf-comm-tooltip {
  position: fixed;
  z-index: 9999;
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  min-width: 280px;
  max-width: 380px;
  overflow: hidden;
  animation: tipFadeIn 0.12s ease;
}
@keyframes tipFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.conf-tip-header {
  padding: 0.55rem 0.85rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.conf-tip-list { display: flex; flex-direction: column; }
.conf-tip-row {
  display: grid;
  grid-template-columns: 1.2rem 1fr auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  pointer-events: all;
  transition: background 0.1s;
}
.conf-tip-row:last-child { border-bottom: none; }
.conf-tip-row:hover { background: var(--surface-2); }
.conf-tip-stage {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}
.conf-tip-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conf-tip-sub {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.conf-tip-badge {
  font-size: 0.67rem;
  font-weight: 600;
  padding: 0.08rem 0.45rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.conf-tip-more {
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}
.conf-tip-empty {
  padding: 0.75rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}
.conf-tip-loading {
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Wiki ──────────────────────────────────────────────── */
.wiki-view { }
.wiki-index-group { margin-bottom: 1.5rem; }
/* Arborescence : sections en cartes, sous-pages en liste */
.wiki-sections { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:1rem; align-items:start; }
.wiki-section-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:0.85rem 1rem; min-width:0; }
.wiki-section-head { display:flex; align-items:baseline; justify-content:space-between; gap:0.5rem; padding-bottom:0.45rem; margin-bottom:0.45rem; border-bottom:1px solid var(--border); }
.wiki-section-title { font-weight:700; font-size:0.98rem; color:var(--text); text-decoration:none; }
a.wiki-section-title:hover { color:var(--accent-text); }
.wiki-tree, .wiki-tree-sub { list-style:none; margin:0; padding:0; }
.wiki-section-card.wide { grid-column:1 / -1; }
.wiki-section-card.wide > .wiki-tree { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:0.4rem 1.75rem; }
.wiki-section-card.wide > .wiki-tree > li.has-sub { padding-top:0.2rem; }
.wiki-tree > li { padding:0.18rem 0; }
.wiki-tree > li.has-sub { padding-top:0.4rem; }
.wiki-tree-sub { margin:0.15rem 0 0.2rem 0.2rem; padding-left:0.75rem; border-left:2px solid var(--border); }
.wiki-tree-sub > li { padding:0.12rem 0; }
.wiki-tree-link { color:var(--text); text-decoration:none; font-size:0.88rem; }
.wiki-tree-link:hover { color:var(--accent-text); text-decoration:underline; }
.wiki-tree-group { font-weight:600; }
.wiki-tree-more { font-size:0.75rem; color:var(--text-muted); }
/* Page : fil d'Ariane, menu de section, sous-pages, précédent / suivant */
.wiki-layout.with-side { display:grid; grid-template-columns:230px minmax(0, 1fr); gap:1.75rem; align-items:start; }
.wiki-side { position:sticky; top:1rem; max-height:calc(100vh - 2rem); overflow:auto; font-size:0.84rem; border-right:1px solid var(--border); padding-right:0.75rem; }
.wiki-side ul { list-style:none; margin:0; padding:0 0 0 0.7rem; }
.wiki-side > ul { padding-left:0; margin-top:0.4rem; }
.wiki-side li { margin:0.1rem 0; }
.wiki-side a { display:block; color:var(--text-muted); text-decoration:none; padding:0.18rem 0.4rem; border-radius:5px; line-height:1.3; }
.wiki-side a:hover { color:var(--text); background:var(--surface-2); }
.wiki-side a.on-path { color:var(--text); font-weight:600; }
.wiki-side a.current { color:var(--accent-text); background:var(--surface-2); font-weight:700; }
.wiki-side .wiki-side-root { font-weight:700; color:var(--text); text-transform:uppercase; font-size:0.74rem; letter-spacing:0.06em; }
.wiki-crumbs { display:flex; flex-wrap:wrap; align-items:center; gap:0.4rem; font-size:0.8rem; color:var(--text-muted); margin-bottom:0.6rem; }
.wiki-crumbs a { color:var(--text-muted); text-decoration:none; }
.wiki-crumbs a:hover { color:var(--accent-text); text-decoration:underline; }
.wiki-subpages { margin-top:1.5rem; padding:0.8rem 1rem; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); }
.wiki-subpages-title { font-size:0.75rem; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--text-muted); margin-bottom:0.4rem; }
.wiki-subpages ul { margin:0; padding-left:1.1rem; columns:2 240px; }
.wiki-subpages li { margin:0.15rem 0; break-inside:avoid; }
.wiki-subpages a { color:var(--accent-text); text-decoration:none; }
.wiki-subpages a:hover { text-decoration:underline; }
.wiki-prevnext { display:flex; justify-content:space-between; gap:1rem; margin-top:1.25rem; padding-top:0.8rem; border-top:1px solid var(--border); font-size:0.86rem; }
.wiki-prevnext a { color:var(--accent-text); text-decoration:none; max-width:48%; }
.wiki-prevnext a.next { margin-left:auto; text-align:right; }
.wiki-prevnext a:hover { text-decoration:underline; }
@media (max-width: 900px) {
  .wiki-layout.with-side { display:block; }
  .wiki-side { display:none; }
}
.wiki-index-group-title { font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-muted); margin-bottom:0.4rem; padding-bottom:0.3rem; border-bottom:1px solid var(--border); }
.wiki-page-row { display:flex; align-items:baseline; gap:0.75rem; padding:0.5rem 0.6rem; border-radius:6px; cursor:pointer; transition:background 0.12s; }
.wiki-page-row:hover { background:var(--surface-2); }
.wiki-page-title { font-weight:600; font-size:0.92rem; color:var(--text); }
.wiki-page-meta { font-size:0.75rem; color:var(--text-muted); margin-left:auto; white-space:nowrap; }
.wiki-cat-badge { font-size:0.7rem; font-weight:600; background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:0.1rem 0.45rem; color:var(--text-muted); }

/* Wiki page reader */
.wiki-page-header { margin-bottom:1.5rem; padding-bottom:1rem; border-bottom:1px solid var(--border); }
.wiki-page-title-h1 { font-size:1.8rem; font-weight:800; margin:0 0 0.4rem; }
.wiki-page-actions { display:flex; gap:0.5rem; flex-wrap:wrap; margin-top:0.75rem; }
.wiki-toc { background:var(--surface-2); border:1px solid var(--border); border-radius:8px; padding:0.75rem 1rem; margin-bottom:1.5rem; max-width:320px; }
.wiki-toc-title { font-size:0.75rem; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--text-muted); margin-bottom:0.4rem; }
.wiki-toc a { display:block; font-size:0.83rem; color:var(--accent); text-decoration:none; padding:0.1rem 0; }
.wiki-toc a:hover { text-decoration:underline; }
.wiki-toc a.toc-h3 { padding-left:1rem; font-size:0.78rem; }
.wiki-backlinks { margin-top:2rem; padding-top:1rem; border-top:1px solid var(--border); font-size:0.83rem; color:var(--text-muted); }
.wiki-internal-link { color:var(--accent); text-decoration:none; }
.wiki-internal-link:hover { text-decoration:underline; }
/* Lien vers une page inexistante (convention MediaWiki) : le pointillé porte
   l'information même si la couleur passe mal (daltonisme, impression). */
.wiki-link-missing { color:var(--danger); border-bottom:1px dotted var(--danger); }
.wiki-link-missing:hover { text-decoration:none; border-bottom-style:solid; }

/* Wiki editor */
.wiki-editor { display:flex; flex-direction:column; gap:0.75rem; }
.wiki-editor-toolbar { display:flex; gap:0.3rem; flex-wrap:wrap; background:var(--surface-2); border:1px solid var(--border); border-radius:6px 6px 0 0; padding:0.4rem 0.5rem; }
.wiki-editor-toolbar button { background:none; border:1px solid transparent; border-radius:4px; padding:0.2rem 0.45rem; font-size:0.82rem; cursor:pointer; color:var(--text); font-family:monospace; }
.wiki-editor-toolbar button:hover { background:var(--surface); border-color:var(--border); }
.wiki-editor-textarea { width:100%; box-sizing:border-box; min-height:380px; resize:vertical; font-family:monospace; font-size:0.87rem; line-height:1.6; padding:0.75rem; background:var(--surface-2); border:1px solid var(--border); border-top:none; border-radius:0 0 6px 6px; color:var(--text); }
.wiki-editor-preview { min-height:380px; padding:1rem; background:var(--surface-2); border:1px solid var(--border); border-top:none; border-radius:0 0 6px 6px; }

/* Wiki history */
.wiki-history-item { display:flex; align-items:flex-start; gap:0.75rem; padding:0.6rem 0; border-bottom:1px solid var(--border); }
.wiki-history-rev { font-size:0.75rem; color:var(--text-muted); white-space:nowrap; }
.wiki-diff-add { background:rgba(61,189,142,0.15); color:var(--success); }
.wiki-diff-del { background:rgba(239,68,68,0.1); color:#ef4444; text-decoration:line-through; }

/* Recent changes */
.wiki-recent-item { display:flex; gap:0.75rem; align-items:baseline; padding:0.5rem 0; border-bottom:1px solid var(--border); }
.wiki-recent-page { font-weight:600; font-size:0.88rem; color:var(--accent); cursor:pointer; }
.wiki-recent-page:hover { text-decoration:underline; }
.wiki-recent-summary { font-size:0.8rem; color:var(--text-muted); font-style:italic; }
.wiki-recent-meta { font-size:0.75rem; color:var(--text-muted); margin-left:auto; white-space:nowrap; }

/* Wiki content prose styles */
.wiki-content h1 { font-size:1.6rem; font-weight:800; margin:1.5rem 0 0.75rem; }
.wiki-content h2 { font-size:1.25rem; font-weight:700; margin:1.5rem 0 0.6rem; padding-bottom:0.3rem; border-bottom:1px solid var(--border); }
.wiki-content h3 { font-size:1.05rem; font-weight:700; margin:1.2rem 0 0.5rem; }
.wiki-content p { margin:0.6rem 0; }
.wiki-content ul, .wiki-content ol { padding-left:1.5rem; margin:0.6rem 0; }
.wiki-content li { margin:0.2rem 0; }
.wiki-content code { background:var(--surface-2); border:1px solid var(--border); border-radius:4px; padding:0.1rem 0.35rem; font-family:monospace; font-size:0.85em; }
.wiki-content pre { background:var(--surface-2); border:1px solid var(--border); border-radius:6px; padding:0.85rem 1rem; overflow-x:auto; margin:0.75rem 0; }
.wiki-content pre code { background:none; border:none; padding:0; }
.wiki-content blockquote { border-left:3px solid var(--accent); margin:0.75rem 0; padding:0.4rem 0 0.4rem 1rem; color:var(--text-muted); }
.wiki-content a { color:var(--accent); }
.wiki-content a:hover { text-decoration:underline; }
.wiki-content hr { border:none; border-top:1px solid var(--border); margin:1.5rem 0; }
.wiki-content table { border-collapse:collapse; width:100%; margin:0.75rem 0; font-size:0.88rem; }
.wiki-content th, .wiki-content td { border:1px solid var(--border); padding:0.4rem 0.75rem; }
.wiki-content th { background:var(--surface-2); font-weight:700; }
/* Un tableau large défile dans son cadre au lieu d'élargir la page (téléphone) */
@media (max-width: 720px) {
  .wiki-content table { display:block; max-width:100%; overflow-x:auto; font-size:0.82rem; }
  .wiki-content th, .wiki-content td { padding:0.35rem 0.5rem; }
}

/* ── Wiki: KaTeX math ───────────────────────────────────────────────────────── */
.wiki-content .katex-display {
  margin: 1rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25rem 0;
}
.wiki-content .katex { font-size: 1.05em; }
.wiki-math-error { color: var(--danger); font-size: 0.82rem; font-family: monospace; }

/* ── Wiki: Mermaid diagrams ─────────────────────────────────────────────────── */
.wiki-content .mermaid {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}
.wiki-content .mermaid svg { max-width: 100%; height: auto; }

/* ── Wiki: toolbar separator ────────────────────────────────────────────────── */
.wiki-toolbar-sep {
  display: inline-block;
  width: 1px;
  height: 1.1rem;
  background: var(--border);
  margin: 0 0.25rem;
  vertical-align: middle;
}

/* ══ Publication Policy — markdown view ════════════════════════════════════ */
.policy-md-view { font-size: 0.9rem; line-height: 1.7; color: var(--text); }
.policy-md-view h1 { font-size: 1.3rem; font-weight: 700; margin: 0 0 0.2rem; color: var(--text); }
.policy-md-view h2 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin: 1.75rem 0 0.7rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.policy-md-view h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin: 1.1rem 0 0.4rem; }
.policy-md-view p  { margin: 0 0 0.75rem; }
.policy-md-view ul, .policy-md-view ol { margin: 0 0 0.75rem 1.4rem; }
.policy-md-view li { margin-bottom: 0.3rem; }
.policy-md-view strong { color: var(--text); }
.policy-md-view blockquote { border-left: 3px solid var(--accent); margin: 0.5rem 0 0.75rem; padding: 0.6rem 1rem; background: var(--surface-2); border-radius: 0 6px 6px 0; font-style: italic; color: var(--text); }
.policy-md-view hr { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.policy-md-view code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0.1em 0.35em; font-size: 0.85em; font-family: monospace; }
.policy-md-view table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 0.9rem; font-size: 0.86rem; }
.policy-md-view th { background: var(--surface-2); font-weight: 600; text-align: left; padding: 0.4rem 0.65rem; border: 1px solid var(--border); }
.policy-md-view td { padding: 0.35rem 0.65rem; border: 1px solid var(--border); vertical-align: top; }
.policy-md-view tr:nth-child(even) td { background: rgba(0,0,0,0.04); }

/* ══ Publication Policy page ═══════════════════════════════════════════════ */

.policy-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1.5rem;
}
.policy-hero-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.policy-hero-title {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
  font-weight: 700;
  font-family: Helvetica,'Helvetica Neue',Arial,sans-serif;
  color: var(--text);
}
.policy-hero-sub { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

.policy-section { margin-bottom: 1.75rem; }
.policy-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.policy-prose {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
  margin: 0 0 0.6rem;
}
.policy-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.policy-list li {
  font-size: 0.87rem;
  color: var(--text);
  padding-left: 1.3rem;
  position: relative;
  line-height: 1.5;
}
.policy-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Steps */
.policy-steps {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.policy-step {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
}
.policy-step-num {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent-fill);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.policy-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.policy-step-body strong { font-size: 0.85rem; color: var(--text); }
.policy-step-body span  { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.policy-step-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
  padding-top: 0.85rem;
}

/* Checklist cards */
.policy-card { padding: 1rem 1.1rem; }
.policy-card-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 0.7rem;
}
.policy-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.policy-checklist li {
  font-size: 0.84rem;
  color: var(--text);
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.45;
}
.policy-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 0.8rem;
}
.policy-checklist-opt li::before {
  content: '◦';
  color: var(--accent);
  font-size: 1rem;
  top: -0.05rem;
}

/* Callout boxes */
.policy-callout {
  border-radius: 8px;
  padding: 1rem 1.15rem;
  font-size: 0.87rem;
  color: var(--text);
  line-height: 1.6;
}
.policy-callout-blue {
  background: rgba(74,159,212,0.08);
  border: 1px solid rgba(74,159,212,0.25);
}
.policy-callout-green {
  background: var(--success-bg);
  border: 1px solid rgba(61,189,142,0.3);
}
.policy-callout strong { color: var(--text); }

/* Acknowledgement quote block */
.policy-quote {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 0.85rem 1.1rem;
  font-size: 0.86rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.65;
  margin: 0.5rem 0 0;
}

/* Publication types pills */
.policy-types-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.policy-type-pill {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

/* ── Instrumental Requirements ────────────────────────────────────────────── */

.instr-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 700px) {
  .instr-layout {
    grid-template-columns: 1fr;
  }
  /* Une seule colonne : l'arbre collant recouvrirait la liste au défilement */
  .instr-layout .instr-tree-panel { position: static; }
  /* Pendant une recherche, les résultats d'abord : l'arbre les repousserait loin en bas */
  .instr-layout.searching .instr-tree-panel { display: none; }
}

/* Tree panel */
.instr-tree-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: sticky;
  top: 1rem;
}

.instr-tree-instrument {
  border-bottom: 1px solid var(--border);
}
.instr-tree-instrument:last-child {
  border-bottom: none;
}

.instr-tree-inst-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.75rem 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.instr-tree-inst-label:hover {
  background: var(--surface);
  color: var(--text);
}
/* En tête de l'arbre : toute la charge utile */
.instr-tree-payload {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-text); padding: 0.4rem 0.75rem 0.6rem; margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--border); border-left: 2px solid transparent;
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.instr-tree-payload:hover { background: var(--surface); }
.instr-tree-payload.active { border-left-color: var(--accent); background: var(--accent)15; }
.instr-tree-inst-label.active {
  border-left-color: var(--accent);
  background: var(--accent)15;
  color: var(--text);
  font-weight: 700;
}

.instr-tree-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.38rem 0.75rem 0.38rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  word-break: break-word;
}
.instr-tree-sub:hover {
  background: var(--surface);
  color: var(--text);
}
.instr-tree-sub.active {
  border-left-color: var(--accent);
  background: var(--accent)15;
  color: var(--text);
  font-weight: 500;
}

.instr-tree-badge {
  font-size: 0.68rem;
  background: var(--accent)25;
  color: var(--accent-text);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  flex-shrink: 0;
}

/* Main panel */
.instr-main-panel {
  min-width: 0;
}

.instr-req-list {
  display: flex;
  flex-direction: column;
}

.instr-req-card {
  transition: box-shadow 0.15s, transform 0.1s;
}
.instr-req-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

/* Table view */
.instr-req-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}
/* Défilable au clavier (flèches) une fois atteint par Tab */
.instr-req-table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.instr-req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.instr-req-table thead th {
  background: var(--surface-2);
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.instr-req-table tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.instr-req-table tbody tr:last-child td {
  border-bottom: none;
}
.instr-req-table-row {
  transition: background 0.1s;
}
.instr-req-table-row:hover {
  background: var(--surface-2);
}
/* Pas de text-transform ici : les libellés sont fournis déjà formatés
   (VERIF_LABELS, SOURCE_LABELS). La priorité, seule valeur encore brute,
   porte son propre text-transform inline. */
.instr-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.12rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}

/* View toggle active state */
.instr-view-toggle.active {
  background: var(--accent-fill);
  color: #fff;
}


/* ── Timeline « History » ─────────────────────────────────────────────────── */
.tl-filters { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.4rem; }

.tl-input {
  width: auto;
  padding: 0.45rem 0.7rem;
  background: var(--surface-1);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.86rem;
}
#historySearch { flex: 1; min-width: 200px; }
.tl-select { min-width: 160px; }

.tl-year {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 1.8rem 0 0.9rem;
  padding-left: 2.1rem;
}
.tl-year:first-child { margin-top: 0; }

/* Le rail vertical est porté par la liste, pas par chaque carte : il reste
   continu entre deux événements, y compris à travers les séparateurs d'année. */
.tl-list { position: relative; padding-left: 2.1rem; }
.tl-list::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: var(--border);
}

.tl-item { position: relative; margin-bottom: 0.9rem; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -1.83rem;
  top: 1.15rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-fill);
  border: 2px solid var(--bg);
}

.tl-card {
  display: flex;
  gap: 1rem;
  width: 100%;
  text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.tl-card:hover { border-color: var(--accent); box-shadow: 0 2px 12px var(--shadow); }

.tl-thumb {
  width: 132px;
  height: 92px;
  flex-shrink: 0;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-thumb-empty { color: var(--text-muted); font-size: 0.7rem; letter-spacing: 0.06em; }

.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.tl-title { font-weight: 600; font-size: 0.98rem; color: var(--text); }
.tl-date  { font-size: 0.78rem; color: var(--text-muted); }
.tl-meta  { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }

.tl-excerpt {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tl-chip {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
}
.tl-chip.meeting    { background: rgba(74,159,212,0.15);  color: var(--accent); }
.tl-chip.workshop   { background: var(--success-bg);      color: var(--success); }
.tl-chip.conference { background: var(--warning-bg);      color: var(--warning); }
.tl-chip.submission { background: rgba(150,110,220,0.16); color: #a68ae0; }
.tl-chip.milestone  { background: var(--danger-bg);       color: var(--danger); }

/* ── Galerie de l'événement ── */
.tl-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.7rem;
}

@media (max-width: 640px) { .tl-gallery { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }

/* Photo de l'événement, en grand en tête du détail */
.tl-hero { flex-shrink: 0; margin: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.tl-hero img, .tl-hero video { display: block; width: 100%; max-height: min(62vh, 520px); object-fit: contain; background: #0b1220; }
.tl-hero img { cursor: zoom-in; }
.tl-hero figcaption { font-size: 0.8rem; color: var(--text-muted); padding: 0.45rem 0.75rem; }

.tl-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.tl-media img, .tl-media video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.tl-media.is-cover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.tl-media-actions {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.tl-media:hover .tl-media-actions, .tl-media:focus-within .tl-media-actions { opacity: 1; }

/* Sans survol (tablette, téléphone), des commandes qui n'apparaissent qu'au
   pointeur seraient tout simplement inatteignables. */
@media (hover: none) {
  .tl-media-actions { opacity: 1; }
}

.tl-media-btn {
  border: none;
  border-radius: 5px;
  width: 26px;
  height: 26px;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  background: rgba(0,0,0,0.62);
  color: #fff;
}
.tl-media-btn:hover { background: rgba(0,0,0,0.85); }
.tl-media-btn.active { background: var(--accent-fill); }

.tl-media-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.3rem 0.45rem;
  font-size: 0.72rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
}

.tl-badge-pin {
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  font-size: 0.65rem;
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  background: var(--accent-fill);
  color: #fff;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.tl-badge-video {
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  font-size: 0.65rem;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  letter-spacing: 0.05em;
}

.tl-drop {
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.84rem;
}
.tl-drop.dragover { border-color: var(--accent); color: var(--accent); }

/* ── Plein écran ── */
.tl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0,0,0,0.88);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.tl-lightbox[style*="flex"] { display: flex; }
.tl-lightbox-inner { max-width: 92vw; max-height: 88vh; }
.tl-lightbox-inner img, .tl-lightbox-inner video { max-width: 92vw; max-height: 88vh; display: block; }
.tl-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.4rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 640px) {
  .tl-card { flex-direction: column; }
  .tl-thumb { width: 100%; height: 150px; }
}

/* Fichiers en attente d'envoi, dans la fenêtre de création d'un événement */
.tl-pending {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.tl-pending:empty { margin-top: 0; }

.tl-pending-item {
  position: relative;
  width: 76px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.tl-pending-item.pinned { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tl-pending-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tl-pending-video {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.62rem;
  color: var(--text-muted);
  padding: 0.2rem;
  text-align: center;
  overflow: hidden;
}

.tl-pending-btn {
  position: absolute;
  border: none;
  width: 20px;
  height: 20px;
  font-size: 0.68rem;
  line-height: 1;
  cursor: pointer;
  background: rgba(0,0,0,0.62);
  color: #fff;
}
.tl-pending-btn.remove { top: 0; right: 0; border-bottom-left-radius: 6px; }
.tl-pending-btn.pin    { top: 0; left: 0;  border-bottom-right-radius: 6px; }
.tl-pending-btn.pin.on { background: var(--accent-fill); }
.tl-pending-btn:hover  { background: rgba(0,0,0,0.85); }
.tl-pending-btn.pin.on:hover { background: var(--accent-hover); }


/* ── Bibliothèque : classement ── */
.lib-facets { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.1rem; }
.lib-facet-row { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.lib-facet-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-right: 0.25rem; min-width: 4.5rem; }
.lib-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.78rem; padding: 0.22rem 0.65rem; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; font-family: inherit; transition: border-color 0.12s, background 0.12s;
}
.lib-chip:hover { border-color: var(--accent); }
.lib-chip.active { background: var(--accent-fill); border-color: var(--accent); color: #fff; }
.lib-chip .n { font-size: 0.72rem; opacity: 0.85; }
.lib-chip.active .n { opacity: 1; }
.lib-chip.cat-science    { border-color: rgba(74,159,212,0.5); }
.lib-chip.cat-instrument { border-color: rgba(61,189,142,0.5); }
.lib-chip.cat-missions   { border-color: rgba(224,123,154,0.5); }
.lib-chip.cat-analysis   { border-color: rgba(245,158,11,0.5); }
.lib-chip.active.cat-science    { background: #4a9fd4; border-color: #4a9fd4; }
.lib-chip.active.cat-instrument { background: #3dbd8e; border-color: #3dbd8e; }
.lib-chip.active.cat-missions   { background: #e07b9a; border-color: #e07b9a; }
.lib-chip.active.cat-analysis   { background: #d98c07; border-color: #d98c07; }
/* Couleurs claires : texte sombre, lisible (le blanc n'y atteignait pas 3:1) */
.lib-chip.active.cat-science, .lib-chip.active.cat-instrument, .lib-chip.active.cat-missions, .lib-chip.active.cat-analysis { color: #0f1b2d; }
.lib-chip.tag { border-style: dashed; }
.lib-topic-pill {
  display: inline-block; font-size: 0.7rem; padding: 0.12rem 0.5rem; border-radius: 12px;
  border: 1px solid var(--border); color: var(--text-muted); background: var(--surface-2); cursor: pointer;
}
/* Texte des thèmes : teinte par thème d'affichage, lisible (≥ 5:1) sur les deux */
.lib-topic-pill.cat-science    { color: #6fb4df; border-color: rgba(74,159,212,0.4); }
.lib-topic-pill.cat-instrument { color: #3dbd8e; border-color: rgba(61,189,142,0.4); }
.lib-topic-pill.cat-missions   { color: #ea9ab3; border-color: rgba(224,123,154,0.4); }
.lib-topic-pill.cat-analysis   { color: #e8a33a; border-color: rgba(245,158,11,0.4); }
[data-theme="light"] .lib-topic-pill.cat-science    { color: #1f6a9a; }
[data-theme="light"] .lib-topic-pill.cat-instrument { color: #1a7050; }
[data-theme="light"] .lib-topic-pill.cat-missions   { color: #a8405f; }
[data-theme="light"] .lib-topic-pill.cat-analysis   { color: #8f5600; }
.lib-topic-pill.tag { border-style: dashed; }
.lib-topic-pill.proposal { color: var(--accent-text); border-color: rgba(74,159,212,0.4); background: rgba(74,159,212,0.08); cursor: default; }
.lib-topic-pill:hover { border-color: var(--accent); }
.lib-tag-input { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.lib-tag-input input { border: none; background: none; outline: none; color: var(--text); font-family: inherit; font-size: 0.85rem; flex: 1; min-width: 120px; padding: 0.2rem; }
.lib-tag-input .lib-topic-pill button { background: none; border: none; color: inherit; cursor: pointer; padding: 0 0 0 0.25rem; font-size: 0.8rem; }
.lib-topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.25rem 0.75rem; }
.lib-topic-grid label { display: flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0.15rem 0; font-size: 0.84rem; font-weight: 500; color: var(--text); text-transform: none; letter-spacing: 0; cursor: pointer; }
.lib-topic-grid input[type=checkbox] { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.lib-topic-cat { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin: 0.6rem 0 0.25rem; }
.lib-topic-cat.cat-science { color: #4a9fd4; } .lib-topic-cat.cat-instrument { color: #3dbd8e; } .lib-topic-cat.cat-missions { color: #e07b9a; } .lib-topic-cat.cat-analysis { color: #d98c07; }

/* ── Parameters: parent picker & traceability chart ───────────────────────── */
.instr-pick-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.4rem; min-height: 1.4rem; }
.instr-pick-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.76rem; padding: 0.2rem 0.3rem 0.2rem 0.6rem;
                   border-radius: 20px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.instr-pick-chip button { border: none; background: none; color: var(--text-muted); cursor: pointer; padding: 0 0.2rem; line-height: 1; font-size: 0.95rem; }
.instr-pick-chip button:hover { color: var(--danger); }
.instr-pick { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.instr-pick > input.form-input { border: none; border-bottom: 1px solid var(--border); border-radius: 0; }
.instr-pick-list { max-height: 190px; overflow: auto; }
.instr-pick-head { position: sticky; top: 0; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--text); font-size: 0.7rem; font-weight: 700;
                   text-transform: uppercase; letter-spacing: 0.06em; padding: 0.3rem 0.7rem; border-bottom: 1px solid var(--border); }
.instr-pick-cat { display: inline-block; font-size: 0.68rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
                  margin-right: 0.5rem; padding: 0.05rem 0.4rem; border-radius: 4px; background: var(--surface-2); }
.instr-pick-chip-path { color: var(--text-muted); font-weight: 400; margin-right: 0.2rem; }
.instr-pick-row { display: grid; grid-template-columns: 1.1rem 1fr; align-items: center; gap: 0.55rem;
                  padding: 0.38rem 0.7rem; cursor: pointer; font-size: 0.82rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent); }
.instr-pick-row:last-child { border-bottom: none; }
.instr-pick-row:hover { background: var(--surface-2); }
.instr-pick-row.picked { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.instr-pick-box { width: 1rem; height: 1rem; border: 1.5px solid var(--border); border-radius: 4px; display: grid; place-items: center; font-size: 0.7rem; color: #fff; }
.instr-pick-row.picked .instr-pick-box { background: var(--accent-fill); border-color: var(--accent); }
.instr-pick-title { font-weight: 500; }
.instr-pick-path { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.instr-pick-empty { font-size: 0.8rem; color: var(--text-muted); padding: 0.5rem 0.7rem; margin: 0; }

.instr-graph-node { cursor: pointer; }
.instr-graph-node rect { fill: var(--surface-2); stroke-width: 1.5; transition: stroke-width 0.15s; }
.instr-graph-node:hover rect, .instr-graph-node.hit rect { stroke-width: 3; }
.instr-graph-node.dim { opacity: 0.25; }
.instr-graph-node text { fill: var(--text); font-size: 12px; font-family: inherit; pointer-events: none; }
.instr-graph-node text.sub { fill: var(--text-muted); font-size: 10.5px; }
.instr-graph-edge { fill: none; stroke: var(--text-muted); stroke-opacity: 0.45; stroke-width: 1.5; }
.instr-graph-edge.hot { stroke: var(--accent); stroke-opacity: 1; stroke-width: 2.5; }
.instr-graph-edge.dim { stroke-opacity: 0.08; }
.instr-graph-node.sel rect    { stroke: var(--danger) !important; stroke-width: 3.5; fill: color-mix(in srgb, var(--danger) 22%, var(--surface-2)); }
.instr-graph-node.impact rect { stroke: var(--danger) !important; stroke-width: 2.5; fill: color-mix(in srgb, var(--danger) 10%, var(--surface-2)); }
.instr-graph-node.sel text, .instr-graph-node.impact text { fill: var(--text); }
.instr-graph-edge.impact { stroke: var(--danger); stroke-opacity: 1; stroke-width: 2.5; }
/* Portee du graphe : la liste, ou tout */
.instr-graph-scope-btn.active { background: var(--accent-fill); border-color: var(--accent); color: #fff; }
.instr-graph-scope-btn:hover:not(.active) { border-color: var(--text-muted); color: var(--text); }
/* Vue centrée sur un paramètre */
#instr-detail-modal { z-index: 1010; }   /* une fiche ouverte depuis le graphe passe devant */
.instr-graph-node.centre rect { stroke-width: 3.5; fill: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
.instr-graph-node:focus-visible { outline: none; }
.instr-graph-node:focus-visible rect { stroke-width: 3.5; stroke-dasharray: 5 3; }
.instr-graph-node text.ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 11.5px; }
.instr-graph-node text .flag { fill: #f59e0b; font-family: inherit; }
.instr-graph-node text.more { fill: var(--accent); font-size: 10.5px; font-weight: 600; }
.instr-graph-edge.near { stroke-opacity: 0.85; stroke-width: 2; }
.instr-graph-picks[hidden] { display: none; }
.instr-graph-picks { max-height: 40vh; overflow: auto; padding: 0.4rem 1.25rem; border-bottom: 1px solid var(--border); display: grid; gap: 0.25rem; }
.instr-graph-pick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.35rem; text-align: left; background: none; border: 1px solid transparent;
  border-radius: 8px; padding: 0.35rem 0.55rem; color: var(--text); font: inherit; font-size: 0.84rem; cursor: pointer; }
.instr-graph-pick:hover, .instr-graph-pick:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.instr-graph-pick small { flex-basis: 100%; color: var(--text-muted); font-size: 0.72rem; }
.instr-graph-start { max-width: 720px; }
.instr-graph-start-h { margin: 0.9rem 0 0.35rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.instr-graph-start-h:first-child { margin-top: 0; }
.instr-graph-start-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.25rem; }
.instr-focus-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; width: 100%; }
.instr-focus-title { font-size: 0.86rem; color: var(--text); margin-right: 0.4rem; }
.instr-focus-btn { font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 20px; }
.instr-focus-btn:disabled { opacity: 0.45; cursor: default; }
.instr-focus-legend { width: 100%; }
.instr-focus-legend summary { cursor: pointer; }
.instr-focus-legend[open] summary { margin-bottom: 0.3rem; }
.instr-focus-legend > div { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; }
.instr-focus-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; }
.instr-focus-hint { margin-left: auto; }
/* Matrice N² */
#instr-graph-wrap.n2-mode { padding: 0 !important; }
.instr-n2 { border-collapse: separate; border-spacing: 0; font-size: 0.72rem; margin: 0 auto; }
.instr-n2 th, .instr-n2 td { padding: 0; border-right: 1px solid color-mix(in srgb, var(--border) 55%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.instr-n2 thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); vertical-align: bottom; }
.instr-n2 thead tr.n2-sysrow th { z-index: 3; }
.instr-n2 thead tr + tr th { top: 1.6rem; }
.instr-n2.sys thead tr th { top: 0; }
.instr-n2 .n2-sys { height: 1.6rem; text-align: center; font-weight: 700; letter-spacing: 0.04em; color: var(--text-muted); font-size: 0.68rem; }
.instr-n2 .n2-corner { position: sticky; left: 0; z-index: 4; min-width: 11rem; text-align: left; padding: 0.3rem 0.5rem; font-weight: 400; color: var(--text-muted); font-size: 0.68rem; }
.instr-n2 .n2-corner span { display: block; }
.instr-n2 .n2-col button { writing-mode: vertical-rl; transform: rotate(180deg); background: none; border: 0; color: var(--text); font: inherit;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.68rem; padding: 0.4rem 0.15rem; cursor: pointer; width: 100%; white-space: nowrap; }
.instr-n2 .n2-row { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 400; }
.instr-n2 .n2-row button, .instr-n2 .n2-totrow .n2-row { display: flex; gap: 0.45rem; align-items: baseline; width: 100%; background: none; border: 0; color: var(--text); font: inherit; padding: 0.2rem 0.5rem; cursor: pointer; text-align: left; }
.instr-n2 .n2-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; white-space: nowrap; }
.instr-n2 .n2-name { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 13rem; }
.instr-n2 th.hot, .instr-n2 th.sel { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.instr-n2 .n2-cell { width: 1.7rem; min-width: 1.7rem; height: 1.6rem; text-align: center; }
.instr-n2 .n2-cell[style] { background: color-mix(in srgb, var(--accent) var(--p), transparent); }
.instr-n2 .n2-cell button { width: 100%; height: 100%; min-height: 1.6rem; background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.instr-n2 .n2-cell button.strong { color: #fff; }
.instr-n2 .n2-cell.diag { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--text-muted) 16%, transparent) 0 3px, transparent 3px 7px); }
.instr-n2 .n2-cell.diag button { color: var(--text-muted); font-weight: 400; }
.instr-n2 .n2-cell.sel { outline: 2px solid var(--danger); outline-offset: -2px; }
.instr-n2 .n2-cell button:focus-visible, .instr-n2 th button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.instr-n2 td.sys-start, .instr-n2 th.sys-start { border-left: 2px solid var(--text-muted); }
.instr-n2 tr.sys-start > th, .instr-n2 tr.sys-start > td { border-top: 2px solid var(--text-muted); }
.instr-n2 .n2-tot { text-align: center; color: var(--text-muted); font-weight: 600; min-width: 2.2rem; padding: 0 0.25rem; }
.instr-n2 .n2-totrow > * { border-top: 2px solid var(--border); }
.instr-n2 .n2-totrow .n2-row { cursor: default; display: table-cell; }
.instr-n2-detail { width: 100%; max-height: 32vh; overflow: auto; margin-top: 0.4rem; border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.75rem; background: var(--surface-2); color: var(--text); }
.instr-n2-detail .n2-detail-head { display: flex; align-items: center; gap: 0.6rem; justify-content: space-between; font-size: 0.82rem; }
.instr-n2-detail h4 { margin: 0.5rem 0 0.15rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.instr-n2-detail ul { list-style: none; margin: 0.2rem 0 0; padding: 0; display: grid; gap: 0.15rem; }
.instr-n2-detail li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: baseline; gap: 0.3rem; font-size: 0.8rem; }
@media (max-width: 600px) { .instr-n2-detail li { grid-template-columns: 1fr; gap: 0; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border); } .instr-n2-detail .n2-arrow { padding-left: 0.2rem; } .instr-n2-detail .n2-arrow::after { content: ' used by'; font-size: 0.72rem; } }
.instr-n2-detail li button { background: none; border: 0; padding: 0.1rem 0.2rem; border-radius: 6px; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.instr-n2-detail li button:hover, .instr-n2-detail li button:focus-visible { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.instr-n2-detail .n2-arrow { color: var(--text-muted); }
@media (max-width: 600px) { .instr-n2 .n2-name { display: none; } .instr-n2 .n2-corner { min-width: 6rem; } }
.instr-sub-head td { background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)) !important; color: var(--text) !important; font-size: 0.76rem !important;
                    border-left: 3px solid var(--accent); cursor: pointer; }
.instr-sub-head:hover td { background: color-mix(in srgb, var(--accent) 24%, var(--surface-2)) !important; }
.instr-sub-head-go { float: right; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--accent-text); }
.instr-cat-head td { background: var(--surface-2); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: 0.35rem 0.75rem; }

/* ── Registre des décisions ───────────────────────────────────────────────── */
.dec-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
            border-radius: 10px; padding: 0.85rem 1.1rem; margin-bottom: 0.6rem; }
.dec-card.superseded, .dec-card.revoked { border-left-color: var(--text-muted); opacity: 0.8; }
.dec-card-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.dec-card-actions { margin-left: auto; display: flex; gap: 0.3rem; }
.dec-mini { font-size: 0.75rem; padding: 0.15rem 0.5rem; min-height: 24px; }
.dec-mini.danger:hover { color: var(--danger); }
.dec-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.76rem; font-weight: 700; color: var(--accent); }
.dec-date { font-size: 0.76rem; color: var(--text-muted); }
.dec-chip { font-size: 0.75rem; padding: 0.1rem 0.5rem; border-radius: 20px; background: var(--surface-2); color: var(--text-muted); }
.dec-chip.warn   { background: color-mix(in srgb, var(--warning) 20%, transparent); color: var(--warning); }
.dec-chip.danger { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.dec-title { font-size: 0.95rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.dec-card.superseded .dec-title, .dec-card.revoked .dec-title { text-decoration: line-through; color: var(--text-muted); }
.dec-detail { font-size: 0.86rem; color: var(--text-muted); margin-top: 0.35rem; white-space: pre-wrap; }
.dec-foot { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }
.dec-link { color: var(--accent); text-decoration: none; }
.dec-link:hover { text-decoration: underline; }

/* ── Feuille de route ─────────────────────────────────────────────────────── */
.rm-timeline { position: relative; font-size: 0.75rem; }
.rm-tl-head { position: relative; border-bottom: 1px solid var(--border); }
.rm-tl-month { position: absolute; top: 4px; color: var(--text-muted); font-size: 0.7rem; text-align: center; }
.rm-tl-body { position: relative; }
.rm-tl-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--border) 60%, transparent); }
.rm-tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent-fill); opacity: 0.7; }
.rm-tl-label { position: absolute; left: 0; font-size: 0.78rem; color: var(--text); font-weight: 500; padding-top: 0.6rem;
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-tl-dot { position: absolute; width: 14px; height: 14px; margin-left: -7px; border-radius: 4px; transform: rotate(45deg);
             background: var(--accent-fill); border: none; cursor: pointer; padding: 0; }
.rm-tl-dot:hover { outline: 2px solid var(--text); outline-offset: 2px; }
.rm-tl-dot.progress  { background: var(--warning); }
.rm-tl-dot.late      { background: var(--danger); }
.rm-tl-dot.done      { background: var(--success); }
.rm-tl-dot.cancelled { background: var(--text-muted); opacity: 0.6; }
.rm-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
           border-radius: 10px; padding: 0.8rem 1.1rem; margin-bottom: 0.6rem; }
.rm-card.late      { border-left-color: var(--danger); }
.rm-card.done      { border-left-color: var(--success); }
.rm-card.in_progress { border-left-color: var(--warning); }
.rm-card.cancelled { border-left-color: var(--text-muted); opacity: 0.75; }
.rm-card-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.rm-date { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.76rem; font-weight: 700; color: var(--text-muted); }
@media (max-width: 760px) { .rm-card-head .dec-card-actions { margin-left: 0; } }

/* ── Charge de travail ────────────────────────────────────────────────────── */
.wl-row { display: grid; grid-template-columns: 200px 1fr 90px; grid-template-areas: "name bar counts" "meta meta meta" "items items items";
          gap: 0.35rem 0.75rem; align-items: center; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); cursor: pointer; }
.wl-row:hover { background: var(--surface); }
.wl-name { grid-area: name; font-size: 0.88rem; font-weight: 500; color: var(--text); }
.wl-noacct { font-size: 0.68rem; color: var(--text-muted); border: 1px solid var(--border); border-radius: 20px; padding: 0 0.35rem; }
.wl-bar { grid-area: bar; position: relative; height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.wl-bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-fill); border-radius: 6px; }
.wl-bar-fill.group { background: var(--text-muted); opacity: 0.6; }
.wl-bar-late { position: absolute; inset: 0 auto 0 0; background: var(--danger); border-radius: 6px; }
.wl-counts { grid-area: counts; text-align: right; font-size: 0.85rem; font-weight: 600; color: var(--text); }
.wl-late-count { color: var(--danger); font-weight: 500; font-size: 0.75rem; }
.wl-meta { grid-area: meta; font-size: 0.75rem; color: var(--text-muted); }
.wl-items { grid-area: items; margin-top: 0.4rem; }
.wl-item { display: flex; gap: 0.6rem; align-items: baseline; font-size: 0.8rem; padding: 0.25rem 0; color: var(--text-muted); }
.wl-item.late .wl-item-due { color: var(--danger); font-weight: 600; }
.wl-item-kind { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; min-width: 5.5rem; }
.wl-item-title { flex: 1; color: var(--text); }
.wl-item-due { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.74rem; }
@media (max-width: 760px) { .wl-row { grid-template-columns: 1fr 70px; grid-template-areas: "name counts" "bar bar" "meta meta" "items items"; } }

/* ── Revues de document ───────────────────────────────────────────────────── */
.rv-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
           border-radius: 10px; padding: 0.85rem 1.1rem; margin-bottom: 0.6rem; cursor: pointer; }
.rv-card:hover { border-color: var(--accent); }
.rv-card.closed { border-left-color: var(--text-muted); opacity: 0.85; }
.rv-card-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.rv-counts { margin-left: auto; font-size: 0.76rem; color: var(--text-muted); }
.rm-date.late { color: var(--danger); font-weight: 700; }
.rv-sheet { display: flex; flex-direction: column; gap: 0.6rem; }
.rv-comment { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--text-muted);
              border-radius: 10px; padding: 0.75rem 1rem; }
.rv-comment.accepted { border-left-color: var(--success); }
.rv-comment.rejected { border-left-color: var(--danger); }
.rv-comment.discuss  { border-left-color: var(--warning); }
.rv-comment.open     { border-left-color: var(--accent); }
.rv-comment-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.rv-comment-author { margin-left: auto; font-size: 0.76rem; color: var(--text-muted); }
.rv-comment-body { font-size: 0.88rem; color: var(--text); white-space: pre-wrap; }
.rv-loc { font-size: 0.75rem; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.rv-proposal, .rv-answer { margin-top: 0.45rem; padding: 0.45rem 0.7rem; border-radius: 7px; background: var(--surface-2);
                           font-size: 0.84rem; color: var(--text); white-space: pre-wrap; }
.rv-proposal span, .rv-answer span { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
                                     color: var(--text-muted); margin-bottom: 0.15rem; }
.rv-comment-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.5rem; }
.dec-chip.rv-kind-major { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.dec-chip.rv-kind-technical { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }

/* ── Calendrier consolidé ─────────────────────────────────────────────────── */
.cal-dots { display: flex; gap: 2px; justify-content: center; margin-top: 2px; }
.cal-mine { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--text-muted);
            text-transform: none; letter-spacing: 0; font-weight: 400; margin: 0; white-space: nowrap; }
.cal-mine input { margin: 0; }
.cal-legend { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 0.75rem; font-size: 0.75rem; color: var(--text-muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.cal-day-panel { margin-top: 0.85rem; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.cal-day-panel-head { display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem;
                      font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.5rem; }
.cal-day-item { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0; text-decoration: none;
                border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent); }
.cal-day-item:last-child { border-bottom: none; }
.cal-day-item .cal-dot { margin-top: 0.35rem; flex-shrink: 0; }
.cal-day-item-main { display: flex; flex-direction: column; }
.cal-day-item-title { font-size: 0.86rem; color: var(--text); }
.cal-day-item-sub { font-size: 0.74rem; color: var(--text-muted); }
/* Conférences : qui présente quoi (infobulle et détail du jour) */
/* Deux niveaux : qui (et oral/poster), puis quoi — le titre garde toute la largeur */
.cal-talk { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0.1rem 0.5rem;
  padding: 0.45rem 0.85rem; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.cal-talk:last-child { border-bottom: none; }
.cal-talk:hover, .cal-talk:focus-visible { background: var(--surface-2); }
.cal-talk-who { font-size: 0.8rem; font-weight: 700; grid-column: 1; grid-row: 1; overflow-wrap: anywhere; }
.cal-talk-what { font-size: 0.8rem; min-width: 0; grid-column: 1 / -1; grid-row: 2; overflow-wrap: break-word; }
.cal-talk-kind { grid-column: 2; grid-row: 1; }
.cal-talk-kind { font-size: 0.66rem; font-weight: 600; padding: 0.05rem 0.45rem; border-radius: 20px;
  border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.cal-talk-tip { max-width: min(420px, calc(100vw - 16px)); }
.cal-talk-tip .conf-tip-header { text-transform: none; letter-spacing: 0; font-size: 0.78rem; }
.cal-day-talks { list-style: none; margin: -0.2rem 0 0.4rem 1.1rem; padding: 0; border-left: 2px solid var(--border); }
.cal-day-talks .cal-talk { padding: 0.3rem 0.6rem; border-bottom: none; }

/* ── Accueil : ce qui réclame de l'attention ──────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.85rem; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
             border-radius: 10px; padding: 0.8rem 1rem; }
.dash-card.danger { border-left-color: var(--danger); }
.dash-card.warn   { border-left-color: var(--warning); }
.dash-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.dash-card-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.dash-card-count { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.dash-line { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.83rem; color: var(--text);
             padding: 0.2rem 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 45%, transparent); }
.dash-line:last-of-type { border-bottom: none; }
.dash-line-sub { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }
.dash-line.late .dash-line-sub { color: var(--danger); font-weight: 600; }
.dash-note { font-size: 0.76rem; color: var(--text-muted); margin: 0.4rem 0 0; }
.dash-card-foot { margin-top: 0.5rem; }
.dash-link { font-size: 0.76rem; padding: 0.15rem 0.5rem; }

/* ── Registre documentaire ────────────────────────────────────────────────── */
.doc-table-wrap { overflow-x: auto; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.doc-table th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
                color: var(--text-muted); font-weight: 700; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); }
.doc-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.doc-table tbody tr { cursor: pointer; }
.doc-table tbody tr:hover { background: var(--surface); }
.doc-title-cell { font-weight: 500; display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.doc-muted { color: var(--text-muted); }
.doc-issue { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; font-weight: 700;
             padding: 0.1rem 0.45rem; border-radius: 5px; background: var(--surface-2); color: var(--text-muted); }
.doc-issue.approved { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.doc-version { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--text-muted);
               border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 0.6rem; }
.doc-version.approved { border-left-color: var(--success); }

@media (max-width: 760px) {
  .cal-month-label { font-size: 1rem; }
  .cal-mine { margin-left: 0; }
}

/* ── Pastille « du nouveau » sur une entrée de menu ───────────────────────── */
.nav-new-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger-fill);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
}
.nav-new-badge[hidden] { display: none; }

/* ── Accueil : grille de boîtes ───────────────────────────────────────────── */
.home-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.85rem; margin-bottom: 2rem; }
.hb { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
      border-radius: 10px; padding: 0.8rem 1rem; }
.hb.danger { border-left-color: var(--danger); }
.hb.warn   { border-left-color: var(--warning); }
.hb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.45rem; }
.hb-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.hb-count { font-size: 1.15rem; font-weight: 800; color: var(--text); line-height: 1; }
.hb-rows { display: flex; flex-direction: column; }
.hb-row { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline;
          padding: 0.28rem 0; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--border) 45%, transparent); }
.hb-row:last-child { border-bottom: none; }
.hb-row:hover .hb-row-label { color: var(--accent); }
.hb-row-label { font-size: 0.85rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-row-meta { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.hb-row.late .hb-row-meta { color: var(--danger); font-weight: 600; }
.hb-more { margin-top: 0.45rem; }
.hb-more-link { font-size: 0.76rem; color: var(--text-muted); text-decoration: none; }
.hb-more-link:hover { color: var(--accent); }

/* ── Guide du circuit des communications (onglet « How it works ») ──────────
   Organigramme vertical en HTML : il se lit de haut en bas sur téléphone
   comme sur grand écran ; seules les issues d'une décision se mettent côte à
   côte quand la place le permet. Les rôles sont codés par couleur. */
.cp { max-width: 860px; margin: 0 auto; }
.cp-intro { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 1.25rem; line-height: 1.5; }
.cp-h { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin: 1.75rem 0 0.75rem; }
.cp-rail { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.5rem; }
.cp-rail-step { padding: 0.35rem 0.7rem; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); font-size: 0.82rem; font-weight: 600; color: var(--text); }
.cp-rail-step.done { border-color: var(--success); color: var(--success); }
.cp-rail-arrow { color: var(--text-muted); font-size: 0.85rem; }
.cp-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1rem; }
.cp-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.cp-role { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
           padding: 0.1rem 0.45rem; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; }
.cp-role.you      { color: var(--accent); }
.cp-role.board    { color: #b7791f; }
.cp-role.reviewer { color: #7c5cc4; }
.cp-role.auto     { color: var(--text-muted); }
.cp-flow { display: flex; flex-direction: column; align-items: stretch; }
.cp-node { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
           padding: 0.7rem 0.9rem; display: flex; gap: 0.75rem; align-items: flex-start; }
.cp-node .cp-num { flex-shrink: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--surface-2);
                   display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: var(--text); }
.cp-node-body { min-width: 0; }
.cp-node-title { font-weight: 600; font-size: 0.92rem; color: var(--text); margin: 0.15rem 0 0.2rem; }
.cp-node-text { font-size: 0.84rem; color: var(--text-muted); line-height: 1.45; }
.cp-arrow { align-self: center; width: 2px; height: 1.1rem; background: var(--border); position: relative; margin: 0.15rem 0 0.35rem; }
.cp-arrow::after { content: ''; position: absolute; left: -4px; bottom: -6px; border: 5px solid transparent; border-top-color: var(--border); }
.cp-decision { border: 2px dashed var(--border); border-radius: 10px; padding: 0.8rem; background: var(--surface-2); }
.cp-decision-q { text-align: center; font-weight: 700; font-size: 0.9rem; color: var(--text); margin-bottom: 0.7rem; }
.cp-branches { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.6rem; }
.cp-branch { background: var(--surface); border: 1px solid var(--border); border-top-width: 3px; border-radius: 8px; padding: 0.6rem 0.75rem; }
.cp-branch.ok     { border-top-color: var(--success); }
.cp-branch.loop   { border-top-color: #D97706; }
.cp-branch.stop   { border-top-color: #ef4444; }
.cp-branch-title { font-weight: 700; font-size: 0.86rem; margin-bottom: 0.25rem; }
.cp-branch.ok .cp-branch-title   { color: var(--success); }
.cp-branch.loop .cp-branch-title { color: #D97706; }
.cp-branch.stop .cp-branch-title { color: #ef4444; }
.cp-branch-text { font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.cp-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.75rem; }
.cp-stage { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem 0.9rem; }
.cp-stage h4 { margin: 0 0 0.35rem; font-size: 0.92rem; }
.cp-stage p, .cp-stage li { font-size: 0.83rem; color: var(--text-muted); line-height: 1.45; }
.cp-stage ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.cp-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; }
.cp-case { border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 8px 8px 0; padding: 0.65rem 0.85rem; }
.cp-case-q { font-weight: 600; font-size: 0.88rem; color: var(--text); margin-bottom: 0.25rem; }
.cp-case-a { font-size: 0.83rem; color: var(--text-muted); line-height: 1.45; }
.cp-statuses { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.cp-statuses .cp-sep { color: var(--text-muted); font-size: 0.8rem; }

/* Options de la salle de visio dans les formulaires de réunion */
.vo { border: 1px solid var(--border); border-radius: 8px; padding: 0.7rem 0.9rem 0.8rem; margin: 0.6rem 0 0; }
.vo legend { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); padding: 0 0.35rem; }
.vo-check { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.84rem; line-height: 1.4; margin: 0.35rem 0; cursor: pointer;
            /* les libellés des formulaires sont en capitales : pas ces phrases */
            text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--text); }
.vo-check strong { font-weight: 600; }
.vo-check input[type="checkbox"] { width: auto; min-width: 0; flex: 0 0 auto; margin: 0.2rem 0 0; padding: 0; }
.vo-check span { flex: 1; min-width: 0; }
.vo-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin-top: 0.55rem; }
.vo-lang label { font-size: 0.8rem; font-weight: 600; }
.vo-lang select { width: auto; min-width: 9rem; }
.vo-hint { display: block; font-size: 0.76rem; color: var(--text-muted); margin: 0.35rem 0 0; }
.vo-lang .vo-hint { flex-basis: 100%; margin: 0; }

/* Avancement d'une action (action-progress.js) */
.ap { --ap-color: var(--accent); min-width: 150px; }
.ap[data-health="done"], .ap[data-health="ok"] { --ap-color: var(--success); }
.ap[data-health="risk"] { --ap-color: var(--warning); }
.ap[data-health="late"] { --ap-color: var(--danger); }
.ap-row { display: flex; align-items: center; gap: 0.5rem; }
.ap-val { font-size: 0.8rem; font-weight: 600; color: var(--text); min-width: 2.8rem; text-align: right; font-variant-numeric: tabular-nums; }
.ap-meta { display: flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; white-space: nowrap; }
.ap-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ap-color); flex: 0 0 auto; }
.ap-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.ap-bar span { display: block; height: 100%; background: var(--ap-color); border-radius: 3px; }
.ap-range { -webkit-appearance: none; appearance: none; flex: 1; width: auto; min-width: 0; height: 6px; margin: 0; padding: 0;
  border: none; border-radius: 3px; cursor: pointer; background:
  linear-gradient(to right, var(--ap-color) var(--p, 0%), var(--border) var(--p, 0%)); }
.ap-range:disabled { cursor: progress; opacity: 0.6; }
.ap-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ap-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--ap-color); box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.ap-range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ap-color); }
.ap-range::-moz-range-track { background: transparent; }
@media (pointer: coarse) {
  .ap-range { height: 8px; }
  .ap-range::-webkit-slider-thumb { width: 24px; height: 24px; }
}

/* Écran tactile : les petits boutons d'action des listes (✎, ✕, ✓, fichier),
   souvent côte à côte, mesuraient 21 à 28 px — Supprimer collé à Modifier
   (audit du 08/10/2026). 36 px au moins sous le doigt. */
@media (pointer: coarse) {
  .btn-delete, .btn-action-done, .btn-action-edit, .btn-action-delete,
  .mcard-edit, .mcard-delete, .mcard-file-btn, .btn-claim-link, .btn-activation { min-width: 36px; min-height: 36px; }
}

/* Écran tactile : 44 px de haut pour les contrôles courants (audit design du
   05/11/2026). Les liens ont besoin d'être en flex pour centrer leur texte. */
@media (pointer: coarse) {
  .btn-primary, .btn-ghost, .tab-btn, .status-filter-btn, .lib-chip,
  .cal-nav, .cal-today-btn, .btn-join-group-card,
  .nav-hamburger, .search-trigger, .notif-bell, .theme-toggle, .account-trigger, #presenceBubble,
  input:not([type="checkbox"], [type="radio"], [type="range"]), select { min-height: 44px; }
  a.btn-ghost, a.theme-section-open { display: inline-flex; align-items: center; min-height: 44px; }
  a.wiki-tree-link { display: flex; align-items: center; min-height: 44px; }
}

/* Tableaux à l'étroit (téléphone, demi-écran, volet ouvert) : la place dont
   dispose le tableau compte, pas la largeur de la fenêtre. Marges de cellule
   resserrées d'abord ; puis la liste des actions passe en cartes, l'avancement
   en pleine largeur plutôt qu'au bout d'un tableau à faire défiler. */
.table-card { container-type: inline-size; }
@container (max-width: 900px) {
  .table-card th, .table-card td { padding-left: 0.6rem; padding-right: 0.6rem; }
}
@container (max-width: 820px) {
  .actions-table thead { display: none; }
  .actions-table, .actions-table tbody { display: block; width: 100%; }
  .actions-table tr { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 0.75rem;
    padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--border); }
  .actions-table td { display: block; padding: 0; border: none; min-width: 0; }
  .actions-table td[colspan] { grid-column: 1 / -1; }
  .actions-table .at-desc { grid-column: 1 / -1; font-weight: 600; }
  .actions-table .at-who  { grid-column: 1; font-size: 0.82rem; }
  .actions-table .at-due  { grid-column: 2; text-align: right; font-size: 0.82rem; }
  .actions-table .at-src  { grid-column: 1; }
  .actions-table .at-act  { grid-column: 2; }
  .actions-table .at-prog { grid-column: 1 / -1; order: 10; margin-top: 0.2rem; }
  .actions-table td.is-empty { display: none; }  /* pas de « — » orphelin en carte */
}

/* Accueil : réunion à la une (renderHomeSpotlight) */
.home-spotlight { display: flex; flex-direction: column; gap: 0.75rem; margin: -0.5rem 0 1.75rem; }
.home-spotlight[hidden] { display: none; }
.spot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 1.5rem;
  padding: 1.1rem 1.35rem; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); border-left: 4px solid var(--accent); }
.spot-live { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); border-left-color: var(--success);
  background: color-mix(in srgb, var(--success) 7%, var(--surface));
  box-shadow: 0 4px 18px color-mix(in srgb, var(--success) 16%, transparent); }
.spot-soon  { border-left-color: var(--warning); background: color-mix(in srgb, var(--warning) 6%, var(--surface)); }
.spot-ended { border-left-color: var(--text-muted); }
.spot-main { min-width: 0; flex: 1 1 18rem; }
.spot-state { display: flex; align-items: center; gap: 0.45rem; font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.spot-live .spot-state { color: var(--success); }
.spot-soon .spot-state { color: var(--warning); }
.spot-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); animation: spot-pulse 1.8s ease-out infinite; }
@keyframes spot-pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.spot-title { display: block; margin: 0.25rem 0 0.2rem; font-size: 1.25rem; font-weight: 700; line-height: 1.25;
  color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.spot-title:hover { color: var(--accent); }
.spot-meta { font-size: 0.86rem; color: var(--text-muted); }
.spot-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem; }
.spot-join { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: 10px;
  background: var(--accent-fill); color: #fff; font-size: 0.98rem; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: filter 0.15s; }
.spot-join:hover { filter: brightness(1.08); }
.spot-join svg { width: 17px; height: 17px; }
.spot-join.is-upcoming { background: var(--surface-2); color: var(--text-muted); opacity: 1; }
.spot-join .join-live { color: #fff; }
.spot-join .join-live::before { background: #fff; }
.spot-details { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; }
.spot-details:hover { color: var(--accent); }
@media (max-width: 640px) {
  .spot { padding: 1rem; }
  .spot-actions { width: 100%; align-items: stretch; }
  .spot-join { justify-content: center; }
  .spot-details { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .spot-dot { animation: none; } }
.home-boxes:empty { margin-bottom: 0; }
/* Accueil : premiers pas d'un nouveau membre */
.gs { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.75rem 1rem; margin: 0 0 2rem; }
.gs[hidden] { display: none; }
.gs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.gs-head:has(+ .gs-steps) { margin-bottom: 0.6rem; }
.gs-head .gs-title { margin-right: auto; }
.gs-next { font-size: 0.86rem; color: var(--text-muted); }
.gs-next strong { color: var(--text); font-weight: 600; }
.gs-title { margin: 0; font-size: 1rem; font-weight: 700; }
.gs-count { margin-left: 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.gs-hide, .gs-toggle, .gs-cta { min-height: 28px; padding: 0.2rem 0.6rem; font-size: 0.78rem; }
@media (pointer: coarse) { .gs-hide, .gs-toggle, .gs-cta { min-height: 44px; padding-inline: 0.8rem; } }
.gs-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.gs-step { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center;
  padding: 0.6rem 0; border-top: 1px solid var(--border); }
.gs-step:first-child { border-top: none; }
.gs-mark { width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 700; color: #fff; }
.gs-step.done .gs-mark { background: var(--success-fill); border-color: var(--success-fill); }
.gs-body { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.gs-body strong { font-size: 0.9rem; }
.gs-body span { font-size: 0.82rem; color: var(--text-muted); }
.gs-body span a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.gs-step.done .gs-body strong { color: var(--text-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.gs-cta { white-space: nowrap; text-decoration: none; }
.gs-done-label { font-size: 0.78rem; color: var(--success); font-weight: 600; }
@media (max-width: 640px) {
  .gs-step { grid-template-columns: 1.6rem minmax(0, 1fr); }
  .gs-cta, .gs-done-label { grid-column: 2; justify-self: start; }
}

/* ── Documents en ligne : modèles, partage, récents ── */
.od-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.45rem; }
.od-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.55rem; }
.od-tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 0.7rem 0.75rem; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; color: var(--text);
  font: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.od-tpl:hover { border-color: var(--accent); }
.od-step { display: flex; flex-direction: column; gap: 1rem; }
.od-step[hidden], #officeNewTemplateBlock[hidden], .od-back[hidden] { display: none; }
.od-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; }
.od-type { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; min-height: 76px; padding: 0.8rem;
  text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font: inherit; cursor: pointer; }
.od-type:hover { border-color: var(--accent); }
.od-type small { font-size: 0.76rem; color: var(--text-muted); line-height: 1.35; }
.od-back { align-self: flex-start; min-height: 32px; padding: 0; background: none; border: 0; color: var(--accent-text); font: inherit; font-size: 0.85rem; cursor: pointer; }
.od-tpl.selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.od-tpl-name { font-weight: 600; font-size: 0.86rem; }
.od-tpl small { font-size: 0.72rem; color: var(--text-muted); line-height: 1.35; }
.od-journal-box { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.75rem; }
.od-journal-box[hidden], .od-journal-info[hidden] { display: none; }
.od-journal-box .od-label { margin-bottom: 0; }
.od-journal-list { display: flex; flex-direction: column; max-height: 216px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.od-journal { display: flex; flex-direction: column; gap: 0.1rem; min-height: 44px; flex: 0 0 auto; justify-content: center; padding: 0.35rem 0.7rem; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer; }
.od-journal:last-child { border-bottom: 0; }
.od-journal:hover:not(:disabled) { background: var(--surface-2); }
.od-journal.selected { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.od-journal:disabled { cursor: default; opacity: 0.6; }
.od-journal small { color: var(--text-muted); font-size: 0.74rem; }
.od-journal-empty { margin: 0; padding: 0.7rem; color: var(--text-muted); font-size: 0.85rem; }
.od-journal-info { margin: 0; padding: 0.55rem 0.7rem; border-radius: 8px; background: var(--surface-2); font-size: 0.8rem; line-height: 1.45; overflow-wrap: anywhere; }
.od-journal-info.od-journal-warn { box-shadow: inset 3px 0 0 var(--warning, #c9892b); }
.od-tpl-icon { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; padding: 0.12rem 0.4rem;
  border-radius: 5px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; }
.od-pptx { background: #c0542b; }
.od-docx { background: #2b6cb0; }
.od-xlsx { background: #25895a; }
.od-tex { background: #4f9c45; }
.od-vis-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.4rem; }
.od-vis { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0; padding: 0.5rem 0.6rem; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--text); font-size: 0.85rem; }
.od-vis:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.od-vis input { width: auto; margin: 0.2rem 0 0; flex: 0 0 auto; }
.od-vis span { display: flex; flex-direction: column; gap: 0.1rem; }
.od-vis small { color: var(--text-muted); font-size: 0.74rem; }
.od-group { margin-top: 0.55rem; }
.od-group[hidden], .od-people[hidden] { display: none; }
.od-people { margin-top: 0.8rem; }
.od-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.4rem; }
.od-chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0.3rem 0.15rem 0.6rem; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 0.8rem; }
.od-chip button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0.2rem; }
.od-chip button:hover { color: var(--danger); }
.od-search { position: relative; }
.od-people-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; list-style: none; margin: 0; padding: 0.25rem 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.2); max-height: 240px; overflow-y: auto; }
.od-people-list[hidden] { display: none; }
.od-people-list li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.4rem 0.75rem; cursor: pointer; font-size: 0.85rem; }
.od-people-list li:hover { background: var(--surface-2); }
.od-people-list li small { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.od-people-list li.od-none { color: var(--text-muted); cursor: default; }
.od-coedit { display: flex; gap: 0.55rem; align-items: flex-start; margin: 0.9rem 0 0; font-size: 0.84rem; line-height: 1.4;
  text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--text); cursor: pointer; }
.od-coedit input { width: auto; margin: 0.2rem 0 0; flex: 0 0 auto; }
.od-vis-badge { font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 20px; border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.od-coedit-badge { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.od-mine { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.od-mine[hidden] { display: none; }
.od-col { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 0.9rem; min-width: 0; }
.od-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.3rem; border-radius: 6px; text-decoration: none; color: var(--text); }
.od-item:hover { background: var(--surface-2); }
.od-item-main { display: flex; flex-direction: column; min-width: 0; }
.od-item-title { font-size: 0.86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-item small, .od-empty { font-size: 0.74rem; color: var(--text-muted); margin: 0; }
@media (max-width: 720px) { .od-mine { grid-template-columns: 1fr; } }

/* Page réunion : notes partagées */
@media (max-width: 560px) { .od-templates { grid-template-columns: 1fr 1fr; } .od-tpl small { display: none; } .od-vis-list { grid-template-columns: 1fr; } }
/* Choix des personnes : liste dans le flux (jamais coupée par la fenêtre) */
.od-people-list { position: static; margin-top: 0.35rem; box-shadow: none; }
.od-people-list li { align-items: center; }
.od-people-list li > span { display: flex; flex-direction: column; min-width: 0; }
.od-people-list li em { font-style: normal; font-size: 0.7rem; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 20px; padding: 0.05rem 0.45rem; white-space: nowrap; }
.od-chip-noacc { border-style: dashed; }

/* Documents : My space / Repository */
.ds-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.4rem; margin: 0 0 1.25rem; border-bottom: 1px solid var(--border); }
.ds-hint { margin-left: auto; font-size: 0.78rem; color: var(--text-muted); padding: 0.3rem 0; }
.ds-h { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 1.25rem 0 0.6rem; }
.ds-empty { font-size: 0.86rem; color: var(--text-muted); margin: 0 0 0.5rem; }
.od-published { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.od-owner { border-top: 1px solid var(--border); padding-top: 0.9rem; }
.od-owner[hidden] { display: none; }
.od-owner-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 0.86rem; }
.od-owner-row span { font-weight: 600; margin-right: auto; }
.od-owner-row select { width: auto; min-width: 12rem; }
@media (max-width: 640px) { .ds-hint { display: none; } }

/* Repository : explorateur en tableau */
.ds-intro a { color: var(--accent); }
.sec-head { margin-bottom: 1rem; }
.sec-head .ds-intro { margin-bottom: 0; }
.sec-intro { margin-top: -0.35rem; }
.cm-myspace-hint { margin: 0 0 1rem; padding: 0.6rem 0.8rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); font-size: 0.84rem; color: var(--text-muted); }
.cm-myspace-hint[hidden] { display: none; }
.cm-myspace-hint strong { color: var(--text); }
.cm-myspace-hint .btn-ghost { margin-left: 0.4rem; font-size: 0.78rem; padding: 0.15rem 0.6rem; }
.rp-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.rp-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.rp-table th { text-align: left; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rp-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.rp-row { cursor: pointer; }
.rp-row:hover, .rp-row.open { background: var(--surface-2); }
.rp-row:last-of-type td { border-bottom: none; }
.rp-name { display: flex; align-items: center; gap: 0.6rem; min-width: 16rem; }
.rp-name .od-tpl-icon { flex: 0 0 auto; }
.rp-title { color: inherit; text-decoration: none; }
.rp-title:hover strong { color: var(--accent); text-decoration: underline; }
.od-pdf { background: #b83a3a; }
.od-file { background: #6b7a90; }
.rp-name-text { display: flex; flex-direction: column; min-width: 0; }
.rp-name-text strong { font-weight: 600; overflow-wrap: anywhere; }
.rp-name-text small { color: var(--text-muted); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42ch; }
.rp-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-author { white-space: nowrap; color: var(--text-muted); }
.rp-act { text-align: right; white-space: nowrap; }
.rp-quick { font-size: 0.78rem; color: var(--accent); text-decoration: none; }
.rp-quick:hover { text-decoration: underline; }
.rp-detail td { background: var(--surface-2); padding: 0.5rem 0.75rem 0.8rem; }
.pres-detail .card { margin: 0 !important; box-shadow: none; }
.pres-detail .pc-title { display: none; }
@media (max-width: 720px) {
  .rp-table thead th:nth-child(3), .rp-table td:nth-child(3),
  .rp-table thead th:nth-child(5), .rp-table td:nth-child(5) { display: none; }
  .rp-name { min-width: 11rem; }
}
.rp-table td:nth-child(4) { white-space: nowrap; }
#presrepo-layout > * { min-width: 0; }

/* Réunion spontanée */
.meet-now-btn[hidden] { display: none; }
.mn-link { display: flex; gap: 0.4rem; }
.mn-link input { flex: 1; min-width: 0; font-size: 0.82rem; }
#meetNowDone[hidden], #meetNowForm[hidden], #meetNowFooter[hidden] { display: none !important; }

/* Calendrier : événements sur plusieurs jours */
.cal-bar { display: block; margin: 1px 2px 2px; padding: 0.25rem 0.45rem; border-radius: 5px; font-size: 0.75rem; font-weight: 600;
  line-height: 1.35; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--bar) 28%, var(--surface)); border-left: 3px solid var(--bar); }
.cal-bar:hover { background: color-mix(in srgb, var(--bar) 42%, var(--surface)); }
.cal-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dashed; margin-left: 0; }
.cal-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }

/* Aperçu visiteur (public/preview.js) */
#preview-bar { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 5000;
  display: flex; align-items: center; gap: 0.9rem; max-width: calc(100vw - 2rem); padding: 0.55rem 0.6rem 0.55rem 1rem;
  border-radius: 999px; background: var(--warning, #b45309); color: #fff; font-size: 0.84rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35); }
#preview-bar button { flex: 0 0 auto; background: #fff; color: #7a3d05; border: none; border-radius: 999px;
  padding: 0.35rem 0.9rem; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 560px) { #preview-bar { border-radius: 12px; bottom: 0.5rem; font-size: 0.78rem; } }

/* ── Projets LaTeX dans My space (latex.js) ── */
.lx-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; container-type: inline-size; }
/* Liste étroite (demi-écran, volet ouvert) : les boutons passent sous le titre
   au lieu de l'écraser — sans cela le titre et ses infos tombaient à quelques
   pixels de large, un mot par ligne. */
@container (max-width: 700px) {
  .lx-row { flex-wrap: wrap; row-gap: 0.55rem; }
  .lx-main { flex: 1 1 calc(100% - 34px - 0.75rem); }
  .lx-actions { width: 100%; padding-left: calc(34px + 0.75rem); }
}
.lx-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; border-top: 1px solid var(--border); }
.lx-row:first-child { border-top: none; }
.lx-row:hover { background: var(--surface-2); }
.lx-icon { flex-shrink: 0; width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center;
  font: 700 0.7rem/1 Georgia, 'Times New Roman', serif; color: #fff; background: #3f8237; }
.lx-main { flex: 1; min-width: 0; }
.lx-name { font-weight: 600; font-size: 0.95rem; color: var(--text); text-decoration: none; display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-name:hover { color: var(--accent); }
.lx-meta { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.15rem; }
.lx-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; flex-shrink: 0; }
.lx-actions .btn-ghost, .lx-actions a { font-size: 0.78rem; padding: 0.25rem 0.65rem; border-radius: 6px; white-space: nowrap; }
.lx-actions a { text-decoration: none; }
.lx-actions .lx-danger { color: var(--danger); }
.lx-members { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.5rem; }
.lx-member { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: 8px; }
.lx-member > span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.86rem; }
.lx-member small { color: var(--text-muted); font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; }
.lx-member select { width: auto; font-size: 0.8rem; padding: 0.2rem 0.4rem; }
.lx-member button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 0 0.25rem; }
.lx-member button:hover { color: var(--danger); }
.lx-member.lx-owner { background: var(--surface-2); }
.lx-member.lx-pending { border-style: dashed; }
.lx-wait { color: var(--warning); font-style: italic; }
.lx-note { font-size: 0.78rem; color: var(--text-muted); margin: 0.5rem 0 0; }
.lx-note:empty { display: none; }
@media (max-width: 640px) {
  .lx-row { flex-wrap: wrap; }
  .lx-actions { width: 100%; justify-content: flex-end; }
}

/* ── Dépôt d'un fichier : d'abord le fichier, puis le formulaire prérempli ── */
.pr-drop { border: 2px dashed var(--border); border-radius: 12px; padding: 1.6rem 1rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--text-muted); transition: border-color 0.15s, background 0.15s; }
.pr-drop.pr-over { border-color: var(--accent); background: rgba(74,159,212,0.08); }
.pr-drop svg { color: var(--accent); opacity: 0.85; }
.pr-drop p { margin: 0; color: var(--text); font-size: 0.95rem; }
.pr-drop p .btn-ghost { font-size: 0.85rem; padding: 0.25rem 0.7rem; margin-left: 0.2rem; }
.pr-drop small { font-size: 0.78rem; max-width: 46ch; line-height: 1.45; }
.pr-nofile { background: none; border: none; color: var(--text-muted); text-decoration: underline; cursor: pointer; font-size: 0.78rem; margin-top: 0.3rem; }
.pr-nofile:hover { color: var(--text); }
.pr-chosen { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); font-size: 0.85rem; }
.pr-chosen span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-chosen .btn-ghost { font-size: 0.78rem; padding: 0.2rem 0.6rem; flex-shrink: 0; }
.pr-detected { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.pr-drop[hidden], .pr-chosen[hidden], .pr-detected[hidden], #presRepoFields[hidden] { display: none !important; }

/* ── My space : lignes de documents (même agencement que les projets LaTeX) ── */
.md-row .md-icon { flex-shrink: 0; width: 34px; height: 34px; min-width: 34px; padding: 0; border-radius: 7px;
  font-size: 0.62rem; letter-spacing: 0.02em; box-sizing: border-box; }
.lx-actions .md-publish { color: var(--accent); border-color: var(--accent); }
/* Envoi en relecture : l'action phare des documents soumissibles */
.lx-actions .md-submit { background: var(--accent-fill); border-color: var(--accent); color: #fff; font-weight: 600; }
.lx-actions .btn-ghost.md-submit:hover { background: color-mix(in srgb, var(--accent) 85%, #000); border-color: var(--accent); color: #fff; }
.md-more, .lx-actions .md-more { font-size: 1.05rem; line-height: 1; padding: 0.2rem 0.55rem; letter-spacing: 0.05em; }
.doc-menu { position: fixed; z-index: 3000; min-width: 210px; padding: 0.3rem; border-radius: 10px;
  max-height: calc(100vh - 16px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 28px rgba(0,0,0,0.28); }
.doc-menu[hidden] { display: none; }
.doc-menu button, .doc-menu a { display: block; width: 100%; text-align: left; padding: 0.45rem 0.7rem; border: none; background: none;
  color: var(--text); font-size: 0.86rem; border-radius: 6px; text-decoration: none; cursor: pointer; font-family: inherit; }
.doc-menu button:hover, .doc-menu a:hover, .doc-menu button:focus-visible, .doc-menu a:focus-visible { background: var(--surface-2); outline: none; }
.doc-menu .danger { color: var(--danger); }
.doc-menu-head { padding: 0.45rem 0.7rem 0.15rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.doc-menu-hint { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 400; margin-top: 0.05rem; }
.doc-menu hr { border: none; border-top: 1px solid var(--border); margin: 0.25rem 0; }

/* ── Tags personnels des documents (My space) ── */
[data-c="blue"]   { --tc: #4a9fd4; }  [data-c="green"]  { --tc: #3dbd8e; }  [data-c="orange"] { --tc: #e08a3c; }
[data-c="red"]    { --tc: #e05858; }  [data-c="purple"] { --tc: #9b7be0; }  [data-c="teal"]   { --tc: #2bb3b1; }
[data-c="pink"]   { --tc: #e06aa8; }  [data-c="yellow"] { --tc: #c9a227; }  [data-c="gray"]   { --tc: #8a94a6; }
.dtag { display: inline-flex; align-items: center; flex-shrink: 0; max-width: 12rem; padding: 0.08rem 0.55rem;
  border-radius: 20px; border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent);
  background: color-mix(in srgb, var(--tc) 16%, transparent); color: color-mix(in srgb, var(--tc) var(--ink-mix), var(--text));
  font: 600 0.72rem/1.5 inherit; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; font-family: inherit; }
button.dtag:hover { background: color-mix(in srgb, var(--tc) 26%, transparent); }
.lx-title-line { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.lx-title-line .lx-name { flex: 0 1 auto; min-width: 0; }
.dtag-dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--tc);
  margin-right: 0.5rem; vertical-align: -0.05rem; flex-shrink: 0; }
.doc-menu .dtag-check { float: right; color: var(--accent); margin-left: 0.75rem; }
.dtag-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; margin: 0.25rem 0 0.5rem; }
.dtag-bar[hidden] { display: none; }
.dtag-chip { font-size: 0.78rem; padding: 0.2rem 0.7rem; }
.dtag-chip:not(.dtag) { border-radius: 20px; border: 1px solid var(--border); background: none; color: var(--text-muted);
  cursor: pointer; font-family: inherit; font-weight: 600; }
.dtag-chip.active { box-shadow: 0 0 0 2px var(--accent); }
.dtag-chip:not(.dtag).active { color: var(--text); }
.dtag-hint { font-size: 0.8rem; color: var(--text-muted); }
.dtag-manage { margin-left: auto; font-size: 0.78rem; padding: 0.25rem 0.65rem; }
.dtag-list { display: flex; flex-direction: column; gap: 0.5rem; }
.dtag-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 0.5rem; }
.dtag-row input { width: 100%; padding: 0.35rem 0.55rem; font-size: 0.85rem; }
.dtag-swatches { display: flex; gap: 0.2rem; }
.dtag-swatches .dtag-dot { width: 1rem; height: 1rem; margin: 0; border: 2px solid transparent; padding: 0; cursor: pointer; }
.dtag-swatches .dtag-dot.on { border-color: var(--text); }
.dtag-count { font-size: 0.75rem; color: var(--text-muted); min-width: 1.2rem; text-align: right; }
.dtag-del { padding: 0.2rem 0.45rem; font-size: 0.8rem; }
.dtag-new { display: flex; gap: 0.5rem; }
.dtag-new[hidden] { display: none; }
/* ── Soumettre un document (My space → relecture) ── */
.dsub-doc { margin: 0; font-size: 0.9rem; }
.dsub-doc span { color: var(--text-muted); font-size: 0.8rem; margin-left: 0.4rem; }
.dsub-opts { display: flex; flex-direction: column; gap: 0.5rem; }
.dsub-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.6rem; align-items: start; padding: 0.65rem 0.8rem;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 400;
  font-size: 0.88rem; color: var(--text); margin: 0; }
.dsub-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.dsub-opt input { margin: 0.2rem 0 0; width: auto; }
.dsub-opt-main { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.dsub-opt-main small { color: var(--text-muted); font-size: 0.78rem; }
.dsub-fields { grid-column: 2; display: none; flex-direction: column; gap: 0.4rem; margin-top: 0.4rem; }
.dsub-opt.on .dsub-fields { display: flex; }
.dsub-fields select, .dsub-fields input, .dsub-fields textarea { width: 100%; box-sizing: border-box; font-size: 0.85rem; }
.dsub-now { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.85rem; font-weight: 400;
  text-transform: none; letter-spacing: 0; color: var(--text); cursor: pointer; }
.dsub-now input { width: auto; margin: 0; }
.dsub-now[hidden], .dsub-note[hidden], #docSubmitBtn[hidden] { display: none; }
.dsub-note { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.dsub-badge { display: inline-flex; align-items: center; padding: 0.05rem 0.5rem; border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: 600 0.72rem/1.5 inherit; font-family: inherit; cursor: pointer; }
.dsub-badge + .dsub-badge { margin-left: 0.3rem; }
.dsub-badge:hover { border-color: var(--accent); }
.dsub-badge[data-s="submitted"], .dsub-badge[data-s="in_review"] { border-color: rgba(74,159,212,0.45); color: var(--accent); }
.dsub-badge[data-s="revision"] { border-color: rgba(200,160,53,0.5); color: #c8a035; }
.dsub-badge[data-s="accepted"] { border-color: rgba(61,189,142,0.45); color: var(--success); }
.dsub-badge[data-s="rejected"] { border-color: rgba(224,82,82,0.45); color: var(--danger); }
.dsub-from { font-size: 0.8rem; color: var(--text-muted); }
.dsub-material { border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.7rem 0.6rem; margin-top: 0.6rem; }
.dsub-material legend { padding: 0 0.3rem; }
.dsub-material .dsub-radio, .dsub-material .dsub-check { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0.3rem 0 0; font-size: 0.82rem; font-weight: 400;
  text-transform: none; letter-spacing: normal; color: var(--text); cursor: pointer; }
.dsub-material .dsub-radio input, .dsub-material .dsub-check input { width: auto; margin-top: 0.2rem; flex: none; }
.dsub-material .dsub-radio span { display: flex; flex-direction: column; }
.dsub-material .dsub-radio small { color: var(--text-muted); font-size: 0.74rem; }
.dsub-material [hidden] { display: none; }
.dsub-hint { font-weight: 400; font-size: 0.74rem; color: var(--text-muted); }
.dsub-authors { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.dsub-author { padding: 0.12rem 0.55rem; border-radius: 20px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: 0.8rem; font-weight: 500; }
.dsub-author.off { color: var(--text-muted); border-style: dashed; background: none; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-muted) 50%, transparent); }
/* Résumés en LaTeX rendus (latexAbstractHtml) */
.ltx-abstract { font-size: 0.86rem; line-height: 1.6; color: var(--text); font-weight: 400; text-transform: none; letter-spacing: 0; }
.ltx-abstract p { margin: 0 0 0.6rem; }
.ltx-abstract p:last-child { margin-bottom: 0; }
.ltx-abstract .katex { font-size: 1.05em; }
.ltx-abstract .katex-display { margin: 0.4rem 0; overflow-x: auto; overflow-y: hidden; }
.ltx-cite { color: var(--text-muted); font-size: 0.9em; }
.ltx-preview { padding: 0.55rem 0.7rem; border: 1px dashed var(--border); border-radius: 6px; background: var(--surface-2); }
.ltx-preview[hidden] { display: none; }
.ltx-preview-h { display: block; margin-bottom: 0.25rem; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); }
.dsub-step { display: flex; flex-direction: column; gap: 0.45rem; }
.dsub-step-h { display: flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted); }
.dsub-step-h span { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 0.68rem; color: var(--text); }
.dsub-seg { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dsub-seg button { flex: 1 1 10rem; padding: 0.5rem 0.75rem; border-radius: 8px; border: 1px solid var(--border); background: none;
  color: var(--text); font: 600 0.85rem inherit; font-family: inherit; cursor: pointer; }
.dsub-seg button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.dsub-seg button:disabled { opacity: 0.45; cursor: not-allowed; }
.dsub-seg em { font-style: normal; margin-left: 0.3rem; padding: 0 0.4rem; border-radius: 10px; background: var(--surface-2); font-size: 0.72rem; }
.dsub-field { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
  text-transform: none; letter-spacing: 0; }
.dsub-field select, .dsub-field input, .dsub-field textarea { width: 100%; box-sizing: border-box; font-size: 0.86rem; font-weight: 400; }
.dtag.dtag-mine { border-style: dashed; background: transparent; }
.dtag-h { margin: 0.35rem 0 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.dtag-note { margin: -0.4rem 0 0; font-size: 0.8rem; color: var(--text-muted); }
.dtag-ro { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dtag-ro .dtag { cursor: default; }
.doc-menu .doc-menu-h { padding: 0.45rem 0.7rem 0.2rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted); }
.doc-menu .doc-menu-note { padding: 0.3rem 0.7rem; font-size: 0.8rem; color: var(--text-muted); }
.dtag-new input { flex: 1; width: auto; padding: 0.4rem 0.6rem; }
@media (max-width: 640px) {
  .dtag-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .dtag-swatches { grid-column: 1 / -1; order: 5; flex-wrap: wrap; }
}
/* Survol des actions d'une ligne : bleu, pas le rouge « danger » des boutons fantômes */
.lx-actions .btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
@media (max-width: 640px) { .lx-row .lx-name { white-space: normal; } }

/* Members : bouton qui déplie le formulaire d'ajout */
.members-add-bar { display: flex; justify-content: flex-end; margin: 0 0 0.75rem; }
.members-add-bar[hidden] { display: none; }
/* Lien d'invitation réutilisable : case à cocher et liens encore ouverts */
.invite-link-intro { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 0.5rem; }
/* Une seule hauteur (38 px, celle de .btn-ghost) et une ligne de base commune */
.invite-link-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.invite-link-row[hidden], .invite-link-field[hidden] { display: none; }
.invite-link-field { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.82rem; color: var(--text-muted); }
.invite-link-field select, .invite-link-field input {
  width: auto; height: 38px; min-height: 38px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; font-size: 0.85rem;
}
.invite-link-field input[type="date"] { min-width: 9.5rem; }
.invite-reusable { display: inline-flex; align-items: center; gap: 0.35rem; height: 38px; margin: 0; font-size: 0.82rem; color: var(--text-muted); cursor: pointer; }
.invite-link-generate { height: 38px; white-space: nowrap; font-size: 0.85rem; }
@media (max-width: 480px) {
  .invite-link-generate { flex: 1 1 100%; }
}
.invite-links-open { margin-top: 0.75rem; }
.invite-links-open[hidden] { display: none; }
.invite-links-title { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin: 0 0 0.35rem; }
.invite-links-open ul { list-style: none; margin: 0; padding: 0; }
.invite-links-open li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-size: 0.8rem; padding: 0.3rem 0; border-top: 1px solid var(--border); }
.invite-link-revoke { font-size: 0.78rem; min-height: 36px; }

/* Branding kit : emplacement de modèle vide (administrateurs) */
.pres-add-template { display: inline-flex; align-self: center; margin: 0.9rem auto; padding: 0.35rem 0.9rem; border: 1px dashed var(--border);
  border-radius: 8px; color: var(--text-muted); font-size: 0.82rem; cursor: pointer; }
.pres-add-template:hover { border-color: var(--pt-accent, var(--accent)); color: var(--pt-accent, var(--accent)); }
/* Avancement : la ligne d'état ne dit que ce qui renseigne. Sans échéance,
   pas d'état ; jamais mise à jour, pas de date ; rien des deux, pas de ligne. */
.ap-sep { margin: 0 0.1rem; }
.ap[data-health="none"] .ap-dot, .ap[data-health="none"] .ap-state, .ap[data-health="none"] .ap-sep { display: none; }
.ap-ago:empty, .ap-sep:has(+ .ap-ago:empty) { display: none; }
.ap[data-health="none"] .ap-meta:has(.ap-ago:empty) { display: none; }

/* Meetings : « Meet now » et « New meeting » côte à côte, à droite */
.mtg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.mtg-actions button { white-space: nowrap; }
.mtg-actions .meet-now-btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.mtg-actions .meet-now-btn[hidden] { display: none; }
.mtg-actions:not(:has(.meet-now-btn:not([hidden]), #meeting-toolbar:not([style*="none"]))) { display: none; }

/* ── Lisibilité : pas de texte sous 12 px (badges, étiquettes, compteurs) ──
   « body » en tête : passe devant les styles de page (app.html) de même poids */
body .instr-badge, body .instr-tree-badge, body .lib-topic-pill, body .lib-facet-label, body .lib-chip .n,
body .board-label, body .tl-chip, body .wiki-cat-badge, body .wiki-index-group-title, body .gcard-badge,
body .mcard-badge, body .status-badge, body .presrepo-folder-count, body .rp-num, body .cal-dow-cell,
body .od-tpl-icon:not(.md-icon), body .conf-dl-chip, body .conf-urgency { font-size: 0.75rem; }

/* Texte pour les lecteurs d'écran seulement */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Lien « Skip to content » : invisible jusqu'à ce qu'on y arrive au clavier */
.skip-link { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 10000; padding: 0.5rem 0.9rem; border-radius: 6px;
  background: var(--accent-fill); color: #fff; font-weight: 600; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
main:focus { outline: none; }

/* ── Types de news (NEWS_KIND_DEF) ── */
.nk-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.35rem; }
.nk-types { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.nk-type { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.35rem 0.7rem; border-radius: 20px; border: 1px solid var(--border); background: none; color: var(--text);
  font: 600 0.8rem inherit; font-family: inherit; cursor: pointer; }
.nk-type.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text); }
.nk-fields { display: flex; flex-direction: column; gap: 0.6rem; }
.nk-fields:empty { display: none; }
.nk-fields label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
  text-transform: none; letter-spacing: 0; margin: 0; }
.nk-fields input { width: 100%; box-sizing: border-box; }
.nk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.nk-hint { font-size: 0.76rem; color: var(--text-muted); }
.nk-suggest { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; }
.nk-suggest:not(:empty) { border: 1px solid var(--border); }
.nk-sug { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0.45rem 0.7rem; border: none;
  border-top: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; font-family: inherit; }
.nk-sug:first-child { border-top: none; }
.nk-sug:hover, .nk-sug:focus-visible { background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.nk-sug strong { font-size: 0.84rem; }
.nk-sug small, .nk-empty { font-size: 0.76rem; color: var(--text-muted); }
.nk-empty { padding: 0.45rem 0.7rem; }
.nk-picked { display: flex; flex-direction: column; gap: 0.3rem; }
.nk-chip { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.35rem 0.6rem; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 0.82rem; }
.nk-chip button { border: none; background: none; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; }

.nk-pill { display: inline-flex; align-items: center; gap: 0.3rem; margin-bottom: 0.35rem; padding: 0.1rem 0.55rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.nk-pill-milestone { color: var(--success); background: var(--success-bg); }
.nk-pill-opportunity { color: var(--warning); background: var(--warning-bg); }
.news-card.nk-card-papers { border-left: 3px solid var(--accent); }
.news-card.nk-card-milestone { border-left: 3px solid var(--success); }
.news-card.nk-card-opportunity { border-left: 3px solid var(--warning); }

.nk-papers { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.75rem 0 0.25rem; }
.nk-paper { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.75rem; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--border); }
.nk-paper-thumb { flex-shrink: 0; width: 74px; border-radius: 4px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.nk-paper-main { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.nk-paper-title { min-height: 24px; font-weight: 700; font-size: 0.95rem; line-height: 1.35; color: var(--text); text-decoration: none; }
a.nk-paper-title:hover { color: var(--accent-text); text-decoration: underline; }
.nk-paper-authors { font-size: 0.8rem; color: var(--text-muted); }
.nk-paper-links { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.15rem; }
.nk-paper-links .btn-ghost { font-size: 0.76rem; padding: 0.15rem 0.55rem; text-decoration: none; white-space: nowrap; }
.nk-more { font-size: 0.78rem; color: var(--text-muted); }

.nk-event { display: flex; align-items: center; gap: 0.9rem; margin: 0.6rem 0; }
.nk-cal { display: flex; flex-direction: column; align-items: center; width: 3.2rem; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0; }
.nk-cal span { width: 100%; text-align: center; background: var(--accent-fill); color: #fff; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; padding: 0.1rem 0; }
.nk-cal b { font-size: 1.25rem; padding: 0.15rem 0 0.25rem; }
.nk-event-main { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.nk-event-main span { font-size: 0.82rem; color: var(--text-muted); }

.nk-milestone { margin: 0.2rem 0 0.9rem; padding: 0.7rem 1rem; border-radius: 0 10px 10px 0;
  background: var(--success-bg); border-left: 4px solid var(--success); }
.nk-milestone strong { font-size: 1.05rem; line-height: 1.4; color: var(--text); }

.nk-welcome { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.5rem; margin: 0.6rem 0; }
.nk-member { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text); text-decoration: none; min-width: 0; }
.nk-member:hover { border-color: var(--accent); }
.nk-member span { display: flex; flex-direction: column; min-width: 0; }
.nk-member strong { font-size: 0.86rem; }
.nk-member small { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nk-opportunity { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: 0.6rem 0; }
.nk-deadline { padding: 0.25rem 0.7rem; border-radius: 20px; font-size: 0.82rem; font-weight: 700; color: var(--warning);
  background: var(--warning-bg); border: 1px solid var(--warning-border); }
.nk-contact { font-size: 0.82rem; color: var(--text-muted); }
.nk-opportunity .btn-ghost, .nk-event .btn-ghost { font-size: 0.8rem; padding: 0.25rem 0.7rem; text-decoration: none; }
@media (max-width: 640px) {
  .nk-row { grid-template-columns: 1fr; }
  .nk-paper-thumb { width: 56px; }
}

/* ─── Liens vers le portail : pastille et sélecteur « # » ───────────────────── */
a.xref { display: inline-flex; align-items: baseline; gap: 0.25em; padding: 0.02em 0.5em 0.06em 0.4em; margin: 0 0.05em;
  border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent-text); text-decoration: none; font-weight: 600; font-size: 0.95em; line-height: 1.35; white-space: normal; }
a.xref:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); text-decoration: none; }
a.xref:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.xref-ico { font-size: 0.9em; }
.chat-msg.mine a.xref { color: inherit; border-color: currentColor; background: rgba(255,255,255,0.14); }
.xref-picker { position: fixed; z-index: 10000; max-height: 300px; overflow-y: auto; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,0.3); padding: 0.3rem; font-size: 0.86rem; }
.xref-picker[hidden] { display: none; }
.xref-group { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: 0.4rem 0.5rem 0.15rem; }
.xref-opt { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border-radius: 7px; cursor: pointer; }
.xref-opt.active, .xref-opt:hover { background: var(--surface-2); }
.xref-opt-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
/* Élément qui s'ouvre (arborescence « #Taskforces/BBIR ») : chevron cliquable */
.xref-more { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: auto;
  border-radius: 6px; color: var(--text-muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.xref-more:hover { background: var(--surface); color: var(--accent); }
@media (pointer: coarse) { .xref-more { width: 40px; height: 40px; } }
.xref-opt-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xref-opt-sub { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xref-note { font-size: 0.72rem; color: var(--text-muted); padding: 0.35rem 0.5rem 0.15rem; }

/* Champ d'abstract : assez haut pour quelques paragraphes, et extensible */
textarea.abstract-input { min-height: 12.5em; line-height: 1.55; font-size: 0.9rem; resize: vertical; box-sizing: border-box; }

/* ─── Nouveautés : ce qui est arrivé depuis le dernier passage ───────────────── */
.is-new:not(tr) { position: relative; box-shadow: inset 4px 0 0 var(--accent), 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 9%, transparent), color-mix(in srgb, var(--accent) 9%, transparent)); }
/* L'étiquette se pose sur le bord haut de la carte : à l'intérieur, elle masquait ses boutons */
.is-new:not(tr)::after { content: 'New'; position: absolute; top: -9px; right: 16px; z-index: 2; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.08rem 0.42rem; border-radius: 999px; background: var(--accent-fill, var(--accent)); color: #fff; pointer-events: none; }
a.wiki-tree-link.is-new { position: static; box-shadow: none; background-image: none; font-weight: 700; color: var(--accent-text); }
a.wiki-tree-link.is-new::after { position: static; display: inline-block; margin-left: 0.4rem; vertical-align: 1px; }
tr.is-new > td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
tr.is-new > td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.meeting-card.is-new { overflow: visible; }
.tab-btn.has-new::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 0.4rem; border-radius: 50%;
  background: var(--danger, #e5484d); vertical-align: 2px; }
@media (prefers-reduced-motion: no-preference) {
  a.is-new { animation: none; }
  .is-new:not(tr):not(a) { animation: newPulse 1.6s ease-out 1; }
  @keyframes newPulse { 0% { box-shadow: inset 4px 0 0 var(--accent), 0 0 0 6px color-mix(in srgb, var(--accent) 40%, transparent); } }
}

/* ─── Import depuis overleaf.com ──────────────────────────────────────────── */
.lx-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.lx-head .ds-h { margin-bottom: 0.6rem; }
.lx-import-btn { font-size: 0.8rem; padding: 0.3rem 0.75rem; margin-top: 0.65rem; }
.oli { display: flex; flex-direction: column; gap: 0.85rem; font-size: 0.9rem; }
.oli-lead { margin: 0; line-height: 1.5; }
.oli-steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.55rem; }
.oli-steps li span { display: block; color: var(--text-muted); font-size: 0.85rem; margin-top: 0.15rem; }
.oli-drop { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 1.6rem 1rem; border: 2px dashed var(--border);
  border-radius: 12px; cursor: pointer; text-align: center; transition: border-color 0.15s, background 0.15s; }
/* C'est un <label> : les libellés du portail sont en capitales grises */
.oli-drop { text-transform: none; letter-spacing: normal; color: var(--text); font-size: 0.9rem; font-weight: 400; margin: 0; }
.oli-progress[hidden] { display: none; }
.oli-drop:hover, .oli-drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.oli-drop.busy { pointer-events: none; opacity: 0.6; }
.oli-drop-main { font-weight: 600; }
.oli-drop-sub, .oli-note, .oli-hint, .oli-meta { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.oli-progress { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; color: var(--text-muted); }
.oli-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.oli-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.oli-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.oli-item { border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.85rem; display: flex; flex-direction: column; gap: 0.35rem; }
.oli-item.waiting, .oli-item.running, .oli-item.failed { flex-direction: row; justify-content: space-between; align-items: center; gap: 0.75rem; }
.oli-item.failed { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.oli-item-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.oli-name { font-weight: 700; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
a.oli-name:hover { color: var(--accent-text); text-decoration: underline; }
.oli-state { font-size: 0.82rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.4rem; }
.oli-item.failed .oli-state { color: var(--danger); }
.oli-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: oliSpin 0.8s linear infinite; }
@keyframes oliSpin { to { transform: rotate(360deg); } }
.oli-ok { color: var(--success); font-weight: 600; font-size: 0.86rem; margin: 0; }
.oli-warn { color: var(--warning); font-weight: 600; font-size: 0.86rem; }
.oli-errors { margin: 0.1rem 0 0; padding-left: 1.1rem; font-size: 0.78rem; }
.oli-errors code, .oli-hint code, .oli-meta code, .oli-share code { font-size: 0.78rem; overflow-wrap: anywhere; }
.oli-share { border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.15rem; display: flex; flex-direction: column; gap: 0.35rem; }
.oli-share-title { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }
.oli-person { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; margin: 0; padding: 0.15rem 0;
  text-transform: none; letter-spacing: normal; font-weight: 500; color: var(--text); cursor: pointer; }
.oli-person input[type="checkbox"] { width: auto; height: auto; margin: 0; flex: none; }
.oli-person span { flex: 1; min-width: 0; text-transform: none; letter-spacing: normal; }
.oli-person select { width: auto; flex: none; font-size: 0.8rem; padding: 0.2rem 0.4rem; }
.oli-share-btn { text-transform: none; letter-spacing: normal; }
.oli-share-btn { align-self: flex-start; font-size: 0.82rem; padding: 0.3rem 0.85rem; }
.oli-share-msg { font-size: 0.8rem; color: var(--danger); }
.oli-after { font-size: 0.84rem; line-height: 1.5; padding: 0.7rem 0.85rem; border-radius: 10px; background: var(--surface-2); }
.oli-foot { display: flex; justify-content: flex-end; gap: 0.5rem; }
@media (prefers-reduced-motion: reduce) { .oli-spin { animation: none; } }

/* ── Paramètres : historique et Time machine (instr-timemachine.js) ─────────── */
.ih-box { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.ih-toggle {
  display: flex; align-items: center; gap: 0.4rem; width: 100%;
  background: none; border: none; padding: 0.25rem 0; cursor: pointer; color: var(--text-muted);
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.ih-toggle:hover { color: var(--text); }
.ih-muted { color: var(--text-muted); font-size: 0.78rem; margin: 0.15rem 0; }
.ih-timeline { list-style: none; margin: 0.5rem 0 0; padding: 0 0 0 1rem; border-left: 2px solid var(--border); }
.ih-v { position: relative; padding: 0 0 0.85rem 0.6rem; }
.ih-v::before {
  content: ''; position: absolute; left: -1.38rem; top: 0.3rem; width: 0.6rem; height: 0.6rem;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--surface);
}
.ih-v.ih-baseline::before { background: var(--text-muted); }
.ih-v.ih-delete::before { background: var(--danger); }
.ih-v.ih-restore::before { background: var(--success); }
.ih-v-head { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; font-size: 0.83rem; }
.ih-v-what { font-weight: 700; }
.ih-v-when { color: var(--text-muted); font-size: 0.76rem; }
.ih-restore { margin-left: auto; font-size: 0.72rem; padding: 0.12rem 0.5rem; }
.ih-changes { list-style: none; margin: 0.3rem 0 0; padding: 0; font-size: 0.8rem; }
.ih-changes li { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: baseline; padding: 0.12rem 0; }
.ih-field { color: var(--text-muted); min-width: 7.5rem; }
.ih-from { text-decoration: line-through; color: var(--text-muted); overflow-wrap: anywhere; }
.ih-to { font-weight: 600; overflow-wrap: anywhere; }
.ih-arrow { color: var(--text-muted); }
.ih-foot { margin-top: 0.2rem; }

#ih-tm-modal { z-index: 990; }            /* une fiche ouverte depuis la Time machine passe devant */
.ih-tm-box { max-width: 900px; }
.ih-tm-nav { display: flex; align-items: center; gap: 0.5rem; }
.ih-tm-nav .btn-ghost { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.ih-tm-slider { position: relative; flex: 1; min-width: 0; }
.ih-tm-slider input[type=range] { width: 100%; accent-color: var(--accent); position: relative; z-index: 1; }
.ih-tm-ticks { position: absolute; left: 8px; right: 8px; top: 50%; height: 0; pointer-events: none; }
.ih-tm-ticks span { position: absolute; width: 2px; height: 10px; margin: -5px 0 0 -1px; background: var(--text-muted); opacity: 0.5; }
.ih-tm-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; margin: 0.6rem 0 0.4rem; }
.ih-tm-when strong { font-size: 1.05rem; }
.ih-note { font-size: 0.82rem; background: var(--surface-2); border-radius: 8px; padding: 0.5rem 0.75rem; margin: 0.4rem 0; }
.ih-tm-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin: 0.6rem 0 0.7rem; }
.ih-tm-summary { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; font-size: 0.82rem; margin-bottom: 0.6rem; }
.ih-chip { font-size: 0.7rem; padding: 0.12rem 0.5rem; border-radius: 20px; background: var(--surface-2); color: var(--text-muted); white-space: nowrap; }
.ih-chip.ih-changed { background: var(--warning-bg); color: var(--warning); }
.ih-chip.ih-deleted { background: rgba(220, 80, 80, 0.14); color: var(--danger); }
.ih-chip.ih-added   { background: var(--success-bg); color: var(--success); }
.ih-tm-filters { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-bottom: 0.6rem; font-size: 0.82rem; }
.ih-tm-filters label { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; width: auto; font-size: 0.82rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); white-space: nowrap; }
.ih-tm-filters input[type=checkbox] { width: auto; height: auto; margin: 0; flex: none; }
.ih-tm-filters input[type=search] { flex: 1; min-width: 12rem; font-size: 0.82rem; padding: 0.3rem 0.6rem; }
.ih-tm-group { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 0.8rem 0 0.3rem; }
.ih-tm-row { border: 1px solid var(--border); border-left-width: 3px; border-radius: 8px; padding: 0.5rem 0.7rem; margin-bottom: 0.4rem; }
.ih-tm-row.ih-changed { border-left-color: var(--warning); }
.ih-tm-row.ih-deleted { border-left-color: var(--danger); }
.ih-tm-row.ih-added   { border-left-color: var(--success); }
.ih-tm-title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.86rem; }
.ih-tm-title a { color: var(--text); font-weight: 600; text-decoration: none; }
.ih-tm-title a:hover { color: var(--accent); }
.ih-tm-vals { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: baseline; font-size: 0.8rem; margin-top: 0.2rem; }
.ih-then { color: var(--text-muted); }
.ih-nowv { font-weight: 600; }
.ih-tm-actions { margin-top: 0.35rem; }
.ih-tm-actions .btn-ghost { font-size: 0.74rem; padding: 0.15rem 0.55rem; }
.ih-empty { color: var(--text-muted); font-size: 0.85rem; text-align: center; padding: 1.5rem 0.5rem; }
@media (max-width: 600px) {
  .ih-field { min-width: 0; width: 100%; }
  .ih-tm-nav { flex-wrap: wrap; }
  .ih-tm-slider { order: -1; flex-basis: 100%; }
}

/* Symbole LaTeX d'un paramètre de l'instrument (texSymbolHtml) */
.instr-sym { display: inline-block; white-space: nowrap; font-size: 1.02em; color: var(--text); text-transform: none; letter-spacing: normal; }
.instr-sym .katex { font-size: 1.08em; }
code.instr-sym { font-size: 0.8em; background: var(--surface-2); padding: 0 0.3em; border-radius: 4px; }
.instr-sym-bad { color: var(--danger); }
.instr-sym-col { width: 1%; white-space: nowrap; text-align: center; }
.instr-sym-head { font-weight: 400; margin-left: 0.35rem; text-transform: none; }
.instr-sym-field { display: flex; align-items: center; gap: 0.75rem; }
.instr-sym-field .form-input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; }
.instr-sym-preview { min-width: 3rem; text-align: center; font-size: 1.3rem; }
.ih-tm-title .instr-sym { margin-left: 0.1rem; }

/* ── Paramètres : identifiant, formule, valeur avec marge, verrou ─────────── */
.instr-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.instr-form-3 { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 0.6rem; align-items: end; }
.instr-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; }
.instr-field-msg { font-size: 0.74rem; color: var(--text-muted); margin: 0.25rem 0 0; }
.instr-field-msg.ok { color: var(--success); }
.instr-field-msg.bad, .instr-fx-result .bad { color: var(--danger); }
.instr-sug { background: none; border: 1px solid var(--border); border-radius: 5px; padding: 0.05rem 0.4rem; margin-left: 0.3rem;
  font-size: 0.72rem; color: var(--accent); cursor: pointer; font-family: ui-monospace, Menlo, Consolas, monospace; }
.instr-formula-help { margin-top: 0.35rem; }
.instr-fx-vars { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.instr-fx-var { display: inline-flex; align-items: baseline; gap: 0.35rem; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.15rem 0.45rem; font-size: 0.74rem; color: var(--text); cursor: pointer;
  font-family: ui-monospace, Menlo, Consolas, monospace; }
.instr-fx-var span { color: var(--text-muted); font-family: inherit; }
.instr-fx-var:hover { border-color: var(--accent); }
.instr-fx-var.off { cursor: default; opacity: 0.7; font-family: inherit; }
.instr-fx-result { font-size: 0.82rem; margin: 0.35rem 0 0; }
.instr-value-box { border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; margin: 0; }
.instr-value-box input:disabled { opacity: 0.75; cursor: not-allowed; }
.instr-value-result { font-size: 0.8rem; color: var(--text-muted); margin: 0.55rem 0 0; }
.instr-value-result strong { color: var(--text); font-size: 0.92rem; }
.instr-more summary { cursor: pointer; font-size: 0.8rem; color: var(--text-muted); }
.instr-more summary:hover { color: var(--text); }
.instr-ref { display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.75rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); border-radius: 4px; padding: 0.02rem 0.35rem;
  margin-right: 0.35rem; white-space: nowrap; letter-spacing: 0; text-transform: none; }
.instr-ref-big { font-size: 0.8rem; padding: 0.12rem 0.5rem; }
.instr-ref-none { color: var(--text-muted); font-size: 0.75rem; }
.instr-ref-cell { white-space: nowrap; }
.instr-flag { margin-left: 0.35rem; font-size: 0.78rem; }
/* Étoile « priorité actuelle » (couleur atténuée plutôt qu'opacity, qui
   créerait un contexte d'empilement au-dessus de l'arbre en largeur étroite) */
.instr-star { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; vertical-align: middle; width: 1.2rem; margin-right: 0.2rem; padding: 0; border: 0; background: none; font-size: 0.95rem; line-height: 1;
  color: color-mix(in srgb, var(--text-muted) 40%, transparent); cursor: pointer; vertical-align: -1px; }
span.instr-star { cursor: default; }
.instr-req-table-row:hover .instr-star, .instr-star:focus-visible { color: var(--text-muted); }
.instr-star.on, .instr-req-table-row:hover .instr-star.on, .instr-star:hover { color: #f59e0b; }
.instr-star-filter.active { background: color-mix(in srgb, #f59e0b 22%, transparent); border-color: #f59e0b; color: var(--text); }
.instr-star-filter span { color: #f59e0b; }
.instr-star-pill { font-size: 0.72rem; padding: 0.15rem 0.6rem; border-radius: 20px; border: 1px dashed var(--border); background: none; color: var(--text-muted); cursor: pointer; font-family: inherit; }
span.instr-star-pill { cursor: default; }
.instr-star-pill.on { border: 1px solid #f59e0b; background: color-mix(in srgb, #f59e0b 18%, transparent); color: var(--text); font-weight: 600; }
.instr-star-pill:hover { border-color: #f59e0b; color: var(--text); }
@media (hover: none) { .instr-star { color: var(--text-muted); } }
.instr-flag-alert { color: #f59e0b; }
.instr-fx { font-style: italic; font-family: Georgia, serif; color: var(--accent); font-weight: 700; }
.instr-val-cell { white-space: nowrap; font-size: 0.84rem; }
.instr-val-cell small { display: block; color: var(--text-muted); font-size: 0.75rem; }
.instr-pick-val { margin-left: auto; color: var(--text-muted); font-size: 0.74rem; white-space: nowrap; padding-left: 0.5rem; }
.instr-lock-banner, .instr-alert-banner { border-radius: 8px; padding: 0.55rem 0.8rem; font-size: 0.82rem; margin-bottom: 0.75rem; }
.instr-lock-banner { background: var(--surface-2); border: 1px solid var(--border); }
.instr-alert-banner { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.45); }
.instr-alert-banner ul { margin: 0.35rem 0 0.45rem; padding-left: 1.1rem; }
.instr-alert-banner .btn-ghost { font-size: 0.74rem; padding: 0.15rem 0.6rem; }
.instr-value-card { border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.9rem; margin-bottom: 0.8rem; background: var(--surface-2); }
.instr-value-main { font-size: 1.25rem; }
.instr-value-parts { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; font-size: 0.82rem; margin-top: 0.3rem; }
.instr-k { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.35rem; }
.instr-formula-show { margin-top: 0.4rem; font-size: 0.82rem; overflow-wrap: anywhere; }
.instr-formula-show code { font-size: 0.82rem; }
.instr-explain { margin-top: 0.55rem; font-size: 0.82rem; }
.instr-explain .fx-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.2rem; margin-top: 0.25rem; line-height: 1.25; }
.fx-term { display: inline-flex; flex-direction: column; align-items: center; background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 6px; padding: 0.1rem 0.35rem; font: inherit; color: var(--text); cursor: pointer; }
.fx-term:hover, .fx-term:focus-visible { border-color: var(--accent); }
.fx-term .fx-val { font-weight: 600; white-space: nowrap; }
.fx-term .fx-ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.66rem; color: var(--text-muted); white-space: nowrap; }
.fx-term.missing { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 45%, transparent); border-style: dashed; }
.fx-term.missing .fx-val { color: var(--danger); }
.fx-op { padding: 0 0.15rem; color: var(--text-muted); }
.fx-const { font-style: italic; font-family: Georgia, serif; cursor: help; }
.fx-fn { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.78rem; }
.fx-eq { padding: 0 0.3rem 0 0.4rem; color: var(--text-muted); }
.fx-wait { color: var(--danger); }
.fx-note { color: var(--text-muted); }
.instr-explain sup { font-size: 0.7em; }
.instr-block { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 10px; padding: 0.6rem 0.85rem; margin-bottom: 0.8rem; font-size: 0.82rem; }
.instr-block-lead { margin: 0.2rem 0 0.35rem; color: var(--text-muted); font-size: 0.8rem; }
.instr-block-list { list-style: none; margin: 0 0 0.4rem; padding: 0; display: grid; gap: 0.1rem; }
.instr-block-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.4rem; }
.instr-block-list button { background: none; border: 0; padding: 0.1rem 0.2rem; border-radius: 6px; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.instr-block-list button:hover, .instr-block-list button:focus-visible { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.instr-block-list small { color: var(--text-muted); font-size: 0.72rem; }
.instr-block-more summary { cursor: pointer; color: var(--text-muted); font-size: 0.78rem; }
/* Dépend de / alimente */
.instr-deps:empty { display: none; }
.instr-deps { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1.2rem; margin-bottom: 0.8rem; font-size: 0.82rem; }
@media (max-width: 640px) { .instr-deps { grid-template-columns: 1fr; } }
.instr-dep-side { min-width: 0; }
.instr-dep-list { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.05rem; }
.instr-dep-list li { display: flex; align-items: center; gap: 0.3rem; min-width: 0; }
.instr-dep-list button { display: flex; align-items: baseline; gap: 0.35rem; min-width: 0; flex: 1; background: none; border: 0; padding: 0.15rem 0.25rem;
  border-radius: 6px; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.instr-dep-list button:hover, .instr-dep-list button:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.instr-dep-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; align-self: center; }
.instr-dep-list .instr-ref { margin-right: 0; flex: none; }
.instr-dep-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.instr-dep-val { margin-left: auto; padding-left: 0.4rem; color: var(--text-muted); white-space: nowrap; flex: none; }
.instr-dep-tag { font-size: 0.66rem; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 10px; padding: 0 0.35rem; cursor: help; }
.instr-dep-none { margin: 0.25rem 0 0; color: var(--text-muted); }
.instr-dep-more summary, .instr-dep-further summary { cursor: pointer; color: var(--text-muted); font-size: 0.76rem; margin-top: 0.2rem; }
.instr-dep-level { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-top: 0.4rem; }
/* Impact avant d'enregistrer */
.instr-impact { margin: 0 1.25rem; padding: 0.55rem 0.8rem; border: 1px solid rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.08);
  border-radius: 8px; font-size: 0.8rem; max-height: 30vh; overflow: auto; }
.instr-impact p { margin: 0; }
.instr-imp-lead { margin-bottom: 0.3rem !important; }
.instr-imp-h { margin-top: 0.4rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.instr-impact ul { list-style: none; margin: 0.15rem 0 0; padding: 0; display: grid; gap: 0.1rem; }
.instr-impact li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.4rem; }
.instr-imp-title { min-width: 0; }
.instr-imp-val { margin-left: auto; white-space: nowrap; }
.instr-imp-pct { color: var(--text-muted); }
.instr-imp-err { color: var(--danger); }
.instr-imp-none { color: var(--text); }
.instr-rel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.8rem; font-size: 0.83rem; margin-bottom: 0.8rem; }
.instr-rel-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.instr-rel-link:hover { text-decoration: underline; }
.instr-rel-val { color: var(--text-muted); font-weight: 400; }
.instr-comment { font-size: 0.85rem; margin-bottom: 0.8rem; }
.instr-comment p { margin: 0.2rem 0 0; white-space: pre-wrap; }
@media (max-width: 600px) {
  .instr-form-2, .instr-form-3 { grid-template-columns: 1fr; }
}

/* ── Paramètres : taskforces responsables, chaîne de décision ─────────────── */
.instr-tf-pick { display: flex; flex-wrap: wrap; gap: 0.35rem; max-height: 9.5rem; overflow-y: auto; }
.instr-tf-filter { flex: 1 1 100%; font-size: 0.82rem; padding: 0.3rem 0.6rem; position: sticky; top: 0; z-index: 1; }
.instr-tf { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.22rem 0.7rem;
  font-size: 0.78rem; color: var(--text-muted); cursor: pointer; font-family: inherit; }
.instr-tf:hover { border-color: var(--accent); color: var(--text); }
.instr-tf.on { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: var(--accent); color: var(--text); font-weight: 600; }
.instr-tf-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.instr-tf-link:hover { text-decoration: underline; }
.instr-why { border: 1px solid rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.08); border-radius: 8px; padding: 0.5rem 0.75rem; margin-bottom: 0.8rem; }
.instr-why-btn, .gp-why { background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; font-size: 0.82rem; font-weight: 600; color: #d97706; }
.instr-why-body { margin-top: 0.5rem; }

.ic-muted { color: var(--text-muted); font-size: 0.78rem; margin: 0.1rem 0; }
.ic-chain + .ic-chain { margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px dashed var(--border); }
.ic-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 0 0 0.35rem; }
.ic-steps { list-style: none; margin: 0; padding: 0; }
.ic-step { position: relative; display: flex; gap: 0.6rem; padding-bottom: 0.7rem; }
.ic-step:not(:last-child)::before { content: ''; position: absolute; left: 0.68rem; top: 1.45rem; bottom: 0.1rem; width: 2px; background: var(--border); }
.ic-dot { flex: none; width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }
.ic-origin .ic-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.ic-last .ic-dot { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.ic-body { min-width: 0; flex: 1; font-size: 0.83rem; }
.ic-what { line-height: 1.4; }
.ic-open { color: var(--text); text-decoration: none; font-weight: 600; }
.ic-open:hover { color: var(--accent); }
.ic-when { color: var(--text-muted); font-size: 0.74rem; }
.ic-changes { list-style: none; margin: 0.25rem 0 0; padding: 0; font-size: 0.78rem; }
.ic-changes li { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: baseline; }
.ic-field { color: var(--text-muted); min-width: 6.5rem; }
.ic-from { text-decoration: line-through; color: var(--text-muted); overflow-wrap: anywhere; }
.ic-to { font-weight: 600; overflow-wrap: anywhere; }

.gp-params-count { font-weight: 400; letter-spacing: 0; text-transform: none; }
.gp-params-flag { display: inline-block; margin-left: 0.3rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: rgba(245, 158, 11, 0.15);
  color: #d97706; font-weight: 700; font-size: 0.68rem; letter-spacing: 0; text-transform: none; }
.gp-params-head { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0.6rem 0 0.35rem; }
.gp-params-head:first-child { margin-top: 0; }
.gp-param { border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.7rem; margin-bottom: 0.4rem; }
.gp-param.tbc { border-left: 3px solid #f59e0b; }
.gp-param-line { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.gp-param-name { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.86rem; flex: 1; min-width: 10rem; }
.gp-param-name:hover { color: var(--accent); }
.gp-param-val { font-size: 0.84rem; font-weight: 600; white-space: nowrap; }
.gp-param-st { font-size: 0.7rem; padding: 0.12rem 0.55rem; border-radius: 20px; white-space: nowrap; }
.gp-param-path { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }
.gp-param-notprio { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }

/* Revue des priorités d'une taskforce (param-review.js) */
.pr-dialog { margin: auto; width: min(760px, calc(100vw - 2rem)); max-width: none; height: min(88vh, 900px); max-height: none; padding: 0; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); overflow: hidden; }
.pr-dialog[open] { display: flex; flex-direction: column; }
.pr-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.pr-head { padding: 0.75rem 1rem 0.6rem; border-bottom: 1px solid var(--border); }
.pr-head-line { display: flex; align-items: center; gap: 0.6rem; }
.pr-title { flex: 1; min-width: 0; font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-count { font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; }
.pr-close { border: 0; background: none; color: var(--text-muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0.15rem 0.35rem; }
.pr-close:hover { color: var(--text); }
.pr-bar { height: 4px; margin-top: 0.5rem; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.pr-bar span { display: block; height: 100%; background: #f59e0b; transition: width 0.2s; }
.pr-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem; -webkit-overflow-scrolling: touch; }
.pr-name { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.35rem; overflow-wrap: anywhere; text-transform: none; letter-spacing: 0; color: var(--text); }
.pr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.74rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.pr-pill { padding: 0.12rem 0.55rem; border-radius: 20px; font-size: 0.72rem; }
.pr-section { margin-bottom: 0.85rem; font-size: 0.84rem; }
.pr-section p { margin: 0.2rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pr-section ul { list-style: none; margin: 0.25rem 0 0; padding: 0; }
.pr-section li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.15rem 0.45rem; padding: 0.15rem 0; }
.pr-section li a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.pr-section li a:hover { color: var(--accent); }
.pr-section small { color: var(--text-muted); }
.instr-local:empty { display: none; }
.instr-local { margin-bottom: 0.8rem; }
.instr-local-chart { overflow-x: auto; margin-top: 0.3rem; }
.pr-local-hint { display: block; margin-top: 0.2rem; color: var(--text-muted); font-size: 0.72rem; }
.pr-more { display: inline-block; font-size: 0.8rem; color: var(--accent); }
.pr-foot { justify-content: space-between; display: flex; gap: 0.5rem; padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
.pr-foot button { min-height: 44px; font-family: inherit; }
.pr-nav { flex: none; width: 44px; border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--text); font-size: 1.1rem; cursor: pointer; }
.pr-nav:disabled { opacity: 0.35; cursor: default; }
.pr-choice { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--text); font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.pr-choice:hover { border-color: var(--text-muted); }
.pr-choice[aria-pressed="true"] { background: var(--surface-2); border-color: var(--text-muted); }
.pr-choice.pr-yes:hover { border-color: #f59e0b; }
.pr-choice.pr-yes[aria-pressed="true"] { background: color-mix(in srgb, #f59e0b 22%, transparent); border-color: #f59e0b; }
.pr-edit { margin-left: auto; }
.pr-form { display: grid; gap: 0.7rem; margin-top: 0.6rem; }
.pr-f { min-width: 0; }
.pr-f label { display: block; font-size: 0.74rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.pr-f small { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; }
.pr-f small[hidden] { display: none; }
.pr-f-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; }
.pr-f-more { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.pr-f-more summary { cursor: pointer; color: var(--text); }
.pr-f-more small { display: block; margin-top: 0.3rem; color: var(--warning, #f59e0b); }
.pr-f-more small[hidden] { display: none; }
.pr-f-more textarea, .pr-f-more input[type="file"] { margin-top: 0.4rem; }
.pr-impact { margin: 0.8rem 0 0; }
.pr-f-error { color: var(--danger); font-size: 0.84rem; margin: 0.7rem 0 0; }
.pr-f-error[hidden] { display: none; }
.pr-keys { font-size: 0.72rem; color: var(--text-muted); text-align: center; padding-bottom: 0.45rem; }
@media (hover: none), (max-width: 640px) { .pr-keys { display: none; } }
@media (max-width: 640px) {
  .pr-dialog { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  /* 16 px : en dessous, iOS zoome sur le champ à chaque saisie */
  .pr-form input, .pr-form select, .pr-form textarea { font-size: 16px; }
  .pr-f-row > :nth-child(3):last-child { grid-column: 1 / -1; }
}
.gp-why { margin-top: 0.35rem; font-size: 0.78rem; }
.gp-why-body { margin-top: 0.5rem; }

/* Sens de la marge : réduit (capacité) ou augmente (besoin) la valeur */
.instr-mdir { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; margin-top: 0.6rem; font-size: 0.8rem; color: var(--text-muted); }
.instr-mdir label { display: inline-flex; align-items: center; gap: 0.3rem; margin: 0; width: auto; font-size: 0.8rem; font-weight: 400;
  text-transform: none; letter-spacing: 0; color: var(--text); cursor: pointer; }
.instr-mdir input[type=radio] { width: auto; height: auto; margin: 0; flex: none; }
.instr-mdir small { color: var(--text-muted); font-size: 0.72rem; }

/* ── Formulaire d'un paramètre : grande fenêtre, deux colonnes, 4 étapes ──── */
.mmodal-box.instr-form-box { max-width: 1120px; width: 96vw; max-height: 94vh; }
.instr-form-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.6rem; align-items: start; }
.instr-form-col { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.instr-form-sec { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.instr-form-sec h4 { display: flex; align-items: center; gap: 0.5rem; margin: 0; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border);
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); }
.instr-form-sec h4 > span { display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 0.7rem; letter-spacing: 0; }
.instr-form-sec h4 small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-muted); font-size: 0.74rem; }
.instr-form-box .instr-pick-list { max-height: 13rem; }
.instr-form-box .instr-form-3 { grid-template-columns: 1.4fr 0.8fr 1.2fr; }
@media (max-width: 860px) {
  .instr-form-body { grid-template-columns: 1fr; gap: 1.1rem; }
}

.instr-code { width: 5.5rem; flex: none; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.76rem; padding: 0.15rem 0.4rem; text-transform: uppercase; }
.instr-code.bad { border-color: var(--danger); }

/* ID rempli automatiquement : le champ s'éclaire un instant */
@keyframes instr-flash { 0% { background: color-mix(in srgb, var(--success) 35%, transparent); } 100% { background: transparent; } }
.instr-flash { animation: instr-flash 1.6s ease-out; border-color: var(--success); }
.instr-codes { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.4rem; padding: 0.55rem 0.7rem; border: 1px dashed var(--border); border-radius: 8px; }
.instr-code-field { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; width: auto; font-size: 0.76rem; font-weight: 400;
  text-transform: none; letter-spacing: 0; color: var(--text-muted); }
.instr-code-field .instr-code { width: 7rem; }
.instr-codes[hidden] { display: none; }

/* Fiche d'un paramètre : boutons sur une ligne, à leur taille — Delete à
   gauche, à l'écart ; les actions ; Close à droite */
#instr-detail-modal .mmodal-footer { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
#instr-detail-modal .mmodal-footer > button { width: auto; flex: none; padding: 0.4rem 0.9rem; font-size: 0.84rem; }
#instr-detail-modal .mmodal-footer > [data-close] { order: 10; }
#instr-detail-modal #instr-detail-delete-btn { order: -1; margin-right: auto; }

/* Statut d'un paramètre : quatre tuiles colorées */
.instr-status-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
.instr-st { display: flex; align-items: center; gap: 0.6rem; text-align: left; padding: 0.55rem 0.7rem; border-radius: 10px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-family: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s; }
.instr-st:hover:not(:disabled) { border-color: var(--st); }
.instr-st:active:not(:disabled) { transform: scale(0.98); }
.instr-st.on { border-color: var(--st); background: color-mix(in srgb, var(--st) 16%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 22%, transparent); }
.instr-st:disabled { opacity: 0.35; cursor: not-allowed; }
.instr-st-icon { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; color: var(--st); background: color-mix(in srgb, var(--st) 15%, transparent); border: 1.5px solid var(--st); }
.instr-st.on .instr-st-icon { background: var(--st); color: #fff; }
.instr-st-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.instr-st-text strong { font-size: 0.84rem; }
.instr-st-text small { font-size: 0.72rem; color: var(--text-muted); }
@media (max-width: 420px) { .instr-status-tiles { grid-template-columns: 1fr; } }
#instr-req-verif-status[hidden] { display: none; }

/* ── Barres de progression : transcription, brouillon IA (meeting.js) ────── */
.prog { margin: 0.35rem 0 0.2rem; }
.prog-track { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.prog-fill { height: 100%; width: 0; border-radius: 999px; transition: width 0.9s linear;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7dd3fc));
  background-size: 200% 100%; animation: prog-shine 2.4s linear infinite; }
@keyframes prog-shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.prog-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; margin-top: 0.35rem; font-size: 0.8rem; }
.prog-label { font-weight: 600; color: var(--text); }
.prog-pct { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.prog-left { color: var(--text-muted); margin-left: auto; }
.prog-note { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; }
@media (prefers-reduced-motion: reduce) { .prog-fill { animation: none; transition: none; } }

/* Brouillon IA en cours, vu hors de l'onglet Minutes (meeting.js, paintAiStatus) */
.mp-tab.ai-busy { position: relative; }
.mp-tab.ai-busy::after { content: ''; position: absolute; top: 0.45rem; right: 0.15rem; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: ai-pulse 1.4s ease-in-out infinite; }
@keyframes ai-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }
.rec-ai { margin-top: 0.6rem; padding: 0.6rem 0.8rem; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, transparent); font-size: 0.84rem; }
.rec-ai-line { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.rec-ai-line > span { flex: 1; min-width: 12rem; }
.rec-ai-go { font-size: 0.76rem; padding: 0.2rem 0.6rem; }
@media (prefers-reduced-motion: reduce) { .mp-tab.ai-busy::after { animation: none; } }

/* ── Unités : suggestions à la frappe (units.js) ─────────────────────────── */
.unit-field { position: relative; }
.unit-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: 22rem;
  margin: 0; padding: 0.25rem; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); max-height: 16rem; overflow-y: auto; }
.unit-list[hidden] { display: none; }
.unit-list li { display: grid; grid-template-columns: 5.5rem 1fr; column-gap: 0.6rem; align-items: baseline; padding: 0.3rem 0.5rem;
  border-radius: 6px; cursor: pointer; font-size: 0.8rem; }
.unit-list li:hover, .unit-list li.sel { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.unit-sym { font-weight: 700; color: var(--text); font-family: ui-monospace, Menlo, Consolas, monospace; }
.unit-name { color: var(--text); }
.unit-q { grid-column: 2; color: var(--text-muted); font-size: 0.72rem; }
.instr-field-msg.warn, .instr-fx-result .warn { color: #d97706; }
.instr-unit-ok { color: var(--success); font-size: 0.76rem; }
@media (max-width: 600px) {
  .instr-form-box .instr-form-3 { grid-template-columns: 1fr; }
  .unit-list { max-width: calc(100vw - 3rem); }
}

/* Preuve de vérification (passage en « Passed ») */
.instr-evidence { margin-top: 0.6rem; padding: 0.65rem 0.75rem; border-radius: 8px; border: 1px solid color-mix(in srgb, #22c55e 45%, var(--border));
  background: color-mix(in srgb, #22c55e 7%, transparent); display: flex; flex-direction: column; gap: 0.45rem; }
.instr-evidence[hidden] { display: none; }
.instr-evidence-file { font-size: 0.78rem; }
.instr-evidence-missing { font-size: 0.82rem; color: #d97706; margin: 0; }
.instr-evidence-old { font-size: 0.68rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: rgba(245, 158, 11, 0.15); color: #d97706; white-space: nowrap; }

/* ── Branding kit : logos ─────────────────────────────────────────────────────
   Galerie de vignettes ; un clic ouvre le logo en grand (choix du format).
   Fond des aperçus au choix : clair, sombre, ou damier (transparence). */
.bk-count { font-weight: 500; color: var(--text-muted); margin-left: 0.2rem; }
.bk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.bk-search { flex: 1 1 14rem; max-width: 22rem; }
#bkAddBtn { margin-left: auto; }
/* .btn-primary impose display: l'attribut hidden doit primer (membres) */
.bk-toolbar [hidden], .bk-nav[hidden], #bk-logos[hidden], #bk-templates[hidden] { display: none !important; }
.bk-group-title { font-size: 0.85rem; letter-spacing: 0.08em; color: var(--text-muted); margin: 1.4rem 0 0.6rem; }
.bk-group-title:first-child { margin-top: 0; }
.bk-group-title span { font-weight: 500; margin-left: 0.3rem; }
.bk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.8rem; }
.bk-tile { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.55rem; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; color: inherit; font: inherit;
  transition: border-color 0.15s, transform 0.15s; }
.bk-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.bk-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bk-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 7px; padding: 0.8rem; overflow: hidden; }
/* L'image remplit la vignette, marges comprises, sans jamais être rognée */
.bk-thumb img { position: absolute; inset: 0.8rem; width: calc(100% - 1.6rem); height: calc(100% - 1.6rem); object-fit: contain; display: block; }
.bk-name { font-weight: 600; font-size: 0.88rem; line-height: 1.3; overflow-wrap: anywhere; }
.bk-nothumb { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; color: #4f6d8f; text-align: center; }
.bk-nothumb-lg { font-weight: 500; letter-spacing: 0; padding: 2rem; }
[data-bg="light"]   { background: #ffffff; }
[data-bg="dark"]    { background: #1b2433; }
[data-bg="checker"] { background: repeating-conic-gradient(#d6dbe1 0 25%, #f2f4f7 0 50%) 0 0 / 16px 16px; }
[data-bg="dark"] .bk-nothumb { color: #c4d2e0; }

/* Vue agrandie */
.bk-viewer-box { max-width: 1040px; }
.bk-viewer-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; overflow-y: auto; }
.bk-stage-col { display: flex; flex-direction: column; min-width: 0; }
.bk-stage { position: relative; display: grid; place-items: center; min-height: 360px; padding: 2rem 3rem; flex: 1; }
/* Fond de ce seul logo, sous l'aperçu */
.bk-stage-bg { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; padding: 0.55rem 1rem; border-top: 1px solid var(--border); }
.bk-stage-bg-label { font-size: 0.75rem; color: var(--text-muted); margin-right: 0.3rem; }
.bk-stage-bg button { border: 1px solid var(--border); background: none; color: var(--text-muted); font: inherit; font-size: 0.78rem;
  padding: 0.25rem 0.65rem; min-height: 28px; border-radius: 6px; cursor: pointer; }
.bk-stage-bg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); font-weight: 600; border-color: var(--accent); }
.bk-stage-img { display: grid; place-items: center; width: 100%; height: 100%; }
.bk-stage-img img { max-width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.bk-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.bk-nav:hover { border-color: var(--accent); }
.bk-prev { left: 0.6rem; }
.bk-next { right: 0.6rem; }
.bk-side { padding: 1rem 1.25rem; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.5rem; }
.bk-cat { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 0; }
.bk-desc { font-size: 0.86rem; margin: 0; }
.bk-dl-title { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 0.4rem 0 0; }
.bk-dl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.bk-dl-list li { display: flex; align-items: stretch; gap: 0.3rem; }
.bk-dl { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; padding: 0.5rem 0.75rem; border: 1px solid var(--border);
  border-radius: 7px; text-decoration: none; color: inherit; background: var(--surface-2); }
.bk-dl:hover { border-color: var(--accent); }
.bk-dl-fmt { font-weight: 700; font-size: 0.9rem; color: var(--accent-text); }
.bk-dl-fmt::before { content: '↓ '; }
.bk-dl-meta { font-size: 0.75rem; color: var(--text-muted); }
.bk-file-del { border: 1px solid transparent; background: none; color: var(--text-muted); border-radius: 6px; cursor: pointer; padding: 0 0.6rem; }
.bk-file-del:hover { color: var(--danger); border-color: var(--danger); }
.bk-admin { margin-top: 0.6rem; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.bk-admin summary { cursor: pointer; font-weight: 600; font-size: 0.86rem; }
.bk-admin .form-input { width: 100%; }
.bk-opt { text-transform: none; letter-spacing: 0; font-weight: 400; }
.bk-admin-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.bk-danger { color: var(--danger); }

/* Ajout groupé */
.bk-up-intro { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.bk-up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.bk-up-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.6rem; align-items: center; }
.bk-up-fmts { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.bk-up-theme { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; }
.bk-up-theme-label { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.bk-up-theme .bk-theme-sel { flex: 1; max-width: 20rem; padding-top: 0.25rem; padding-bottom: 0.25rem; }
.bk-up-list li + li { border-top: 1px solid var(--border); padding-top: 0.45rem; }
.bk-up-state { grid-column: 1 / -1; font-size: 0.76rem; color: var(--text-muted); }
.bk-up-state:empty { display: none; }
.bk-up-err { color: var(--danger); }

/* Figures : mêmes vignettes que le Branding kit, plus larges (axes, légendes) */
.fig-gallery { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.fig-tile-meta { font-size: 0.76rem; color: var(--text-muted); overflow-wrap: anywhere; }
.fig-count { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
.fig-desc { white-space: pre-line; }
.fig-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 0.75rem; margin: 0.3rem 0 0; font-size: 0.84rem; }
.fig-facts dt { color: var(--text-muted); }
.fig-facts dd { margin: 0; overflow-wrap: anywhere; }
.fig-facts a { color: var(--accent-text); }
.fig-missing { color: var(--text-muted); font-style: italic; }
.fig-usage { font-weight: 600; }
.fig-usage[data-usage="internal"] { color: var(--danger); }
.fig-archive-n { font-weight: 500; color: var(--text-muted); margin-left: 0.2rem; }
.fig-archive-title { font-size: 0.8rem; font-weight: 600; margin: 0.7rem 0 0.3rem; }
.fig-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.fig-form-row > div { min-width: 0; }
.fig-form .form-input { width: 100%; box-sizing: border-box; }
.fig-form-files { font-size: 0.78rem; color: var(--text-muted); margin: 0.3rem 0 0; }
.fig-form-files:empty { display: none; }

@media (max-width: 760px) {
  .fig-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .fig-form-row { grid-template-columns: 1fr; }
  .bk-viewer-body { grid-template-columns: 1fr; }
  .bk-side { border-left: none; border-top: 1px solid var(--border); }
  .bk-stage { min-height: 220px; padding: 1.25rem 2.6rem; }
  .bk-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  #bkAddBtn { margin-left: 0; }
}

/* ── Branding kit › Templates : modèles LaTeX ── */
.ltx-box { margin-top: 1.6rem; }
.ltx-title { font-size: 0.9rem; letter-spacing: 0.08em; color: var(--text); margin: 0 0 0.7rem; }
.ltx-title span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-muted); margin-left: 0.4rem; font-size: 0.82rem; }
.ltx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.8rem; }
.ltx-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem 0.75rem; align-items: start; padding: 0.9rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.ltx-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.ltx-text small { color: var(--text-muted); font-size: 0.8rem; }
.ltx-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ltx-actions .btn-primary, .ltx-actions .btn-ghost { font-size: 0.8rem; padding: 0.35rem 0.75rem; text-decoration: none; }

/* ── Versions d'un projet LaTeX (latex-versions.js) ── */
.lxv-box { max-width: 980px; }
.lxv-body { gap: 1rem; }
.lxv-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.9rem; }
.lxv-save, .lxv-card { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.9rem 1rem; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); }
.lxv-side { display: flex; flex-direction: column; gap: 0.9rem; }
.lxv-tools h4, .lxv-list-title { margin: 0; font-size: 0.85rem; }
.lxv-list-title span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-muted); margin-left: 0.3rem; }
.lxv-help { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.lxv-save label, .lxv-card label { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; font-size: 0.75rem; }
.lxv-save input, .lxv-save select, .lxv-card select { width: 100%; }
.lxv-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.lxv-row > label { flex: 1 1 12rem; }
.lxv-save .btn-primary, .lxv-card .btn-primary, .lxv-card .btn-ghost { align-self: flex-start; }
.lxv-opt { text-transform: none; letter-spacing: 0; font-weight: 400; }
.lxv-other[hidden] { display: none; }
.lxv-job { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.9rem; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); font-size: 0.86rem; }
.lxv-job[hidden] { display: none; }
.lxv-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent;
  animation: lxvSpin 0.8s linear infinite; flex-shrink: 0; }
@keyframes lxvSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lxv-spin { animation: none; } }
.lxv-list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.lxv-item { padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--surface); }
.lxv-item.lxv-arxiv { border-left-color: var(--success); }
.lxv-item.lxv-diff { border-left-color: var(--warning); }
.lxv-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; }
.lxv-kind { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.lxv-meta { font-size: 0.78rem; color: var(--text-muted); }
.lxv-note { margin: 0.3rem 0 0; font-size: 0.84rem; }
.lxv-where { margin: 0.3rem 0 0; font-size: 0.78rem; color: var(--text-muted); }
.lxv-where code { font-size: 0.76rem; overflow-wrap: anywhere; }
.lxv-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.lxv-actions .btn-ghost { font-size: 0.78rem; padding: 0.25rem 0.65rem; text-decoration: none; }
.lxv-report { margin-top: 0.5rem; padding: 0.55rem 0.75rem; border-radius: 8px; font-size: 0.82rem; }
.lxv-report.ok { background: var(--success-bg); }
.lxv-report.ko { background: var(--warning-bg); }
.lxv-verdict { margin: 0 0 0.3rem; font-weight: 600; }
.lxv-report summary { cursor: pointer; }
.lxv-report ul { margin: 0.3rem 0 0 1.1rem; padding: 0; }
.lxv-report code { font-size: 0.78rem; }
.lxv-err { color: var(--danger); font-weight: 700; }
.lxv-warn { color: var(--warning); font-weight: 700; }
.lxv-latexerr { margin-top: 0.45rem; padding: 0.5rem 0.75rem; border-radius: 8px; background: var(--warning-bg); font-size: 0.82rem; }
.lxv-latexerr p { margin: 0; }
.lxv-latexerr ul { margin: 0.3rem 0 0 1.1rem; padding: 0; }
.lxv-latexerr code { font-size: 0.78rem; white-space: normal; overflow-wrap: anywhere; }
.lxv-report .lxv-latexerr { padding: 0; background: none; }
@media (max-width: 760px) { .lxv-tools { grid-template-columns: 1fr; } }

/* ── Projet de publication : un dossier d'étapes (latex-publication.js) ── */
.lx-icon-pub { background: var(--accent); color: #fff; }
.lx-name-btn { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; max-width: 100%; font-family: inherit; }
.lxp-folder { display: inline-flex; vertical-align: -0.2em; margin-right: 0.45rem; color: var(--accent); }
.lxp-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.6rem 1rem; }
.lxp-head .lxv-help { flex: 1 1 22rem; }
.lxp-head .btn-ghost { text-decoration: none; font-size: 0.8rem; }
.lxp-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.lxp-stage { padding: 0.75rem 0.95rem; border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; background: var(--surface); }
.lxp-stage.current { border-left-color: var(--accent); }
.lxp-stage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; }
/* Retirer une étape : action rare et sans retour, signalée au survol. */
.lxp-del:hover { border-color: var(--danger); color: var(--danger); }
.lxp-num { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.3rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; background: var(--surface-2); color: var(--text); }
.lxp-stage.current .lxp-num { background: var(--accent); color: #fff; }
.lxp-path { font-size: 0.76rem; color: var(--text-muted); overflow-wrap: anywhere; }
.lxp-badge { font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--accent-bg, var(--surface-2)); color: var(--accent); }
.lxp-stage > .lxv-actions { align-items: center; gap: 0.4rem; }
/* Une ligne de commandes de même hauteur : boutons, liste, libellé centrés */
.lxp-stage > .lxv-actions > .btn-primary, .lxp-stage > .lxv-actions > .btn-ghost, .lxp-changes .btn-ghost, .lxp-changes select {
  box-sizing: border-box; height: 2rem; margin: 0; font-size: 0.8rem; line-height: 1; white-space: nowrap; }
.lxp-stage > .lxv-actions > .btn-primary, .lxp-stage > .lxv-actions > .btn-ghost, .lxp-changes .btn-ghost {
  display: inline-flex; align-items: center; padding: 0 0.85rem; }
.lxp-stage > .lxv-actions > .btn-primary { letter-spacing: 0.05em; }
.lxp-changes { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 0.4rem; margin-left: 0.5rem; }
.lxp-changes label { margin: 0; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); white-space: nowrap;
  text-transform: none; letter-spacing: 0; }
.lxp-changes select { width: auto; max-width: 14rem; padding: 0 2rem 0 0.7rem; }
.lxp-out { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.3rem 0.8rem; margin: 0.6rem 0 0; font-size: 0.8rem; }
.lxp-out dt { font-weight: 600; color: var(--text-muted); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; padding-top: 0.15rem; }
.lxp-out dd { margin: 0; }
.lxv-actions.lxp-inline { display: inline-flex; margin: 0 0 0 0.4rem; vertical-align: middle; }
.lxp-change { display: block; }
.lxp-older { margin-top: 0.25rem; }
.lxp-older summary { cursor: pointer; color: var(--text-muted); }
.lxp-older ul { margin: 0.25rem 0 0 1rem; padding: 0; }
.lxp-next { margin-top: 0.2rem; }
.lxp-gen { margin: 0.35rem 0 0; }
.lxp-hl[hidden], .lxp-copy[hidden] { display: none; }
.lxp-conv { align-items: flex-end; }
.lxp-check { flex-direction: row !important; align-items: center; justify-content: flex-start; gap: 0.4rem !important;
  font-size: 0.85rem !important; text-transform: none; letter-spacing: 0; }
.lxp-check input { width: auto !important; flex: none; margin: 0; }
.lxp-check code, .lxp-path { text-transform: none; letter-spacing: 0; }
@media (max-width: 640px) {
  .lxp-out { grid-template-columns: 1fr; }
  .lxp-changes { flex-wrap: wrap; margin-left: 0; }
}

/* ── Ordre du jour dans les formulaires de réunion (agenda-editor.js) ── */
.agx-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.35rem; }
.agx { display: flex; flex-direction: column; gap: 0.45rem; }
.agx-help { margin: 0; font-size: 0.75rem; color: var(--text-muted); }
.agx-list { margin: 0; padding: 0; list-style: none; counter-reset: agx; display: flex; flex-direction: column; gap: 0.3rem; }
.agx-item { counter-increment: agx; display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.4rem 0.55rem;
  border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 7px; background: var(--surface); }
.agx-item::before { content: counter(agx) "."; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); min-width: 1.2rem; padding-top: 0.05rem; }
.agx-item.done { border-left-color: var(--success); }
.agx-item.postponed { border-left-color: var(--warning); }
.agx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.agx-title { font-size: 0.86rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.agx-meta { font-size: 0.74rem; color: var(--text-muted); }
.agx-detail { font-size: 0.78rem; color: var(--text-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.agx-btns { display: flex; gap: 0.2rem; flex-shrink: 0; }
.agx-btn { min-width: 1.75rem; height: 1.75rem; padding: 0 0.35rem; border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--text-muted); font-size: 0.8rem; cursor: pointer; }
.agx-btn:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.agx-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.agx-btn:disabled { opacity: 0.35; cursor: default; }
.agx-form { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.55rem; border: 1px dashed var(--border); border-radius: 8px; }
.agx-row { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }
/* .agx devant : les formulaires hôtes (.form-field input) imposent width: 100% */
.agx .agx-f-title { flex: 1 1 14rem; min-width: 0; width: auto; }
.agx .agx-f-dur { flex: 0 0 5.5rem; width: 5.5rem; }
.agx-owner { position: relative; flex: 0 1 12rem; min-width: 9rem; }
.agx .agx-owner .agx-f-owner { width: 100%; }
.agx .agx-f-detail { width: 100%; box-sizing: border-box; resize: vertical; }
.agx-owner-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 300; margin: 0; padding: 0.3rem 0; list-style: none;
  max-height: 200px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.agx-owner-list li { padding: 0.4rem 0.75rem; font-size: 0.85rem; color: var(--text); cursor: pointer; }
.agx-owner-list li:hover { background: var(--surface-2); }
.agx-owner-list li.agx-none { color: var(--text-muted); cursor: default; }
.mcard-agenda { text-decoration: none; }
.mcard-agenda:hover { color: var(--text); border-color: var(--accent); }
@media (max-width: 600px) {
  .agx-item { flex-wrap: wrap; }
  .agx-btns { width: 100%; justify-content: flex-end; }
  .agx-btn { min-width: 2.25rem; height: 2.25rem; }
  .agx-owner { flex: 1 1 100%; }
}


/* ─── Choisir qui porte une action (assignee-pick.js) ────────────────────────
   Des puces pour ce qui est choisi, une liste filtrable en dessous. */
.apk { display: flex; flex-direction: column; gap: 0.4rem; }
.apk[hidden] { display: none; }
.apk-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; min-height: 1.6rem; align-items: center; }
.apk-empty { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }
.apk-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: var(--accent-fill); color: #fff; border-radius: 20px;
  padding: 0.12rem 0.3rem 0.12rem 0.6rem; font-size: 0.78rem;
}
.apk-x {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0 0.25rem; border-radius: 50%;
}
.apk-x:hover { background: rgba(0, 0, 0, 0.25); }
.apk-search { font-size: 0.82rem; padding: 0.3rem 0.6rem; }
.apk-list {
  max-height: 180px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface);
}
.apk-row {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
  padding: 0.3rem 0.6rem; font-size: 0.82rem; color: var(--text);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
.apk-row:last-child { border-bottom: 0; }
.apk-row:hover, .apk-row:focus { background: var(--surface-2); outline: none; }
.apk-row:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.apk-row.on { color: var(--accent); font-weight: 600; }
.apk-box {
  width: 15px; height: 15px; flex: 0 0 15px; border-radius: 4px;
  border: 1px solid var(--border); display: inline-flex;
  align-items: center; justify-content: center; font-size: 0.7rem;
}
.apk-row.on .apk-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.apk-hint { margin-left: auto; font-size: 0.74rem; color: var(--text-muted); }
.apk-none { margin: 0; padding: 0.5rem 0.6rem; font-size: 0.8rem; color: var(--text-muted); }

/* ─── Nommer les intervenants d'une transcription ────────────────────────── */
.spk-list { display: flex; flex-direction: column; gap: 0.7rem; margin: 0.4rem 0 0.8rem; }
.spk-row {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.55rem 0.7rem; background: var(--surface);
}
.spk-id { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.spk-id strong { font-size: 0.86rem; letter-spacing: 0.02em; }
.spk-meta { font-size: 0.76rem; color: var(--text-muted); }
.spk-sample { margin: 0.3rem 0 0.45rem; font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.spk-sample q { display: block; margin-bottom: 0.15rem; }
.spk-line { display: flex; align-items: flex-start; gap: 0.45rem; margin-bottom: 0.2rem; }
.spk-line q { flex: 1; min-width: 0; }
.spk-play {
  flex: none; font-size: 0.74rem; padding: 0.1rem 0.45rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg, transparent); color: var(--text); font-variant-numeric: tabular-nums;
}
.spk-play:hover, .spk-play:focus-visible { border-color: var(--accent); color: var(--accent); }
.spk-row.playing { border-color: var(--accent); }
.spk-box { max-width: 620px; width: 95%; }
.spk-box.with-player { max-width: 980px; }
/* Collé en haut de la fenêtre qui défile, marge haute comprise : sinon le
   texte qui passe dessous reste visible au-dessus du lecteur */
.spk-player { position: sticky; top: -1rem; margin-top: -1rem; padding: 1rem 0 0.5rem; z-index: 1; background: var(--surface); }
.spk-media { display: block; width: 100%; max-height: 40vh; border-radius: 8px; background: #000; }
audio.spk-media { background: none; }
.spk-now { margin: 0.3rem 0 0; font-size: 0.78rem; color: var(--text-muted); }
/* À côté du texte sur grand écran, au-dessus sur téléphone */
@media (min-width: 820px) {
  .with-player .spk-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem; align-items: start; }
  .with-player .spk-player { order: 2; top: -1rem; }
  .with-player .spk-media { max-height: 60vh; }
}
.spk-sample q::before { content: '“'; }
.spk-sample q::after  { content: '”'; }
.spk-pick { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.spk-pick select, .spk-pick input { font-size: 0.82rem; padding: 0.25rem 0.5rem; flex: 1 1 12rem; min-width: 0; }
.spk-again { display: flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; color: var(--text-muted); }


/* ─── Dossiers de My space ───────────────────────────────────────────────── */
.ms-folders { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.2rem 0 0.9rem; }
.ms-folder {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); border-radius: 20px; padding: 0.22rem 0.75rem;
  font-size: 0.82rem; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ms-folder:hover { border-color: var(--text-muted); }
.ms-folder.active { background: var(--accent-fill); border-color: var(--accent); color: #fff; }
.ms-folder.drop { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, transparent); }
.ms-folder-n { font-size: 0.74rem; opacity: 0.75; font-variant-numeric: tabular-nums; }
.ms-folder-act { padding: 0 0.1rem; opacity: 0.8; }
.ms-folder-act:hover { opacity: 1; }
.ms-folder-new { border-style: dashed; color: var(--text-muted); }
.md-row[draggable="true"] { cursor: grab; }
.md-row[draggable="true"]:active { cursor: grabbing; }


/* ─── Casier d'une taskforce (page du groupe) ────────────────────────────── */
.gp-files-desc { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 0.6rem; line-height: 1.5; }
/* Le gestionnaire de fichiers de My space (.fm), à la taille d'une carte */
.fm.gp-fm { min-height: 300px; margin-top: 0; grid-template-columns: minmax(160px, 210px) 1fr; }
.gp-fm .fm-table-wrap { max-height: 520px; }
/* La carte est plus étroite que l'écran : on suit sa largeur, pas celle de la fenêtre */
.gp-files-wrap { container-type: inline-size; }
@container (max-width: 640px) {
  .fm.gp-fm { grid-template-columns: 1fr; }
  .gp-fm .fm-tree { border-right: 0; border-bottom: 1px solid var(--border); max-height: 200px; }
  .gp-fm .fm-c-size { display: none; }
}
@container (max-width: 440px) {
  .gp-fm .fm-c-date { display: none; }
}
.gp-empty { font-size: 0.85rem; color: var(--text-muted); margin: 0.3rem 0; }


/* ─── My space : gestionnaire de fichiers (myspace.js) ───────────────────── */
.fm {
  display: grid; grid-template-columns: minmax(190px, 240px) 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  min-height: 420px; margin-top: 0.6rem;
  overflow: clip;     /* pas « hidden » : la barre de sélection, collante, doit suivre la page */
}
.fm-tree {
  /* un <nav> : la barre du portail stylise les nav en ligne, on rétablit la colonne */
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start;
  height: auto; position: static; z-index: auto; gap: 1px;
  border-right: 1px solid var(--border); padding: 0.5rem 0.35rem; overflow-y: auto;
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}
.fm-node {
  display: flex; align-items: center; gap: 0.3rem; cursor: pointer; user-select: none;
  padding: 0.28rem 0.45rem 0.28rem calc(0.45rem + var(--d, 0) * 0.95rem);
  border-radius: 6px; font-size: 0.84rem; color: var(--text);
}
.fm-node:hover { background: var(--surface-2); }
.fm-node.active { background: var(--accent-fill); color: #fff; }
.fm-node:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fm-tw, .fm-tw-sp { width: 0.9rem; flex: 0 0 0.9rem; text-align: center; font-size: 0.7rem; color: var(--text-muted); transition: transform 0.12s; }
.fm-tw.open { transform: rotate(90deg); }
.fm-node.active .fm-tw { color: #fff; }
.fm-ni { width: 1.1rem; text-align: center; flex: 0 0 auto; display: inline-flex; justify-content: center; color: var(--text-muted); }
.fm-node.active .fm-ni { color: inherit; }
.fm-svg { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.fm-folder-ico { display: inline-flex; justify-content: center; color: var(--accent); }
.fm-folder-ico .fm-svg { width: 18px; height: 18px; }
.fm-st .fm-svg { width: 14px; height: 14px; vertical-align: -2px; }
.fm-nl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-nc { font-size: 0.72rem; opacity: 0.7; font-variant-numeric: tabular-nums; }
/* dans une colonne de hauteur bornée, rien ne doit se tasser */
.fm-node, .fm-sep { flex-shrink: 0; }
.fm-sep { line-height: 1.3; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
          margin: 0.7rem 0.5rem 0.25rem; min-height: 1px; border-top: 1px solid transparent; }
.fm-sep:empty { border-top-color: var(--border); margin: 0.5rem 0.4rem; }

.fm-main { display: flex; flex-direction: column; min-width: 0; position: relative; }
.fm-main.fm-dropzone::after {
  content: 'Drop the files here'; position: absolute; inset: 0.4rem; border: 2px dashed var(--accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent);
  font-weight: 600; pointer-events: none; z-index: 2;
}
.fm-top { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.55rem 0.8rem 0.3rem; }
.fm-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem; flex: 1; min-width: 0; }
.fm-crumb {
  background: none; border: 0; padding: 0.15rem 0.35rem; border-radius: 5px; cursor: pointer;
  font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--text);
}
.fm-crumb:hover { background: var(--surface-2); }
.fm-crumb-here { cursor: default; }
.fm-crumb-sep { color: var(--text-muted); font-size: 0.85rem; }
.fm-loc-actions { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.fm-loc-actions .fm-btn { white-space: nowrap; }
.fm-loc-actions { margin-left: auto; }
.fm-hint { font-size: 0.78rem; color: var(--text-muted); }
.fm-btn { font-size: 0.78rem; padding: 0.22rem 0.65rem; }
.fm-danger:hover { border-color: var(--danger); color: var(--danger); }
.fm-tools { display: flex; gap: 0.4rem; align-items: center; padding: 0 0.8rem 0.5rem; }
.fm-filter { flex: 1; font-size: 0.84rem; padding: 0.32rem 0.6rem; min-height: 38px; box-sizing: border-box; }   /* à la hauteur des boutons voisins */
.fm-status { font-size: 0.8rem; color: var(--accent); padding: 0 0.8rem 0.4rem; }

.fm-table-wrap { flex: 1; overflow: auto; border-top: 1px solid var(--border); }
.fm-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.fm-table thead th {
  position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left;
  border-bottom: 1px solid var(--border); padding: 0.3rem 0.45rem; font-weight: 600;
}
.fm-sort { background: none; border: 0; padding: 0; font: inherit; font-size: 0.72rem; text-transform: uppercase;
           letter-spacing: 0.05em; color: var(--text-muted); cursor: pointer; }
.fm-sort:hover { color: var(--text); }
.fm-row td { padding: 0.32rem 0.45rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); vertical-align: middle; }
.fm-row:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.fm-row.sel td { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.fm-row:focus { outline: none; }
.fm-row:focus-visible td { box-shadow: inset 0 0 0 1px var(--accent); }
.fm-row[draggable="true"] { cursor: default; }
.fm-row.fm-drop td, .fm-node.fm-drop, .fm-crumb.fm-drop {
  background: color-mix(in srgb, var(--accent) 22%, transparent) !important; outline: 1px dashed var(--accent);
}
.fm-c-chk { width: 2rem; text-align: center; }
.fm-c-chk input { cursor: pointer; }
.fm-c-date { width: 7.5rem; color: var(--text-muted); white-space: nowrap; }
.fm-c-size { width: 5.5rem; color: var(--text-muted); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.fm-c-st { width: 1%; white-space: nowrap; padding-right: 0.6rem !important; }   /* à la taille de son contenu */
.fm-c-more { width: 2.4rem; text-align: right; }
.fm-c-more .md-more { padding: 0.1rem 0.45rem; border-color: transparent; color: var(--text-muted); }
.fm-c-more .md-more:hover, .fm-c-more .md-more:focus-visible, .fm-c-more .md-more[aria-expanded="true"] { border-color: var(--border); color: var(--text); }
.fm-name-wrap { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.fm-icon { width: 30px !important; height: 22px !important; font-size: 0.58rem !important; flex: 0 0 auto; border-radius: 4px; }
.fm-name-txt { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.45rem; min-width: 0; }
.fm-name { color: var(--text); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
a.fm-name:hover { color: var(--accent); text-decoration: underline; }
.fm-folder-name { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; gap: 0.45rem; align-items: center; color: var(--text); }
.fm-folder-ico { width: 30px; text-align: center; }
.fm-where { font-size: 0.74rem; color: var(--text-muted); }
.fm-st { display: inline-block; font-size: 0.74rem; color: var(--text-muted); margin-right: 0.3rem; }
.fm-st-pub { color: var(--accent); font-weight: 600; }
.fm-empty { color: var(--text-muted); font-size: 0.86rem; padding: 2rem 1rem; text-align: center; margin: 0; }

.fm-select {
  position: sticky; bottom: 0; z-index: 5;   /* toujours à portée, même au bas d'une longue liste */
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  padding: 0.45rem 0.8rem; border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.fm-select[hidden], .fm-status[hidden] { display: none; }
.fm-sel-n { font-size: 0.82rem; font-weight: 600; margin-right: 0.3rem; }
.fm-sel-clear { margin-left: auto; }
.fm-ghost { position: fixed; top: -100px; left: -100px; padding: 0.3rem 0.7rem; border-radius: 6px;
            background: var(--accent-fill); color: #fff; font-size: 0.8rem; }
.fm-undo {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%); z-index: 9000;
  display: flex; gap: 0.8rem; align-items: center; padding: 0.55rem 0.6rem 0.55rem 1rem;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3); font-size: 0.86rem;
}
.fm-undo[hidden] { display: none; }
#fmMain #latex-box { padding: 0.4rem 0.8rem 0.8rem; border-top: 1px solid var(--border); }

@media (max-width: 760px) {
  .fm { grid-template-columns: 1fr; }
  .fm-tree { border-right: 0; border-bottom: 1px solid var(--border); max-height: 220px; }
  .fm-c-date, .fm-c-size { display: none; }
  .fm-c-st { width: auto; }
  .fm-c-st .fm-st + .fm-st { display: none; }        /* la référence du registre attendra l'écran large */
}
@media (max-width: 520px) {
  .fm-c-st { display: none; }                         /* l'état reste dans le menu ⋯ */
  .fm-name-wrap { gap: 0.4rem; }
}
/* Choix d'emplacement et ligne date · taille : téléphone seulement */
.fm-place, .fm-meta-m { display: none; }
@media (max-width: 760px) {
  /* L'arbre empilé repoussait les fichiers sous la ligne de flottaison : un choix natif le remplace */
  #section-myspace .fm-tree { display: none; }      /* pas sur la page d'une taskforce, sans ce choix */
  .fm-place { display: block; flex: 1 1 100%; width: 100%; font-size: 16px; min-height: 44px; }
  #section-myspace .fm-crumbs.fm-crumbs-root { display: none; }
  .fm-meta-m { display: block; flex-basis: 100%; font-size: 0.75rem; color: var(--text-muted); font-weight: 400; margin-top: 0.1rem; }
  .fm-folder .fm-meta-m { padding-left: calc(30px + 0.45rem); }
  #section-myspace .fm { min-height: 0; }
}
@media (max-width: 640px) {
  #section-myspace .ms-intro-more { display: none; }
}
/* Tactile : filtre à 16 px (sinon Safari zoome) ; case à cocher dans une cible de 44 px */
@media (pointer: coarse) {
  .fm-filter { font-size: 16px; }
  .fm-c-chk { width: 44px; padding: 0 !important; }
  .fm-c-chk input { width: 20px; height: 20px; margin: 12px; }
}

/* Projets LaTeX dans le gestionnaire de fichiers */
.fm-icon-tex { background: #4f7a3a; color: #fff; font-family: 'Latin Modern Roman', Georgia, serif; font-style: italic; }
.fm-name-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.fm-name-btn:hover { color: var(--accent); text-decoration: underline; }

/* « Everyone » : l'action s'adresse à toute la collaboration */
.am-everyone-note, .ma-everyone-note { font-size: 0.8rem; color: var(--text-muted); margin: 0.5rem 0 0; line-height: 1.45; }

.fm-st-btn { background: none; border: 1px solid transparent; border-radius: 4px; padding: 0 0.25rem; cursor: pointer; font: inherit; color: var(--text-muted); }
.fm-st-btn:hover { border-color: var(--border); color: var(--accent); }

/* Ses propres soumissions : mises en avant dans les listes de conférences */
.comm-board-group { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0.25rem 0 0.6rem; }
.comm-board-group span { font-weight: 500; margin-left: 0.25rem; }
.comm-board-group ~ .comm-board-group { margin-top: 1.25rem; }
.comm-card.comm-card-mine { border-left: 3px solid var(--accent); }
.comm-mine-badge { font-size: 0.75rem; font-weight: 600; color: var(--accent-text); background: rgba(74,159,212,0.1); border: 1px solid rgba(74,159,212,0.3); border-radius: 12px; padding: 0.05rem 0.5rem; white-space: nowrap; }
.comm-mine-badge.is-turn { color: var(--warning, #b7791f); background: rgba(214,158,46,0.12); border-color: rgba(214,158,46,0.4); }
.conf-row.conf-row-mine { box-shadow: inset 3px 0 0 var(--accent); }

/* Photos d'une présentation de conférence (fiche de soumission) */
.cd-photos-zone { max-height: 340px; }
.cd-photos-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.55rem; }
.cd-zone-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.cd-photos-add { margin-left: auto; font-size: 0.78rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem; }
.cd-photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.45rem; }
.cd-photo { position: relative; margin: 0; }
.cd-photo a { display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.cd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-photo figcaption { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-photo-more { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,0.55); color: #fff; font-size: 0.9rem; line-height: 1; cursor: pointer; }
.cd-photo-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cd-photos-empty { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

/* ── Salle de relecture (review-room.js) ─────────────────────────────────── */
body.rr-open { overflow: hidden; }
.rr-overlay { position: fixed; inset: 0; z-index: 1200; background: var(--bg); display: flex; flex-direction: column; }
.rr-overlay[hidden] { display: none; }
.rr-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.1rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.rr-head-text { flex: 1; min-width: 0; }
.rr-kicker { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.rr-title { margin: 0.1rem 0 0; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-close { border: none; background: none; color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0.2rem 0.5rem; border-radius: 8px; }
.rr-close:hover, .rr-close:focus-visible { background: var(--surface-2); }
.rr-tabs { display: none; gap: 0.25rem; }
.rr-tab { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 20px; padding: 0.25rem 0.7rem; font-size: 0.8rem; cursor: pointer; }
.rr-tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text, #fff); }
.rr-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); }
.rr-reader { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface-2); overflow: auto; }
.rr-side { min-height: 0; overflow: auto; padding: 1rem 1.1rem 2rem; display: flex; flex-direction: column; gap: 0.9rem; background: var(--surface); }
.rr-reader > * { flex-shrink: 0; }
.rr-pdf-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.45rem 0.9rem; font-size: 0.8rem; color: var(--text-muted); background: var(--surface); border-bottom: 1px solid var(--border); }
.rr-pages { flex: 1 0 auto; padding: 0.75rem 0.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.rr-page { position: relative; flex-shrink: 0; min-height: 200px; width: 100%; display: flex; justify-content: center; }
.rr-page canvas { background: #fff; box-shadow: var(--shadow, 0 2px 8px rgba(0,0,0,0.2)); max-width: 100%; }
.rr-page-no { position: absolute; top: 6px; left: 8px; font-size: 0.7rem; color: var(--text-muted); background: var(--surface); border-radius: 10px; padding: 0.05rem 0.45rem; }
.rr-page.rr-flash canvas { outline: 3px solid var(--accent); outline-offset: 2px; transition: outline-color 1.2s; }
.rr-text { padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.rr-card { margin: 1.5rem; padding: 1.1rem 1.25rem; display: flex; gap: 0.9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.rr-card-icon { font-size: 1.6rem; }
.rr-card p { margin: 0.35rem 0 0.7rem; font-size: 0.86rem; color: var(--text-muted); line-height: 1.5; }
.rr-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.rr-url { word-break: break-all; color: var(--text); }
.rr-small { font-size: 0.8rem !important; padding: 0.3rem 0.75rem !important; text-decoration: none; }
.rr-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.4rem; }
.rr-opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-muted); }
.rr-hint { margin: 0; font-size: 0.84rem; color: var(--text-muted); line-height: 1.5; }
.rr-empty { margin: 0; font-size: 0.84rem; color: var(--text-muted); font-style: italic; }
.rr-form { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.rr-form-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.rr-field { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); flex: 1; min-width: 0; }
.rr-field-page { flex: 0 0 70px; }
.rr-field-kind { flex: 0 0 120px; }
.rr-field .form-input { font-size: 0.85rem; font-weight: 400; color: var(--text); }
.rr-form-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.rr-kbd { font-size: 0.7rem; color: var(--text-muted); }
.rr-points { display: flex; flex-direction: column; gap: 0.6rem; }
.rr-point { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; padding: 0.6rem 0.75rem; background: var(--surface); }
.rr-point.rr-k-major { border-left-color: var(--danger); }
.rr-point.rr-k-editorial { border-left-color: var(--text-muted); }
.rr-point-head { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.74rem; color: var(--text-muted); }
.rr-where { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 12px; padding: 0.05rem 0.5rem; font-size: 0.74rem; cursor: pointer; }
.rr-where:disabled { cursor: default; }
.rr-where:not(:disabled):hover { border-color: var(--accent); }
.rr-kind { font-weight: 600; }
.rr-who { margin-left: auto; }
.rr-point-body { font-size: 0.86rem; margin-top: 0.35rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.rr-proposal, .rr-reply { margin-top: 0.4rem; font-size: 0.82rem; padding: 0.35rem 0.55rem; border-radius: 6px; background: var(--surface-2); white-space: pre-wrap; }
.rr-proposal span, .rr-reply span { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.rr-reply.ok { background: var(--success-bg); }
.rr-reply.no { background: var(--danger-bg); }
.rr-reply.warn { background: var(--warning-bg); }
.rr-reply-form { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.rr-reply-form textarea { flex-basis: 100%; font-size: 0.82rem; }
.rr-chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 16px; padding: 0.2rem 0.65rem; font-size: 0.78rem; cursor: pointer; }
.rr-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text, #fff); }
.rr-point-actions { display: flex; gap: 0.35rem; margin-top: 0.45rem; }
.rr-review, .rr-board { border-top: 1px solid var(--border); padding-top: 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.rr-recs { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.rr-review p, .rr-board p { margin: 0; font-size: 0.85rem; }
.rr-summary { white-space: pre-wrap; color: var(--text-muted); }
.rr-board-row { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.84rem; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; }
.rr-board-row span { color: var(--text-muted); font-size: 0.78rem; }
.cd-room-row { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; margin-top: 0.35rem; }
.cd-room-btn { font-size: 0.82rem !important; }
.cd-room-note { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }
@media (max-width: 820px) {
  .rr-tabs { display: flex; }
  .rr-head { flex-wrap: wrap; }
  .rr-head-text { flex-basis: calc(100% - 3rem); }
  .rr-tabs { order: 3; }
  .rr-body { grid-template-columns: 1fr; }
  .rr-body[data-pane="doc"] .rr-side, .rr-body[data-pane="side"] .rr-reader { display: none; }
  .rr-reader { border-right: none; }
}
.rr-danger { color: var(--danger) !important; }
.rr-group { display: flex; flex-direction: column; gap: 0.5rem; padding-bottom: 0.6rem; border-bottom: 1px dashed var(--border); }
.rr-verdict { margin-top: 0.4rem; font-size: 0.78rem; font-weight: 600; }
.rr-verdict.ok { color: var(--success); }
.rr-verdict.no { color: var(--danger); }
.rr-verdict-form { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; font-size: 0.78rem; color: var(--text-muted); }
.rr-pdf-actions { display: flex; gap: 0.4rem; }
.rr-origin { padding: 0.35rem 0.9rem; font-size: 0.75rem; color: var(--text-muted); background: var(--surface); border-bottom: 1px solid var(--border); }
.cd-review-due { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; }
.cd-review-due input { width: auto; font-size: 0.82rem; padding: 0.25rem 0.5rem; }
.cd-review-due span { font-weight: 400; flex-basis: 100%; }
.rr-letter { border-top: 1px solid var(--border); padding-top: 0.8rem; display: flex; flex-direction: column; gap: 0.45rem; }
/* Épingles de la salle de relecture */
.rr-sheet { position: relative; display: inline-block; line-height: 0; }
.rr-sheet canvas { display: block; }
.rr-pinning .rr-sheet { cursor: crosshair; outline: 2px dashed var(--accent); outline-offset: 3px; }
.rr-pin { position: absolute; transform: translate(-50%, -50%); min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; border: 2px solid #fff; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 20px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.45); }
.rr-pin.rr-k-major { background: var(--danger); }
.rr-pin.rr-k-editorial { background: #6b7a8f; }
.rr-pin.rr-pin-new { background: var(--warning); color: #000; }
.rr-pin.rr-flash, .rr-point.rr-flash { animation: rr-pulse 1.2s ease-out 2; }
@keyframes rr-pulse { 0% { box-shadow: 0 0 0 0 var(--accent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.rr-num { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.7rem; font-weight: 700; color: var(--text); }
.rr-num.pinned { background: var(--accent); border-color: var(--accent); color: #fff; }
.rr-pin-btn { align-self: flex-start; }
.rr-pin-btn[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .rr-pin.rr-flash, .rr-point.rr-flash { animation: none; outline: 2px solid var(--accent); } }
.rr-edit { margin-top: 0.4rem; }
/* Passages cités du résumé : sélection → remarque, surlignés avec leur numéro */
.rr-sel-hint { text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--accent); }
.rr-text .ltx-abstract { user-select: text; -webkit-user-select: text; }
.rr-sel-btn { position: fixed; z-index: 1300; border: none; border-radius: 18px; padding: 0.45rem 0.9rem; min-height: 36px;
  background: var(--accent); color: var(--accent-text, #fff); font-size: 0.82rem; font-weight: 600; cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,0.35); }
.rr-sel-btn[hidden] { display: none; }
mark.rr-hl { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-bottom: 2px solid var(--accent); border-radius: 2px; cursor: pointer; padding: 0 1px; }
mark.rr-hl.rr-k-major { background: color-mix(in srgb, var(--danger) 20%, transparent); border-bottom-color: var(--danger); }
mark.rr-hl.rr-k-editorial { background: color-mix(in srgb, var(--text-muted) 18%, transparent); border-bottom-color: var(--text-muted); }
mark.rr-hl[data-num]::after { content: attr(data-num); display: inline-block; margin-left: 2px; padding: 0 4px; border-radius: 8px; background: var(--accent);
  color: #fff; font-size: 0.65rem; font-weight: 700; line-height: 1.4; vertical-align: super; }
mark.rr-hl.rr-k-major[data-num]::after { background: var(--danger); }
mark.rr-hl.rr-k-editorial[data-num]::after { background: #6b7a8f; }
mark.rr-hl.rr-flash { animation: rr-pulse 1.2s ease-out 2; }
.rr-quote { display: block; width: 100%; text-align: left; margin: 0.35rem 0 0.25rem; padding: 0.3rem 0.55rem; border: none; border-left: 3px solid var(--border);
  background: var(--surface-2); color: var(--text-muted); font: inherit; font-size: 0.8rem; font-style: italic; line-height: 1.45; border-radius: 0 6px 6px 0; cursor: pointer; }
.rr-quote:hover { color: var(--text); }
.rr-quote-pending { display: flex; align-items: flex-start; gap: 0.4rem; padding: 0.4rem 0.55rem; border-left: 3px solid var(--accent); background: var(--surface-2);
  border-radius: 0 6px 6px 0; font-size: 0.8rem; font-style: italic; color: var(--text); }
.rr-quote-pending[hidden] { display: none; }
.rr-quote-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rr-quote-x { border: none; background: none; color: var(--text-muted); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; min-width: 28px; min-height: 28px; }
.rr-decide { border-top: 2px solid var(--accent); }

.cd-review-indep { display: flex; align-items: flex-start; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; }
.cd-review-indep span { font-weight: 400; }
.rr-blind { font-style: italic; }

/* ── Bureau des conférences (2026-10) ── */
.cd-material { display: inline-block; font-size: 0.78rem; padding: 0.2rem 0.55rem; border-radius: 6px; line-height: 1.4; }
.cd-material.public { background: var(--success-bg); color: var(--success); }
.cd-material.undisclosed { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.cd-wm-note { font-weight: 400; color: var(--text-muted); font-size: 0.75rem; }
.cd-declare { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.35rem; }
.cd-declare-set { border: 1px solid var(--border); border-radius: 8px; padding: 0.55rem 0.7rem 0.65rem; margin: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.cd-declare-set legend { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); padding: 0 0.3rem; }
.cd-declare-opt { text-transform: none; letter-spacing: normal; margin: 0; font-weight: 400; }
.cd-declare-opt { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.82rem; line-height: 1.45; color: var(--text); cursor: pointer; }
.cd-declare-opt input { width: auto; margin: 0.2rem 0 0; flex-shrink: 0; }
.cd-declare-credit { margin: 0; font-size: 0.76rem; color: var(--text-muted); line-height: 1.45; }
.cd-bureau-decision { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.cd-bureau-decision .btn-ghost { font-size: 0.8rem; padding: 0.3rem 0.75rem; }
.cd-proceedings { margin-top: 0.75rem; padding: 0.7rem 0.85rem; border: 1px dashed var(--border); border-radius: 10px; display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; }
.cd-proceedings p { margin: 0; font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.cd-proceedings .btn-ghost { font-size: 0.8rem; text-decoration: none; }
.cd-private-note { margin: 0.5rem 0; font-size: 0.84rem; color: var(--text-muted); line-height: 1.5; }
.cd-discussion-private { margin-left: auto; font-size: 0.72rem; color: var(--text-muted); }
.cd-discussion-private[hidden] { display: none; }
.cd-skip-abstract { font-size: 0.78rem; align-self: flex-start; color: var(--text-muted); }
.comm-public-state { font-size: 0.7rem; padding: 0.05rem 0.5rem; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }

/* Guidelines des présentations en conférence */
.cg-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.cg-head .btn-ghost { margin-left: auto; }
.cg-stamp { font-size: 0.78rem; color: var(--text-muted); }
.cg-body { max-width: 760px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.4rem 1.4rem 1.2rem; line-height: 1.6; overflow-wrap: anywhere; }
.cg-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.8rem; }
.cg-pane { display: flex; flex-direction: column; gap: 0.35rem; margin: 0; min-width: 0; text-transform: none; letter-spacing: normal; }
.cg-pane-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cg-pane textarea { width: 100%; box-sizing: border-box; min-height: 520px; font-family: ui-monospace, Menlo, monospace; font-size: 0.82rem; line-height: 1.5; resize: vertical; }
.cg-pane .cg-body { max-width: none; min-height: 520px; max-height: 70vh; overflow: auto; }
@media (max-width: 760px) {
  .cg-edit { grid-template-columns: 1fr; }
  .cg-pane textarea, .cg-pane .cg-body { min-height: 300px; }
  .cg-body { padding: 0.2rem 0.9rem 0.9rem; }
}
.link-btn { border: none; background: none; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

/* Recherche des paramètres (toute la charge utile) */
.instr-search { position: relative; max-width: 560px; margin: 0 0 0.75rem; }
.instr-search-icon { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.instr-search input { width: 100%; box-sizing: border-box; padding: 0.5rem 0.75rem 0.5rem 2.1rem; font-size: 0.88rem;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.instr-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
mark.instr-hit { background: color-mix(in srgb, #facc15 45%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ─── Export des paramètres (instr-export.js) ─────────────────────────────── */
.ix-box { max-width: 560px; width: min(560px, 94vw); }
/* Le corps de fenêtre est une colonne flexible de hauteur bornée : sans ceci,
   le résumé rétrécit et passe sous les boutons */
.ix-box .mmodal-body > * { flex-shrink: 0; }
/* Les libellés de formulaire du portail sont en capitales, et ses champs en pleine largeur */
.ix-field label { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); margin: 0; }
.ix-field input[type="radio"] { width: auto; display: inline-block; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.ix-field { border: 0; padding: 0; margin: 0 0 0.85rem; display: flex; flex-direction: column; gap: 0.35rem; }
.ix-field legend { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.35rem; padding: 0; }
.ix-field label { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; font-size: 0.88rem; cursor: pointer; }
.ix-date { width: auto; font-size: 0.84rem; padding: 0.2rem 0.45rem; }
.ix-meta { font-size: 0.84rem; color: var(--text-muted); margin: 0.2rem 0 0.8rem; min-height: 1.2em; }
.ix-meta code, .ix-citation code { font-size: 0.8rem; }
.ix-formats { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.ix-formats .btn-ghost, .ix-formats .btn-primary { font-size: 0.82rem; }
.ix-cite { border: 1px solid var(--border); border-radius: 8px; padding: 0.65rem 0.8rem; background: var(--bg); }
.ix-cite-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.84rem; }
.ix-copy { font-size: 0.75rem; padding: 0.15rem 0.6rem; }
.ix-citation { font-size: 0.82rem; margin: 0.45rem 0; overflow-wrap: anywhere; user-select: all; }
.ix-note { font-size: 0.76rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* ─── Glossaire (glossary.js) : un mot du portail, défini au survol ───────── */
.gl-term { text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
           text-underline-offset: 3px; cursor: help; }
.gl-term:hover, .gl-term:focus-visible { text-decoration-color: var(--accent); color: var(--accent-text); outline: none; }

/* Recherche de la barre du haut, sur toutes les pages. En fin de feuille : elle
   l'emporte sur les réglages de largeur plus haut. */
/* ── Search button (nav trigger) ── */
a.search-trigger { text-decoration: none; }
/* La barre occupe la place libre : même mise en page que dans l'application */
.nav-right { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
.search-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.38rem 1.4rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.82rem;
  /* Élastique plutôt que rigide : 320 px de largeur souhaitée, mais la
     boîte peut se réduire quand la barre manque de place. Un min-width
     fixe la bloquait, poussant les icônes hors de l'écran entre 769 et
     950 px — largeur d'une fenêtre de portable ou d'une tablette. */
  flex: 0 1 320px;
  min-width: 0;
  overflow: hidden;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.search-trigger:hover { border-color: var(--accent); color: var(--text); }
.search-trigger .search-kbd {
  font-size: 0.68rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  margin-left: 0.25rem;
}
/* Seuil propre à la recherche, distinct de celui de la mise en page : même
   réduite au minimum de son contenu (~149 px), la boîte laissait la barre
   déborder entre 769 et 790 px. La replier en icône dès 820 px couvre cette
   bande sans toucher au comportement du volet latéral, réglé à 768. */
@media (max-width: 820px) {
  .search-trigger span, .search-trigger .search-kbd { display: none; }
  .search-trigger {
    flex: 0 0 auto;
    min-width: 0;
    width: 38px;
    padding: 0.38rem;
    justify-content: center;
  }
}

/* ── Composants communs ─────────────────────────────────────────────────────
   Une seule apparence pour chaque composant, quelle que soit la page. Les
   feuilles et les blocs de page ne gardent que leur mise en page propre. */

/* En-tête de page : titre et phrase d'explication */
.sec-title, .gp-title, .meeting-page-title, .page-title, .section-title,
.req-page-title-block h2, .page-title-block h1 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.ds-intro, .gp-desc, .req-page-title-block p, .page-title-block p {
  margin: 0 0 1rem;
  max-width: 70ch;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.gp-desc, .req-page-title-block p, .page-title-block p { margin-bottom: 0; }
@media (max-width: 640px) {
  .sec-title, .gp-title, .meeting-page-title, .page-title, .section-title,
  .req-page-title-block h2, .page-title-block h1 { font-size: 1.3rem; }
}

/* L'attribut hidden gagne toujours : ces composants fixent leur propre display */
.btn-ghost[hidden], .btn-primary[hidden], .status-badge[hidden], .instr-badge[hidden], .poll-status[hidden],
.dec-chip[hidden], .ih-chip[hidden], .od-vis-badge[hidden], .req-badge[hidden], .badge[hidden],
.badge-pending[hidden], .tp-badge[hidden], .gcard-badge[hidden], .wiki-cat-badge[hidden] { display: none; }

/* Pages annexes sur téléphone : le logo ramène au portail, la barre tient sur une ligne */
.app-logo-link { flex-shrink: 0; }
@media (max-width: 560px) {
  .nav-right > .nav-back { display: none; }
}

/* Onglets : défilent au doigt sur téléphone, sans barre de défilement */
.tab-bar, .ds-tabs, .medit-tabs, .ih-tm-tabs, .gp-tabs, .mp-tabs { scrollbar-width: none; }
.tab-bar::-webkit-scrollbar, .ds-tabs::-webkit-scrollbar, .medit-tabs::-webkit-scrollbar,
.ih-tm-tabs::-webkit-scrollbar, .gp-tabs::-webkit-scrollbar, .mp-tabs::-webkit-scrollbar { display: none; }

.tab-btn, .ds-tab, .medit-tab, .ih-tab, .gp-tab, .mp-tab {
  flex: 0 0 auto;
  margin-bottom: -1px;
  padding: 0.55rem 0.9rem;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover, .ds-tab:hover, .medit-tab:hover, .ih-tab:hover, .gp-tab:hover, .mp-tab:hover { color: var(--text); }
.tab-btn.active, .ds-tab.active, .medit-tab.active, .mp-tab.active, .ih-tab.on, .gp-tab[aria-selected="true"] {
  color: var(--accent-text);
  border-bottom-color: var(--accent);
}

/* Pastilles de statut : la forme ici, la couleur reste à chaque variante */
.status-badge, .instr-badge, .poll-status, .dec-chip, .ih-chip, .od-vis-badge,
.req-badge, .badge, .badge-pending, .tp-badge, .gcard-badge, .wiki-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

/* État vide d'une section : titre, explication, lien vers le guide */
.empty-block { max-width: 60ch; padding: 1.25rem 0; }
.empty-block-title { margin: 0 0 0.25rem; font-size: 1rem; font-weight: 600; color: var(--text); }
.empty-block-text { margin: 0 0 0.4rem; font-size: 0.9rem; line-height: 1.5; color: var(--text-muted); }
.empty-block a { font-size: 0.88rem; color: var(--accent-text); }
td > .empty-block { margin: 0 auto; padding: 2.25rem 1rem; text-align: center; }
@media (pointer: coarse) { .empty-block a { display: inline-flex; align-items: center; min-height: 44px; } }

/* Accueil : ce qui attend une réponse, en tête */
.home-title { margin: 0 0 0.6rem; font-size: 1.1rem; font-weight: 700; }
.home-clear { margin: 0 0 2rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); font-size: 0.9rem; color: var(--text-muted); }

/* Repère d'une taskforce : tuile colorée, icône ou initiales */
.tf-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.5rem; height: 2.5rem;
  border-radius: 10px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0;
  background: color-mix(in srgb, var(--c) 24%, transparent); color: color-mix(in srgb, var(--c) 70%, var(--text)); }
.tf-icon svg { width: 1.4rem; height: 1.4rem; }
.gp-title .tf-icon { margin-right: 0.6rem; vertical-align: -0.35rem; }

/* Choix de l'icône d'une taskforce (formulaire New / Edit Taskforce) */
.tf-pick { margin-top: 0.35rem; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.tf-pick-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.tf-pick-name { flex: 1 1 8rem; min-width: 0; font-size: 0.87rem; color: var(--text); }
.tf-pick-name small { display: block; color: var(--text-muted); font-size: 0.76rem; }
.tf-pick-head input { flex: 1 1 10rem; max-width: 16rem; margin: 0; }
.tf-pick-list { max-height: 15rem; overflow-y: auto; padding: 0.25rem 0.6rem 0.6rem; overscroll-behavior: contain; }
.tf-pick-cat { margin: 0.55rem 0 0.3rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.tf-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.75rem, 1fr)); gap: 0.3rem; }
.tf-pick-btn { position: relative; display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0.1rem;
  border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; }
.tf-pick-btn:hover { border-color: var(--border); }
.tf-pick-btn[aria-pressed="true"] { border-color: var(--accent); }
.tf-pick-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.tf-pick-btn.is-auto-used::after { content: ''; position: absolute; top: 0.2rem; right: 0.2rem; width: 0.4rem; height: 0.4rem;
  border-radius: 50%; background: var(--text-muted); }
.tf-pick-auto { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); }
.tf-pick-empty { margin: 0.75rem 0; font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 640px) { .gcard-head > div:first-of-type { flex: 1 1 calc(100% - 3.5rem) !important; } }

/* ══════════════════════════════════════════════════════
   VOLET DE GAUCHE (menu des sections)
   Un seul composant pour l'application (app.html) et les pages annexes
   (taskforce, thème, réunion : construit par nav-shell.js). Comportement :
   sidebar.js. Sorti d'app.html le 2026-11-18 pour que les deux soient
   identiques.
   ══════════════════════════════════════════════════════ */
/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w, 232px);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0.75rem;
  /* Reste à l'écran quand on fait défiler la page. Sans align-self, le
     flex-container l'étire sur toute la hauteur et sticky n'a plus de jeu ;
     le décalage l'arrête sous la barre de navigation, elle-même sticky
     (cf. style.css), au lieu de la laisser passer dessous. --nav-h suit la
     hauteur réelle de la barre (le logo est configurable) — cf. theme-init.js. */
  position: sticky;
  top: var(--nav-h, 62px);
  align-self: flex-start;
  height: calc(100vh - var(--nav-h, 62px));
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  transition: width 0.22s ease, padding 0.22s ease;
}

/* Largeur du volet déplié : 232 px, à toutes les tailles d'écran. C'est ce
   que demandent le plus long libellé (« Conferences », qui finit à 178 px
   du bord) et un badge de non-lus à sa droite ; à 290 px, plus de 100 px
   restaient vides. */
:root { --sidebar-w: 232px; }

/* Volet replié (ordinateur) : un rail d'icônes, le menu reste à portée. Le
   libellé reste dans le bouton pour les lecteurs d'écran (taille nulle) et
   revient en infobulle ; un badge devient une pastille. */
@media (min-width: 769px) {
  html.sidebar-collapsed .sidebar { width: 64px; padding-left: 0.5rem; padding-right: 0.5rem; }
  html.sidebar-collapsed .nav-group-title,
  html.sidebar-collapsed .nav-external-icon { display: none; }
  html.sidebar-collapsed .nav-group + .nav-group {
    margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border);
  }
  html.sidebar-collapsed .section-nav { width: 100%; padding-left: 0; padding-right: 0; align-items: stretch; }
  html.sidebar-collapsed .section-btn {
    position: relative; justify-content: center; gap: 0; padding: 0.45rem 0; font-size: 0;
  }
  html.sidebar-collapsed .section-btn .chat-nav-badge,
  html.sidebar-collapsed .section-btn .badge-pending,
  html.sidebar-collapsed .section-btn .nav-new-badge {
    position: absolute; top: 4px; right: 6px; width: 9px; min-width: 9px; height: 9px; padding: 0; font-size: 0;
  }
}

/* Poignées de repli/dépliage + verrou */
.sidebar-handle-group {
  position: fixed;
  top: 50%;
  left: var(--sidebar-w, 232px);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 60;
  transition: left 0.22s ease;
}
.sidebar-handle {
  width: 24px;              /* 24 px : cible minimale WCAG 2.5.8 */
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0.7;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: opacity 0.15s, color 0.15s, background 0.15s, border-color 0.15s;
}
.sidebar-handle:hover {
  opacity: 1;
  color: var(--accent);
  background: var(--surface-2);
  border-color: var(--accent);
}
#sidebarHandle svg { transition: transform 0.22s ease; }
html.sidebar-collapsed .sidebar-handle-group { left: 64px; }
html.sidebar-collapsed #sidebarHandle svg { transform: rotate(180deg); }

/* Verrou : empêche le repli automatique au changement de section */
.sidebar-pin { height: 26px; }
.sidebar-pin .icon-locked { display: none; }
html.sidebar-locked .sidebar-pin {
  opacity: 1;
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(74,159,212,0.12);
}
html.sidebar-locked .sidebar-pin .icon-locked   { display: block; }
html.sidebar-locked .sidebar-pin .icon-unlocked { display: none; }

/* ── Navigation sidebar (sections) ── */
.section-nav {
  display: flex;
  flex-direction: column;
  width: fit-content;
  gap: 0.15rem;
}
/* Blocs du menu : un petit titre discret, un peu d'air entre eux */
.nav-group { display: flex; flex-direction: column; gap: 0.15rem; align-self: stretch; }
.nav-group + .nav-group { margin-top: 0.85rem; }
.nav-group[hidden] { display: none; }
.nav-group-title {
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.2rem 0.85rem 0.25rem;
}
.section-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.85rem;
  background: none;
  border: none;
  border-radius: 7px;
  color: var(--text-muted);
  font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.section-btn:hover { color: var(--text); background: var(--surface-2); }
.section-btn.active {
  color: var(--accent-text);
  background: rgba(74,159,212,0.12);
}
.section-btn svg { flex-shrink: 0; opacity: 0.7; }
a.section-btn { text-decoration: none; line-height: normal; }
.section-btn .nav-external-icon { margin-left: auto; opacity: 0.5; }
.section-btn.active svg { opacity: 1; }

.chat-nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger-fill);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.chat-nav-badge[hidden] { display: none; }

@media (max-width: 768px) {
  /* Volet hors de l'écran, il glisse à l'ouverture (bouton ☰) */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: calc(-1 * var(--sidebar-w)) !important;
    height: 100% !important;
    z-index: 9999 !important;
    transition: left 0.25s ease;
    width: var(--sidebar-w);
    padding-top: 4.5rem;
    overflow-y: auto;
  }
  /* Le repli desktop ne s'applique pas en mobile (hamburger + backdrop) */
  html.sidebar-collapsed .sidebar {
    width: var(--sidebar-w);
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .sidebar-handle-group { display: none; }
}

/* Pages annexes : pas de .app-layout, le volet est fixé à gauche sous la
   barre du haut et la page lui laisse sa largeur */
@media (min-width: 769px) {
  /* align-self : celui du volet de l'application (flex-start) s'applique aussi
     à un élément fixe dans les navigateurs récents et annule top/bottom */
  body.has-sidebar .sidebar { position: fixed; left: 0; top: var(--nav-h, 62px); bottom: 0; height: auto; align-self: auto; z-index: 40; }
  body.has-sidebar { padding-left: var(--sidebar-w); transition: padding-left 0.22s ease; }
  html.sidebar-collapsed body.has-sidebar { padding-left: 64px; }
  body.has-sidebar > nav { margin-left: calc(-1 * var(--sidebar-w)); transition: margin-left 0.22s ease; }
  html.sidebar-collapsed body.has-sidebar > nav { margin-left: -64px; }
}
@media print { .sidebar, .sidebar-handle-group { display: none !important; } body.has-sidebar { padding-left: 0 !important; } }


/* ─── Bulle de présence (utilisateurs connectés) ─────────────────────── */
#presenceWidget { position: relative; flex-shrink: 0; }
/* L'ID l'emporte sur [hidden] de la feuille UA : il faut le réaffirmer. */
#presenceWidget[hidden] { display: none; }
#presenceBubble {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.55rem; border-radius: 6px;
  background: none; color: var(--text-muted);
  border: 1px solid var(--border); cursor: pointer;
  font-size: 0.85rem; font-weight: 600; line-height: 1;
}
#presenceBubble:hover { color: var(--text); border-color: var(--text-muted); }
#presenceBubble .presence-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); flex: none;
}
#presencePanel {
  position: absolute; top: calc(100% + 0.5rem); right: 0; z-index: 1000;
  width: 240px; max-height: 320px; overflow-y: auto;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.22);
}
.presence-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border);
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted);
}
#presenceClose {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-size: 1.1rem; line-height: 1; padding: 0 0.15rem;
}
#presenceClose:hover { color: var(--text); }
#presenceList { list-style: none; margin: 0; padding: 0.3rem 0; }
#presenceList li {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.35rem 0.75rem; font-size: 0.85rem;
}
#presenceList .presence-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  object-fit: cover; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
}
#presenceList .presence-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#presenceList .presence-empty {
  color: var(--text-muted); font-style: italic; justify-content: center;
}
@media (max-width: 640px) {
  #presencePanel { width: 210px; }
}
@media print { #presenceWidget { display: none !important; } }

/* Action qui mène à ce qu'elle concerne (minutes, réunion, document…) */
.action-link { color: inherit; text-decoration: none; }
.action-link::after { content: " ↗"; color: var(--accent); font-weight: 400; }
.action-link:hover, .action-link:focus-visible { color: var(--accent); text-decoration: underline; }

/* Actions : intitulé qui ouvre la discussion, bouton « 💬 Discuss » et son
   compteur, intitulé verrouillé pour qui ne l'a pas confié */
.action-title-btn { border: none; background: none; padding: 0; margin: 0; font: inherit; color: inherit;
  text-align: left; cursor: pointer; }
.action-title-btn:hover, .action-title-btn:focus-visible { color: var(--accent); text-decoration: underline; }
.action-discuss { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.3rem; }
.action-discuss-n { background: var(--accent-fill); color: #fff; border-radius: 999px; padding: 0 0.4rem;
  font-size: 0.72rem; font-weight: 700; line-height: 1.4; }
.mmodal-box textarea#am-description.is-locked { background: var(--surface-2); color: var(--text-muted); cursor: default; border-style: dashed; }
.am-reword-note, .ae-reword-note { font-size: 0.8rem; color: var(--text-muted); margin: 0.4rem 0 0; line-height: 1.45; }
.form-input.is-locked { background: var(--surface-2); color: var(--text-muted); }
.action-discuss-link { display: inline-block; margin-top: 0.3rem; font-size: 0.8rem; color: var(--accent); text-decoration: none; }
.action-discuss-link:hover { text-decoration: underline; }
/* Détails d'une action : aperçu sous l'intitulé (deux lignes), texte entier
   dans le volet de discussion et sur la page de la réunion */
.action-details-peek { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  border: none; background: none; padding: 0; margin: 0.2rem 0 0; font: inherit; font-size: 0.8rem; font-weight: 400;
  color: var(--text-muted); text-align: left; cursor: pointer; white-space: pre-line; width: 100%; }
.action-details-peek:hover, .action-details-peek:focus-visible { color: var(--text); }
.drawer-action-details { margin: 0.5rem 0 0.6rem; font-size: 0.85rem; line-height: 1.5; color: var(--text);
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 35vh; overflow-y: auto;
  padding: 0.5rem 0.65rem; border-left: 3px solid var(--border); background: var(--surface-2); border-radius: 4px; }
.action-details { margin-top: 0.25rem; font-size: 0.82rem; color: var(--text-muted); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.mmodal-box textarea#am-details.is-locked, .action-editor textarea.is-locked { background: var(--surface-2); color: var(--text-muted); cursor: default; border-style: dashed; }

/* ── Mentions @Prénom Nom (mentions-ui.js) ─────────────────────────────────
   Une personne, pas du texte : en gras, sur une teinte de l'accent, et un clic
   ouvre son menu (profil, message). */
.mention { display: inline; margin: 0; padding: 0 0.22em; border: 0; border-radius: 4px; font: inherit; font-weight: 650;
  line-height: inherit; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 14%, transparent);
  cursor: pointer; white-space: nowrap; vertical-align: baseline; }
.mention:hover, .mention[aria-expanded="true"] { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.mention:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Sur une bulle à fond d'accent (ses propres messages) */
.chat-msg.mine .mention, .gpc-msg.mine .mention { color: #fff; background: rgba(255,255,255,0.2); }
.mention-pop { position: absolute; z-index: 10050; min-width: 13rem; max-width: min(20rem, calc(100vw - 16px)); padding: 0.35rem;
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.3); }
.mention-pop-head { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.4rem 0.6rem 0.5rem; margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--border); }
.mention-pop-head strong { font-size: 0.92rem; color: var(--text); }
.mention-pop-head span { font-size: 0.78rem; color: var(--text-muted); }
.mention-pop > [role="menuitem"] { display: block; padding: 0.55rem 0.6rem; min-height: 2.5rem; box-sizing: border-box; border: 0; border-radius: 6px;
  background: none; color: var(--text); font: inherit; font-size: 0.88rem; text-align: left; text-decoration: none; cursor: pointer; }
.mention-pop > [role="menuitem"]:hover, .mention-pop > [role="menuitem"]:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); outline: none; }

/* Heure locale d'un membre (public/local-time.js) */
.local-time { font-variant-numeric: tabular-nums; }
.local-time-diff, .local-time-none { color: var(--text-muted); font-size: 0.85em; }
.member-local-time { white-space: nowrap; }

/* Bouton qui ouvre une ligne ou une carte (paramètre, soumission) : il porte
   le nom de l'élément, pour qu'on l'ouvre au clavier ; son clic remonte au
   gestionnaire de la ligne. À l'œil, il reste le texte qu'il remplace. */
.row-open { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 24px; }
/* Mêmes 24 px pour les autres libellés devenus boutons */
.th-sort, .presrepo-folder-name, .presrepo-folder-toggle:not([aria-hidden]) { min-height: 24px; }
.presrepo-folder-toggle { min-width: 24px; }
.row-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* Workshop dans la liste des réunions : une carte qui regroupe ses sessions */
.meeting-ws-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.5rem; }
.meeting-ws-card .my-ws-tag { margin-right: 0.4rem; }
.meeting-ws-sessions { padding: 0 0.75rem 0.5rem; }
.meeting-ws-sessions .meeting-card { background: var(--surface-2); }

/* Un intitulé caché (.sr-only) se place par rapport au premier ancêtre
   positionné. Dans un tableau qui défile dans sa carte, c'était la page : le
   texte caché de la dernière colonne échappait au défilement et élargissait
   toute la page sur téléphone (Members, Risks, Documents). */
th:has(> .sr-only), td:has(> .sr-only) { position: relative; }

/* ── Carte à disques proportionnels (bubble-map.js) ──────────────────────────
   Lieux de conférence des statistiques ; même dessin que la carte de la vitrine. */
.bmap-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.bmap-svg { display: block; width: 100%; height: auto; aspect-ratio: 960 / 420; }
.bmap-dot { cursor: default; transition: fill-opacity 0.15s; }
.bmap-dot:hover { fill-opacity: 0.85; }
.bmap-dot-label { fill: var(--text); font-size: 10px; font-weight: 600; }
.bmap-tooltip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.bmap-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.bmap-key { flex: 0 0 auto; }   /* taille posée par bubble-map.js */
.bmap-key-label { fill: var(--text); font-size: 10px; font-weight: 600; }
.bmap-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin: 0.8rem 0 0;
  padding: 0;
}
.bmap-list li {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.15rem 0.7rem;
  font-size: 0.82rem;
}
.bmap-list li.bmap-empty { border: 0; padding: 0; color: var(--text-muted); }
.bmap-count { color: var(--accent); font-weight: 600; }
