:root { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #1f2937; background: #f4f6f8; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #1d4ed8; text-decoration: none; }
button, .button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; padding: .7rem 1rem; background: #1d4ed8; color: white; font-weight: 650; cursor: pointer; }
button.secondary, .button.secondary { background: #e8eefc; color: #1e3a8a; }
button.danger { background: #b91c1c; padding: .5rem .7rem; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1.4rem; background: #111827; color: white; }
.brand { color: white; font-weight: 800; font-size: 1.15rem; }
.context { margin-left: 1rem; padding-left: 1rem; border-left: 1px solid #4b5563; color: #d1d5db; }
.top-actions { display: flex; align-items: center; gap: 1rem; font-size: .92rem; }
.top-actions a, .link-button { color: #dbeafe; }
.link-button { padding: 0; background: none; }
.layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.sidebar { padding: 1.2rem; background: white; border-right: 1px solid #e5e7eb; display: flex; flex-direction: column; gap: .45rem; }
.sidebar a { padding: .72rem .8rem; border-radius: 8px; color: #374151; }
.sidebar a:hover { background: #eff6ff; color: #1d4ed8; }
.content { padding: 2rem; max-width: 1500px; width: 100%; }
.auth-content { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: linear-gradient(135deg, #eff6ff, #f8fafc); }
.auth-card { width: min(430px, 100%); padding: 2rem; border-radius: 16px; background: white; box-shadow: 0 18px 50px rgba(15, 23, 42, .12); }
h1 { margin-top: 0; }
.lead { font-size: 1.1rem; }
.card { padding: 1.25rem; background: white; border: 1px solid #e5e7eb; border-radius: 13px; box-shadow: 0 2px 8px rgba(15, 23, 42, .04); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.choice-card { text-align: left; }
.muted { color: #6b7280; }
.notice { padding: 1rem; border-radius: 10px; background: #ecfdf5; color: #065f46; margin-bottom: 1rem; }
.stats { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.stat { min-width: 180px; padding: 1.2rem; background: white; border-radius: 12px; border: 1px solid #e5e7eb; }
.stat strong { display: block; font-size: 2rem; }
.stat span { color: #6b7280; }
.two-columns { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(500px, 1.7fr); gap: 1rem; align-items: start; }
.form-stack { display: grid; gap: 1rem; }
label { display: grid; gap: .4rem; font-weight: 650; }
label.checkbox { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
input, select { width: 100%; padding: .72rem .8rem; border: 1px solid #cbd5e1; border-radius: 8px; background: white; font: inherit; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .8rem; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
th { color: #4b5563; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.table-card { overflow-x: auto; }
.flash { margin-bottom: 1rem; padding: .85rem 1rem; border-radius: 9px; }
.flash.success { background: #ecfdf5; color: #065f46; }
.flash.error { background: #fef2f2; color: #991b1b; }
.empty-state { padding: 2rem; border-radius: 12px; background: white; border: 1px dashed #cbd5e1; text-align: center; }
small { color: #6b7280; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .sidebar { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #e5e7eb; } .two-columns { grid-template-columns: 1fr; } .topbar { align-items: flex-start; padding-block: .8rem; } .top-actions { flex-wrap: wrap; justify-content: flex-end; } }

/* Phase 2 — gestion des accès */
.brand-zone { display: flex; align-items: center; min-width: 0; }
.user-name { white-space: nowrap; }
.sidebar-title { margin: .9rem .8rem .15rem; color: #94a3b8; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.page-header, .section-header, .assignment-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.page-header { margin-bottom: 1.2rem; }
.page-header h1 { margin-bottom: .25rem; }
.page-header p, .section-header p { margin: 0; color: #64748b; }
.back-link { display: inline-block; margin-bottom: .7rem; font-weight: 650; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: .25rem .55rem; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: .74rem; font-weight: 750; white-space: nowrap; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-admin { background: #ede9fe; color: #5b21b6; }
.status-stack { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }
.three-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; align-items: start; }
.assignments-layout { grid-template-columns: minmax(300px, .7fr) minmax(540px, 1.5fr); }
.action-stack { display: grid; gap: .8rem; }
.action-stack form, .action-stack button { width: 100%; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; align-items: end; }
.hint { font-size: .75rem; color: #64748b; font-weight: 500; }
.assignment-list { display: grid; gap: 1rem; }
.assignment-card { padding: 1rem; border: 1px solid #dbe3ec; border-radius: 11px; background: #f8fafc; }
.assignment-card.inactive-card { opacity: .72; background: #f1f5f9; }
.assignment-heading { margin-bottom: .9rem; }
.compact-form { gap: .7rem; }
.delete-form { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid #e2e8f0; }
.button-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.small-button { padding: .45rem .65rem; font-size: .82rem; }
button.secondary { background: #e8eefc; color: #1e3a8a; }
.module-card { display: block; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
.module-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 23, 42, .08); border-color: #bfdbfe; }
.module-card p { color: #64748b; }
.clean-list { margin: .5rem 0 0; padding-left: 1.2rem; }
.clean-list li { margin: .45rem 0; }
.permissions-summary { margin-top: 1.2rem; }
.permissions-summary summary { cursor: pointer; font-weight: 750; }
.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.tag { padding: .3rem .55rem; border-radius: 7px; background: #f1f5f9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; }
.info-notice { background: #eff6ff; color: #1e3a8a; }
.inline-filter { margin-bottom: 1rem; max-width: 520px; }
.permissions-table select { min-width: 135px; }
.permissions-table td:first-child { text-transform: capitalize; font-weight: 650; }
.sticky-actions { position: sticky; bottom: 0; padding: 1rem 0 .2rem; background: linear-gradient(to bottom, rgba(255,255,255,0), white 25%); display: flex; justify-content: flex-end; }
.matrix-selector { margin-bottom: 1rem; }
.matrix-filter { grid-template-columns: 180px minmax(280px, 1fr) auto; }

@media (max-width: 1100px) {
  .three-columns { grid-template-columns: 1fr; }
  .assignments-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .page-header, .section-header, .assignment-heading { flex-direction: column; }
  .status-stack { justify-content: flex-start; }
  .form-row, .matrix-filter { grid-template-columns: 1fr; }
  .content { padding: 1rem; }
  .context { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Phase 3 — Comité de Direction */
textarea { width: 100%; padding: .72rem .8rem; border: 1px solid #cbd5e1; border-radius: 8px; background: white; font: inherit; resize: vertical; }
.section-spaced { margin-top: 1rem; }
.committee-home-layout { grid-template-columns: minmax(320px, .85fr) minmax(520px, 1.4fr); }
.committee-member-layout { grid-template-columns: minmax(330px, .72fr) minmax(560px, 1.5fr); }
.committee-meetings-layout { grid-template-columns: minmax(340px, .72fr) minmax(560px, 1.5fr); }
.committee-detail-grid { display: grid; grid-template-columns: minmax(520px, 1.35fr) minmax(360px, .85fr); gap: 1rem; align-items: start; }
.term-list, .meeting-list, .member-list, .decision-list { display: grid; gap: .75rem; margin-top: 1rem; }
.term-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.term-card.active-term { border-color: #86efac; background: #f0fdf4; }
.form-details { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e5e7eb; }
.form-details summary { cursor: pointer; font-weight: 750; margin-bottom: 1rem; }
.meeting-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: .9rem; padding: .85rem; border: 1px solid #e2e8f0; border-radius: 10px; color: inherit; background: #fff; }
.meeting-row:hover { border-color: #bfdbfe; background: #f8fbff; }
.meeting-date { display: grid; place-items: center; padding: .45rem; border-radius: 9px; background: #eff6ff; color: #1e3a8a; }
.meeting-date strong { font-size: 1.2rem; line-height: 1; }
.meeting-date span { font-size: .7rem; margin-top: .2rem; }
.meeting-main { display: grid; gap: .2rem; min-width: 0; }
.meeting-main span, .meeting-main small { color: #64748b; }
.full-meeting-list .meeting-row { min-height: 82px; }
.member-card { border: 1px solid #e2e8f0; border-radius: 11px; background: #fff; overflow: hidden; }
.member-card > summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; cursor: pointer; list-style: none; }
.member-card > summary::-webkit-details-marker { display: none; }
.member-card > summary > div:first-child { display: grid; gap: .2rem; }
.member-card > summary span:not(.badge) { color: #64748b; font-size: .9rem; }
.member-meta { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; padding: 0 1rem 1rem; color: #64748b; font-size: .86rem; }
.edit-panel { margin: 0 1rem 1rem; padding: 1rem; border-radius: 10px; background: #f8fafc; }
.attendance-list { display: grid; gap: .65rem; }
.attendance-row { display: grid; grid-template-columns: minmax(160px, 1fr) 145px minmax(150px, .8fr); gap: .65rem; align-items: center; padding: .7rem; border: 1px solid #e2e8f0; border-radius: 9px; }
.attendance-row > div { display: grid; gap: .15rem; }
.prose-box { white-space: pre-wrap; padding: 1rem; border-radius: 9px; background: #f8fafc; border: 1px solid #e2e8f0; min-height: 80px; }
.decision-card { padding: 1rem; border: 1px solid #e2e8f0; border-radius: 11px; background: #fff; }
.decision-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.decision-heading h3 { margin: .15rem 0 .5rem; }
.vote-summary { display: flex; flex-wrap: wrap; gap: 1rem; padding-top: .75rem; border-top: 1px solid #e5e7eb; color: #475569; }
.three-field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }

@media (max-width: 1100px) {
  .committee-home-layout, .committee-member-layout, .committee-meetings-layout, .committee-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .meeting-row { grid-template-columns: 52px minmax(0, 1fr); }
  .meeting-row > .badge { grid-column: 2; }
  .attendance-row { grid-template-columns: 1fr; }
  .three-field-row { grid-template-columns: 1fr; }
}

/* Phase 4 — Workflow des réunions, DocuSeal et assistant IA */
.meeting-workflow-nav { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1rem; padding: .45rem; border: 1px solid #dbe3ec; border-radius: 12px; background: #fff; }
.meeting-workflow-nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .68rem .85rem; border-radius: 9px; color: #475569; font-weight: 750; }
.meeting-workflow-nav a:hover { background: #f1f5f9; }
.meeting-workflow-nav a.active { background: #1d4ed8; color: #fff; }
.meeting-workflow-nav a span { min-width: 1.45rem; padding: .12rem .4rem; border-radius: 999px; background: rgba(148,163,184,.22); text-align: center; font-size: .72rem; }
.meeting-title-header { margin-bottom: .8rem; }
.workflow-summary { display: grid; gap: 1rem; }
.workflow-steps { display: grid; gap: .65rem; }
.workflow-steps a { display: grid; grid-template-columns: 34px 1fr; gap: .7rem; align-items: center; padding: .7rem; border: 1px solid #e2e8f0; border-radius: 10px; color: inherit; }
.workflow-steps a:hover { border-color: #93c5fd; background: #f8fbff; }
.workflow-steps a > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-weight: 800; }
.workflow-steps a > div { display: grid; gap: .15rem; }
.workflow-steps small { color: #64748b; }
.meeting-mini-statuses { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .2rem; }
.mini-status { padding: .2rem .45rem; border-radius: 6px; background: #f1f5f9; color: #475569 !important; font-size: .7rem; }
.participant-table-wrap { overflow-x: auto; }
.participant-table { min-width: 1120px; }
.participant-table input, .participant-table select { min-width: 130px; }
.participant-table .compact-checkbox { min-width: auto; width: 20px; height: 20px; }
.inactive-row { opacity: .55; background: #f8fafc; }
.participant-add-form { grid-template-columns: 1fr 1fr 1fr auto; }
.workflow-list { display: grid; gap: .8rem; padding-left: 1.3rem; }
.workflow-list li { padding-left: .3rem; }
.workflow-list li span { display: block; margin-top: .2rem; color: #64748b; }
.convocation-readiness { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1rem 0; }
.convocation-readiness > div { display: grid; gap: .2rem; padding: .85rem; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.convocation-readiness span { color: #64748b; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.delivery-list { display: grid; gap: .65rem; }
.delivery-list > div { display: grid; grid-template-columns: 1fr auto; gap: .45rem .7rem; align-items: center; padding: .7rem; border: 1px solid #e2e8f0; border-radius: 9px; }
.delivery-list > div > div { display: grid; gap: .12rem; }
.delivery-error { grid-column: 1 / -1; color: #991b1b; }
.copy-field { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.recorder-card { overflow: hidden; }
.recording-time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.25rem; font-weight: 800; }
.recorder-visual { display: flex; align-items: center; justify-content: center; gap: .8rem; min-height: 150px; margin: 1rem 0; border-radius: 14px; background: #f8fafc; border: 1px dashed #cbd5e1; }
#recording-dot { width: 18px; height: 18px; border-radius: 50%; background: #94a3b8; }
#recording-dot.recording { background: #dc2626; animation: recorder-pulse 1.2s infinite; }
#recording-dot.paused { background: #f59e0b; }
#recording-dot.processing { background: #2563eb; animation: recorder-pulse 1.2s infinite; }
@keyframes recorder-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .45; } }
.recorder-actions { justify-content: center; }
.transcript-box { max-height: 520px; overflow-y: auto; margin-top: 1rem; }
.document-editor-card { padding: 1.4rem; }
.document-editor { min-height: 720px; line-height: 1.55; font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; }
.document-preview { line-height: 1.55; font-family: Georgia, 'Times New Roman', serif; }
.meeting-template-card { border-left: 5px solid #bfdbfe; }
.print-only { display: none; }
.official-document pre { white-space: pre-wrap; font-family: Georgia, 'Times New Roman', serif; line-height: 1.55; }
@media (max-width: 900px) {
  .participant-add-form, .convocation-readiness { grid-template-columns: 1fr; }
  .meeting-workflow-nav { overflow-x: auto; flex-wrap: nowrap; }
  .meeting-workflow-nav a { white-space: nowrap; }
  .copy-field { grid-template-columns: 1fr; }
}
@media print {
  .topbar, .sidebar, .back-link, .page-header, .meeting-workflow-nav, .document-editor-card, .no-print, .flash, .notice { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; }
  .print-only { display: block; }
  .official-document { color: #000; }
  .official-document header { text-align: center; margin-bottom: 2rem; }
  .official-document h1 { font-size: 1.6rem; }
}
