:root {
  --hug-red: #c8102e;
  --hug-red-dark: #9a0c23;
  --hug-navy: #0f2744;
  --hug-blue: #1a4a7a;
  --hug-sky: #dceaf5;
  --hug-mist: #eef4f8;
  --hug-ice: #f7fafc;
  --hug-line: #c5d6e4;
  --text: #152536;
  --muted: #5a6f82;
  --ok: #1f7a4d;
  --warn: #9a6b00;
  --err: #a11919;
  --shadow: 0 10px 30px rgba(15, 39, 68, 0.08);
  --radius: 14px;
  --sidebar-w: 268px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 40% -10%, rgba(200, 16, 46, 0.10), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(26, 74, 122, 0.14), transparent 50%),
    linear-gradient(180deg, #f4f8fb 0%, #e8f0f6 100%);
  min-height: 100vh;
}

.brand-mark {
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--hug-red), var(--hug-red-dark));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(200, 16, 46, 0.35);
}
.brand-144 {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong {
  font-family: var(--serif);
  font-size: 1rem;
  color: #fff;
  line-height: 1.2;
}
.brand-text span { font-size: 0.78rem; color: rgba(255,255,255,0.72); }

/* ── Sidebar layout ───────────────────────────────── */
body.has-sidebar {
  display: block;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(175deg, #0c1f36 0%, #143556 55%, #0f2744 100%);
  color: #fff;
  box-shadow: 8px 0 32px rgba(15, 39, 68, 0.22);
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(500px 280px at 0% 0%, rgba(200, 16, 46, 0.28), transparent 60%),
    radial-gradient(400px 240px at 100% 100%, rgba(88, 160, 220, 0.12), transparent 55%);
  pointer-events: none;
}

.sidebar-brand,
.sidebar-urgence,
.sidebar-nav,
.sidebar-footer {
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.15rem 1rem;
}

.sidebar-urgence {
  margin: 0 1.15rem 1rem;
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--hug-red);
  color: #fff;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  width: fit-content;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-label {
  margin: 1rem 0.55rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: rgba(255,255,255,0.88);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.sidebar-nav a.active {
  background: rgba(255,255,255,0.14);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--hug-red);
}

.sidebar-nav a.nav-admin {
  background: transparent !important;
  color: #ffc9d2 !important;
}
.sidebar-nav a.nav-admin:hover {
  background: rgba(200, 16, 46, 0.22) !important;
  color: #fff !important;
}
.sidebar-nav a.nav-admin.active {
  background: linear-gradient(135deg, var(--hug-red), var(--hug-red-dark)) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(200, 16, 46, 0.35);
}

.nav-ico {
  width: 1.25rem;
  text-align: center;
  opacity: 0.85;
  font-size: 0.95rem;
}

.sidebar-footer {
  padding: 1rem 1.1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.15);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
a.sidebar-user-link {
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  padding: 0.35rem;
  margin: -0.35rem -0.35rem 0.75rem;
}
a.sidebar-user-link:hover {
  background: rgba(255,255,255,0.08);
}
.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg, #2a6aa8, #1a4a7a);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.sidebar-user-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.sidebar-user-meta strong {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-meta .role-pill {
  margin-left: 0;
  width: fit-content;
}
.btn-logout {
  width: 100%;
  color: #fff !important;
  border-color: rgba(255,255,255,0.22) !important;
  background: rgba(255,255,255,0.06) !important;
}
.btn-logout:hover {
  background: rgba(255,255,255,0.12) !important;
}

.shell {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 1.15rem 1.5rem 2rem;
  max-width: calc(1180px + var(--sidebar-w));
  width: auto;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

.shell-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.35rem;
  padding: 0.35rem 0.15rem 0.85rem;
  border-bottom: 1px solid rgba(197, 214, 228, 0.7);
}
.shell-top-title {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.shell-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.shell-top-title strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--hug-navy);
}
.shell-top-meta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--hug-red);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.sidebar-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--hug-line);
  background: #fff;
  color: var(--hug-navy);
  font-size: 1.15rem;
  cursor: pointer;
}
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 39, 68, 0.45);
  z-index: 35;
}

.main { margin-top: 1rem; min-width: 0; max-width: 100%; }
.footer {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 0.25rem;
}

/* Auth (no sidebar) */
.auth-body .auth-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}
.auth-brand-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(135deg, #0f2744, #1a4a7a);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.auth-brand-bar .brand-text strong { color: #fff; }
.auth-brand-bar .brand-text span { color: rgba(255,255,255,0.72); }
.auth-footer { justify-content: center; text-align: center; }

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .shell {
    margin-left: 0;
    max-width: none;
    padding: 1rem 1rem 2rem;
  }
  .sidebar-toggle { display: inline-grid; place-items: center; }
}

.hero {
  background:
    linear-gradient(120deg, rgba(15, 39, 68, 0.94), rgba(26, 74, 122, 0.88)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: #fff;
  border-radius: calc(var(--radius) + 2px);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "URGENCE";
  position: absolute;
  right: -0.2rem;
  top: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  background: var(--hug-red);
  padding: 0.35rem 1.4rem 0.35rem 0.9rem;
  transform: rotate(0deg);
  border-radius: 8px 0 0 8px;
}
.hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 700;
}
.hero p { margin: 0; opacity: 0.9; max-width: 60ch; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.stat {
  background: #fff;
  border: 1px solid var(--hug-line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: 0.82rem; }
.stat .value {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--hug-navy);
  font-weight: 700;
  margin-top: 0.15rem;
}

.panel {
  background: #fff;
  border: 1px solid var(--hug-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.15rem;
  min-width: 0;
  max-width: 100%;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  background: linear-gradient(180deg, var(--hug-ice), var(--hug-mist));
  border-bottom: 1px solid var(--hug-line);
}
.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--serif);
  color: var(--hug-navy);
}
.panel-body { padding: 1.1rem 1.15rem; }

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
  width: 100%;
  /* évite que le panel coupe le scroll / le contenu */
  margin: 0;
}
.table-wrap::-webkit-scrollbar {
  height: 8px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #9bb4c9;
  border-radius: 999px;
}
table.data {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.94rem;
  table-layout: auto;
}
table.data th, table.data td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hug-line);
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}
table.data th {
  background: var(--hug-navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.data tr:nth-child(even) td { background: #f3f7fb; }
table.data tr:nth-child(odd) td { background: #e8f1f8; }
table.data tr:hover td { background: #d9e8f5; }
table.data a {
  color: var(--hug-blue);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
table.data a:hover { text-decoration: underline; }
/* Colonnes actions / badges : ne pas écraser */
table.data td:last-child,
table.data th:last-child {
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-theme { background: #ffe3e8; color: var(--hug-red-dark); }
.badge-publication { background: #e3eef9; color: #164976; }
.badge-protocole { background: #e5f5ec; color: #1d6a45; }
.badge-subvention { background: #fff0d9; color: #8a5a00; }
.badge-status { background: #edf0f4; color: #405568; }
.badge-public { background: #e8f8ef; color: #1f7a4d; }
.badge-private { background: #f1f3f6; color: #667788; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: none;
  border-radius: 10px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(145deg, var(--hug-red), var(--hug-red-dark));
  color: #fff;
  box-shadow: 0 8px 16px rgba(200, 16, 46, 0.25);
}
.btn-secondary {
  background: var(--hug-navy);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--hug-blue);
  border: 1px solid var(--hug-line);
}
.btn-danger {
  background: #fff;
  color: var(--err);
  border: 1px solid #f0c2c2;
}
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.82rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.15rem;
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero::after { display: none; }
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
@media (max-width: 700px) {
  .form-row { grid-template-columns: 1fr; }
}
label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: var(--hug-navy);
}
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--hug-line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 160px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(200, 16, 46, 0.25);
  border-color: var(--hug-red);
}
.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--hug-navy);
}
.check input { width: auto; }

.auth-wrap {
  max-width: 440px;
  margin: 2.5rem auto;
}
.auth-card .panel-body { padding: 1.4rem; }
.auth-hint {
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  background: var(--hug-mist);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}
.auth-hint code {
  background: #fff;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--hug-navy);
}

.meta-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}
.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--hug-line);
  font-size: 0.92rem;
}
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 600; text-align: right; }

.description {
  line-height: 1.65;
  white-space: pre-wrap;
  color: var(--text);
  background: var(--hug-ice);
  border-left: 4px solid var(--hug-red);
  padding: 1rem 1.1rem;
  border-radius: 0 12px 12px 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
}
.filters .field { min-width: 160px; flex: 1; }

.flash-wrap { margin-top: 0.75rem; display: grid; gap: 0.45rem; }
.flash {
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
}
.flash-ok { background: #e7f7ee; color: var(--ok); }
.flash-warn { background: #fff6df; color: var(--warn); }
.flash-err { background: #fdecec; color: var(--err); }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.empty {
  padding: 1.4rem;
  text-align: center;
  color: var(--muted);
}
.title-cell {
  min-width: 220px;
  max-width: 36rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.title-cell .muted {
  display: block;
  margin-top: 0.25rem;
  white-space: normal;
}
.muted { color: var(--muted); font-size: 0.86rem; }

@media (max-width: 700px) {
  table.data {
    min-width: 640px;
    font-size: 0.88rem;
  }
  table.data th, table.data td {
    padding: 0.65rem 0.75rem;
  }
  .title-cell { min-width: 200px; max-width: none; }
  .panel-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .meeting-project-list li,
  .attachment-item,
  .participant-list li {
    min-width: 0;
    max-width: 100%;
  }
  .meeting-project-list a,
  .attachment-item strong {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

.role-pill {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--hug-sky);
  color: var(--hug-navy);
}
.role-pill-admin {
  background: #ffe3e8;
  color: var(--hug-red-dark);
}

.admin-subnav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.admin-subnav a {
  color: var(--hug-blue);
  font-weight: 600;
  text-decoration: none;
}
.admin-subnav strong { color: var(--hug-navy); }

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.admin-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--hug-line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.admin-card:hover {
  transform: translateY(-2px);
  border-color: var(--hug-red);
}
.admin-card-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hug-red);
  margin-bottom: 0.45rem;
}
.admin-card h2 {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--hug-navy);
}
.admin-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.badge-role-admin { background: #ffe3e8; color: var(--hug-red-dark); }
.badge-role-chercheur { background: #e3eef9; color: #164976; }
.badge-role-lecteur { background: #edf0f4; color: #405568; }

.inline-form { margin: 0; }
.inline-form select {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  min-width: 140px;
}

tr.current-version td {
  background: #e8f8ef !important;
}

input[type="file"] {
  width: 100%;
  border: 1px dashed var(--hug-line);
  border-radius: 10px;
  padding: 0.85rem;
  background: var(--hug-ice);
}

.subject-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.85rem;
}
.subject-row.compact { margin-top: 0.45rem; }
.badge-subject {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.panel .badge-subject,
table.data .badge-subject,
.subject-row.compact .badge-subject {
  background: #e8f0fa;
  color: #1a4a7a;
  border: 1px solid #c5d6e4;
}
.hero .subject-row .badge-subject {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.badge-skill {
  background: #fff0d9;
  color: #8a5a00;
  border: 1px solid #f0d7a8;
}
.hero .badge-skill {
  background: rgba(255, 240, 217, 0.22);
  color: #ffe6b8;
  border-color: rgba(255, 230, 184, 0.45);
}

.experts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.expert-card {
  background: #fff;
  border: 1px solid var(--hug-line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}
.expert-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.expert-card-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--hug-navy);
}
.expert-card h3 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.experts-list { display: grid; gap: 0.85rem; }
.expert-row {
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--hug-line);
}
.expert-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.verbatim-box {
  max-height: 420px;
  overflow: auto;
  font-size: 0.9rem;
  white-space: pre-wrap;
}
.meeting-project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.meeting-project-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--hug-line);
  min-width: 0;
  max-width: 100%;
}
.meeting-project-list a {
  flex: 1 1 12rem;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.actions-board { display: grid; gap: 0.75rem; }
.action-card {
  border: 1px solid var(--hug-line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: var(--hug-ice);
}
.action-card.status-valide { background: #e8f8ef; border-color: #b7e0c7; }
.action-card.status-fait { background: #eef6ff; }
.action-card.status-en_cours { background: #fff8e8; }
.action-desc { margin: 0 0 0.65rem; font-weight: 600; color: var(--hug-navy); }
.action-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
@media (max-width: 700px) {
  .action-meta { grid-template-columns: 1fr; }
}

.attachment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.attachment-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed var(--hug-line);
}
.attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.attachment-upload {
  padding-top: 0.75rem;
  border-top: 1px solid var(--hug-line);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.summary-box {
  white-space: pre-wrap;
  line-height: 1.55;
}
.action-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.action-edit-desc {
  margin: 0 0 0.85rem;
  white-space: pre-wrap;
}

/* Modales de saisie */
.app-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(640px, calc(100vw - 2rem));
  width: 100%;
}
.app-modal::backdrop {
  background: rgba(15, 39, 68, 0.55);
  backdrop-filter: blur(2px);
}
.modal-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 39, 68, 0.28);
  overflow: hidden;
  border: 1px solid var(--hug-line);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--hug-line);
  background: var(--hug-ice);
}
.modal-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--hug-navy);
}
.modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 8px;
}
.modal-close:hover { background: var(--hug-sky); color: var(--hug-navy); }
.modal-body {
  padding: 1.1rem 1.15rem;
  display: grid;
  gap: 0.75rem;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.15rem 1.1rem;
  border-top: 1px solid var(--hug-line);
  background: #fff;
}
.modal-card.form-grid { gap: 0; }
.modal-card.form-grid > .modal-body { gap: 0.75rem; }
.modal-body .form-grid { gap: 0.55rem; }

.app-modal-wide {
  max-width: min(820px, calc(100vw - 2rem));
}
.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.rich-content {
  line-height: 1.55;
  color: var(--text);
}
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  margin: 1rem 0 0.45rem;
  font-family: var(--serif);
  color: var(--hug-navy);
  line-height: 1.25;
}
.rich-content h3 { font-size: 1.08rem; }
.rich-content p { margin: 0 0 0.75rem; }
.rich-content ul,
.rich-content ol {
  margin: 0 0 0.85rem 1.15rem;
  padding: 0;
}
.rich-content li { margin: 0.25rem 0; }
.rich-content blockquote {
  margin: 0.75rem 0;
  padding: 0.55rem 0.85rem;
  border-left: 3px solid var(--hug-red);
  background: var(--hug-ice);
  color: var(--muted);
}
.summary-box.rich-content { white-space: normal; }
.verbatim-box.rich-content {
  white-space: normal;
  max-height: 520px;
}

.rich-editor {
  border: 1px solid var(--hug-line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.45rem 0.5rem;
  background: var(--hug-ice);
  border-bottom: 1px solid var(--hug-line);
}
.rich-toolbar button {
  border: 1px solid transparent;
  background: #fff;
  border-radius: 8px;
  padding: 0.28rem 0.55rem;
  font-size: 0.82rem;
  color: var(--hug-navy);
  cursor: pointer;
  line-height: 1.2;
}
.rich-toolbar button:hover {
  border-color: var(--hug-line);
  background: var(--hug-sky);
}
.rich-sep {
  width: 1px;
  align-self: stretch;
  background: var(--hug-line);
  margin: 0 0.2rem;
}
.rich-surface {
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  padding: 0.9rem 1rem;
  outline: none;
  line-height: 1.55;
}
.rich-surface-tall {
  min-height: 320px;
  max-height: 560px;
}
.rich-surface:focus {
  box-shadow: inset 0 0 0 2px rgba(26, 74, 122, 0.18);
}
.rich-surface h3 {
  margin: 0.7rem 0 0.35rem;
  font-family: var(--serif);
  color: var(--hug-navy);
}
.rich-surface p { margin: 0 0 0.65rem; }
.rich-surface ul,
.rich-surface ol { margin: 0 0 0.65rem 1.1rem; }

/* Progression LLM (structuration / analyse) */
form.is-progressing .progress-idle { display: none; }
form.is-progressing .modal-foot .btn-ghost,
form.is-progressing .modal-close { opacity: 0.45; pointer-events: none; }
.progress-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fafc 0%, #eef4f8 100%);
  border: 1px solid var(--hug-line);
}
.progress-panel[hidden] { display: none !important; }
.progress-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #c5d6e4;
  border-top-color: var(--hug-red);
  animation: progress-spin 0.8s linear infinite;
  justify-self: start;
}
@keyframes progress-spin {
  to { transform: rotate(360deg); }
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}
.progress-meta strong {
  color: var(--hug-navy);
  font-size: 0.95rem;
}
.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #dceaf5;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hug-red), #e85a3a 55%, #1a4a7a);
  transition: width 0.25s ease;
}
.progress-hint { margin: 0; font-size: 0.85rem; }
dialog.app-modal[data-busy]::backdrop {
  background: rgba(15, 39, 68, 0.7);
}

.audio-recorder {
  border: 1px solid var(--hug-line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: var(--hug-ice);
  display: grid;
  gap: 0.65rem;
}
.audio-recorder-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem;
  align-items: baseline;
}
.audio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.audio-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--hug-navy);
  min-width: 3.2rem;
}
.audio-playback {
  width: 100%;
  margin-top: 0.15rem;
}
.participant-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.participant-list li {
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--hug-line);
}
