:root {
  color: #142033;
  background: #f4f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f4f7fb; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-frame { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: 70px auto 1fr; }
.sidebar { grid-column: 1; grid-row: 1 / span 3; display: flex; flex-direction: column; padding: 28px 16px 22px; color: #eaf1fb; background: linear-gradient(180deg, #071321 0%, #0a1a2d 64%, #081424 100%); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; font-size: 21px; font-weight: 760; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #102034; background: linear-gradient(135deg, #d9e9ff, #70a7ff); font-size: 24px; font-weight: 850; }
.sidebar-tagline { margin: 8px 0 30px 54px; color: #8293aa; font-size: 13px; }
.sidebar-nav { display: grid; gap: 7px; }
.sidebar-nav .button { justify-content: flex-start; width: 100%; color: #c6d2e1; background: transparent; text-align: left; }
.sidebar-nav .button:first-child { color: #fff; background: linear-gradient(90deg, #173b60, #122b45); box-shadow: inset 3px 0 #2982ff; }
.sidebar-divider { height: 1px; margin: 21px 13px; background: #24364c; }
.sidebar-quote { margin: auto 8px 38px; color: #b5c2d3; white-space: pre-line; font-size: 17px; line-height: 1.45; font-style: italic; }
.sidebar-motto { margin: 0 5px; color: #63778e; white-space: pre-line; font-size: 12px; line-height: 1.55; letter-spacing: .16em; }
.toolbar { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 24px; padding: 0 34px; color: #c6d2e1; background: #0a1728; }
.global-search { width: min(510px, 55vw); padding: 11px 16px; border: 1px solid #253a53; border-radius: 10px; outline: none; color: #eff6ff; background: #122237; }
.global-search::placeholder { color: #92a3b8; }
.toolbar-project { margin-left: auto; color: #f6f9fe; font-size: 14px; font-weight: 650; }
.toolbar-user { color: #d4deeb; font-size: 14px; white-space: nowrap; }
.menu-toggle { display: none; }
.screen-context { grid-column: 2; padding: 26px 42px 0; color: #6d7e95; font-size: 14px; }
.screen { grid-column: 2; padding: 0 42px 42px; }
.welcome-hero { position: relative; min-height: 148px; margin: 0 0 20px; padding: 29px 34px; overflow: hidden; border-radius: 18px; background: linear-gradient(103deg, #fff 0%, #f6f9fe 48%, #dceaff 100%); }
.welcome-hero::after { content: ""; position: absolute; right: 5%; bottom: -55px; width: 430px; height: 170px; border-radius: 50%; background: radial-gradient(ellipse, rgba(105, 157, 225, .28), transparent 68%); transform: rotate(-8deg); }
.eyebrow { margin: 0 0 8px; color: #397be8; font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.welcome-hero h1 { margin: 0; color: #102034; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.045em; }
.welcome-copy { margin: 7px 0 0; color: #607692; font-size: 17px; }
.new-project-hero { display: flex; align-items: center; width: 100%; min-height: 112px; margin: 0 0 28px; padding: 20px 30px; border: 1px solid #dce5f0; border-radius: 17px; color: #142033; background: #fff; text-align: left; box-shadow: 0 8px 26px rgba(33, 66, 112, .06); }
.new-project-hero:hover { border-color: #4e92ff; box-shadow: 0 10px 28px rgba(33, 96, 190, .13); }
.new-project-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-right: 22px; border-radius: 50%; color: #fff; background: #2168ed; font-size: 36px; font-weight: 300; }
.new-project-copy { font-size: 23px; font-weight: 750; }
.new-project-copy::after { content: "Décrivez simplement ce que vous voulez accomplir"; display: block; margin-top: 4px; color: #607692; font-size: 14px; font-weight: 450; }
.new-project-arrow { margin-left: auto; color: #6d8099; font-size: 28px; }
.projects-heading { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.projects-heading h2 { margin: 0; color: #142033; font-size: 20px; letter-spacing: -.02em; }
.projects-heading > span { padding: 8px 12px; border: 1px solid #dbe4ef; border-radius: 8px; color: #52677f; background: #fff; font-size: 13px; }
.project-filters { margin-bottom: 15px; }
.project-card { min-height: 390px; overflow: hidden; border: 1px solid #e2eaf3; border-radius: 15px; background: #fff; box-shadow: 0 6px 20px rgba(26, 56, 94, .06); }
.screen > .project-card { display: inline-flex; vertical-align: top; width: calc(25% - 13px); margin: 0 14px 18px 0; flex-direction: column; }
.screen > .project-card:nth-of-type(4n) { margin-right: 0; }
.project-cover { display: grid; place-items: center; height: 112px; color: rgba(255, 255, 255, .95); background: linear-gradient(135deg, #142e4c, #557fae); }
.project-card:nth-of-type(4n + 1) .project-cover { background: linear-gradient(135deg, #081321, #43698f); }
.project-card:nth-of-type(4n + 2) .project-cover { background: linear-gradient(135deg, #18293c, #778ba4); }
.project-card:nth-of-type(4n + 3) .project-cover { background: linear-gradient(135deg, #315743, #98b59a); }
.project-cover-symbol { display: grid; place-items: center; width: 47px; height: 47px; border: 1px solid rgba(255,255,255,.5); border-radius: 14px; background: rgba(6, 20, 37, .42); font-size: 24px; font-weight: 800; }
.project-card-body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 17px; }
.project-card h2 { margin: 11px 0 4px; color: #142033; font-size: 20px; letter-spacing: -.035em; }
.project-card-meta { gap: 6px; order: -1; }
.project-ref, .project-phase, .health-pill { padding: 4px 8px; border-radius: 999px; font-size: 11px; }
.project-ref { color: #2869cf; background: #e8f1ff; }
.project-phase { color: #62748c; background: #f0f3f7; }
.health-pill { color: #177844; background: #ddf6e8; font-weight: 700; }
.health-pill.warning { color: #8b6415; background: #fff1cc; }
.health-pill.negative { color: #a33434; background: #ffe2e2; }
.project-description { min-height: 40px; margin: 0 0 14px; color: #607692; font-size: 13px; line-height: 1.45; }
.progress-row { display: flex; align-items: center; gap: 9px; margin-top: auto; }
.progress-track { display: block; flex: 1; height: 8px; overflow: hidden; border-radius: 999px; background: #e7edf5; }
.progress-fill { display: block; height: 100%; border-radius: inherit; background: #347ff0; }
.progress-row strong { color: #273b55; font-size: 13px; }
.project-stats, .project-updated { margin: 11px 0 0; color: #647993; font-size: 12px; }
.project-updated { margin-top: 7px; }
.project-card-actions { justify-content: space-between; margin-top: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 9px 14px; border: 0; border-radius: 8px; color: #fff; background: #12243a; font-size: 13px; font-weight: 650; }
.button:hover { background: #1c3c60; }
.button-secondary { color: #415875; background: #edf2f7; }
.button-secondary:hover { color: #19375b; background: #dce8f5; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card { margin: 14px 0; padding: 20px; border: 1px solid #e1e6eb; border-radius: 10px; background: #fff; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field input, .field textarea { min-height: 40px; padding: 10px 12px; border: 1px solid #c8d4e2; border-radius: 7px; outline: none; color: #1c2c40; background: #fff; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: #377ee8; box-shadow: 0 0 0 3px rgba(55,126,232,.12); }
.muted { color: #6d7e95; }
.overview-section { margin-top: 20px; padding: 22px; border: 1px solid #e1e6eb; border-radius: 12px; background: #fff; }
.overview-header { position: relative; border-bottom: 1px solid #d9dee5; padding-bottom: 20px; }
.overview-header h1, h1 { margin: 0; font-size: 30px; letter-spacing: -0.03em; }
h2 { margin: 0 0 18px; font-size: 18px; }
h3 { margin: 20px 0 8px; color: #52606d; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.overview-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin: 0; }
.overview-fact dt { color: #697586; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.overview-fact dd { margin: 5px 0 0; line-height: 1.45; }
.overview-list { margin: 0; padding-left: 20px; line-height: 1.55; }
.overview-empty { color: #87919d; list-style: none; margin-left: -20px; }
.health-badge { position: absolute; top: 2px; right: 0; border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 700; }
.health-positive { color: #17633a; background: #d9f5e5; }
.health-warning { color: #805b10; background: #fff1c7; }
.health-negative { color: #9b2c2c; background: #ffe0e0; }
.health-neutral { color: #52606d; background: #e8edf2; }
.briefing-panel { border-color: #9bb8ff; box-shadow: 0 8px 24px rgba(31, 94, 255, .08); }
.workspace-layout { grid-column: 2; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; padding: 0 42px 42px; }
.workspace-panel { min-width: 0; }
.workspace-panel.panel-large { grid-column: span 12; }
.workspace-panel.panel-medium { grid-column: span 6; }
.workspace-panel.panel-small { grid-column: span 4; }
.workspace-panel > .project-overview { max-width: none; padding: 0; }
.workspace-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.workspace-actions + .card { margin-top: 14px; }
.module-dock-wrapper { margin-top: 16px; }
.module-dock { overflow: hidden; border: 1px solid #dfe7f0; border-radius: 12px; background: #fff; }
.module-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px; border-bottom: 1px solid #e4ebf3; background: #f7f9fc; }
.module-tab { padding: 9px 13px; border: 0; border-radius: 7px; color: #5b6f87; background: transparent; white-space: nowrap; font-size: 13px; font-weight: 650; }
.module-tab:hover, .module-tab.active { color: #173c70; background: #e2edff; }
.module-body { min-height: 105px; padding: 18px 20px; }
.module-panel.hidden { display: none; }
.module-panel h3 { margin-top: 0; }
.chat-history { display: grid; gap: 10px; max-height: 230px; overflow-y: auto; margin: 8px 0 12px; }
.chat-message { max-width: 88%; padding: 9px 12px; border-radius: 10px; color: #2b415d; background: #f1f5f9; }
.chat-message p { margin: 3px 0 0; line-height: 1.45; }
.chat-user { justify-self: end; background: #e2edff; }
.chat-role { color: #6e829a; font-size: 11px; font-weight: 700; }
.chat-composer { display: flex; align-items: end; gap: 8px; }
.chat-composer textarea { flex: 1; min-height: 42px; padding: 10px; border: 1px solid #c8d4e2; border-radius: 8px; resize: vertical; }
.chat-status { min-height: 18px; margin: 8px 0 0; color: #6d7e95; font-size: 12px; }
.guardian-drift, .guardian-blocked { color: #a33434; }
.guardian-review { color: #8b6415; }
@media (max-width: 1120px) { .screen > .project-card { width: calc(33.333% - 12px); } .screen > .project-card:nth-of-type(4n) { margin-right: 14px; } }
@media (max-width: 820px) {
  .app-frame { display: block; overflow-x: hidden; }
  .sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: min(248px, 82vw); min-height: 100vh; padding: 22px 16px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 14px 0 30px rgba(5, 20, 38, .22); }
  .sidebar.sidebar-open { transform: translateX(0); }
  .sidebar-quote, .sidebar-motto, .sidebar-tagline, .sidebar-divider { display: none; }
  .sidebar-nav { display: grid; margin-top: 22px; }
  .toolbar { position: sticky; top: 0; z-index: 10; grid-column: auto; padding: 14px 18px; }
  .menu-toggle { display: inline-flex; flex: 0 0 auto; }
  .screen-context, .screen, .workspace-layout { padding-left: 18px; padding-right: 18px; }
  .screen > .project-card { width: calc(50% - 8px); }
  .workspace-panel.panel-medium, .workspace-panel.panel-small { grid-column: span 12; }
}
@media (max-width: 560px) {
  .toolbar-project, .toolbar-user { display: none; }
  .global-search { width: 100%; min-width: 0; }
  .welcome-hero { min-height: 132px; padding: 24px 20px; }
  .welcome-copy { font-size: 15px; }
  .new-project-hero { min-height: 94px; padding: 16px; }
  .new-project-icon { width: 45px; height: 45px; margin-right: 13px; font-size: 28px; }
  .new-project-copy { font-size: 18px; }
  .new-project-copy::after { max-width: 190px; font-size: 12px; }
  .screen > .project-card { width: 100%; margin-right: 0; }
  .overview-facts { grid-template-columns: 1fr; }
  .health-badge { position: static; display: inline-block; margin-top: 16px; }
  .module-tabs { scrollbar-width: thin; }
  .module-tab { min-height: 42px; }
  .chat-composer { align-items: stretch; flex-direction: column; }
  .chat-composer .button { width: 100%; }
}
