/* =========================================================================
   myCODESRIA : thème
   Console sobre : fond gris-bleu clair, barre latérale blanche par sections,
   tableaux sans cadre à en-tête gris, onglets à fond pâle, boutons pilule.
   Police Roboto. Couleur d'accent : bleu par défaut, réglable par la plateforme
   (Administration → Paramètres) et par chaque personne (Préférences) via les
   variables --accent-light-* / --accent-dark-* injectées dans base.html.
   Pour changer l'identité par défaut, modifier uniquement les blocs « Jetons ».
   ========================================================================= */

/* --- Jetons : clair ---------------------------------------------------- */
:root,
[data-bs-theme="light"] {
  --accent: var(--accent-light, #1f5aa8);
  --accent-rgb: var(--accent-light-rgb, 31, 90, 168);
  --accent-hover: var(--accent-light-hover, #19488a);
  --on-accent: var(--accent-light-on, #ffffff);
  --accent-soft: rgba(var(--accent-rgb), .09);

  --app-bg: #eff1f5;
  --surface: #ffffff;
  --surface-muted: #e6e9ef;
  --line: #e1e5eb;
  --ink: #2b2f36;
  --ink-muted: #5f6774;
  --primary-bg: var(--accent);
  --primary-hover: var(--accent-hover);
  --on-primary: var(--on-accent);
  --sidebar-bg: #ffffff;
  --sidebar-ink: #2b2f36;
  --sidebar-active-bg: transparent;
  --sidebar-active-ink: var(--accent);
  --hero-bg: linear-gradient(140deg, #1d2a3f 0%, #121a28 100%);
  --shadow-sm: 0 1px 2px rgba(31, 41, 55, .04);
  --shadow-md: 0 8px 24px -8px rgba(31, 41, 55, .14);

  --bs-body-bg: var(--app-bg);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--ink-muted);
  --bs-border-color: var(--line);
  --bs-tertiary-bg: var(--surface-muted);
  --bs-primary: var(--accent);
  --bs-primary-rgb: var(--accent-rgb);
  --bs-link-color: var(--accent);
  --bs-link-color-rgb: var(--accent-rgb);
  --bs-link-hover-color: var(--accent-hover);
  --bs-primary-bg-subtle: var(--accent-soft);
  --bs-primary-text-emphasis: var(--accent-hover);
  --bs-primary-border-subtle: rgba(var(--accent-rgb), .3);
  --bs-border-radius: .5rem;
  --bs-border-radius-lg: .625rem;
}

/* --- Jetons : sombre ---------------------------------------------------- */
[data-bs-theme="dark"] {
  --accent: var(--accent-dark, #7aa7e6);
  --accent-rgb: var(--accent-dark-rgb, 122, 167, 230);
  --accent-hover: var(--accent-dark-hover, #a3c2ee);
  --on-accent: var(--accent-dark-on, #0b1220);
  --accent-soft: rgba(var(--accent-rgb), .14);

  --app-bg: #0f1217;
  --surface: #181c23;
  --surface-muted: #20252e;
  --line: #2a303a;
  --ink: #e8ebf0;
  --ink-muted: #9aa3b0;
  --primary-bg: var(--accent);
  --primary-hover: var(--accent-hover);
  --on-primary: var(--on-accent);
  --sidebar-bg: #151920;
  --sidebar-ink: #d5dae2;
  --sidebar-active-bg: transparent;
  --sidebar-active-ink: var(--accent);
  --hero-bg: linear-gradient(140deg, #1d2a3f 0%, #121a28 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, .6);

  --bs-body-bg: var(--app-bg);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--ink-muted);
  --bs-border-color: var(--line);
  --bs-tertiary-bg: var(--surface-muted);
  --bs-primary: var(--accent);
  --bs-primary-rgb: var(--accent-rgb);
  --bs-link-color: var(--accent);
  --bs-link-color-rgb: var(--accent-rgb);
  --bs-link-hover-color: var(--accent-hover);
  --bs-primary-bg-subtle: var(--accent-soft);
  --bs-primary-text-emphasis: var(--accent-hover);
  --bs-primary-border-subtle: rgba(var(--accent-rgb), .35);
  --bs-dropdown-bg: var(--surface);
}

/* --- Base ---------------------------------------------------------------- */
body {
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--app-bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: "Noto Sans Arabic", "Roboto", system-ui, sans-serif; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 500; }

/* Boutons : pilules ; le principal prend la couleur d'accent */
.btn { --bs-btn-font-weight: 500; border-radius: 999px; padding-inline: 1.125rem; }
.btn-sm { padding-inline: .75rem; }
.btn-lg { padding-inline: 1.5rem; }
.btn-link { padding-inline: .25rem; }
.btn-primary {
  --bs-btn-color: var(--on-primary); --bs-btn-hover-color: var(--on-primary); --bs-btn-active-color: var(--on-primary);
  --bs-btn-disabled-color: var(--on-primary);
  --bs-btn-bg: var(--primary-bg); --bs-btn-border-color: var(--primary-bg);
  --bs-btn-hover-bg: var(--primary-hover); --bs-btn-hover-border-color: var(--primary-hover);
  --bs-btn-active-bg: var(--primary-hover); --bs-btn-active-border-color: var(--primary-hover);
  --bs-btn-disabled-bg: var(--primary-bg); --bs-btn-disabled-border-color: var(--primary-bg);
}
.btn-outline-primary {
  --bs-btn-color: var(--accent); --bs-btn-border-color: rgba(var(--accent-rgb), .45);
  --bs-btn-hover-color: var(--on-primary); --bs-btn-hover-bg: var(--primary-bg); --bs-btn-hover-border-color: var(--primary-bg);
  --bs-btn-active-color: var(--on-primary); --bs-btn-active-bg: var(--primary-bg); --bs-btn-active-border-color: var(--primary-bg);
}
.btn-outline-secondary {
  --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-bg: var(--surface);
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--surface-muted); --bs-btn-hover-border-color: var(--line);
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: var(--surface-muted); --bs-btn-active-border-color: var(--line);
}
.btn-icon {
  width: 2.5rem; height: 2.5rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--ink-muted); border: 1px solid transparent; font-size: 1.15rem;
}
.btn-icon:hover { background: var(--surface); color: var(--accent); }

.form-control, .form-select { border-color: #d3d8e0; background-color: var(--surface); border-radius: .375rem; }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { border-color: var(--line); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: rgba(var(--accent-rgb), .7);
  box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb), .15);
}
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-label { font-weight: 500; font-size: .875rem; }

.card {
  --bs-card-bg: var(--surface);
  --bs-card-border-color: transparent;
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--shadow-sm);
}
[data-bs-theme="dark"] .card { --bs-card-border-color: var(--line); }
.card-title-sm { font-size: .9375rem; font-weight: 500; color: var(--ink); }

.badge-soft { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.badge-muted { background: var(--surface-muted); color: var(--ink-muted); border: 1px solid var(--line); font-weight: 500; }

.dropdown-menu { --bs-dropdown-bg: var(--surface); --bs-dropdown-border-color: var(--line); border-radius: .5rem; min-width: 15rem; padding: .375rem; }
.dropdown-item { border-radius: .375rem; }

.alert { border-radius: .5rem; }

/* Thème : icône affichée selon le mode */
.theme-icon-dark { display: none; }
[data-bs-theme="dark"] .theme-icon-dark { display: inline; }
[data-bs-theme="dark"] .theme-icon-light { display: none; }

/* Logo : version claire en mode sombre (logo noir sur fond transparent) */
.brand-logo { height: 30px; width: auto; }
[data-bs-theme="dark"] .brand-logo { filter: brightness(0) invert(1); }

/* --- Couleurs des modules ------------------------------------------------
   Une teinte par module (registre : TONES / DEFAULT_TONES, réglable dans Administration → Modules).
   .tone-<nom> fixe --tone (icône) et --tone-soft (pastille) ; claires puis sombres. */
.tone-blue   { --tone: #2563eb; } .tone-indigo { --tone: #4f46e5; } .tone-violet { --tone: #7c3aed; }
.tone-pink   { --tone: #db2777; } .tone-red    { --tone: #dc2626; } .tone-orange { --tone: #ea580c; }
.tone-amber  { --tone: #b45309; } .tone-green  { --tone: #15803d; } .tone-teal   { --tone: #0f766e; }
.tone-cyan   { --tone: #0e7490; } .tone-brown  { --tone: #8b5a2b; } .tone-slate  { --tone: #475569; }
[data-bs-theme="dark"] .tone-blue   { --tone: #8ab4f8; } [data-bs-theme="dark"] .tone-indigo { --tone: #a5b4fc; }
[data-bs-theme="dark"] .tone-violet { --tone: #c4b5fd; } [data-bs-theme="dark"] .tone-pink   { --tone: #f9a8d4; }
[data-bs-theme="dark"] .tone-red    { --tone: #fca5a5; } [data-bs-theme="dark"] .tone-orange { --tone: #fdba74; }
[data-bs-theme="dark"] .tone-amber  { --tone: #fcd34d; } [data-bs-theme="dark"] .tone-green  { --tone: #86efac; }
[data-bs-theme="dark"] .tone-teal   { --tone: #5eead4; } [data-bs-theme="dark"] .tone-cyan   { --tone: #67e8f9; }
[data-bs-theme="dark"] .tone-brown  { --tone: #d6b38a; } [data-bs-theme="dark"] .tone-slate  { --tone: #cbd5e1; }
[class*="tone-"] { --tone-soft: color-mix(in srgb, var(--tone) 13%, transparent); }
[data-bs-theme="dark"] [class*="tone-"] { --tone-soft: color-mix(in srgb, var(--tone) 18%, transparent); }

/* Pastille d'icône colorée (menu des modules, tableau de bord, en-têtes de page, administration) */
.mod-chip {
  width: 2.5rem; height: 2.5rem; border-radius: .75rem; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tone-soft, var(--accent-soft)); color: var(--tone, var(--accent)); font-size: 1.15rem;
}
.mod-chip-sm { width: 1.875rem; height: 1.875rem; border-radius: .5rem; font-size: .95rem; }
.mod-chip-lg { width: 3rem; height: 3rem; border-radius: .875rem; font-size: 1.4rem; }
/* Dans les pages d'un module : icônes des listes et des états vides dans la couleur du module */
.app-content[class*="tone-"] .list-row > .bi:first-child,
.app-content[class*="tone-"] .empty-state > .bi,
.app-content[class*="tone-"] .card-title-sm > .bi:first-child { color: var(--tone); }
.app-content[class*="tone-"] .empty-state > .bi { opacity: .75; }

/* --- Coque applicative -------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Barre latérale : panneau blanc posé sur le fond, sections en petites capitales repliables */
.app-sidebar {
  --bs-offcanvas-width: 272px;
  --bs-offcanvas-bg: var(--sidebar-bg);
  background: var(--sidebar-bg);
}
@media (min-width: 992px) {
  .app-sidebar {
    width: 248px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    border-start-end-radius: 1rem; border-end-end-radius: 1rem; box-shadow: 1px 0 0 var(--line);
  }
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; height: 76px; padding: 0 1.25rem; }
.brand-tag {
  font-size: .75rem; font-weight: 500;  /* « my » en minuscules (nom : myCODESRIA) */
  color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: .05rem .5rem;
}
.sidebar-nav { padding: .25rem .75rem 1.5rem; display: flex; flex-direction: column; gap: 1px; }
.nav-group { margin-top: 1.125rem; }
.nav-section {
  display: flex; align-items: center; gap: .375rem; width: 100%;
  margin: 0 0 .25rem; padding: .25rem .5rem; border: 0; background: none; text-align: start;
  font-size: .6875rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted);
}
html[lang="ar"] .nav-section { letter-spacing: 0; font-size: .75rem; }
.nav-section i { font-size: .55rem; opacity: .8; transition: transform .15s ease-out; }
.nav-section:hover { color: var(--ink); }
.nav-group.is-collapsed .nav-section i { transform: rotate(180deg); }
.nav-group.is-collapsed .nav-group-items { display: none; }
.nav-item-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .5rem; border-radius: .375rem;
  color: var(--sidebar-ink); text-decoration: none; font-size: .9375rem; font-weight: 400;
}
.nav-item-link i { font-size: 1.05rem; width: 1.25rem; text-align: center; color: var(--ink-muted); }
.nav-item-link:hover { color: var(--accent); }
.nav-item-link:hover i { color: var(--accent); }
.nav-item-link.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-ink); font-weight: 500; }
.nav-item-link.active i { color: var(--sidebar-active-ink); }
/* Icônes des modules dans leur couleur ; module ouvert sur fond teinté */
.nav-item-link[class*="tone-"] i, .nav-item-link[class*="tone-"]:hover i { color: var(--tone); }
.nav-item-link[class*="tone-"].active { background: var(--tone-soft); color: var(--ink); }
.nav-item-link[class*="tone-"].active i { color: var(--tone); }
.nav-item-link:not(.disabled):hover { background: var(--surface-muted); color: var(--ink); }
.nav-item-link.disabled { opacity: .55; cursor: default; }
.nav-item-link.disabled:hover, .nav-item-link.disabled:hover i { color: var(--sidebar-ink); }
.soon-dot { margin-inline-start: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Barre du haut : sans bordure, sur le fond de page */
.app-topbar {
  position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: .5rem;
  height: 76px; padding: 0 2rem;
  background: color-mix(in srgb, var(--app-bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
}
.topbar-search .form-control { border-radius: 999px; }
.lang-switch { display: flex; align-items: center; gap: .375rem; color: var(--ink-muted); }
.lang-switch .form-select { width: auto; border-radius: 999px; padding-block: .3rem; border-color: transparent; background-color: transparent; }
.user-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .25rem .625rem .25rem .25rem; border: 1px solid transparent; border-radius: 999px; background: transparent;
}
.user-chip:hover { background: var(--surface); }
.user-chip-name { max-width: 10rem; font-size: .875rem; }
.avatar {
  width: 2rem; height: 2rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 500; letter-spacing: .02em;
}

.app-content { padding: .5rem 2rem 3rem; width: 100%; max-width: 1440px; }
@media (max-width: 575.98px) { .app-content, .app-topbar { padding-inline: 1rem; } }

/* En-tête de page : petite étiquette du module, puis titre fin */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.page-eyebrow { font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .25rem; }
html[lang="ar"] .page-eyebrow { letter-spacing: 0; }
.page-title { font-size: 1.625rem; font-weight: 400; letter-spacing: 0; margin: 0; }
.page-heading { display: flex; align-items: center; gap: .875rem; min-width: 0; }
.page-subtitle { color: var(--ink-muted); margin: .375rem 0 0; }
.ref { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92em; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.page-actions .btn { padding-block: .5rem; }

/* Pages de gestion du compte (allauth) */
.manage .app-content { max-width: 720px; }
.manage .auth-title { font-size: 1.375rem; }

/* --- Onglets : actif sur fond pâle, souligné ------------------------------ */
.nav-tabs-modern { border-bottom: 1px solid #d3d8e0; gap: .25rem; margin-bottom: 1.5rem; }
[data-bs-theme="dark"] .nav-tabs-modern { border-bottom-color: var(--line); }
.nav-tabs-modern .nav-link {
  border: 0; border-bottom: 2px solid transparent; border-radius: .375rem .375rem 0 0;
  color: var(--ink-muted); font-weight: 400; font-size: .9375rem; padding: .625rem 1.5rem; margin-bottom: -1px;
}
.nav-tabs-modern .nav-link:hover { color: var(--ink); }
.nav-tabs-modern .nav-link.active { color: var(--accent); font-weight: 500; border-bottom-color: var(--accent); background: rgba(var(--accent-rgb), .1); }

/* --- Tableaux : sans cadre, en-tête gris, lignes blanches aérées ---------- */
.table { --bs-table-bg: var(--surface); --bs-table-hover-bg: rgba(var(--accent-rgb), .035); }
.table > thead th {
  font-size: .875rem; font-weight: 500; color: var(--ink);
  background: var(--surface-muted); border-bottom: 0; padding-block: .9rem; white-space: nowrap;
}
.table > tbody td { padding-block: .9rem; border-color: var(--line); }
.table > tbody tr:last-child td { border-bottom: 0; }
.table > :not(caption) > * > :first-child { padding-inline-start: 1rem; }
.table > :not(caption) > * > :last-child { padding-inline-end: 1rem; }
.table-card, .card:has(> .table-responsive > .table), .card:has(> .table) {
  background: var(--surface); border: 0; border-radius: var(--bs-border-radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
[data-bs-theme="dark"] .table-card { border: 1px solid var(--line); }
.table-card .table { margin: 0; }
.cell-user { display: flex; align-items: center; gap: .75rem; }
.cell-user .avatar { width: 2.25rem; height: 2.25rem; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }

/* Statut : pastille de couleur + libellé */
.status-dot { display: inline-flex; align-items: center; gap: .5rem; font-size: .8125rem; font-weight: 400; color: var(--ink-muted); }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, currentColor); }
.status-dot.on { --dot: #16a34a; }
.status-dot.off { --dot: #dc2626; }

.filter-bar { background: var(--surface); border-radius: var(--bs-border-radius-lg); padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
[data-bs-theme="dark"] .filter-bar { border: 1px solid var(--line); }

/* Pagination discrète */
.pagination { --bs-pagination-border-color: transparent; --bs-pagination-bg: transparent; --bs-pagination-color: var(--ink-muted);
  --bs-pagination-hover-bg: var(--surface); --bs-pagination-active-bg: var(--accent); --bs-pagination-active-border-color: var(--accent);
  --bs-pagination-border-radius: 999px; gap: .25rem; }
.pagination .page-link { border-radius: 999px !important; min-width: 2.25rem; text-align: center; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ink-muted); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .6; }


/* --- Tableau de bord ---------------------------------------------------- */
/* Accueil : bandeau de bienvenue teinté de la couleur d'accent */
.welcome {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.75rem; padding: 1.5rem 1.75rem; border-radius: 1rem; color: var(--ink);
  background: linear-gradient(120deg, rgba(var(--accent-rgb), .14) 0%, rgba(var(--accent-rgb), .04) 55%, var(--surface) 100%);
  border: 1px solid rgba(var(--accent-rgb), .14);
}
.welcome::after {  /* motif discret : cercles concentriques à droite */
  content: ""; position: absolute; inset-inline-end: -4rem; top: -5rem; width: 16rem; height: 16rem; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, transparent 38%, rgba(var(--accent-rgb), .08) 39%, rgba(var(--accent-rgb), .08) 41%, transparent 42%,
    transparent 58%, rgba(var(--accent-rgb), .06) 59%, rgba(var(--accent-rgb), .06) 61%, transparent 62%);
}
.welcome h1 { font-size: 1.625rem; font-weight: 400; margin: 0 0 .25rem; }
.welcome h1 strong { font-weight: 500; }
.welcome p { margin: 0; color: var(--ink-muted); }
.welcome .badge { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.welcome-stat { position: relative; z-index: 1; display: flex; align-items: center; gap: .75rem; padding: .625rem 1rem; border-radius: .75rem;
  background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; }
.welcome-stat strong { font-size: 1.5rem; font-weight: 500; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.welcome-stat span { font-size: .8125rem; color: var(--ink-muted); line-height: 1.2; }

.section-title { font-size: 1rem; font-weight: 500; margin: 0 0 1rem; display: flex; align-items: center; gap: .5rem; }
.section-title .count { font-size: .75rem; color: var(--ink-muted); font-weight: 500; }

.module-tile {
  position: relative; display: flex; flex-direction: column; gap: .75rem; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--bs-border-radius-lg);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease-out;
}
.module-tile:hover { border-color: rgba(var(--accent-rgb), .35); }
.module-tile.is-planned:hover { border-color: var(--line); }
.module-icon {
  width: 2.75rem; height: 2.75rem; border-radius: .75rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1.25rem;
}
.module-tile.is-planned .module-icon { background: var(--surface-muted); color: var(--ink-muted); }
.module-tile h3 { font-size: 1rem; font-weight: 500; margin: 0; }
.module-tile h3 a { color: inherit; text-decoration: none; }
.module-tile p { font-size: .875rem; color: var(--ink-muted); margin: 0; }
.module-tile .tile-arrow { margin-top: auto; color: var(--accent); font-size: .875rem; font-weight: 500; }
[dir="rtl"] .tile-arrow .bi-arrow-right { display: inline-block; transform: scaleX(-1); }

/* À traiter et raccourcis */
.todo-group + .todo-group { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.todo-head { display: flex; align-items: center; gap: .625rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.todo-head > .bi-chevron-right { color: var(--ink-muted); }
.todo-head:hover { color: var(--accent); }
.todo-count { min-width: 1.75rem; padding: 0 .5rem; border-radius: .5rem; background: var(--accent-soft); color: var(--accent);
  font-size: .8125rem; font-weight: 500; text-align: center; font-variant-numeric: tabular-nums; }
.todo-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 1rem; padding: .375rem 0 .375rem 2.5rem;
  color: var(--ink); text-decoration: none; font-size: .875rem; }
[dir="rtl"] .todo-row { padding: .375rem 2.5rem .375rem 0; }
.todo-row:hover { color: var(--accent); }
.todo-detail { color: var(--ink-muted); max-width: 22rem; }
/* Tuiles des modules : pastille colorée, nom, description sur deux lignes */
.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: .75rem; }
.shortcut {
  display: flex; align-items: flex-start; gap: .875rem; padding: 1rem; border: 1px solid var(--line); border-radius: .875rem;
  background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease-out, box-shadow .15s ease-out, transform .15s ease-out;
}
.shortcut-text { min-width: 0; display: flex; flex-direction: column; gap: .125rem; }
.shortcut-name { font-weight: 500; }
.shortcut-desc { font-size: .8125rem; color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.shortcut:hover { border-color: color-mix(in srgb, var(--tone, var(--accent)) 40%, transparent); box-shadow: var(--shadow-md); transform: translateY(-1px); color: var(--ink); }
a.shortcut:focus-visible { outline: 2px solid var(--tone, var(--accent)); outline-offset: 2px; }
.shortcut.is-planned { background: transparent; box-shadow: none; border-style: dashed; }
.shortcut.is-planned .mod-chip { background: var(--surface-muted); color: var(--ink-muted); }
@media (prefers-reduced-motion: reduce) { .shortcut { transition: none; } a.shortcut:hover { transform: none; } }

/* --- Grille des autorisations ------------------------------------------- */
.perm-group { border: 1px solid var(--line); border-radius: .75rem; padding: .875rem 1rem; margin-bottom: .75rem; background: var(--surface); }
.perm-group-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.perm-group-title { display: flex; align-items: center; gap: .5rem; font-weight: 500; font-size: .9375rem; }
.perm-group-title i { color: var(--accent); }
.perm-group .form-check { margin-bottom: .25rem; }

.toggle-row { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .form-switch .form-check-input { width: 2.5rem; height: 1.25rem; cursor: pointer; }

/* --- Pages d'authentification ------------------------------------------ */
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
@media (min-width: 992px) { .auth-shell { grid-template-columns: minmax(480px, 1fr) 1.1fr; } }
.auth-form-side { display: flex; flex-direction: column; padding: 1.5rem; background: var(--surface); }
@media (min-width: 576px) { .auth-form-side { padding: 2rem 3rem; } }
.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.auth-card { width: 100%; max-width: 420px; margin: auto; padding: 2.5rem 0; }
.auth-title { font-size: 1.75rem; font-weight: 500; letter-spacing: -.01em; margin-bottom: .5rem; }
.auth-card .form-control-lg { font-size: 1rem; }
.auth-footer { font-size: .75rem; color: var(--ink-muted); text-align: center; margin: 0; }
.auth-divider { display: flex; align-items: center; gap: .75rem; color: var(--ink-muted); font-size: .8125rem; margin: 1.5rem 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-provider {
  display: flex; align-items: center; justify-content: center; gap: .625rem;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 1rem;
}
.btn-provider:hover { background: var(--surface-muted); border-color: var(--ink-muted); color: var(--ink); }
/* Connexions tierces : toujours sur une ligne, boutons de même largeur */
.provider-row { display: flex; gap: .5rem; }
.provider-row .btn-provider { flex: 1 1 0; min-width: 0; padding: .625rem .5rem; font-size: .9375rem; white-space: nowrap; }
.provider-row .btn-provider svg { flex: none; }
.provider-row .btn-provider span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) {
  .provider-row { gap: .375rem; }
  .provider-row .btn-provider { gap: .375rem; padding: .5rem .25rem; font-size: .8125rem; }
  .provider-row .btn-provider svg { width: 16px; height: 16px; }
}

.auth-hero {
  position: relative; align-items: center; justify-content: center; padding: 4rem; overflow: hidden;
  background: var(--hero-bg);
  color: #fff;
}
.auth-hero.has-image { background: var(--hero-image) center / cover no-repeat, var(--hero-bg); }
.auth-hero.has-image::before {  /* voile réglable dans les paramètres, pour garder le titre lisible */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,calc(var(--hero-overlay, 55%) + 10%)), rgba(0,0,0,var(--hero-overlay, 55%)));
}
.auth-hero.has-image .auth-hero-inner { align-self: flex-end; }
.auth-hero-inner { position: relative; max-width: 480px; }
.hero-kicker { display: inline-block; font-size: .875rem; font-weight: 500; color: #9cc0f0; margin-bottom: 1rem; }
.hero-title { font-size: 2.25rem; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 1rem; }
.hero-text { font-size: 1.0625rem; opacity: .85; margin-bottom: 2rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.hero-points li { display: flex; align-items: center; gap: .75rem; font-weight: 500; }
.hero-points i {
  width: 2.25rem; height: 2.25rem; border-radius: .625rem; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); font-size: 1.05rem;
}

/* --- Préférences : mode et couleur -------------------------------------- */
.mode-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.mode-choice { position: relative; display: flex; flex-direction: column; gap: .5rem; cursor: pointer; }
.mode-choice input { position: absolute; opacity: 0; }
.mode-preview {
  display: flex; gap: 4px; height: 64px; padding: 8px; border-radius: .75rem;
  border: 2px solid var(--line); transition: border-color .15s ease;
}
.mode-preview span { flex: 1; border-radius: .375rem; }
.mode-preview--light { background: #eff1f5; }
.mode-preview--light span:first-child { background: #fff; border: 1px solid #e7e5e4; flex: .45; }
.mode-preview--light span:last-child { background: #fff; border: 1px solid #e7e5e4; }
.mode-preview--dark { background: #0c0a09; }
.mode-preview--dark span:first-child { background: #1c1917; flex: .45; }
.mode-preview--dark span:last-child { background: #1c1917; }
.mode-preview--system { background: linear-gradient(90deg, #eff1f5 50%, #0f1217 50%); }
.mode-preview--system span:first-child { background: #fff; border: 1px solid #e7e5e4; flex: .45; }
.mode-preview--system span:last-child { background: #1c1917; }
.mode-choice input:checked + .mode-preview { border-color: var(--accent); }
.mode-choice input:focus-visible + .mode-preview { box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb), .25); }
.mode-label { font-size: .8125rem; font-weight: 500; text-align: center; }

.swatches { display: flex; flex-wrap: wrap; gap: .625rem; }
.swatch { position: relative; cursor: pointer; }
.swatch input[type="radio"] { position: absolute; opacity: 0; }
.swatch-dot {
  display: block; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
  outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s ease;
}
.swatch input:checked + .swatch-dot { outline-color: var(--ink); }
[data-bs-theme="dark"] .swatch-dot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.swatch input:focus-visible + .swatch-dot { outline-color: var(--accent); }
.swatch-custom {
  width: 2.25rem; height: 2.25rem; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px dashed var(--ink-muted); color: var(--ink-muted);
}
.swatch-custom input[type="color"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.accent-preview {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  padding: .875rem 1rem; border: 1px dashed var(--line); border-radius: .75rem;
}

/* --- Module Membres ------------------------------------------------------ */
.member-card {
  position: relative; overflow: hidden; color: #fff; border-radius: 1rem; padding: 1.75rem;
  background: var(--hero-bg); box-shadow: var(--shadow-md);
}
[data-bs-theme="dark"] .member-card { border: 1px solid var(--line); }
.member-card-title { font-size: 1.5rem; font-weight: 500; margin: 0; }
.member-card-badge { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 500; }
.member-card-meta { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 2rem; }
.member-card-meta span { display: block; font-size: .8125rem; opacity: .7; }
.member-card-meta strong { font-weight: 500; }
.plan-price { font-size: 1.5rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: .8125rem; font-weight: 500; color: var(--ink-muted); }

.pay-methods { display: grid; gap: .5rem; }
.pay-method { position: relative; cursor: pointer; display: block; }
.pay-method input { position: absolute; opacity: 0; }
.pay-method-body {
  display: flex; align-items: center; gap: .75rem; padding: .75rem .875rem;
  border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); transition: border-color .15s ease, background .15s ease;
}
.pay-method-body > i { font-size: 1.25rem; color: var(--accent); }
.pay-method input:checked + .pay-method-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pay-method input:focus-visible + .pay-method-body { box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb), .25); }
.instructions { background: var(--surface-muted); border: 1px solid var(--line); border-radius: .75rem; padding: 1rem 1.25rem; white-space: normal; }
.instructions p:last-child { margin-bottom: 0; }

.status-dot.pending { color: #d97706; }
.stat-tile {
  display: block; height: 100%; padding: 1rem 1.25rem; border-radius: var(--bs-border-radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none;
}
a.stat-tile:hover { border-color: rgba(var(--accent-rgb), .4); color: var(--ink); }
a.stat-tile.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.stat-tile span { display: block; font-size: .8125rem; color: var(--ink-muted); margin-bottom: .25rem; }
.stat-tile strong { font-size: 1.625rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-tile strong small { font-size: .8125rem; font-weight: 500; color: var(--ink-muted); }
.stat-tile.is-alert { border-color: rgba(217, 119, 6, .5); }
.stat-tile.is-alert strong { color: #d97706; }
.small-tile { padding: .75rem; } .small-tile strong { font-size: 1.25rem; }
.list-row { display: flex; align-items: center; gap: .75rem; padding: .625rem .25rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.list-row:last-child { border-bottom: 0; }
.rubric + .rubric { border-top: 1px solid var(--line); }
.rubric > summary { display: flex; align-items: center; gap: .5rem; padding: .625rem .25rem; cursor: pointer; list-style: none; font-size: .8125rem; font-weight: 500; color: var(--ink-muted); }
.rubric > summary::-webkit-details-marker { display: none; }
.rubric > summary::before { content: ""; border: .3rem solid transparent; border-inline-start-color: currentColor; margin-inline-end: -.15rem; transition: transform .15s; }
.rubric[open] > summary::before { transform: rotate(90deg) translateX(.15rem); }
[dir="rtl"] .rubric[open] > summary::before { transform: rotate(-90deg) translateX(-.15rem); }
.rubric > summary:hover { color: var(--ink); }
.rubric-count { min-width: 1.375rem; padding: 0 .375rem; border-radius: 999px; background: var(--surface-muted); font-size: .75rem; text-align: center; }
.rubric > .list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--surface-muted); color: var(--ink); }
.list-row .avatar { width: 2rem; height: 2rem; background: var(--accent-soft); color: var(--accent); }
.payment-row { padding: .875rem 0; border-bottom: 1px solid var(--line); }
.payment-row:first-of-type { padding-top: 0; } .payment-row:last-child { border-bottom: 0; }
.detail-list { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: .5rem 1rem; margin: 0; font-size: .875rem; }
.detail-list dt { color: var(--ink-muted); font-weight: 500; } .detail-list dd { margin: 0; }
.min-w-0 { min-width: 0; }

/* --- Module Procédures -------------------------------------------------- */
.status-dot.returned { color: #d97706; }
.status-dot.rejected { color: #dc2626; }
.steps-mini { padding-inline-start: 1.1rem; margin: 0 0 1rem; display: grid; gap: .5rem; }
.stepper { list-style: none; margin: 0; padding: 0; }
.stepper-item { position: relative; display: flex; gap: .875rem; padding-bottom: 1.25rem; }
.stepper-item:not(:last-child)::before {
  content: ""; position: absolute; inset-inline-start: 1rem; top: 2.1rem; bottom: .2rem; width: 2px; background: var(--line);
}
.stepper-dot {
  flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: .8125rem; font-weight: 500;
  background: var(--surface-muted); color: var(--ink-muted); border: 2px solid var(--line);
}
.stepper-item--done .stepper-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.stepper-item--current .stepper-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stepper-item--rejected .stepper-dot { background: #dc2626; border-color: #dc2626; color: #fff; }
.stepper-item--skipped { opacity: .55; }
.stepper-item--done:not(:last-child)::before { background: #16a34a; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event { padding: .625rem 0 .625rem .875rem; border-inline-start: 3px solid var(--line); margin-bottom: .5rem; }
.event--approved, .event--completed, .event--auto_approved { border-color: #16a34a; }
.event--rejected { border-color: #dc2626; }
.event--returned { border-color: #d97706; }
.event--commented { border-color: var(--accent); }
.event--skipped { opacity: .6; }

/* --- Module Projets et tâches ------------------------------------------- */
.progress-line { height: 6px; border-radius: 999px; background: var(--surface-muted); overflow: hidden; border: 1px solid var(--line); }
.progress-line span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.prio { font-weight: 500; font-size: .6875rem; }
.prio-urgent { background: rgba(220, 38, 38, .12); color: #dc2626; }
.prio-high { background: rgba(217, 119, 6, .14); color: #b45309; }
.prio-low { background: var(--surface-muted); color: var(--ink-muted); border: 1px solid var(--line); }
[data-bs-theme="dark"] .prio-high { color: #f59e0b; }
.avatar-xs { width: 1.5rem; height: 1.5rem; font-size: .625rem; }

.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.kanban-col { background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--bs-border-radius-lg); padding: .75rem; display: flex; flex-direction: column; min-height: 320px; }
.kanban-col-head { display: flex; align-items: center; gap: .5rem; font-weight: 500; font-size: .875rem; margin-bottom: .75rem; }
.kanban-col-head .count { margin-inline-start: auto; font-size: .75rem; color: var(--ink-muted); font-weight: 500; }
.kanban-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-muted); }
.kanban-dot--in_progress { background: #2563eb; } .kanban-dot--review { background: #d97706; } .kanban-dot--done { background: #16a34a; }
.kanban-list { display: flex; flex-direction: column; gap: .5rem; flex: 1; min-height: 40px; }
.kanban-card {
  display: flex; flex-direction: column; gap: .5rem; padding: .75rem; border-radius: .625rem;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  color: var(--ink); text-decoration: none; cursor: grab;
}
.kanban-card:hover { border-color: rgba(var(--accent-rgb), .45); color: var(--ink); }
.kanban-card.is-dragging { opacity: .5; }
.kanban-card.is-overdue { border-inline-start: 3px solid #dc2626; }
.kanban-card-title { font-size: .875rem; font-weight: 500; line-height: 1.35; }
.kanban-card-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.kanban-add { margin-top: .5rem; }
.kanban-add .form-control { background: transparent; border-style: dashed; }
@media (max-width: 991.98px) { .kanban { grid-template-columns: repeat(4, 260px); } }

/* --- Signature électronique --------------------------------------------- */
.pdf-frame { width: 100%; height: 100%; border: 0; border-radius: var(--bs-border-radius-lg); background: var(--surface-muted); }
.signature-pad { border: 1px dashed var(--ink-muted); border-radius: .75rem; background: #fff; touch-action: none; }
.signature-pad canvas { width: 100%; height: auto; display: block; cursor: crosshair; }
.signer-row { display: flex; gap: .75rem; align-items: flex-start; padding: .625rem 0; border-bottom: 1px solid var(--line); }
.signer-row:last-of-type { border-bottom: 0; }
.signer-num { flex-shrink: 0; width: 1.75rem; height: 1.75rem; margin-top: .3rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 500; font-size: .8125rem; }
.signer-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; margin-top: .5rem; }
.signer-options .form-check { margin-top: .4rem; }
/* Placement des champs et aperçu des champs à signer */
@media (min-width: 1200px) { .esign-builder-toolbar { position: sticky; top: 4.25rem; z-index: 5; } .esign-props[data-empty="1"] { visibility: hidden; } }
@media (max-width: 1199.98px) {
  .esign-props { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: var(--surface); padding: .75rem 1rem 1rem !important; box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
  .esign-props[data-empty="1"] { display: none; }
}
.esign-pages { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: .75rem; background: var(--surface-muted); border-radius: var(--bs-border-radius-lg); min-height: 50vh; }
.esign-page { position: relative; box-shadow: 0 1px 4px rgba(0,0,0,.12); background: #fff; line-height: 0; max-width: 100%; }
.esign-page canvas { display: block; max-width: 100%; height: auto; cursor: copy; }
.esign-page-number { position: absolute; right: .5rem; bottom: .4rem; font-size: .7rem; line-height: 1; color: #78716c; background: rgba(255,255,255,.8); padding: .15rem .35rem; border-radius: .25rem; }
.esign-field { position: absolute; border: 2px solid #2563eb; border-radius: 3px; background: rgba(37,99,235,.13); cursor: move; touch-action: none; line-height: 1.1; overflow: hidden; padding: 0; text-align: start; }
.esign-field.is-selected { outline: 2px dashed #1c1917; outline-offset: 2px; }
.esign-field-label { position: absolute; left: 2px; top: 1px; font-size: .62rem; font-weight: 500; color: #1c1917; white-space: nowrap; pointer-events: none; }
.esign-field-handle { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; background: #1c1917; cursor: nwse-resize; }
.esign-field.is-mine { border-color: var(--accent); background: rgba(139,94,60,.14); cursor: default; animation: esign-pulse 2s ease-in-out 3; }
button.esign-field.is-mine { cursor: pointer; }
@keyframes esign-pulse { 50% { box-shadow: 0 0 0 4px rgba(139,94,60,.25); } }
@media (prefers-reduced-motion: reduce) { .esign-field.is-mine { animation: none; } }
.signature-pad--initials { max-width: 260px; }
/* Signature ou paraphe enregistré : aperçu sur fond blanc (l'image est transparente) */
.mark-preview { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 1rem;
  background: #fff; border: 1px dashed var(--line); border-radius: .5rem; }
.mark-preview img { max-width: 100%; max-height: 140px; object-fit: contain; }
.mark-preview--small { min-height: 72px; padding: .5rem; }
.mark-preview--small img { max-height: 72px; }
.saved-mark-choice:has(input:checked) + .mark-draw { display: none; }
.public .app-topbar { position: static; }

/* --- Module RH -------------------------------------------------------------- */
.leave-swatch { display: inline-block; width: .75rem; height: .75rem; border-radius: 3px; vertical-align: -1px; flex-shrink: 0; }
.leave-calendar th, .leave-calendar td { text-align: center; padding: .25rem .1rem; font-size: .75rem; min-width: 1.6rem; }
.leave-calendar .sticky-col { position: sticky; inset-inline-start: 0; background: var(--surface); text-align: start; min-width: 11rem; z-index: 1; white-space: nowrap; }
.leave-calendar .is-weekend, .leave-calendar .is-holiday { background: var(--surface-muted); }
.leave-cell { display: block; height: 1.25rem; border-radius: 3px; background: var(--leave); }
.leave-cell.is-pending { background: repeating-linear-gradient(45deg, var(--leave), var(--leave) 3px, transparent 3px, transparent 6px); border: 1px solid var(--leave); }
.guard-list { display: grid; gap: .5rem; max-height: 70vh; overflow-y: auto; }
.guard-row { display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.guard-row .avatar { width: 2.5rem; height: 2.5rem; background: var(--accent-soft); color: var(--accent); }

/* Recrutement : pipeline des candidatures par étape */
.pipeline { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.pipeline-col { flex: 0 0 15rem; background: var(--surface-muted); border: 1px solid var(--line); border-radius: .75rem; padding: .5rem; }
.pipeline-head { display: flex; justify-content: space-between; align-items: center; font-weight: 500; font-size: .85rem; padding: .25rem .25rem .5rem; }
.pipeline-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; padding: .5rem .75rem; margin-bottom: .5rem; color: inherit; text-decoration: none; }
.pipeline-card:hover { border-color: var(--accent, var(--bs-primary)); }
.hp-field { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Intranet */
.cat-pill { display: inline-block; font-size: .72rem; font-weight: 500; padding: .05rem .5rem; border-radius: 999px;
  color: var(--cat); background: color-mix(in srgb, var(--cat) 14%, transparent); }
.news-thumb { width: 72px; height: 52px; object-fit: cover; border-radius: .5rem; flex: 0 0 auto; }
.news-image { width: 100%; max-height: 380px; object-fit: cover; border-radius: .75rem; }
.news-body { line-height: 1.7; }
.date-box { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--line); border-radius: .5rem; line-height: 1; flex: 0 0 auto; }
.date-box span { font-weight: 500; } .date-box small { font-size: .65rem; text-transform: uppercase; color: var(--ink-muted); }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; }
.month-head { background: var(--surface-muted); font-size: .72rem; font-weight: 500; text-align: center; padding: .35rem 0; text-transform: capitalize; }
.month-cell { background: var(--surface); min-height: 5.5rem; padding: .25rem; min-width: 0; }
.month-cell.other { background: var(--surface-muted); color: var(--ink-muted); }
.month-cell.today .month-day { background: var(--ink); color: var(--surface); border-radius: 999px; padding: 0 .4rem; }
.month-day { font-size: .75rem; font-weight: 500; }
.month-event { display: block; font-size: .7rem; margin-top: .15rem; padding: .05rem .3rem; border-radius: .25rem; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; text-decoration: none; color: var(--ink); border-inline-start: 3px solid var(--cat); background: color-mix(in srgb, var(--cat) 10%, transparent); }
.month-event.cancelled { text-decoration: line-through; opacity: .6; }
@media (max-width: 575.98px) { .month-cell { min-height: 3.5rem; } .month-event { font-size: 0; height: .4rem; padding: 0; } }
.list-row.active { background: var(--surface-muted); }
.unread-dot { width: .5rem; height: .5rem; border-radius: 999px; background: var(--bs-danger); flex: 0 0 auto; }
.chat .card-body { height: min(70vh, 640px); }
.chat-log { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .25rem; }
.chat-msg { max-width: 80%; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; text-align: end; }
.chat-meta { font-size: .7rem; color: var(--ink-muted); }
.chat-bubble { display: inline-block; text-align: start; padding: .45rem .75rem; border-radius: .9rem; background: var(--surface-muted); border: 1px solid var(--line); overflow-wrap: anywhere; }
.chat-msg.mine .chat-bubble { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.avatar-lg { width: 2.75rem; height: 2.75rem; font-size: .95rem; flex: 0 0 auto; background: var(--accent-soft); color: var(--accent); }
.min-w-0 { min-width: 0; }
[dir="rtl"] .flip-rtl { display: inline-block; transform: scaleX(-1); }

/* Vie de l'institution */
.album-card { display: block; border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; background: var(--surface); color: inherit; text-decoration: none; }
.album-card img, .album-empty { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-muted); font-size: 2rem; color: var(--ink-muted); }
.album-meta { display: block; padding: .5rem .75rem; }
.album-card:hover { border-color: var(--accent); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.photo-item { margin: 0; }
.photo-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .5rem; background: var(--surface-muted); }
.photo-grid a[data-lightbox] { display: block; cursor: zoom-in; }

/* Visionneuse de la photothèque (static/js/gallery.js) */
body.lightbox-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 1080; background: rgba(8, 8, 8, .98); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox-stage { position: absolute; inset: 0 0 3.5rem; display: flex; align-items: center; justify-content: center; padding: 1rem 4rem; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; opacity: 0; transition: opacity .25s ease; border-radius: .25rem; }
.lightbox-img.is-ready { opacity: 1; }
.lightbox-spinner { position: absolute; }
.lightbox-spinner[hidden] { display: none; }
.lightbox-btn { background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; text-decoration: none; flex: none; }
.lightbox-btn:hover, .lightbox-btn:focus-visible { background: rgba(255, 255, 255, .25); color: #fff; outline: 2px solid #fff; outline-offset: 2px; }
.lightbox-btn[hidden] { display: none; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: .75rem; }
.lightbox-next { right: .75rem; }
.lightbox-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3.5rem; display: flex; align-items: center; gap: .5rem;
  padding: 0 .75rem; color: #fff; background: rgba(0, 0, 0, .35); }
.lightbox-counter { font-variant-numeric: tabular-nums; opacity: .8; min-width: 4.5rem; }
.lightbox-caption { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 576px) {
  .lightbox-stage { padding: .5rem; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 4rem; transform: none; }
}
.support-btn { min-width: 3.5rem; }
.response-box { border-inline-start: 3px solid var(--accent); padding: .5rem 1rem; background: var(--surface-muted); border-radius: .5rem; }
.faq-item { border-bottom: 1px solid var(--line); padding: .6rem 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { cursor: pointer; font-weight: 500; }
.planning { overflow-x: auto; }
.planning-row { display: flex; align-items: stretch; min-width: 640px; border-bottom: 1px solid var(--line); }
.planning-label { flex: 0 0 11rem; padding: .5rem .5rem .5rem 0; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-track { position: relative; flex: 1 1 auto; min-height: 2.5rem; display: flex; }
.planning-head .planning-track span { font-size: .7rem; color: var(--ink-muted); border-inline-start: 1px solid var(--line); padding-inline-start: .2rem; }
.planning-block { position: absolute; top: .35rem; bottom: .35rem; border-radius: .35rem; background: var(--ink); color: var(--surface); font-size: .7rem;
  padding: .1rem .35rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
.planning-block.pending { background: repeating-linear-gradient(45deg, var(--bs-warning), var(--bs-warning) 6px, #f5c451 6px, #f5c451 12px); color: #1c1917; }

/* GED et wiki */
.doc-preview { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface-muted); }
.doc-preview-img { max-width: 100%; border-radius: .5rem; border: 1px solid var(--line); }
.wiki-content { line-height: 1.7; overflow-wrap: anywhere; }
.wiki-content h1, .wiki-content h2, .wiki-content h3 { margin-top: 1.5rem; }
.wiki-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.wiki-content th, .wiki-content td { border: 1px solid var(--line); padding: .35rem .6rem; }
.wiki-content pre, .wiki-content code { background: var(--surface-muted); border-radius: .35rem; }
.wiki-content pre { padding: .75rem; overflow-x: auto; }
.wiki-content blockquote { border-inline-start: 3px solid var(--accent); padding-inline-start: 1rem; color: var(--ink-muted); }
.wiki-content img { max-width: 100%; }
.wiki-diff { font-size: .8rem; white-space: pre-wrap; background: var(--surface-muted); padding: .75rem; border-radius: .5rem; max-height: 70vh; overflow: auto; }
.wiki-diff .add { background: color-mix(in srgb, #16a34a 18%, transparent); display: block; }
.wiki-diff .del { background: color-mix(in srgb, #dc2626 18%, transparent); display: block; text-decoration: line-through; }

/* Recherche globale */
.topbar-search { position: relative; flex: 0 1 22rem; min-width: 0; }
.topbar-search .bi { position: absolute; inset-inline-start: .65rem; top: 50%; transform: translateY(-50%); color: var(--ink-muted); font-size: .85rem; }
.topbar-search input { padding-inline-start: 2rem; border-radius: 999px; background: var(--surface-muted); }
@media (max-width: 575.98px) { .topbar-search { flex-basis: 8rem; } }
.wiki-content h1 { font-size: 1.5rem; } .wiki-content h2 { font-size: 1.25rem; } .wiki-content h3 { font-size: 1.1rem; }
.wiki-content h4, .wiki-content h5, .wiki-content h6 { font-size: 1rem; }

/* Parc automobile */
.fleet-week th, .fleet-week td { min-width: 7rem; vertical-align: top; }
.fleet-week thead th.today { color: var(--accent); }
.fleet-chip { display: block; font-size: .72rem; padding: .1rem .35rem; margin-bottom: .2rem; border-radius: .3rem; background: var(--ink); color: var(--surface);
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 10rem; }
.fleet-chip.pending { background: var(--bs-warning); color: #1c1917; }

/* Soumissions */
.stat-bar { display: inline-block; width: 3rem; height: .4rem; margin-inline-end: .4rem; border-radius: 999px; vertical-align: middle;
  background: linear-gradient(to right, var(--accent) var(--w), var(--surface-muted) var(--w)); }

/* Lien public vers les appels (connexion, pied de page) */
.auth-calls { display: flex; align-items: center; gap: .75rem; width: 100%; margin: 1.5rem 0 0; padding: .75rem 1rem;
  border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .85rem; }
.auth-calls:hover { border-color: var(--accent); }
.auth-calls > .bi:first-child { font-size: 1.25rem; color: var(--accent); }
.auth-calls span { flex: 1 1 auto; color: var(--ink-muted); }
.auth-calls strong { color: var(--ink); }
.auth-footer a, .public-footer a { color: inherit; }
.public-footer { font-size: .75rem; color: var(--ink-muted); text-align: center; padding: 1.5rem 1rem; }

/* Annuaire */
.dir-photo { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 1px solid var(--line); }
.dir-photo-sm { width: 3.25rem; height: 3.25rem; }
.dir-photo-lg { width: 8.5rem; height: 8.5rem; }
.dir-initials { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent);
  font-weight: 500; font-size: 1.1rem; }
.dir-photo-lg.dir-initials { font-size: 2.25rem; }
.dir-chip { display: inline-block; font-size: .75rem; padding: .1rem .55rem; margin: 0 .25rem .25rem 0; border-radius: 999px;
  background: var(--surface-muted); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.dir-chip:hover { border-color: var(--accent); color: var(--accent); }
.dir-chip-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.dir-label { font-size: .75rem; font-weight: 500; color: var(--ink-muted); margin: .5rem 0 .25rem; }
.dir-pub { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.dir-pub:last-child { border-bottom: 0; }
.person-card:hover { border-color: var(--accent); }
.min-w-0 { min-width: 0; }

/* Sélecteur de fichiers multiples (static/js/file-picker.js) */
.file-picker { border: 1px dashed var(--line); border-radius: var(--bs-border-radius); padding: .75rem; }
.file-picker.is-dragover { border-color: var(--accent-light); background: rgba(var(--accent-light-rgb), .06); }
.file-picker .list-group-item { font-size: .875rem; }

/* Suggestions de signataires (static/js/esign-suggest.js) */
.signer-suggest { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: .25rem; max-height: 18rem; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--bs-border-radius); box-shadow: var(--shadow-md); }
.signer-suggest-item { padding: .5rem .75rem; cursor: pointer; }
.signer-suggest-item + .signer-suggest-item { border-top: 1px solid var(--line); }
.signer-suggest-item:hover, .signer-suggest-item.active { background: var(--surface-muted); }

/* --- Publications : une carte par revue ou collection ------------------- */
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: .875rem; }
.pub-card { display: flex; flex-direction: column; gap: .75rem; padding: 1rem 1.125rem; border: 1px solid var(--line); border-radius: .875rem;
  background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.pub-card.is-quiet { box-shadow: none; background: transparent; }
.pub-card.is-quiet .pub-stages { opacity: .6; }
.pub-card-title { font-size: 1rem; font-weight: 500; margin: 0; line-height: 1.3; min-width: 0; }
.pub-card-title a { color: var(--ink); text-decoration: none; }
.pub-card-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-flags { display: flex; flex-wrap: wrap; gap: .375rem; }
.pub-flag { display: inline-flex; align-items: baseline; gap: .25rem; padding: .2rem .6rem; border-radius: 999px; font-size: .8125rem;
  color: var(--ink-muted); background: var(--surface-muted); text-decoration: none; }
.pub-flag strong { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.pub-flag:hover { color: var(--ink); }
.pub-flag.is-on { background: var(--accent-soft); color: var(--accent); }
.pub-flag.is-on strong { color: var(--accent); }
.pub-flag.is-alert { background: rgba(217, 119, 6, .14); color: #b45309; }
.pub-flag.is-alert strong { color: #b45309; }
[data-bs-theme="dark"] .pub-flag.is-alert, [data-bs-theme="dark"] .pub-flag.is-alert strong { color: #fbbf24; }
.pub-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .125rem; }
.pub-stages a { display: grid; grid-template-columns: minmax(0, 9.5rem) 1fr 2.5rem; align-items: center; gap: .625rem; padding: .15rem .25rem;
  border-radius: .375rem; font-size: .8125rem; color: var(--ink-muted); text-decoration: none; }
.pub-stages a:hover { background: var(--surface-muted); color: var(--ink); }
.pub-stage-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-stage-bar { height: .375rem; border-radius: 999px; background: var(--surface-muted); overflow: hidden; }
.pub-stage-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); opacity: .75; }
.pub-stage-n { text-align: end; font-variant-numeric: tabular-nums; color: var(--ink); }
.pub-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: auto; padding-top: .625rem; border-top: 1px solid var(--line); }

/* --- Tableau de bord : « À traiter » en cartes, modules à venir repliés -- */
/* Cartes de même hauteur sur une ligne, qui se partagent toute la largeur ; le lien « Voir » reste en bas */
.todo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: .875rem; align-items: stretch; }
.todo-card { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.125rem; border: 1px solid var(--line); border-radius: .875rem;
  border-top: 3px solid var(--tone, var(--accent)); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.todo-card .todo-count { background: var(--tone-soft, var(--accent-soft)); color: var(--tone, var(--accent)); }
.todo-card .todo-rows { display: flex; flex-direction: column; }
/* Dans une carte : le titre sur toute la largeur, le détail dessous (lisible même dans une colonne étroite) */
.todo-card .todo-row, [dir="rtl"] .todo-card .todo-row { padding: .4rem 0; border-top: 1px solid var(--line); grid-template-columns: minmax(0, 1fr); gap: 0; }
.todo-card .todo-detail { font-size: .8125rem; max-width: none; }
.todo-card .todo-rows:empty { display: none; }
.todo-more { margin-top: auto; padding-top: .25rem; color: var(--tone, var(--accent)); text-decoration: none; font-weight: 500; }
.todo-more:hover { text-decoration: underline; }
.planned-modules > summary { cursor: pointer; list-style: none; }
.planned-modules > summary::-webkit-details-marker { display: none; }
.planned-modules > summary::before { content: "\F285"; font-family: "bootstrap-icons"; font-size: .75rem; color: var(--ink-muted); transition: transform .15s ease-out; }
.planned-modules[open] > summary::before { transform: rotate(90deg); }
[dir="rtl"] .planned-modules > summary::before { transform: scaleX(-1); }
[dir="rtl"] .planned-modules[open] > summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .planned-modules > summary::before { transition: none; } }

/* Actions rapides dans le bandeau d'accueil */
.quick-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .5rem; }
.quick-action { display: inline-flex; align-items: center; gap: .5rem; padding: .375rem .875rem .375rem .375rem; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; font-size: .875rem; font-weight: 500;
  border: 1px solid transparent; transition: border-color .15s ease-out, transform .15s ease-out; }
.quick-action .mod-chip { width: 1.75rem; height: 1.75rem; border-radius: 999px; font-size: .875rem; }
.quick-action:hover { color: var(--ink); border-color: color-mix(in srgb, var(--tone) 45%, transparent); transform: translateY(-1px); }
.quick-action:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }
[dir="rtl"] .quick-action { padding: .375rem .375rem .375rem .875rem; }
@media (max-width: 767.98px) {  /* téléphone : une seule ligne qu'on fait défiler, au lieu d'une pile */
  .quick-actions { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: .25rem; scrollbar-width: none; }
  .quick-actions::-webkit-scrollbar { display: none; }
  .quick-action { flex-shrink: 0; white-space: nowrap; }
}
/* Tuiles de chiffres : pastille colorée, nombre, libellé */
.dash-tile { display: flex; align-items: center; gap: .875rem; }
.dash-tile .mod-chip { flex-shrink: 0; display: inline-flex; margin: 0; font-size: 1.2rem; color: var(--tone); }  /* pas la règle des libellés de .stat-tile */
.dash-tile-text { display: flex; flex-direction: column; min-width: 0; }
.dash-tile-text > span { margin: 0; }
a.dash-tile { transition: border-color .15s ease-out, box-shadow .15s ease-out; }
a.dash-tile:hover { box-shadow: var(--shadow-md); }
/* Modules : grandes cartes avec description, chiffre clé et accès directs aux rubriques */
.dash-module-section-title { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 .5rem; }
.mod-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: .875rem; align-items: stretch; }
.mod-card { display: flex; flex-direction: column; gap: .75rem; padding: 1rem 1.125rem; border: 1px solid var(--line); border-radius: .875rem;
  background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; transition: border-color .15s ease-out, box-shadow .15s ease-out; }
.mod-card:hover { border-color: color-mix(in srgb, var(--tone) 40%, transparent); box-shadow: var(--shadow-md); }
.mod-card-head { display: flex; align-items: flex-start; gap: .75rem; color: var(--ink); text-decoration: none; }
.mod-card-head:hover .mod-card-name { color: var(--tone); }
.mod-card-head:focus-visible { outline: 2px solid var(--tone); outline-offset: 3px; border-radius: .5rem; }
.mod-card-name { display: block; font-weight: 600; }
.mod-card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .8125rem; color: var(--ink-muted); }
.mod-card-stat { font-size: .8125rem; color: var(--ink-muted); padding: .375rem .625rem; border-radius: .5rem; background: var(--tone-soft); }
.mod-card-stat strong { font-size: 1rem; color: var(--tone); font-variant-numeric: tabular-nums; margin-inline-end: .125rem; }
.mod-card-stat.is-alert { background: rgba(217, 119, 6, .12); }
.mod-card-stat.is-alert strong { color: #b45309; }
[data-bs-theme="dark"] .mod-card-stat.is-alert strong { color: #fbbf24; }
.mod-card-links { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: auto; }
.mod-card-links a { padding: .2rem .625rem; border-radius: 999px; border: 1px solid var(--line); font-size: .8125rem; color: var(--ink); text-decoration: none; }
.mod-card-links a:hover { border-color: var(--tone); color: var(--tone); }
/* « Mon espace » : cartes personnelles (congés, demandes, envois en signature) */
.space-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: .875rem; align-items: stretch; }
.space-card { display: flex; flex-direction: column; gap: .625rem; padding: 1rem 1.125rem; border: 1px solid var(--line); border-radius: .875rem;
  background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.space-head { display: flex; align-items: center; gap: .625rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.space-head:hover { color: var(--tone); }
.space-head > .bi-chevron-right { color: var(--ink-muted); }
.space-value { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.space-value strong { font-size: 1.75rem; font-weight: 500; line-height: 1; color: var(--tone); font-variant-numeric: tabular-nums; }
.space-value span { font-size: .8125rem; color: var(--ink-muted); }
.space-value.is-alert strong { color: #d97706; }
.space-rows { display: flex; flex-direction: column; }
.space-rows .todo-row, [dir="rtl"] .space-rows .todo-row { padding: .4rem 0; border-top: 1px solid var(--line); grid-template-columns: minmax(0, 1fr); gap: 0; }
.space-rows .todo-detail { font-size: .8125rem; max-width: none; }
/* Personnalisation : lignes réordonnables, agenda en grille, raccourcis, favoris */
.custom-row { align-items: center; }
.agenda-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: .75rem; }
.agenda-grid > .card { padding: 0 .75rem; }
.agenda-grid .list-row { border-bottom: 0; }
.shortcut-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.favorite-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: .25rem 1rem; }
@media (prefers-reduced-motion: reduce) { .quick-action, .mod-card, a.dash-tile { transition: none; } .quick-action:hover { transform: none; } }

/* Palette d'émoticônes des zones de message (textarea[data-emoji], voir theme.js) */
.emoji-picker { position: relative; display: inline-block; margin-top: .35rem; }
.emoji-palette { position: absolute; z-index: 1050; bottom: calc(100% + 4px); left: 0; width: min(320px, 85vw); max-height: 220px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: .4rem; background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color); border-radius: .6rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.emoji-palette button { border: 0; background: transparent; font-size: 1.25rem; line-height: 1.6; border-radius: .35rem; padding: 0; }
.emoji-palette button:hover, .emoji-palette button:focus-visible { background: var(--bs-secondary-bg); }

/* Pièces jointes des messages (messagerie de l'intranet) */
.chat-file { display: flex; flex-direction: column; gap: .25rem; margin-top: .4rem; color: inherit; text-decoration: none; font-size: .85rem; }
.chat-file span { text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.chat-file .bi { display: inline; margin-inline-end: .25rem; }
.chat-file:has(.bi) { flex-direction: row; align-items: baseline; }
.chat-file img { max-width: min(260px, 100%); max-height: 200px; object-fit: contain; border-radius: .5rem; background: var(--surface); }

/* Correcteur pendant la saisie (static/js/writing.js) */
.writing-panel { margin-top: .3rem; font-size: .85rem; }
.writing-toggle { border: 0; background: transparent; padding: 0; color: var(--bs-warning-text-emphasis, #9a6700); font-weight: 500; cursor: pointer; }
.writing-toggle:hover, .writing-toggle:focus-visible { text-decoration: underline; }
.writing-list { list-style: none; padding: .4rem .6rem; margin: .3rem 0 0; border: 1px solid var(--line, var(--bs-border-color)); border-radius: .6rem;
  background: var(--bs-body-bg); max-height: 260px; overflow-y: auto; }
.writing-list li { padding: .35rem 0; border-bottom: 1px dashed var(--line, var(--bs-border-color)); }
.writing-list li:last-child { border-bottom: 0; }
.writing-context mark { background: rgba(220, 53, 69, .15); color: inherit; padding: 0 .1rem; border-radius: .2rem; text-decoration: underline wavy #dc3545; }
.writing-message { color: var(--bs-secondary-color); margin: .15rem 0 .25rem; }
.writing-actions { display: flex; flex-wrap: wrap; gap: .3rem; }

/* Notifications (cloche de la barre du haut, page Notifications, bulles) */
.notif-menu { width: min(360px, 92vw); }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-item { display: flex; flex-direction: column; gap: .1rem; padding: .55rem 1rem; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line, var(--bs-border-color)); }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover, .notif-item:focus-visible { background: var(--surface-muted, var(--bs-tertiary-bg)); }
.notif-item.unread { background: color-mix(in srgb, var(--accent, #1f5aa8) 8%, transparent); }
.notif-item.unread .notif-title::before { content: ""; display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent, #1f5aa8); margin-inline-end: .4rem; vertical-align: middle; }
.notif-title { font-weight: 600; font-size: .9rem; }
.notif-body { font-size: .82rem; color: var(--bs-secondary-color); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-time { font-size: .75rem; color: var(--bs-secondary-color); }
.notif-toast { min-width: 280px; }
.notif-toast .toast-body { color: inherit; }

/* Tri des listes (static/js/list-sort.js et en-têtes {% sort_th %}) */
.sort-button, .sort-link { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; font: inherit; color: inherit; }
.sort-button:focus-visible, .sort-link:focus-visible { outline: 2px solid var(--accent, #1f5aa8); outline-offset: 2px; border-radius: .2rem; }
.sort-button .bi, .sort-link .bi { font-size: .8em; }
.sort-idle { opacity: .35; }
th:hover .sort-idle { opacity: .8; }
.list-sort { display: flex; justify-content: flex-end; align-items: center; gap: .4rem; margin: 0 0 .4rem; color: var(--bs-secondary-color); }

/* Photothèque : vignette en attente d'un nouvel essai, ou définitivement indisponible */
.photo-item.is-retrying img { opacity: .35; }
.photo-item.is-retrying { background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(127, 127, 127, .08) 8px 16px); border-radius: .5rem; }
.photo-item.is-missing img { visibility: hidden; }

/* Suivi-évaluation : barres d'atteinte, répartition par statut, histogramme des années */
.mel-bar { height: 6px; border-radius: 3px; background: var(--bs-secondary-bg); overflow: hidden; margin-bottom: 4px; }
.mel-bar > span { display: block; height: 100%; border-radius: 3px; }
.mel-on_track { background: var(--bs-success); }
.mel-at_risk { background: var(--bs-warning); }
.mel-off_track { background: var(--bs-danger); }
.mel-muted, .mel-no_target { background: var(--bs-secondary); }
.mel-empty, .mel-no_data { background: var(--bs-secondary-bg); }
.mel-dot-on_track { color: var(--bs-success); font-size: .6rem; }
.mel-dot-at_risk { color: var(--bs-warning); font-size: .6rem; }
.mel-dot-off_track { color: var(--bs-danger); font-size: .6rem; }
.mel-stack { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; }
.mel-stack > span { min-width: 4px; }
.mel-depth-1 { margin-inline-start: 1.25rem; }
.mel-depth-2 { margin-inline-start: 2.5rem; }
.mel-depth-3 { margin-inline-start: 3.75rem; }
.mel-depth-4 { margin-inline-start: 5rem; }
.mel-table th { font-size: .75rem; font-weight: 600; color: var(--bs-secondary-color); }
.mel-hbar { display: grid; grid-template-columns: minmax(0, 9rem) 1fr auto; gap: .5rem; align-items: center; margin-bottom: .25rem; }
.mel-hbar .mel-bar { margin-bottom: 0; }
.mel-chart { display: flex; align-items: flex-end; gap: .75rem; height: 160px; overflow-x: auto; }
.mel-col { flex: 1 0 2.5rem; display: flex; flex-direction: column; align-items: center; height: 100%; }
.mel-col-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--bs-border-color); }
.mel-col-bars > span { width: 40%; max-width: 22px; min-height: 1px; border-radius: 3px 3px 0 0; }
.mel-col-target { background: var(--bs-secondary-bg); border: 1px solid var(--bs-border-color); }
.mel-key { display: inline-block; width: .75rem; height: .75rem; border-radius: 2px; vertical-align: -1px; }
@media (max-width: 767.98px) { .mel-depth-1, .mel-depth-2, .mel-depth-3, .mel-depth-4 { margin-inline-start: .5rem; } }
@media print { .mel-report { border: 0; box-shadow: none; } .mel-report-node { break-inside: avoid; } .nav-tabs-modern { display: none; } }
.mel-table td:first-child { min-width: 13rem; }
/* Suivi-évaluation : carte d'Afrique en tuiles (une case par pays) */
.mel-map { display: grid; grid-template-columns: repeat(11, minmax(0, 2.6rem)); grid-auto-rows: 2.6rem; gap: 3px; direction: ltr; }
.mel-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 4px; font-size: .68rem; line-height: 1.15; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.mel-tile-code { font-weight: 600; }
.mel-tile-1 { background: rgba(var(--bs-success-rgb), .22); color: var(--bs-body-color); }
.mel-tile-2 { background: rgba(var(--bs-success-rgb), .4); color: var(--bs-body-color); }
.mel-tile-3 { background: rgba(var(--bs-success-rgb), .58); color: var(--bs-body-color); }
.mel-tile-4 { background: rgba(var(--bs-success-rgb), .78); color: #fff; }
.mel-tile-5 { background: var(--bs-success); color: #fff; }
.mel-tile-hidden { background: repeating-linear-gradient(45deg, var(--bs-secondary-bg), var(--bs-secondary-bg) 4px, var(--bs-tertiary-bg) 4px, var(--bs-tertiary-bg) 8px); }
@media (max-width: 575.98px) { .mel-map { grid-template-columns: repeat(11, minmax(0, 1fr)); grid-auto-rows: 1.9rem; gap: 2px; } .mel-tile { font-size: .55rem; } }
/* Budget : barre d'exécution (dépensé, puis engagé) */
.budget-bar { display: flex; height: 8px; border-radius: 4px; background: var(--bs-secondary-bg); overflow: hidden; margin-bottom: 4px; }
.budget-spent { background: var(--bs-success); }
.budget-committed { background: rgba(var(--bs-primary-rgb), .45); }
.budget-key { display: inline-block; width: .75rem; height: .75rem; border-radius: 2px; vertical-align: -1px; }

/* Indicateur d'activité (static/js/theme.js) : barre animée en haut de page, message si le traitement dure */
.busy-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2000; overflow: hidden; pointer-events: none; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.busy-bar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 999px; background: var(--accent); animation: busy-slide 1.1s ease-in-out infinite; }
@keyframes busy-slide { from { left: -40%; } to { left: 100%; } }
.busy-pill { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; font-size: .875rem; pointer-events: none; color: var(--bs-body-color); background: var(--bs-body-bg); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
html.is-busy, html.is-busy a, html.is-busy button { cursor: progress; }
@media (prefers-reduced-motion: reduce) { .busy-bar::before { animation: none; left: 0; width: 100%; opacity: .6; } }
/* Boutons de navigation : la flèche suit le sens de lecture */
.btn .bi-arrow-left, .btn .bi-chevron-left, .btn .bi-chevron-right, .page-link .bi { vertical-align: -.1em; }

/* Barre d'étapes d'un dossier (partials/flow.html) : étapes faites, étape en cours, étapes à venir, puis « À présent ». */
.flow { border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: .75rem 1rem; background: var(--bs-tertiary-bg); }
.flow-steps { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 0; margin: 0 0 .5rem; padding: 0; }
.flow-step { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; color: var(--bs-secondary-color); }
.flow-step:not(:last-child)::after { content: ""; width: 1.5rem; height: 2px; margin: 0 .5rem; background: var(--bs-border-color); }
.flow-dot { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--bs-border-color); display: inline-flex;
  align-items: center; justify-content: center; font-size: .75rem; font-weight: 600; background: var(--bs-body-bg); }
.flow-step--done { color: var(--bs-body-color); }
.flow-step--done .flow-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.flow-step--done:not(:last-child)::after { background: #16a34a; }
.flow-step--current { color: var(--bs-body-color); font-weight: 600; }
.flow-step--current .flow-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.flow-step--stopped { color: #dc2626; font-weight: 600; }
.flow-step--stopped .flow-dot { background: #dc2626; border-color: #dc2626; color: #fff; }
.flow-now { font-size: .875rem; }
@media (max-width: 575.98px) { .flow-steps { flex-direction: column; } .flow-step:not(:last-child)::after { display: none; } }

/* Page de signature : zones cliquables, aperçu de la signature à son emplacement, bouton « Signer ce document » */
.esign-field-preview { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: contain; pointer-events: none; }
.esign-field-preview--text { display: flex; align-items: center; justify-content: center; font-family: "Brush Script MT", "Segoe Script", cursive; font-size: clamp(.7rem, 2.2vw, 1.25rem); color: #1c1917; white-space: nowrap; overflow: hidden; }
.esign-field.is-mine.is-filled { background: rgba(255, 255, 255, .85); animation: none; }
button.esign-field--signature.is-mine .esign-field-label, button.esign-field--initials.is-mine .esign-field-label { font-size: .7rem; font-weight: 600; }
.esign-sign-cta { position: sticky; bottom: 1rem; display: flex; justify-content: center; margin-top: -3.25rem; padding-bottom: .5rem; pointer-events: none; z-index: 2; }
.esign-sign-cta .btn { pointer-events: auto; }
#signature-block { border-radius: .5rem; transition: box-shadow .3s; }
#signature-block.is-highlighted { box-shadow: 0 0 0 4px var(--accent-soft); }

/* Fenêtre de confirmation : les retours à la ligne du message sont respectés */
.confirm-message { white-space: pre-line; overflow-wrap: anywhere; }

/* Tableau de bord : deux colonnes sur grand écran (colonne principale et colonne latérale), une seule en dessous */
.dash-cols { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1.5rem; }
@media (min-width: 1200px) {
  .dash-cols:not(.is-single) { grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr); align-items: start; }
}
.dash-main, .dash-side { min-width: 0; }
.dash-side .agenda-grid { grid-template-columns: minmax(0, 1fr); }
/* Listes datées et pages récentes */
.due-list { display: flex; flex-direction: column; }
.due-row { display: flex; align-items: center; gap: .75rem; padding: .5rem .25rem; border-radius: .5rem; color: inherit; text-decoration: none; min-width: 0; }
.due-row + .due-row { border-top: 1px solid var(--bs-border-color-translucent); }
.due-row:hover, .due-row:focus-visible { background: var(--bs-tertiary-bg); }
.due-text { flex: 1 1 auto; min-width: 0; }
.due-date { flex: 0 0 2.75rem; display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding: .25rem 0; border-radius: .5rem; background: var(--bs-tertiary-bg); }
.due-date strong { font-size: 1.05rem; font-weight: 600; }
.due-date span { font-size: .6875rem; text-transform: uppercase; color: var(--ink-muted); }
.due-date.is-today { background: var(--accent-soft); color: var(--accent); }
.due-date.is-today span { color: inherit; }

/* Signature : questions et clarifications */
.q-thread { display: flex; flex-direction: column; gap: .5rem; }
.q-msg { padding: .625rem .75rem; border-radius: .625rem; background: var(--bs-tertiary-bg); max-width: 92%; overflow-wrap: anywhere; }
.q-msg.is-mine { align-self: flex-end; background: var(--accent-soft); }
.q-meta { font-size: .75rem; color: var(--ink-muted); margin-bottom: .125rem; }
.q-body { font-size: .9375rem; }

/* Événements : vote du public pour des prix */
.award-vote { max-width: 34rem; }
.award-row.is-chosen { border-color: var(--bs-success); }
.award-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(26rem, 100%), 1fr)); gap: 1rem; }
.award-card { display: flex; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; color: #111; break-inside: avoid; }
.award-card .text-body-secondary { color: #555 !important; }
.award-card-qr { flex: 0 0 auto; line-height: 0; }
.award-card-qr svg { width: 11rem; height: 11rem; }
.award-cards.is-single { grid-template-columns: minmax(0, 1fr); }
.award-cards.is-single .award-card { flex-direction: column; text-align: center; padding: 2rem; }
.award-cards.is-single .award-card-qr svg { width: min(70vh, 30rem); height: min(70vh, 30rem); }
.award-cards.is-single .award-card-text { font-size: 1.25rem; }
@media print { .award-cards { grid-template-columns: 1fr 1fr; } .app-sidebar, .app-topbar, .nav-tabs-modern, .page-header { display: none !important; } }
.award-results { table-layout: fixed; width: 100%; }
.award-results .award-rank { width: 2rem; }
.award-results .award-count { width: 3.5rem; }

/* Messagerie : fils à la manière d'une messagerie instantanée */
.conv-list { display: flex; flex-direction: column; max-height: 70vh; overflow-y: auto; }
.conv-row { display: flex; align-items: center; gap: .625rem; padding: .5rem .375rem; border-radius: .625rem; color: var(--ink); text-decoration: none; min-width: 0; }
.conv-row + .conv-row { border-top: 1px solid var(--line); }
.conv-row:hover, .conv-row:focus-visible { background: var(--surface-muted); }
.conv-row.active { background: var(--accent-soft); }
.conv-avatar { flex: 0 0 2.25rem; width: 2.25rem; height: 2.25rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: .8125rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.conv-avatar.is-group { background: var(--surface-muted); color: var(--ink-muted); }
.conv-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.conv-top, .conv-bottom { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.conv-name { flex: 1 1 auto; font-weight: 500; }
.conv-row.is-unread .conv-name, .conv-row.is-unread .conv-preview { font-weight: 600; color: var(--ink); }
.conv-time { flex: 0 0 auto; font-size: .75rem; color: var(--ink-muted); }
.conv-preview { flex: 1 1 auto; font-size: .8125rem; color: var(--ink-muted); }
.chat-head { display: flex; align-items: center; gap: .625rem; padding-bottom: .5rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); }
.chat-group { margin-bottom: .5rem; }
.chat-group summary { cursor: pointer; color: var(--ink-muted); }
.chat-day { align-self: center; margin: .5rem 0 .125rem; }
.chat-day span { font-size: .7rem; color: var(--ink-muted); background: var(--surface-muted); border-radius: 999px; padding: .125rem .625rem; }
.chat-subject { align-self: center; font-size: .75rem; color: var(--ink-muted); font-style: italic; }

/* Bouton flottant « écrire un message » : fixe dans le coin bas, côté fin de ligne (droite, ou gauche en arabe) */
.fab-message { position: fixed; inset-block-end: 1.25rem; inset-inline-end: 1.25rem; z-index: 1040; width: 3.25rem; height: 3.25rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; text-decoration: none;
  background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); transition: transform .12s ease, box-shadow .12s ease; }
.fab-message:hover, .fab-message:focus-visible { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .28); }
.fab-message:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.fab-message .fab-count { position: absolute; inset-block-start: -.25rem; inset-inline-end: -.25rem; font-size: .7rem; }
body:has(.fab-message) #notif-toasts { bottom: 4.25rem !important; }  /* les notifications s'affichent au-dessus du bouton */
@media (prefers-reduced-motion: reduce) { .fab-message { transition: none; } }

/* Éditeur de texte enrichi (static/js/richtext.js) et affichage du texte enrichi (filtre « rich ») */
.rich { display: flex; flex-direction: column; }
.rich-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--bs-border-color); border-bottom: 0;
  border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0; background: var(--bs-tertiary-bg); }
.rich-btn { border: 0; background: transparent; color: var(--bs-body-color); width: 2rem; height: 2rem; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.rich-btn:hover:not(:disabled), .rich-btn:focus-visible { background: var(--bs-secondary-bg); }
.rich-btn:disabled { opacity: .35; }
.rich-sep { width: 1px; height: 1.25rem; background: var(--bs-border-color); margin: 0 4px; }
.rich-editor { border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius); overflow-y: auto; max-height: 70vh; line-height: 1.55; }
.rich-editor:focus { outline: none; }
.rich-content p, .rich-editor p { margin: 0 0 .6rem; }
.rich-content h2, .rich-editor h2 { font-size: 1.15rem; font-weight: 600; margin: 1rem 0 .4rem; }
.rich-content h3, .rich-editor h3 { font-size: 1.02rem; font-weight: 600; margin: .8rem 0 .3rem; }
.rich-content h4, .rich-editor h4 { font-size: .95rem; font-weight: 600; margin: .6rem 0 .25rem; }
.rich-content ul, .rich-content ol, .rich-editor ul, .rich-editor ol { margin: 0 0 .6rem; padding-inline-start: 1.4rem; }
.rich-content blockquote, .rich-editor blockquote { margin: 0 0 .6rem; padding-inline-start: .8rem; border-inline-start: 3px solid var(--bs-border-color); color: var(--bs-secondary-color); }
.rich-content table, .rich-editor table { border-collapse: collapse; margin: .25rem 0 .8rem; width: 100%; }
.rich-content th, .rich-content td, .rich-editor th, .rich-editor td { border: 1px solid var(--bs-border-color); padding: .3rem .5rem; vertical-align: top; min-width: 3rem; }
.rich-content th, .rich-editor th { background: var(--bs-tertiary-bg); font-weight: 600; }
.rich-content > :last-child { margin-bottom: 0; }

/* Mémos : une personne par ligne (personne, rôle, fonction), sur toute la largeur de la colonne */
.signer-row.memo-person { display: block; padding: .5rem 0 .75rem; }
.memo-person-head { display: flex; align-items: center; gap: .25rem; margin-bottom: .375rem; }
.memo-person-head .signer-num { margin-top: 0; }
/* Sondages et enquêtes */
.survey-question { font-size: 1rem; font-weight: 500; float: none; }
.survey-answer[disabled] { opacity: .85; }
.survey-scale { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.survey-scale .btn { min-width: 2.25rem; }
.survey-other { display: flex; align-items: center; gap: .5rem; }
.survey-other .form-check-label { white-space: nowrap; }
.survey-other .form-control { flex: 1 1 8rem; min-width: 0; max-width: 22rem; }
.survey-input { max-width: 22rem; }
.survey-rank { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.survey-rank .form-select { width: 4.5rem; flex: none; }
.survey-rank label { margin: 0; }
.survey-grid th[scope=row] { min-width: 9rem; }
.survey-grid td, .survey-grid th { border-color: var(--line); }
.survey-condition { border-top: 1px dashed var(--line); padding-top: .75rem; margin-top: .25rem; }
.survey-texts { list-style: none; padding: 0; margin: .25rem 0 0; }
.survey-texts li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.survey-texts li:last-child { border-bottom: 0; }
.survey-public { max-width: 40rem; }
