.chantier-page { min-width: 0; padding: 28px 32px 48px; background: #f5f6f8; color: #26313d; }
.chantier-page h1, .chantier-page h2, .chantier-page h3, .chantier-page p { margin: 0; }
.chantier-page button, .chantier-page input { font: inherit; }
.chantier-page button { cursor: pointer; }
.chantier-page button:disabled { cursor: wait; opacity: .65; }
.chantier-page button:focus-visible, .chantier-page a:focus-visible { outline: 3px solid #a20b3d; outline-offset: 3px; }
.chantier-page svg { width: 18px; height: 18px; flex-shrink: 0; }
.chantier-toolbar, .chantier-toolbar-actions, .chantier-record-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chantier-toolbar { margin-bottom: 24px; }
.chantier-toolbar h1, .chantier-record-heading h1 { font-size: 28px; line-height: 1.25; margin: 5px 0; }
.chantier-eyebrow { color: #91072f; font-size: 11px; letter-spacing: .07em; font-weight: 800; text-transform: uppercase; }
.chantier-muted, .chantier-caption { color: #75818c; font-size: 12px; line-height: 1.6; }
.chantier-readonly, .chantier-secondary, .chantier-stage { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; white-space: nowrap; }
.chantier-readonly { color: #647581; }
.chantier-secondary { border: 1px solid #d9dfe6; border-radius: 9px; padding: 10px 14px; color: #4c5965; background: white; font-weight: 700; }
.chantier-secondary:hover { background: #faf3f6; border-color: #c6869b; }
.chantier-search { display: flex; align-items: center; gap: 12px; padding: 0 16px; background: white; border: 1px solid #dfe4ea; border-radius: 12px; box-shadow: 0 4px 16px #24324106; }
.chantier-search input { width: 100%; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; color: inherit; }
.chantier-search:focus-within { border-color: #a20b3d; box-shadow: 0 0 0 3px #a20b3d12; }
.chantier-caption { padding: 14px 0; }
.chantier-kanban { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; padding: 2px 2px 18px; min-height: 340px; scrollbar-width: thin; }
/* Reuse the actual CRM components; only chantier-specific layout is adapted. */
.chantier-column.pipeline-kanban-column { flex: 0 0 350px; width: 350px; }
.chantier-column .pipeline-kanban-column__title h2 { flex: 0 1 auto; margin: 0; white-space: normal; }
.chantier-column-total { justify-content: flex-start; }
.chantier-column-total > span { color: #697582; font-size: .7rem; font-weight: 800; }
.chantier-column > .chantier-column-cards { display: flex; flex-direction: column; max-height: max(260px, calc(100dvh - 310px)); overflow-y: auto; }
.chantier-card { flex-shrink: 0; cursor: pointer; }
.chantier-card-main { min-width: 0; border-radius: 0; }
.chantier-card-main .pipeline-kanban-card__location { overflow-wrap: anywhere; }
.chantier-card-main .pipeline-kanban-card__metrics b { white-space: normal; overflow-wrap: anywhere; }
.chantier-card-poseur { background: var(--level-soft); color: #536473; }
.chantier-card-poseur b { white-space: normal; overflow-wrap: anywhere; }
.chantier-card-reference { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #eceef0; padding-top: 9px; }
.chantier-card-reference small { color: #858990; font-size: .68rem; font-weight: 700; }
.chantier-card-reference b { color: #51565d; font-size: .77rem; }
.chantier-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.chantier-tags:empty { display: none; }
.chantier-tags > span { display: inline-block; padding: 4px 7px; border-radius: 5px; background: #f8e9ef; color: #8c1740; font-size: 10px; line-height: 1.4; font-weight: 700; }
.chantier-notice { border: 1px solid #eddbb4; border-radius: 9px; padding: 12px 15px; background: #fff9ec; color: #8d671b; font-size: 12px; line-height: 1.6; margin-bottom: 16px !important; }
.chantier-notice.is-error { border-color: #efbbc9; background: #fff4f6; color: #9d1840; }
.chantier-empty { padding: 65px 24px; background: white; border: 1px solid #e2e6ec; border-radius: 12px; text-align: center; color: #77828d; }
.chantier-back { background: none; border: 0; color: #687787; padding: 6px 0; }
.chantier-stage { color: #95163f; background: #fbedf2; border: 1px solid #efcedb; border-radius: 30px; padding: 10px 16px; font-weight: 700; }
.chantier-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.chantier-kpi { display: flex; align-items: center; gap: 15px; border: 1px solid #e2e7ed; border-left: 4px solid var(--stage-color); border-radius: 12px; background: white; padding: 20px; box-shadow: 0 5px 15px #1f304006; }
.chantier-kpi > svg { color: var(--stage-color); width: 26px; height: 26px; }
.chantier-kpi div { display: grid; gap: 7px; }
.chantier-kpi small { text-transform: uppercase; color: #838c98; font-size: 10px; font-weight: 800; }
.chantier-kpi strong { font-size: 17px; }
.chantier-record-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.chantier-record-main, .chantier-summary { min-width: 0; }
.chantier-tabs.pipeline-workspace-tabs { max-width: 100%; border-radius: 0; margin-bottom: 16px; }
.chantier-tabs.pipeline-workspace-tabs button { flex: 0 0 auto; }
.chantier-groups, .chantier-group-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.chantier-group-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.chantier-group-columns.is-single { grid-template-columns: minmax(0, 1fr); }
.chantier-panel { border: 1px solid #dfe5eb; border-radius: 11px; background: white; overflow: hidden; }
.chantier-panel.has-table { min-width: 0; }
.chantier-panel h2 { display: flex; align-items: center; gap: 9px; padding: 16px; background: #fafbfc; border-bottom: 1px solid #edf0f3; font-size: 13px; }
.chantier-panel h2 svg { color: #9b2148; }
.chantier-fields { margin: 0; padding: 0; }
.chantier-field { padding: 13px 16px; border-bottom: 1px solid #eff1f4; }
.chantier-field:last-child { border: 0; }
.chantier-field dt { color: #7e8996; font-size: 10px; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; line-height: 1.5; }
.chantier-field dd { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.chantier-field dd a { color: #29679b; text-decoration: none; }
.chantier-field dd a:hover { text-decoration: underline; }
.chantier-field dd a svg { display: inline-block; vertical-align: middle; width: 12px; }
.chantier-boolean { display: inline-flex; align-items: center; gap: 6px; color: #84919a; }
.chantier-boolean.is-yes { color: #18805c; }
.chantier-boolean svg { width: 14px; height: 14px; }
.chantier-table-scroll { overflow: auto; max-width: 100%; }
.chantier-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.chantier-table th { text-align: left; color: #738091; background: #f5f7fa; font-size: 10px; }
.chantier-table td, .chantier-table th { padding: 10px 12px; border-bottom: 1px solid #e7ebf0; min-width: 90px; max-width: 270px; }
.chantier-summary { display: grid; gap: 16px; }
.chantier-history-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: #e8f3ff; }
.chantier-history-icon svg { color: #2c71b8 !important; width: 16px; }
.chantier-history-list { max-height: 650px; overflow-y: auto; scrollbar-width: thin; }
.chantier-history-list > .chantier-muted, .chantier-history-list > .chantier-notice { margin: 12px; }
.chantier-history-list > button { margin: 12px 14px; }
.chantier-message { overflow-wrap: anywhere; }
.chantier-message p { white-space: pre-line; }
.chantier-change { display: grid; min-width: 0; gap: 5px; padding: 8px 0; }
.chantier-change + .chantier-change { border-top: 1px solid #eff1f4; }
.chantier-change-values { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 7px; }
.chantier-change-values svg { width: 13px; height: 13px; align-self: center; color: #88929e; }
.chantier-change-values > .chantier-change-old { color: #858b95; font-weight: 500; }
.chantier-change-values > .chantier-change-new { color: #256c9c; font-weight: 700; }
.chantier-message .chantier-history-unavailable { color: #8a8e95; font-style: italic; }
@media (max-width: 1150px) {
  .chantier-record-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .chantier-page { padding: 24px 20px; }
  .chantier-group-columns { display: flex; flex-direction: column; }
  .chantier-group-stack { display: contents; }
  .chantier-group-columns .chantier-panel { order: var(--group-order); width: 100%; }
}
@media (max-width: 760px) {
  .portal-sidebar .audience-nav.app-nav { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .chantier-page { padding: 20px 14px 110px; }
  .chantier-toolbar { align-items: flex-start; margin-bottom: 18px; }
  .chantier-toolbar-actions { flex-direction: column; gap: 9px; align-items: flex-end; }
  .chantier-toolbar h1, .chantier-record-heading h1 { font-size: 24px; }
  .chantier-kanban {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-inline: 2px;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }
  .chantier-column.pipeline-kanban-column {
    flex-basis: min(350px, calc(100vw - 36px));
    width: min(350px, calc(100vw - 36px));
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .chantier-column > .chantier-column-cards { max-height: 62dvh; }
  .chantier-record-heading { flex-direction: column; align-items: flex-start; }
  .chantier-kpis { gap: 8px; margin: 18px 0; }
  .chantier-kpi { padding: 12px 8px; gap: 7px; align-items: flex-start; }
  .chantier-kpi > svg { display: none; }
  .chantier-kpi strong { font-size: 13px; }
  .chantier-kpi small { font-size: 8px; }
  .chantier-record-layout { grid-template-columns: 1fr; }
  /* Every Odoo section stays visible on phones, without sideways scrolling. */
  .chantier-tabs.pipeline-workspace-tabs { height: auto; min-height: 0; flex-wrap: wrap; justify-content: flex-start; gap: 0 6px; padding: 4px 8px; overflow: visible; }
  .chantier-tabs.pipeline-workspace-tabs button,
  .chantier-tabs.pipeline-workspace-tabs button:first-child { min-height: 44px; max-width: 100%; flex: 0 1 auto; padding: 8px 9px; white-space: normal; overflow-wrap: anywhere; font-size: .82rem; line-height: 1.35; }
}
