:root {
  color-scheme: light;
  --bg: #eef3ff;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #d9dee7;
  --brand: #2651d4;
  --brand-dark: #1d3fa8;
  --soft-blue: #eaf0ff;
  --soft-green: #e8f4ea;
  --soft-yellow: #fff4de;
  --soft-red: #fce8e6;
  --soft-violet: #f3e8ff;
}

/* Expérience quotidienne : recherche, saisie et page Tour + Muni */
.nav-primary .nav-webapp {
  border-color: #c9b7ea;
  background: #f6f1ff;
  color: #583292;
}

.nav-primary .nav-webapp:hover,
.nav-primary .nav-webapp.active {
  border-color: #8157c8;
  background: #6c43ad;
  color: #fff;
}

.global-search {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(260px, 620px);
  gap: 10px;
  align-items: center;
  margin: 9px 0 13px;
}

.global-search > label {
  margin: 0;
  color: #52677e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.global-search-box {
  position: relative;
}

.global-search-box > input {
  width: 100%;
  min-height: 40px;
  padding: 8px 38px 8px 12px;
  border-color: #bdccdd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 46, 84, .06);
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  opacity: .55;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid #b9c9dc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 35px rgba(15, 46, 84, .2);
}

.global-search-results a {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5ebf2;
  color: #102f52;
  text-decoration: none;
}

.global-search-results a:last-child { border-bottom: 0; }
.global-search-results a:hover,
.global-search-results a:focus { background: #eef5ff; }
.global-search-results strong { font-size: 13px; }
.global-search-results span { color: #687b91; font-size: 11px; }
.search-empty { margin: 0; padding: 12px; color: #687b91; font-size: 12px; }

.creation-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .8fr);
  gap: 14px;
}

.creation-columns.is-editing { grid-template-columns: minmax(0, 1fr); }

.standard-add-card,
.quick-add-card {
  display: grid;
  gap: 11px;
  align-content: start;
  margin: 0;
  border: 1px solid #c8d7e7;
  border-radius: 12px;
  padding: 14px;
  background: #f8fbff;
}

.quick-add-card {
  border-color: #b9d7c4;
  background: #f3fbf5;
}

.creation-card-heading {
  display: flex;
  align-items: center;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(110, 133, 160, .2);
}

.creation-mode-selector {
  display: flex;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.mode-choice {
  display: inline-grid;
  flex: 0 0 25px;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 2px solid #8ba8c4;
  border-radius: 50%;
  background: #fff;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.creation-mode-selector[aria-pressed="true"] .mode-choice {
  border-color: var(--brand);
  background: var(--brand);
}

.quick-add-card .creation-mode-selector[aria-pressed="true"] .mode-choice {
  border-color: #3b8458;
  background: #3b8458;
}

.mode-copy { display: grid; gap: 1px; }
.creation-card-heading strong { color: #14395f; font-size: 14px; }
.creation-card-heading small { color: #6a7e93; font-size: 10px; }

.standard-add-card.is-selected {
  box-shadow: 0 0 0 2px rgba(38, 81, 212, .18), 0 8px 20px rgba(29, 63, 168, .07);
}

.quick-add-card.is-selected {
  box-shadow: 0 0 0 2px rgba(59, 132, 88, .2), 0 8px 20px rgba(46, 112, 70, .08);
}

.standard-add-card:not(.is-selected),
.quick-add-card:not(.is-selected) {
  opacity: .82;
}

.planning-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8e4ef;
  border-left: 3px solid #87abd0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
}

.planning-section > label { margin: 0; }
.planning-section > label > input,
.planning-section > label > select { margin-top: 4px; }
.planning-status { border-left-color: #a8b8c8; }

.editor-title-group {
  display: grid;
  gap: 2px;
}

.editor-title-group .eyebrow,
.editor-title-group h2 { margin: 0; }

.editor-title-group .eyebrow { color: var(--brand); }

.edit-planning-card {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: #cbd5f5;
  background: #f7f8ff;
  box-shadow: none;
}

.edit-planning-card .creation-card-heading,
.edit-planning-card .planning-status {
  grid-column: 1 / -1;
}

.edit-planning-card .creation-card-heading {
  border-bottom-color: #d8def4;
}

.edit-planning-card .creation-card-heading strong {
  color: #243f91;
  font-size: 15px;
}

.edit-planning-card .planning-section {
  border-left-color: var(--brand);
  background: #fff;
}

@media (max-width: 900px) {
  .edit-planning-card {
    grid-template-columns: 1fr;
  }
}

.editor-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.editor-shortcuts button,
.duration-input-row button {
  min-height: 32px;
  border: 1px solid #bfd0e3;
  background: #fff;
  color: #315a86;
  font-size: 11px;
  font-weight: 800;
}

.duration-input-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto auto;
  gap: 7px;
  align-items: center;
}

.duration-input-row > span { color: #64748b; font-size: 11px; }

.quick-add-card > p {
  margin: 2px 0 0;
  color: #587065;
  font-size: 12px;
  line-height: 1.45;
}

.quick-planning-button {
  display: grid;
  gap: 6px;
  min-height: 132px;
  border: 1px solid #8dbd9d;
  border-radius: 11px;
  padding: 16px;
  background: linear-gradient(145deg, #fff, #e6f5ea);
  color: #22543d;
  text-align: left;
  box-shadow: 0 6px 14px rgba(34, 84, 61, .08);
}

.quick-planning-button:hover,
.quick-planning-button.is-applied {
  border-color: #4e9265;
  background: #dff2e4;
}

.quick-planning-button > span { font-size: 13px; font-weight: 800; }
.quick-planning-button > strong { font-size: 17px; line-height: 1.25; }
.quick-planning-button > small { color: #4f765d; font-size: 11px; }
.quick-preset-status { color: #51745d; font-size: 10px; font-weight: 700; }

.mini-notes-panel,
.tour-muni-panel {
  margin-top: 15px;
  border: 1px solid #ccd8e6;
  border-radius: 11px;
  padding: 13px;
  background: #fff;
}

.mini-notes-panel { border-color: #d8c98f; background: #fffdf4; }

.mini-notes-heading,
.tour-muni-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.mini-notes-heading h3,
.tour-muni-heading h3 { margin: 1px 0 0; color: #153b62; }
.section-title-inline,
.tour-heading-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 9px;
}
.section-title-inline .eyebrow,
.tour-heading-title .eyebrow { margin: 0; }
.section-title-inline .eyebrow::after,
.tour-heading-title .eyebrow::after {
  margin-left: 9px;
  color: #8ca1b8;
  content: '\2014';
}
.section-title-inline h3,
.tour-heading-title h2 { margin: 0; }
.mini-notes-heading > span { color: #7d6c2e; font-size: 11px; font-weight: 800; }
.tour-muni-heading p { margin: 3px 0 0; color: #60758b; font-size: 11px; }
.tour-muni-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tour-muni-actions form { margin: 0; }
.tour-muni-actions a,
.tour-muni-actions button { min-height: 34px; border: 1px solid #b9cce2; border-radius: 8px; padding: 7px 10px; background: #fff; color: #245181; font-size: 11px; font-weight: 800; text-decoration: none; }

.mini-note-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.mini-note-add input { min-height: 38px; background: #fff; }
.mini-note-add button { min-width: 90px; background: #1c5793; color: #fff; }
.mini-note-list { display: grid; gap: 6px; margin-top: 9px; }

.mini-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid #e3d9aa;
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
}

.mini-note-toggle label { display: flex; gap: 8px; align-items: center; margin: 0; color: #3c4651; font-size: 12px; font-weight: 700; }
.mini-note-toggle input { width: 17px; height: 17px; margin: 0; accent-color: #3d7a4e; }
.mini-note.is-done { opacity: .62; }
.mini-note.is-done .mini-note-toggle span { text-decoration: line-through; }
.mini-note-actions { display: flex; gap: 5px; }
.mini-note-actions form { margin: 0; }
.mini-note-actions button { min-height: 29px; padding: 4px 8px; border-color: #d2d8df; background: #fff; color: #4b5968; font-size: 10px; }
.mini-note-actions .mini-note-delete { width: 29px; padding: 0; color: #a23b3b; font-size: 17px; }
.empty.compact { margin: 0; padding: 8px; }

.tour-muni-panel { border-color: #adc7e1; background: #f5f9fd; }
.tour-muni-list { display: grid; gap: 7px; }
.tour-muni-item { margin: 0; background: #fff; }
.tour-muni-item.is-later { border-left-color: #9b7ac8; }

.tour-panel { display: flex; flex-direction: column; }
.tour-panel > .tour-heading { order: 1; }
.tour-panel > .tour-agenda-panel { order: 2; }
.tour-panel > .conseil-deadlines { order: 3; }
.tour-panel > .mini-notes-panel { order: 4; margin-top: 0; margin-bottom: 15px; }
.tour-panel > .tour-notes-panel { order: 5; }
.tour-panel > .tour-muni-panel { order: 6; margin-top: 0; margin-bottom: 0; }

@media (max-width: 820px) {
  .global-search { grid-template-columns: 1fr; gap: 5px; }
  .global-search > label { font-size: 10px; }
  .creation-columns { grid-template-columns: 1fr; }
  .standard-add-card,
  .quick-add-card { padding: 11px; }
  .editor-shortcuts { grid-template-columns: 1fr 1fr 1fr; }
  .mini-notes-heading,
  .tour-muni-heading { align-items: flex-start; }
  .tour-muni-heading { flex-direction: column; }
  .tour-muni-actions { width: 100%; }
  .tour-muni-actions > * { flex: 1 1 150px; }
  .tour-muni-actions a,
  .tour-muni-actions button { display: flex; align-items: center; justify-content: center; width: 100%; text-align: center; }
}

@media (max-width: 520px) {
  .section-title-inline,
  .tour-heading-title { gap: 3px 6px; }
  .section-title-inline .eyebrow::after,
  .tour-heading-title .eyebrow::after { margin-left: 6px; }
  .global-search-box > input { font-size: 12px; }
  .editor-shortcuts { grid-template-columns: 1fr; }
  .duration-input-row { grid-template-columns: minmax(65px, 1fr) auto; }
  .duration-input-row button { grid-column: 1 / -1; }
  .mini-note-add { grid-template-columns: 1fr; }
  .mini-note-add button { width: 100%; }
  .mini-note { grid-template-columns: 1fr; }
  .mini-note-actions { justify-content: flex-end; }
  .nav-primary .nav-webapp { flex: 0 0 auto; }
}

/* Ajustements d'usage d'août 2026 : écrans plus compacts et Pilotage progressif */
.nav-label-short { display: none; }

.toolbar.session-toolbar,
.toolbar.page-toolbar {
  min-height: 70px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.toolbar.session-toolbar h2,
.toolbar.page-toolbar h2 {
  font-size: 22px;
}

.tour-heading {
  padding-top: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.tour-heading h2 { font-size: 21px; }
.tour-muni-session-toolbar { min-height: 70px; padding: 10px 14px; }

.tour-calendar-day.is-today {
  background: #fff3ad;
  box-shadow: inset 0 0 0 2px #e8bf37;
}

.tour-calendar-day.is-today .tour-calendar-date {
  background: #d79b00;
  color: #fff;
}

.localized-date-preview {
  display: block;
  margin-top: 4px;
  color: #536b84;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.history-field textarea {
  min-height: 220px;
  resize: vertical;
}

.assignment-checks input[type="checkbox"],
.pilotage-assignments input[type="checkbox"],
.treated-toggle input[type="checkbox"],
.mini-note-toggle input[type="checkbox"] {
  accent-color: var(--brand);
}

.pilotage-table {
  min-width: 920px;
  table-layout: fixed;
}

.pilotage-table th:nth-child(1) { width: 34%; }
.pilotage-table th:nth-child(2) { width: 25%; }
.pilotage-table th:nth-child(3) { width: 17%; }
.pilotage-table th:nth-child(4) { width: 17%; }
.pilotage-table th:nth-child(5) { width: 7%; }

.pilotage-summary-row td {
  min-height: 58px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.pilotage-summary-row.is-dirty td,
.pilotage-detail-row.is-dirty td {
  background: #fff6c7 !important;
}

.pilotage-main-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #5f7185;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.pilotage-main-date strong {
  color: #193b5e;
  font-size: 12px;
  text-transform: none;
}

.pilotage-assignment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pilotage-assignment-summary span {
  border: 1px solid #c7d7e8;
  border-radius: 999px;
  padding: 3px 7px;
  background: #eef5fb;
  color: #315a80;
  font-size: 10px;
  font-weight: 800;
}

.pilotage-assignment-summary em {
  color: #7a8796;
  font-size: 11px;
  font-style: normal;
}

.pilotage-detail-toggle-cell { text-align: right; }

.pilotage-detail-toggle {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #c6d4e4;
  border-radius: 7px;
  padding: 6px 9px;
  background: #f7faff;
  color: #285177;
  font-size: 11px;
  font-weight: 800;
}

.pilotage-detail-toggle .chevron {
  display: inline-block;
  transition: transform .18s ease;
}

.pilotage-detail-toggle .chevron.is-open { transform: rotate(180deg); }

.pilotage-detail-row[hidden] { display: none; }

.pilotage-detail-row > td {
  padding: 0 12px 12px;
  background: #f5f8fc;
}

.pilotage-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr)) minmax(135px, .7fr) minmax(220px, 1.1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #d5e0ec;
  border-radius: 8px;
  background: #fff;
}

.pilotage-control,
.pilotage-control label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #405a74;
  font-size: 11px;
  font-weight: 800;
}

.pilotage-detail-grid input[type="date"],
.pilotage-detail-grid input[type="number"],
.pilotage-detail-grid select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #c7d4e2;
  border-radius: 6px;
  padding: 7px 8px;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.duration-field {
  display: grid;
  grid-template-columns: minmax(60px, 1fr) auto;
  gap: 5px;
  align-items: center;
}

.duration-field > span {
  color: #6a7c8f;
  font-size: 10px;
}

.pilotage-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.pilotage-shortcuts button {
  min-height: 29px;
  border: 1px solid #c8d5e5;
  border-radius: 6px;
  padding: 4px;
  background: #f5f8fc;
  color: #315a86;
  font-size: 10px;
  font-weight: 800;
}

.pilotage-shortcuts button:hover { background: #e8f1fb; }

.pilotage-detail-grid .pilotage-assignments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  margin: 0;
  border: 1px solid #d5e0ec;
  border-radius: 7px;
  padding: 7px 9px;
}

.pilotage-detail-grid .pilotage-assignments legend {
  padding: 0 4px;
  color: #405a74;
  font-size: 10px;
  font-weight: 800;
}

.pilotage-detail-grid .deadline-edit {
  align-self: end;
}

.pilotage-detail-grid .deadline-edit .edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .pilotage-detail-grid {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }

  .pilotage-detail-grid .pilotage-assignments {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .nav-label-wide { display: none; }
  .nav-label-short { display: inline; }

  .toolbar.session-toolbar,
  .toolbar.page-toolbar,
  .tour-muni-session-toolbar {
    min-height: 66px;
    padding: 9px 11px;
  }

  .pilotage-table { min-width: 760px; }
  .pilotage-table th:nth-child(1) { width: 30%; }
  .pilotage-table th:nth-child(2) { width: 27%; }
  .pilotage-table th:nth-child(3) { width: 18%; }
  .pilotage-table th:nth-child(4) { width: 17%; }
  .pilotage-table th:nth-child(5) { width: 8%; }
}

/* Console du Conseil communal, veille et archivage */
.council-heading-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.council-admin { position: relative; }

.council-admin > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid #b8cbe0;
  border-radius: 7px;
  padding: 7px 10px;
  background: #fff;
  color: #234f79;
  font-size: 11px;
  font-weight: 800;
}

.council-admin > summary::-webkit-details-marker { display: none; }
.council-admin[open] > summary { background: #eaf2fb; }

.council-admin-form {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 12px;
  width: min(680px, calc(100vw - 40px));
  max-height: min(720px, calc(100vh - 120px));
  overflow-y: auto;
  border: 1px solid #b9cbe0;
  border-radius: 10px;
  padding: 15px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 46, 84, .24);
}

.council-admin-title { display: grid; gap: 2px; }
.council-admin-title strong { color: #153a60; font-size: 16px; }
.council-admin-title small { color: #64748b; }

.council-calculation-rule {
  display: grid;
  gap: 4px;
  border: 1px solid #b9cce2;
  border-left: 4px solid #426f9e;
  border-radius: 8px;
  padding: 10px 11px;
  background: #eef5fb;
  color: #3d5872;
  font-size: 11px;
  line-height: 1.45;
}

.council-calculation-rule strong { color: #173f68; font-size: 12px; }
.council-calculation-rule small { color: #61778d; }

.council-rule-grid,
.council-session-dates,
.watch-controls {
  margin: 0;
  border: 1px solid #d7e1ec;
  border-radius: 8px;
  padding: 10px;
}

.council-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.council-rule-grid legend,
.council-session-dates legend,
.watch-controls legend {
  padding: 0 5px;
  color: #315675;
  font-size: 11px;
  font-weight: 800;
}

.council-rule-grid label { display: grid; gap: 5px; color: #52677c; font-size: 10px; font-weight: 800; }
.council-rule-grid label > span { display: flex; gap: 5px; align-items: center; }
.council-rule-grid input { width: 72px; }

.council-date-list { display: grid; gap: 6px; }

.council-date-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 7px;
  align-items: start;
}

.council-date-row .localized-date-preview { grid-column: 1; }
.council-date-row > input[type="date"] { grid-column: 1; grid-row: 1; }
.council-date-row .localized-date-preview { grid-column: 1; grid-row: 2; }
.council-date-row button {
  grid-column: 2;
  grid-row: 1;
  width: 36px;
  min-height: 36px;
  padding: 0;
  background: #fff5f5;
  color: #a13b3b;
  font-size: 18px;
}

.council-add-date { margin-top: 8px; background: #eef5fb; color: #295578; }
.council-admin-buttons { display: flex; justify-content: flex-end; }

.planning-status-summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d7e1ec;
  border-radius: 7px;
  padding: 9px 11px;
  background: #f7f9fc;
}

.planning-status-summary span { color: #64748b; font-size: 11px; font-weight: 800; }
.planning-status-summary strong { color: #244b70; }

.watch-controls > p {
  margin: 0 0 9px;
  color: #65778a;
  font-size: 11px;
}

.watch-options {
  display: grid;
  grid-template-columns: repeat(4, auto) minmax(210px, 1fr);
  gap: 7px;
  align-items: center;
}

.watch-options > label {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 38px;
  border: 1px solid #d5dfeb;
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff;
  color: #3d5872;
  font-size: 11px;
  font-weight: 800;
}

.watch-custom-date { display: grid !important; grid-template-columns: auto auto minmax(120px, 1fr); }
.watch-custom-date .localized-date-preview { grid-column: 3; margin: 0; }

.actions button.watch,
.actions .watch-action-menu > summary.watch {
  border-color: #e4bd83;
  background: #fff4df;
  color: #87500f;
}

.watch-action-menu {
  position: relative;
}

.watch-action-menu > summary.watch {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid;
  border-radius: 7px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
  user-select: none;
}

.watch-action-menu > summary::-webkit-details-marker { display: none; }
.watch-action-menu > summary::after { margin-left: 7px; content: '\25B4'; font-size: 9px; }
.watch-action-menu[open] > summary { border-color: #c58a39; background: #ffe8c2; }

.watch-popover {
  position: absolute;
  z-index: 45;
  bottom: calc(100% + 9px);
  left: 0;
  display: grid;
  width: min(390px, calc(100vw - 42px));
  gap: 12px;
  border-color: #dfbd88;
  padding: 14px;
  background: #fffdf8;
  box-shadow: 0 16px 38px rgba(49, 37, 18, .2);
}

.watch-popover::after {
  position: absolute;
  bottom: -7px;
  left: 24px;
  width: 12px;
  height: 12px;
  border-right: 1px solid #dfbd88;
  border-bottom: 1px solid #dfbd88;
  background: #fffdf8;
  content: '';
  transform: rotate(45deg);
}

.watch-popover-heading {
  display: grid;
  gap: 3px;
}

.watch-popover-heading strong { color: #684315; font-size: 14px; }
.watch-popover-heading span { color: #72644f; font-size: 11px; }
.watch-popover .watch-select-options { grid-template-columns: 1fr; }

.watch-popover .watch-confirm {
  width: 100%;
  min-height: 38px;
  border-color: #c58a39;
  background: #9b641c;
  color: #fff;
}

.watch-popover .watch-confirm:hover { background: #7d4f14; }

.actions button.archive {
  border-color: #b9d7c0;
  background: #eaf5ec;
  color: #285f37;
}

.actions button.reactivate {
  border-color: #b8cde5;
  background: #edf5fc;
  color: #25557f;
}

.other-editor-actions { position: relative; }
.other-editor-actions > summary { cursor: pointer; padding: 8px 4px; color: #53677b; font-size: 11px; font-weight: 800; }
.other-editor-actions > div { display: flex; gap: 7px; margin-top: 5px; }
.actions button.abandoned { border-color: #cbd5e1; background: #f1f5f9; color: #475569; }

.mini-note-history { margin-top: 10px; border-top: 1px solid #e3d9aa; padding-top: 8px; }
.mini-note-history > summary { cursor: pointer; color: #77662c; font-size: 11px; font-weight: 800; }
.mini-note-history-list { display: grid; gap: 5px; margin-top: 8px; }
.mini-note-history-list article { display: flex; gap: 10px; justify-content: space-between; border-radius: 6px; padding: 6px 8px; background: #f7f5ec; color: #69717b; font-size: 11px; }
.mini-note-history-list article span { text-decoration: line-through; }
.mini-note-history-list time { white-space: nowrap; }

@media (max-width: 820px) {
  .council-heading-actions { width: 100%; justify-content: space-between; }
  .council-admin-form { position: fixed; top: 70px; right: 10px; left: 10px; width: auto; max-height: calc(100vh - 90px); }
  .council-rule-grid { grid-template-columns: 1fr; }
  .watch-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-custom-date { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .watch-popover {
    position: fixed;
    top: 50%;
    right: 16px;
    bottom: auto;
    left: 16px;
    width: auto;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    transform: translateY(-50%);
  }

  .watch-popover::after { display: none; }
}

/* Correctifs de septembre 2026 : alignement du Pilotage et navigation uniforme. */
.nav-primary .nav-section .nav-label-wide,
.nav-primary .nav-section .nav-label-short {
  min-width: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.nav-primary .nav-section .nav-label-short { display: none; }

.pilotage-summary-row td {
  display: table-cell;
  height: 64px;
  padding-top: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid #dce5ef;
  vertical-align: middle;
}

.pilotage-main-date > span,
.pilotage-main-date > strong {
  display: block;
}

.pilotage-main-date > strong { margin-top: 2px; }

.pilotage-assignment-summary > span {
  display: inline-flex;
  margin: 2px 3px 2px 0;
}

.pilotage-detail-row > td {
  display: table-cell;
  border-bottom: 1px solid #cbd8e6;
}

.pilotage-table .deadline-section td {
  display: table-cell;
  height: 34px;
  padding: 7px 11px;
  border-top: 1px solid #bfd0e4;
  border-bottom: 1px solid #bfd0e4;
  vertical-align: middle;
}

@media (max-width: 820px) {
  .nav-primary .nav-section .nav-label-wide { display: none; }
  .nav-primary .nav-section .nav-label-short { display: inline; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card,
.editor,
.toolbar,
.item,
.empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(31, 41, 55, 0.08);
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 30px;
}

h2 {
  margin-bottom: 4px;
  font-size: 22px;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.muted,
.toolbar p {
  color: var(--muted);
}

.stack,
.grid-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.field-help {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid #cfd6e2;
  border-radius: 7px;
  background: #f8fafc;
  padding: 9px 11px;
}

.check-line input {
  width: auto;
  min-width: 18px;
  height: 18px;
}

.assignment-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #f5f7ff;
  padding: 12px;
}

.assignment-checks legend {
  padding: 0 6px;
  color: #1d3fa8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.assignment-checks .check-line {
  background: #fff;
  border-color: #b8c6ff;
}

.planning-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
  border: 1px solid #cbd9e8;
  border-radius: 10px;
  padding: 11px 12px 12px;
  background: #f8fbff;
}

.planning-choice legend {
  padding: 0 6px;
  color: #1d4f82;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.planning-choice p {
  grid-column: 1 / -1;
  margin: 0;
  color: #64748b;
  font-size: 11px;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd6e2;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 86px;
  resize: vertical;
}

button,
.new-button,
.views a,
.edit,
.ghost-link {
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
}

button,
.new-button,
.edit {
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 700;
}

.primary,
.new-button {
  background: var(--brand);
  color: #fff;
}

.primary:hover,
.new-button:hover {
  background: var(--brand-dark);
}

.ghost,
.ghost-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px clamp(14px, 2vw, 28px);
  background: #2651d4;
  border-bottom: 1px solid #1d3fa8;
  backdrop-filter: blur(10px);
}

.brand-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.1;
  color: #ffffff;
}

.brand-title span {
  color: #cfe0f5;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.topbar .ghost {
  padding: 7px 10px;
  white-space: nowrap;
  border-color: rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
}

.app {
  max-width: none;
  margin: 0 auto;
  padding: 20px clamp(14px, 2vw, 28px) 48px;
}

.views {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: stretch;
  margin-bottom: 14px;
}

.view-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  padding: 5px;
  background: #fff;
}

.group-label {
  padding: 0 5px;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.group-entry {
  background: #dff3e6;
  border-color: #8fc9a3;
}

.group-tour {
  background: #e8f4ff;
  border-color: #9cc3ff;
}

.group-sessions {
  background: #dce8ff;
  border-color: #8eb0ff;
}

.group-pilotage {
  background: #fff0c2;
  border-color: #e4bc45;
}

.group-archives {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.views a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  border: 1px solid #cfd6e2;
  background: #fff;
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
}

.views a.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.views a span {
  min-width: 20px;
  border-radius: 999px;
  background: rgba(31, 78, 121, .12);
  padding: 1px 5px;
  text-align: center;
  font-size: 10px;
}

.views a.active span {
  background: rgba(255, 255, 255, .2);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 16px;
}

.toolbar:has(.session-overview) {
  padding: 11px 14px;
  margin-bottom: 10px;
}

.session-overview {
  display: none;
}

.toolbar h2 {
  color: #0f2e54;
}

.quick-add {
  margin-bottom: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(31, 41, 55, 0.06);
}

.tour-panel {
  padding: clamp(12px, 2vw, 20px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(31, 41, 55, 0.08);
}

.tour-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
}

.tour-heading h2 { margin: 0; color: #0f2e54; }

.tour-agenda-panel {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #b9cee6;
  border-left: 4px solid #2e69a3;
  border-radius: 9px;
  background: #f8fbff;
}

.tour-agenda-heading,
.tour-agenda-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tour-agenda-heading h3,
.tour-agenda-heading .eyebrow { margin-bottom: 0; }
.tour-agenda-actions { justify-content: flex-end; flex-wrap: wrap; }
.tour-agenda-date { color: var(--muted); font-size: 12px; font-weight: 700; }
.tour-agenda-period { margin: 10px 0; color: #48627e; font-size: 12px; }
.tour-agenda-source + .tour-agenda-source { margin-top: 16px; padding-top: 14px; border-top: 2px solid #d8e4f0; }
.tour-agenda-source-title { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; color: #0f2e54; font-size: 15px; }
.tour-agenda-source-title span { width: 9px; height: 9px; border-radius: 50%; background: #2167a5; }
.tour-agenda-source.is-personal .tour-agenda-source-title span { background: #a85b17; }
.tour-calendar-scroll { max-width: 100%; overflow-x: auto; border: 1px solid #cbd9e7; border-radius: 7px; background: #fff; }
.tour-calendar { min-width: 760px; }
.tour-calendar-weekdays,
.tour-calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tour-calendar-weekdays > div { padding: 5px 4px; border-right: 1px solid #d7e1eb; background: #edf3f8; color: #607186; font-size: 10px; font-weight: 800; text-align: center; text-transform: uppercase; }
.tour-calendar-weekdays > div:last-child { border-right: 0; }
.tour-calendar-week-label { padding: 3px 6px; border-top: 1px solid #d7e1eb; background: #f7f9fc; color: #718096; font-size: 9px; font-weight: 700; }
.tour-calendar-day { min-width: 0; min-height: 82px; padding: 4px; border-top: 1px solid #d7e1eb; border-right: 1px solid #d7e1eb; background: #fff; }
.tour-calendar-day:last-child { border-right: 0; }
.tour-calendar-day.is-weekend { background: #f7f9fc; }
.tour-calendar-day.is-outside { background: #fafbfc; opacity: .5; }
.tour-calendar-date { display: block; width: 20px; margin: 0 0 4px auto; color: #65768a; font-size: 10px; font-weight: 700; text-align: center; }
.tour-calendar-day.is-today .tour-calendar-date { border-radius: 12px; background: #1769aa; color: #fff; }
.tour-calendar-event { display: flex; width: 100%; gap: 3px; min-width: 0; margin-bottom: 3px; padding: 3px 4px; border: 0; border-left: 3px solid #68798b; border-radius: 3px; background: #edf1f5; color: #27384a; font: inherit; font-size: 10px; line-height: 1.25; text-align: left; cursor: pointer; }
.tour-calendar-event:hover { filter: brightness(.95); }
.tour-calendar-event:focus-visible { outline: 2px solid #0f5f9d; outline-offset: 1px; }
.tour-calendar-event b { flex: 0 0 auto; color: #526579; }
.tour-calendar-event span { min-width: 0; overflow-wrap: anywhere; }
.tour-calendar-event.is-past { opacity: .78; }
.tour-calendar-event.is-selected { border-left-color: #084f87; background: #1769aa; color: #fff; font-weight: 700; }
.tour-calendar-event.is-selected b { color: #dcefff; }
.tour-calendar-event.is-low { border-left-color: #ccd4dc; background: #f6f8fa; color: #8a97a5; }
.tour-calendar-event.is-low b { color: #8a97a5; }
.tour-calendar-event.is-multiday span::after { content: ' ↔'; opacity: .75; }
.tour-calendar-legend { display: flex; flex-wrap: wrap; gap: 9px 14px; margin-top: 9px; color: #607186; font-size: 10px; }
.tour-calendar-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; background: #68798b; }
.tour-calendar-legend .is-selected::before { background: #1769aa; }
.tour-calendar-legend .is-low::before { background: #98a5b3; }
.tour-event-dialog { width: min(520px, calc(100% - 28px)); padding: 0; border: 1px solid #b8c9da; border-radius: 10px; background: #fff; color: #23364a; box-shadow: 0 18px 55px rgba(20, 45, 75, .28); }
.tour-event-dialog::backdrop { background: rgba(15, 35, 60, .38); }
.tour-event-dialog form { position: relative; padding: 22px; }
.tour-event-dialog-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #eef3f8; color: #34516e; font-size: 22px; line-height: 1; cursor: pointer; }
.tour-event-dialog h4 { margin: 4px 36px 12px 0; color: #133b63; font-size: 18px; }
.tour-event-dialog-schedule { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 0 0 14px; color: #52677d; font-size: 12px; }
.tour-event-dialog-description { max-height: 45vh; overflow-y: auto; padding: 11px; border-radius: 6px; background: #f4f7fa; color: #334a60; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.tour-agenda-empty { margin-top: 12px; padding: 13px; border: 1px dashed #b9c9db; border-radius: 7px; text-align: center; }
.tour-agenda-empty p { margin: 5px 0 0; color: var(--muted); }
.tour-agenda-raw { margin-top: 12px; padding: 12px; border: 1px solid #d8e4f0; border-radius: 7px; background: #fff; white-space: normal; line-height: 1.55; }
.tour-calendar-warning { margin: 10px 0 0; padding: 8px 10px; border-radius: 6px; background: #fff4de; color: #854d0e; font-size: 12px; font-weight: 700; }
.tour-agenda-excluded { margin-top: 12px; padding: 8px 10px; border: 1px dashed #cbd7e4; border-radius: 7px; background: #f7f9fc; color: #66778a; font-size: 11px; }
.tour-agenda-excluded summary { cursor: pointer; font-weight: 700; }
.tour-agenda-excluded ul { display: grid; gap: 5px; margin: 8px 0 0; padding-left: 18px; }
.tour-agenda-excluded li span { margin-right: 6px; color: #718297; }
.tour-agenda-excluded li strong { margin-right: 6px; color: #41556b; }
.tour-agenda-excluded li em { color: #8a5a44; font-style: normal; }

.deposit-page { min-height: 100vh; }
.deposit-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.deposit-card { width: min(780px, 100%); padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 40px rgba(31, 65, 112, .12); }
.deposit-card textarea { line-height: 1.5; resize: vertical; }
.deposit-url { font-family: Consolas, monospace; font-size: 12px; }
.deposit-success { margin: 14px 0; padding: 13px; border: 1px solid #91c9a4; border-radius: 8px; background: #e8f4ea; color: #22543d; }
.deposit-success p { margin: 5px 0 0; }
.deposit-state { padding: 10px; border-radius: 7px; background: #eaf2ff; color: #1d3fa8; }
.deposit-state.warning { background: #fff4de; color: #854d0e; }
.deposit-back { display: inline-flex; margin-top: 14px; }

.conseil-deadlines {
  margin-bottom: 10px;
  border: 1px solid #c8daf5;
  border-radius: 8px;
  background: #f4f8ff;
  padding: 9px 12px;
}
.conseil-deadlines h3 { margin-bottom: 9px; color: #0f2e54; }
.conseil-deadlines-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.conseil-deadlines-heading h3 { margin: 0; }
.council-schedule-toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #bdd0e3;
  border-radius: 7px;
  background: #fff;
  color: #315a86;
  font-size: 11px;
  font-weight: 800;
}
.council-schedule-toggle:hover { background: #edf5fc; }
.council-schedule-toggle .chevron { transition: transform .18s ease; }
.council-schedule-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.council-schedule-wrap { overflow-x: auto; }
.council-schedule-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.council-schedule-table th,
.council-schedule-table td { border-top: 1px solid #e2e8f0; padding: 7px 9px; text-align: left; vertical-align: top; }
.council-schedule-table thead th { border-top: 0; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.council-schedule-table tbody th { width: 260px; white-space: nowrap; }
.council-schedule-table ul { margin: 0; padding-left: 17px; }
.council-schedule-table li + li { margin-top: 4px; }
.deadline-today { background: #eaf2ff; }
.today-label {
  margin-left: 7px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  padding: 2px 6px;
  font-size: 10px;
  text-transform: uppercase;
}

.council-session-label {
  display: inline-block;
  border: 1px solid #d39b2a;
  border-radius: 999px;
  background: #fff0c2;
  color: #704700;
  padding: 4px 9px;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(112, 71, 0, .12);
}

.autosave-status {
  border-radius: 999px;
  background: #e8f4ea;
  color: #22543d;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.autosave-status.pending,
.autosave-status.saving { background: #fff4de; color: #854d0e; }
.autosave-status.error { background: #fee2e2; color: #991b1b; }

.tour-master-save {
  width: 100%;
  margin-bottom: 10px;
  font-size: 15px;
}
.tour-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tour-block-form {
  display: grid;
  gap: 6px;
  align-content: start;
  border: 2px solid #8fc9a3;
  border-radius: 9px;
  background: #e8f4ea;
  padding: 10px;
  transition: background .2s ease, border-color .2s ease;
}
.tour-block-form.is-empty {
  border-color: #e4b63e;
  background: #fff3bf;
}
.tour-block-form.is-empty textarea {
  background: #fffbea;
  border-color: #d9a928;
}
.tour-block-form:not(.is-empty) textarea {
  background: #f3fbf5;
  border-color: #8fc9a3;
}
.tour-block-form textarea { line-height: 1.5; }
.tour-block-form > label { font-size: 17px; color: #163c2a; }
.tour-grid textarea { min-height: 105px; }
.quick-notes textarea { min-height: 105px; font-size: inherit; }

.quick-add form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.task-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid #d9e2f3;
}

.task-summary a {
  max-width: 320px;
  overflow: hidden;
  border: 1px solid #c8daf5;
  border-radius: 999px;
  background: #eaf2ff;
  color: #0f2e54;
  padding: 6px 10px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.task-summary a:hover {
  background: #d8e8ff;
}

.session-overview {
  grid-column: 1 / -1;
  overflow-x: auto;
  border: 1px solid #c8daf5;
  border-radius: 8px;
  background: #f4f8ff;
}

.session-overview-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-size: 13px;
}

.session-overview-table th,
.session-overview-table td {
  border-top: 1px solid #e2e8f0;
  padding: 7px 9px;
  text-align: left;
  vertical-align: middle;
}

.session-overview-table thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.session-overview-table a {
  color: #0f2e54;
  font-weight: 800;
  text-decoration: none;
}

.session-overview-table a:hover {
  text-decoration: underline;
}

.pilotage-overview {
  margin-top: 10px;
}

.overview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.session-overview-table tr.overview-postponed td {
  background: #faf5ff;
}

.session-overview-table tr.overview-separator td {
  padding: 12px 9px 7px;
  border-top: 3px solid #8b5cf6;
  background: #f4f8ff;
  color: #4c1d95;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.overview-separator span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.overview-position {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.overview-main {
  background: #e8f4ea;
  color: #22543d;
}

.overview-later {
  background: #f3e8ff;
  color: #4c1d95;
}

.overview-agenda {
  background: #dbeafe;
  color: #1d4ed8;
}

.editor {
  padding: 18px;
  margin-bottom: 16px;
}

.editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(3px);
}

.editor-overlay .editor {
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  margin: 0;
  border-color: #b9c8dc;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.editor-overlay .section-heading {
  position: sticky;
  top: -18px;
  z-index: 2;
  margin: -18px -18px 18px;
  padding: 16px 18px 12px;
  background: #fff;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid #9cc3ff;
}

.section-heading h2 {
  margin: 0;
  color: #0f2e54;
}

.grid-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.actions button.success {
  border-color: #b7d8c0;
  background: #e8f4ea;
  color: #22543d;
}

.actions button.success:hover {
  background: #d6ecd9;
}

.actions button.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.actions button.danger:hover {
  background: #ffe4e6;
}

.list {
  display: grid;
  gap: 10px;
}

.deadline-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: visible;
  box-shadow: 0 8px 28px rgba(31, 41, 55, 0.06);
}

.deadline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: -8px;
}

.dot.expired,
.deadline-row.expired .deadline-cell {
  background: #fee2e2;
}

.dot.today,
.deadline-row.today .deadline-cell {
  background: #fed7aa;
}

.dot.urgent,
.deadline-row.urgent .deadline-cell {
  background: #fff4de;
}

.dot.prepare,
.deadline-row.prepare .deadline-cell {
  background: #fff9c7;
}

.dot.watch,
.deadline-row.watch .deadline-cell {
  background: #e0f2fe;
}

.dot.planned,
.deadline-row.planned .deadline-cell {
  background: #e8f4ea;
}

.dot.text-date,
.deadline-row.text-date .deadline-cell {
  background: #eaf2ff;
}

.dot.no-date,
.deadline-row.no-date .deadline-cell {
  background: #f3f4f6;
}

.deadline-table-wrap {
  overflow-x: auto;
}

.deadline-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

.pilotage-batch-form {
  display: grid;
  gap: 0;
}

.pilotage-save-bar {
  position: sticky;
  top: 56px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #c8daf5;
  background: #f4f8ff;
}

.pilotage-save-bar.bottom {
  position: static;
  border-top: 1px solid #c8daf5;
  border-bottom: 0;
}

.pilotage-change-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pilotage-table {
  min-width: 1320px;
  table-layout: fixed;
}

.pilotage-table th:nth-child(1) { width: 300px; }
.pilotage-table th:nth-child(2) { width: 120px; }
.pilotage-table th:nth-child(3) { width: 155px; }
.pilotage-table th:nth-child(4) { width: 88px; }
.pilotage-table th:nth-child(5) { width: 120px; }
.pilotage-table th:nth-child(6) { width: 155px; }
.pilotage-table th:nth-child(7) { width: 225px; }
.pilotage-table th:nth-child(8) { width: 210px; }
.pilotage-table th:nth-child(9) { width: 90px; }

@media (min-width: 1180px) {
  .deadline-table-wrap {
    overflow: visible;
  }

  .pilotage-table {
    min-width: 100%;
  }
}

.pilotage-table input[type="date"],
.pilotage-table input[type="number"],
.pilotage-table select {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.pilotage-table input[type="number"] {
  max-width: 86px;
}

.pilotage-table tr.is-dirty td {
  background: #fffbe6;
}

.pilotage-assignments {
  min-width: 210px;
}

.pilotage-assignments,
.pilotage-agenda {
  font-size: 12px;
}

.pilotage-planning {
  min-width: 210px;
}

.pilotage-planning > label {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.pilotage-planning .pilotage-now {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin-top: 7px;
  border: 1px solid #b7d8c0;
  border-radius: 6px;
  background: #edf8ef;
  padding: 6px 8px;
  color: #22543d;
  font-size: 11px;
  font-weight: 800;
}

.pilotage-planning .pilotage-now input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
}

.pilotage-assignments label,
.pilotage-agenda label {
  display: inline-flex;
  margin: 2px 6px 2px 0;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.deadline-table th {
  position: sticky;
  top: 108px;
  z-index: 5;
  height: 44px;
  background: #eaf1fb;
  box-shadow: inset 0 -1px 0 #b9c8dc, 0 2px 5px rgba(15, 46, 84, .08);
  color: #334155;
  font-size: 12px;
  text-align: left;
  text-transform: uppercase;
  vertical-align: middle;
}

.deadline-table th,
.deadline-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 9px 10px;
  vertical-align: top;
}

.deadline-cell {
  width: 220px;
  min-width: 220px;
  border-left: 5px solid transparent;
}

.deadline-row.expired .deadline-cell {
  border-left-color: #dc2626;
}

.deadline-row.today .deadline-cell {
  border-left-color: #ea580c;
}

.deadline-row.urgent .deadline-cell {
  border-left-color: #f59e0b;
}

.deadline-row.prepare .deadline-cell {
  border-left-color: #eab308;
}

.deadline-section td {
  background: #eaf2ff;
  color: #0f2e54;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.deadline-row.watch .deadline-cell {
  border-left-color: #0284c7;
}

.deadline-row.planned .deadline-cell {
  border-left-color: #16a34a;
}

.deadline-row.text-date .deadline-cell {
  border-left-color: #2563eb;
}

.deadline-row.no-date .deadline-cell {
  border-left-color: #94a3b8;
}

.deadline-row.inactive {
  opacity: .72;
}

.due-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 6px;
}

.due-form input {
  padding: 7px 8px;
  font-weight: 500;
}

.due-form button {
  padding: 7px 9px;
  border-color: #cfd6e2;
  background: #fff;
}

.deadline-metrics-cell {
  width: 112px;
  min-width: 112px;
}

.deadline-metrics-form {
  display: grid;
  grid-template-columns: minmax(48px, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.deadline-metrics-form label {
  display: grid;
  gap: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.deadline-metrics-form input {
  width: 58px;
  min-width: 0;
  padding: 7px 6px;
}

.deadline-metrics-form button {
  padding: 7px 9px;
}

.deadline-manual-status {
  min-width: 145px;
  white-space: nowrap;
}

.deadline-subject {
  min-width: 280px;
}

.deadline-subject strong {
  font-weight: 650;
}

.deadline-subject strong,
.deadline-subject small {
  display: block;
}

.deadline-subject small {
  margin-top: 5px;
  color: #64748b;
  line-height: 1.35;
}

.deadline-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.deadline-status-expired { background: #fee2e2; color: #991b1b; }
.deadline-status-today { background: #fed7aa; color: #9a3412; }
.deadline-status-urgent { background: #fff4de; color: #854d0e; }
.deadline-status-prepare { background: #fff9c7; color: #713f12; }
.deadline-status-watch { background: #e0f2fe; color: #075985; }
.deadline-status-planned { background: #e8f4ea; color: #22543d; }
.deadline-status-no-date { background: #f3f4f6; color: #475569; }

.deadline-card-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 10px;
  padding: 9px 10px;
  border-left: 5px solid #94a3b8;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}

.deadline-card-line strong {
  color: #0f172a;
}

.deadline-card-line small {
  width: 100%;
  color: #7c2d12;
  font-weight: 800;
}

.deadline-card-line-expired { border-left-color: #dc2626; background: #fff1f2; }
.deadline-card-line-today { border-left-color: #ea580c; background: #ffedd5; }
.deadline-card-line-urgent { border-left-color: #f59e0b; background: #fff7ed; }
.deadline-card-line-prepare { border-left-color: #eab308; background: #fefce8; }
.deadline-card-line-watch { border-left-color: #0284c7; background: #f0f9ff; }
.deadline-card-line-planned { border-left-color: #16a34a; background: #f0fdf4; }
.deadline-card-line-no-date { border-left-color: #94a3b8; background: #f8fafc; }

.status-hint {
  display: block;
  margin-top: 6px;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
}

.deadline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 210px;
}

.deadline-assign {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.deadline-assign .inline-assignment button {
  padding: 4px 7px;
  background: #fff;
  border-color: #cfd6e2;
  color: #334155;
  font-size: 11px;
}

.deadline-action {
  min-width: 260px;
  color: #374151;
  line-height: 1.35;
}

.deadline-edit {
  text-align: right;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 12px;
  padding: 12px;
  border-left-width: 6px;
  scroll-margin-top: 92px;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.item-row .item-toggle {
  min-width: 0;
}

.row-treated {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 9px 12px 9px 4px;
  border-left: 1px solid #e2e8f0;
  background: #fff;
}

.row-treated label {
  min-height: 38px;
  padding: 7px 11px;
}

.item.item-treated .row-treated {
  background: #edf8ef;
}

.item.status-termine {
  background: #e8f4ea;
  border-color: #a8d5b2;
}

.item.status-termine .title-line {
  background: #d7ecd9;
  border-color: #a8d5b2;
}

.item.item-treated {
  background: #e8f4ea;
  border-color: #95cfa3;
}

.item.item-treated .title-line {
  background: #d7ecd9;
  border-color: #95cfa3;
}

.item.status-abandonne {
  opacity: .75;
  border-left-color: #cbd5e1;
}

.item.status-en-veille {
  border-left-color: #8b78b8;
  background: #faf8ff;
}

.title-line {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: flex-start;
  margin: -5px -5px 8px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #dbeafe;
  border: 1px solid #b8d4fb;
}

.title-line h3 {
  margin: 0;
}

.status {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef2f7;
  padding: 5px 9px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.order-buttons {
  display: inline-flex;
  gap: 3px;
  margin-left: auto;
}

.order-buttons button {
  min-width: 28px;
  min-height: 28px;
  border: 1px solid #cfd6e2;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  padding: 2px 6px;
  font-weight: 800;
}

.order-buttons button:hover {
  background: #eef2f7;
}

.treated-toggle {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.treated-toggle label {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 5px;
  border: 1px solid #bddfc3;
  border-radius: 999px;
  background: #fff;
  padding: 5px 8px;
  color: #22543d;
  font-size: 12px;
  font-weight: 800;
}

.treated-toggle input {
  width: auto;
}

.treated-toggle button {
  min-height: 30px;
  border: 1px solid #9bc9a6;
  background: #fff;
  color: #22543d;
  padding: 5px 8px;
  font-size: 11px;
}

.reset-treated {
  justify-self: end;
}

.reset-treated button {
  border-color: #bfd5ff;
  background: #eaf2ff;
  color: #0f2e54;
}

.next,
.notes {
  color: #374151;
  line-height: 1.45;
}

.notes {
  border-left: 4px solid #c084fc;
  background: var(--soft-violet);
  padding: 9px 10px;
  border-radius: 6px;
}

.details {
  margin-top: 12px;
  border: 1px solid #d7dde8;
  border-radius: 7px;
  background: #fbfcfe;
}

.details summary {
  cursor: pointer;
  padding: 8px 10px;
  color: #334155;
  font-weight: 700;
}

.detail-block {
  border-top: 1px solid #e5e7eb;
  padding: 8px 10px;
}

.detail-block strong {
  display: block;
  margin-bottom: 5px;
  color: #1f4e79;
  font-size: 12px;
  text-transform: uppercase;
}

.detail-block p {
  margin: 0;
  color: #374151;
  line-height: 1.45;
}

.session-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed #d7dde8;
}

.session-note textarea {
  min-height: 42px;
}

.session-note button {
  border-color: #cfd6e2;
  background: #fff;
  color: #1f2937;
}

.assignment-line {
  display: grid;
  gap: 7px;
  align-items: start;
  margin-top: 0;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  justify-content: flex-start;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 700;
}

.muni {
  background: var(--soft-green);
  border-color: #bddfc3;
}

.cpds {
  background: var(--soft-blue);
  border-color: #bfd5ff;
}

.conseil {
  background: var(--soft-yellow);
  border-color: #f2d18b;
}

.tache {
  background: var(--soft-red);
  border-color: #f1b7b2;
}

.date {
  background: #eef2f7;
  border-color: #cbd5e1;
}

.review {
  background: #f3e8ff;
  border-color: #d8b4fe;
  color: #4c1d95;
}

.agenda {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.no-meeting {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.inline-assignment {
  display: inline-flex;
  margin: 0;
}

.inline-assignment button {
  min-width: 0;
  border: 1px solid rgba(31, 41, 55, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  color: #1f2937;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.inline-assignment button:hover {
  background: #fff;
  border-color: rgba(31, 41, 55, .34);
}

.assign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  justify-content: flex-start;
}

.assign-actions .inline-assignment button {
  padding: 5px 8px;
  background: #fff;
  border-color: #cfd6e2;
  color: #334155;
}

.assign-actions .inline-assignment button:hover {
  background: #eef2f7;
}

.review-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0;
}

.review-controls button {
  padding: 5px 8px;
  border-color: #d8b4fe;
  background: #faf5ff;
  color: #4c1d95;
  font-size: 11px;
}

.review-controls button:hover {
  background: #f3e8ff;
}

.item-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, 128px);
  align-content: start;
  justify-items: stretch;
  gap: 8px;
}

.side-controls {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-start;
  align-items: center;
}

.item-side > .assignment-line,
.item-side > .review-controls,
.item-side > .assignment-checkboxes {
  grid-column: 1;
}

.assignment-checkboxes {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  background: #f8fafc;
}

.assignment-checkboxes > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.assignment-checkboxes label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #d7e0eb;
  border-radius: 7px;
  background: #fff;
  color: #29445f;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.assignment-checkboxes input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2859d8;
}

.assignment-checkboxes label:has(input:checked) {
  border-color: #a9c4ee;
  background: #eaf2ff;
  color: #173f70;
}

.assignment-save-status {
  color: #718096;
  font-size: 10px;
}

.item-side > .edit,
.item-side > .done-form,
.item-side > .restore-form,
.item-side > .delete-form {
  grid-column: 2;
  width: 100%;
}

.item-side > .delete-form {
  align-self: start;
}

.edit {
  border-color: #cfd6e2;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.done-form {
  width: 100%;
}

.done-form button {
  width: 100%;
  border-color: #b7d8c0;
  background: #e8f4ea;
  color: #22543d;
}

.done-form button:hover {
  background: #d6ecd9;
}

.delete-form {
  width: 100%;
}

.delete-form button {
  width: 100%;
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.delete-form button:hover {
  background: #ffe4e6;
}

.postponed-panel {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 8px solid #7c3aed;
}

.postponed-panel .section-heading {
  justify-content: center;
  margin-bottom: 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

.postponed-panel h2 {
  margin: 0;
  color: #4c1d95;
  font-size: 19px;
  text-align: center;
}

.postponed-list {
  display: grid;
  gap: 12px;
}

.item-postponed {
  border-left-color: #8b5cf6;
}

.notice,
.alert {
  border-radius: 7px;
  padding: 11px 12px;
  margin-bottom: 14px;
  font-weight: 700;
}

.notice {
  background: #e8f4ea;
  color: #22543d;
}

.alert {
  background: #fee2e2;
  color: #991b1b;
}

.floating {
  animation: fade 3.2s ease forwards;
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

/* Navigation compacte en deux niveaux */
.views {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.nav-primary,
.nav-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.nav-primary {
  padding: 0;
  border: 0;
  background: transparent;
}

.nav-primary .new-button,
.nav-primary .nav-section {
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 8px;
}

.nav-primary .new-button {
  border: 1px solid var(--brand);
  background: var(--brand);
  box-shadow: 0 3px 10px rgba(38, 81, 212, .18);
  color: #fff;
}

.nav-primary .new-button:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.nav-primary .nav-section {
  border: 1px solid #d5deea;
  background: #fff;
  color: #475569;
  font-weight: 800;
}

.nav-primary .nav-section:hover {
  background: #f1f5f9;
  color: #0f2e54;
}

.nav-primary .nav-section.active {
  border-color: #0f2e54;
  background: #0f2e54;
  box-shadow: 0 3px 10px rgba(15, 46, 84, .18);
  color: #fff;
}

.nav-secondary {
  width: fit-content;
  min-height: 36px;
  padding: 4px;
  border: 1px solid #d5deea;
  border-radius: 9px;
  background: rgba(255, 255, 255, .78);
}

.nav-secondary a {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 5px 9px;
}

.nav-secondary a:hover {
  background: #eaf2ff;
}

.nav-secondary a.active {
  background: #dce9ff;
  color: #0f2e54;
}

.nav-secondary a.active span {
  background: #fff;
  color: #0f2e54;
}

.toolbar.session-toolbar {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  padding: 17px 18px;
  border: 0;
  background: linear-gradient(120deg, #0f2e54 0%, #1f4e79 72%, #2d65a0 100%);
  box-shadow: 0 8px 22px rgba(15, 46, 84, .16);
}

.session-toolbar::after {
  position: absolute;
  top: -58px;
  right: 220px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  content: '';
}

.session-toolbar > * {
  position: relative;
  z-index: 1;
}

.session-toolbar h2 {
  margin: 1px 0 3px;
  color: #fff;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.session-kicker,
.session-count {
  margin: 0;
}

.session-kicker {
  color: #bcd6f3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.session-count {
  color: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.session-toolbar .reset-treated button {
  min-height: 40px;
  border-color: rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.session-toolbar .reset-treated button:hover {
  background: rgba(255, 255, 255, .22);
}

/* Lignes synthétiques et fiches ouvertes dans le contexte */
.list,
.postponed-list {
  gap: 7px;
}

.item {
  display: block;
  padding: 0;
  overflow: hidden;
  border-left-width: 5px;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(31, 41, 55, .06);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.item:hover {
  border-color: #9eb8df;
  box-shadow: 0 7px 20px rgba(31, 65, 112, .12);
}

.item.is-open {
  border-color: #7ea5df;
  box-shadow: 0 10px 28px rgba(31, 65, 112, .14);
}

.item.item-treated .item-toggle,
.item.status-termine .item-toggle {
  background: #edf8ef;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.item-row .row-treated {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 9px 12px 9px 4px;
  border-left: 1px solid #e2e8f0;
  background: #fff;
}

.item-row .row-treated label {
  min-height: 38px;
  padding: 7px 11px;
}

.item.item-treated .item-row .row-treated {
  background: #edf8ef;
}

.item.item-treated .item-toggle:hover,
.item.status-termine .item-toggle:hover {
  background: #e2f3e6;
}

.item-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 11px 14px;
  color: #172033;
  text-align: left;
}

.item-toggle:hover,
.item-toggle:focus-visible {
  background: #f7faff;
}

.item-toggle:focus-visible {
  outline: 3px solid rgba(38, 81, 212, .28);
  outline-offset: -3px;
}

.item-toggle-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.item-toggle-main > strong {
  color: #0f2e54;
  font-size: 16px;
  line-height: 1.3;
}

.session-item .item-toggle {
  min-height: 62px;
  padding: 10px 14px;
}

.session-item .item-toggle-main > strong {
  color: #18324f;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.session-item .detail-hint {
  color: #4b6b91;
  font-size: 11px;
}

.session-item:hover .item-toggle-main > strong {
  color: #153f72;
}

.row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.row-deadline {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 700;
}

.unassigned {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.item-toggle-meta {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
}

.session-row-date {
  color: #6b7f95;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.detail-hint {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: #315a91;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.chevron {
  display: inline-block;
  transition: transform .18s ease;
}

.item.is-open .chevron {
  transform: rotate(180deg);
}

.contextual-status {
  opacity: .52;
}

.item-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 16px;
  padding: 0 14px 14px;
  border-top: 1px solid #dbe4f0;
  background: #fbfdff;
}

.item-detail[hidden] {
  display: none;
}

.detail-toolbar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.item-detail .title-line {
  display: none;
}

.item-detail .item-side {
  padding-left: 14px;
  border-left: 1px solid #dbe4f0;
}

.item-detail .session-note button,
.item-detail .edit,
.item-detail .review-controls button,
.item-detail .done-form button,
.item-detail .delete-form button,
.item-detail .restore-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}

.item-detail .done-form,
.item-detail .delete-form,
.item-detail .restore-form {
  padding-top: 8px;
  border-top: 1px solid #f2c7c7;
}

.item-detail .done-form button,
.item-detail .delete-form button {
  font-size: 12px;
}

.review-controls .review-now {
  border-color: #9bc9a6;
  background: #e8f4ea;
  color: #22543d;
}

.review-controls .review-now:hover {
  background: #d6ecd9;
}

.item-detail .review-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.item-detail .review-controls button {
  width: 100%;
  min-height: 38px;
}

/* Finition commune à l'ensemble de l'application authentifiée */
.topbar {
  box-shadow: 0 3px 12px rgba(15, 46, 84, .16);
}

.toolbar:not(.session-toolbar) {
  display: block;
  padding: 8px 2px 5px;
  margin-bottom: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.toolbar:not(.session-toolbar) h2 {
  margin: 1px 0 3px;
  color: #102f52;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.page-kicker,
.page-description {
  margin: 0;
}

.page-kicker {
  color: #54708e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.page-description {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.toolbar.page-toolbar {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 104px;
  padding: 17px 19px;
  margin-bottom: 12px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(120deg, #12365e 0%, #1f527f 70%, #2e69a3 100%);
  box-shadow: 0 8px 22px rgba(15, 46, 84, .16);
}

.toolbar.page-toolbar::after {
  position: absolute;
  top: -62px;
  right: 13%;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  content: '';
}

.toolbar.page-toolbar > * {
  position: relative;
  z-index: 1;
}

.toolbar.page-toolbar h2 {
  margin: 1px 0 4px;
  color: #fff;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.toolbar.page-toolbar .page-kicker {
  color: #a9c7e7;
}

.toolbar.page-toolbar .page-description {
  max-width: 780px;
  color: #d9e9f8;
}

.toolbar.page-toolbar .page-description span {
  font-weight: 800;
}

.toolbar.page-archives {
  background: linear-gradient(120deg, #26384e 0%, #39556f 72%, #52728d 100%);
}

.list .item:not(.session-item),
.postponed-list .item {
  border-color: #d8e1ec;
  border-left-color: #9eb8df;
  box-shadow: 0 2px 9px rgba(31, 65, 112, .05);
}

.list .item:not(.session-item) .item-toggle,
.postponed-list .item .item-toggle {
  min-height: 62px;
  padding: 10px 13px;
}

.list .item:not(.session-item) .item-toggle-main > strong,
.postponed-list .item .item-toggle-main > strong {
  font-size: 15px;
  font-weight: 700;
}

/* Pilotage : densité, alignement et lecture continue */
.deadline-panel {
  border-color: #ccd8e6;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(31, 65, 112, .08);
}

.deadline-legend {
  gap: 6px;
  padding: 9px 12px;
  background: #fff;
}

.deadline-legend .dot {
  margin-right: 0;
}

.deadline-legend {
  font-size: 11px;
}

.pilotage-save-bar {
  min-height: 58px;
  padding: 8px 12px;
  border-color: #c9d7e8;
  background: rgba(247, 250, 254, .96);
  backdrop-filter: blur(8px);
}

.pilotage-save-hint {
  color: #344e6b;
  font-size: 12px;
  font-weight: 800;
}

.pilotage-save-bar .primary {
  min-height: 38px;
  padding: 8px 13px;
  box-shadow: 0 3px 9px rgba(38, 81, 212, .16);
  font-size: 12px;
}

.pilotage-table th:nth-child(1) { width: 280px; }
.pilotage-table th:nth-child(2) { width: 112px; }
.pilotage-table th:nth-child(3) { width: 145px; }
.pilotage-table th:nth-child(4) { width: 78px; }
.pilotage-table th:nth-child(5) { width: 110px; }
.pilotage-table th:nth-child(6) { width: 135px; }
.pilotage-table th:nth-child(7) { width: 200px; }
.pilotage-table th:nth-child(8) { width: 250px; }
.pilotage-table th:nth-child(9) { width: 86px; }

.pilotage-table thead th {
  height: 46px;
  padding: 7px 10px;
  border-right: 1px solid #d6e0eb;
  background: #e7eff9;
  color: #39516d;
  font-size: 10px;
  letter-spacing: .055em;
}

.pilotage-table thead th:last-child {
  border-right: 0;
}

.pilotage-table td {
  padding: 8px 10px;
  vertical-align: middle;
}

.pilotage-table .deadline-row:hover td {
  background-color: #f8fbff;
}

.pilotage-table .deadline-row.expired .deadline-cell { background: #fff5f5; }
.pilotage-table .deadline-row.today .deadline-cell { background: #fff8f1; }
.pilotage-table .deadline-row.urgent .deadline-cell { background: #fffaf2; }
.pilotage-table .deadline-row.prepare .deadline-cell { background: #fffdf2; }
.pilotage-table .deadline-row.watch .deadline-cell { background: #f4fbff; }
.pilotage-table .deadline-row.planned .deadline-cell { background: #f5fbf6; }
.pilotage-table .deadline-row.no-date .deadline-cell { background: #f8fafc; }

.pilotage-table input[type="date"],
.pilotage-table input[type="number"],
.pilotage-table select {
  min-height: 38px;
  padding: 7px 8px;
  font-size: 13px;
}

.pilotage-table input[type="number"] {
  max-width: 68px;
  text-align: center;
}

.deadline-subject strong {
  color: #173553;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
}

.deadline-section td {
  padding: 7px 11px;
  border-top: 1px solid #bfd0e4;
  background: #edf3fb;
  color: #234d79;
  font-size: 11px;
  letter-spacing: .065em;
}

.pilotage-assignments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 7px;
  min-width: 0;
}

.pilotage-assignments label {
  margin: 0;
  font-size: 11px;
}

.pilotage-assignments input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.pilotage-planning {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) 94px;
  gap: 7px;
  align-items: end;
  min-width: 0;
}

.pilotage-planning > label:first-child {
  min-width: 0;
}

.pilotage-planning .pilotage-now {
  justify-content: center;
  min-height: 38px;
  margin: 0;
  padding: 5px 6px;
  text-align: center;
  line-height: 1.15;
}

.deadline-edit .edit {
  min-height: 38px;
  padding: 7px 9px;
  border-color: #c8d4e3;
  color: #254b73;
  font-size: 11px;
}

/* Tour de table et formulaires : mêmes surfaces et mêmes repères */
.tour-panel {
  border-color: #ccd8e6;
  border-radius: 11px;
  box-shadow: 0 10px 30px rgba(31, 65, 112, .08);
}

.tour-heading {
  position: relative;
  overflow: hidden;
  margin: calc(-1 * clamp(12px, 2vw, 20px)) calc(-1 * clamp(12px, 2vw, 20px)) 14px;
  padding: 16px clamp(12px, 2vw, 20px);
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  background: linear-gradient(120deg, #12365e 0%, #1f527f 70%, #2e69a3 100%);
}

.tour-heading::after {
  position: absolute;
  top: -78px;
  right: 14%;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  content: '';
}

.tour-heading > * {
  position: relative;
  z-index: 1;
}

.tour-heading h2 {
  color: #fff;
}

.tour-heading .eyebrow {
  color: #a9c7e7;
}

.tour-heading .autosave-status {
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.conseil-deadlines {
  border-color: #d5dfeb;
  border-radius: 9px;
  background: #fbfdff;
}

.tour-block-form {
  border-width: 1px;
  border-radius: 9px;
  padding: 12px;
}

.tour-block-form > label {
  font-size: 14px;
}

.editor-overlay .editor {
  border-radius: 13px;
}

.postponed-panel {
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}

.postponed-panel .section-heading {
  justify-content: flex-start;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #ddd0f5;
  border-left: 4px solid #8b5cf6;
  border-radius: 8px;
  background: #f7f3ff;
}

.postponed-panel h2 {
  color: #54249b;
  font-size: 16px;
  text-align: left;
}

/* Début planifié et présentation aux prochaines séances */
.pilotage-table th:nth-child(1) { width: 260px; }
.pilotage-table th:nth-child(2) { width: 110px; }
.pilotage-table th:nth-child(3) { width: 140px; }
.pilotage-table th:nth-child(4) { width: 250px; }
.pilotage-table th:nth-child(5) { width: 76px; }
.pilotage-table th:nth-child(6) { width: 135px; }
.pilotage-table th:nth-child(7) { width: 200px; }
.pilotage-table th:nth-child(8) { width: 86px; }

.start-planning-cell {
  min-width: 0;
}

.start-planning-cell > input {
  width: 100%;
}

.start-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 5px;
}

.start-shortcuts button {
  min-height: 29px;
  border: 1px solid #c8d5e5;
  background: #f5f8fc;
  padding: 4px 6px;
  color: #315a86;
  font-size: 10px;
}

.start-shortcuts button:hover {
  background: #e8f1fb;
}

.pilotage-table input[readonly] {
  background: #f3f6fa;
  color: #475569;
}

.grid-form input[readonly] {
  background: #f3f6fa;
  color: #475569;
  cursor: default;
}

.start-plan-controls,
.presentation-controls {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 9px;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  background: #f8fbff;
}

.control-label {
  color: #49627d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.start-plan-buttons,
.start-plan-date,
.presentation-controls > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.start-plan-date {
  grid-template-columns: minmax(0, 1fr) auto;
}

.start-plan-controls button,
.presentation-controls button {
  min-height: 34px;
  border: 1px solid #c8d5e5;
  background: #fff;
  padding: 6px 8px;
  color: #315a86;
  font-size: 11px;
  font-weight: 800;
}

.start-plan-controls button:hover,
.presentation-controls button:hover {
  background: #eaf2ff;
}

.presentation-controls {
  border-color: #c9dfd0;
  background: #f4fbf6;
}

.presentation-controls > div {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.presentation-controls button.active {
  border-color: #71b485;
  background: #dff2e4;
  color: #22543d;
}

@keyframes fade {
  0%, 72% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 820px) {
  .editor-overlay {
    align-items: start;
    padding: 8px;
  }

  .editor-overlay .editor {
    max-height: calc(100vh - 16px);
    padding: 14px;
    border-radius: 9px;
  }

  .editor-overlay .section-heading {
    top: -14px;
    margin: -14px -14px 14px;
    padding: 13px 14px 10px;
  }

  .pilotage-save-bar {
    top: 48px;
  }

  .deadline-table th {
    top: 112px;
  }

  .toolbar,
  .title-line {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .app {
    padding-top: 8px;
  }

  .views {
    margin-bottom: 12px;
  }

  .quick-add {
    margin-bottom: 12px;
  }

  .task-summary {
    gap: 5px;
    padding-top: 8px;
  }

  .task-summary a {
    max-width: 100%;
    padding: 5px 8px;
    font-size: 11px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    padding: 7px 10px;
  }

  .brand-title {
    flex-direction: column;
    gap: 1px;
  }

  .topbar h1 {
    font-size: 17px;
  }

  .brand-title span {
    font-size: 11px;
  }

  .topbar .ghost {
    padding: 6px 8px;
    font-size: 12px;
  }

  button,
  .new-button,
  .views a,
  .edit,
  .ghost-link {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .views {
    gap: 5px;
    align-items: stretch;
  }

  .views a {
    min-height: 34px;
    gap: 5px;
  }

  .views a span {
    min-width: 20px;
    padding: 1px 5px;
    font-size: 11px;
  }

  .view-group {
    gap: 5px;
    padding: 5px;
  }

  .group-entry,
  .group-tour {
    flex: 1 1 calc(50% - 3px);
  }

  .group-entry .group-label,
  .group-tour .group-label {
    display: none;
  }

  .group-entry a,
  .group-tour a {
    justify-content: center;
    width: 100%;
  }

  .group-label {
    width: 100%;
    padding: 0 2px;
    font-size: 10px;
  }

  .council-schedule-table tbody th {
    width: auto;
    white-space: normal;
  }

  .today-label {
    display: block;
    width: max-content;
    margin: 4px 0 0;
  }

  .badge {
    padding: 4px 7px;
    font-size: 11px;
  }

  .inline-assignment button,
  .assign-actions .inline-assignment button {
    min-height: 26px;
    padding: 4px 7px;
    font-size: 11px;
  }

  .review-controls {
    gap: 5px;
  }

  .review-controls button {
    min-height: 28px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .grid-form,
  .item,
  .quick-add form,
  .session-note,
  .tour-grid,
  .assignment-checks {
    grid-template-columns: 1fr;
  }

  .planning-choice {
    grid-template-columns: 1fr;
  }

  .tour-heading { align-items: flex-start; flex-direction: column; }

  .item {
    scroll-margin-top: 72px;
  }

  .item-side {
    grid-template-columns: minmax(0, 1fr) minmax(100px, 122px);
    justify-items: stretch;
  }

  .item-side .edit,
  .deadline-edit .edit {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .views a {
    white-space: nowrap;
  }

  .views {
    display: grid;
    gap: 5px;
  }

  .nav-primary,
  .nav-secondary {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-primary .new-button,
  .nav-primary .nav-section,
  .nav-secondary a {
    flex: 0 0 auto;
  }

  .item-toggle {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    padding: 11px;
  }

  .session-item .item-toggle {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .item-row .row-treated {
    padding: 7px 8px 7px 3px;
  }

  .item-row .row-treated label {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 11px;
  }

  .item-toggle-meta {
    justify-content: space-between;
  }

  .session-item .item-toggle-meta {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }

  .session-row-date {
    font-size: 10px;
  }

  .item-toggle-main > strong {
    font-size: 15px;
  }

  .item-detail {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 11px 11px;
  }

  .item-detail .item-side {
    grid-template-columns: 1fr 1fr;
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid #dbe4f0;
    border-left: 0;
  }

  .session-note {
    grid-template-columns: 1fr;
  }

  .session-note button {
    width: 100%;
  }

  .item-detail .review-controls {
    grid-template-columns: 1fr;
  }

  .nav-secondary {
    width: 100%;
  }

  .toolbar.session-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 92px;
    padding: 14px;
  }

  .session-toolbar h2 {
    font-size: 21px;
  }

  .session-toolbar::after {
    right: 80px;
  }

  .session-toolbar .reset-treated button {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 11px;
  }
}

@media (max-width: 820px) {
  .app {
    padding-right: 10px;
    padding-bottom: 28px;
    padding-left: 10px;
  }

  .toolbar:not(.session-toolbar) {
    padding: 7px 2px 4px;
  }

  .toolbar:not(.session-toolbar) h2 {
    font-size: 22px;
  }

  .page-description {
    font-size: 11px;
  }

  .toolbar.page-toolbar {
    min-height: 92px;
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 9px;
  }

  .toolbar.page-toolbar h2 {
    font-size: 22px;
  }

  .toolbar.page-toolbar::after {
    top: -72px;
    right: -20px;
    width: 170px;
    height: 170px;
  }

  .nav-primary,
  .nav-secondary,
  .deadline-legend {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-primary::-webkit-scrollbar,
  .nav-secondary::-webkit-scrollbar,
  .deadline-legend::-webkit-scrollbar {
    display: none;
  }

  .nav-primary .new-button,
  .nav-primary .nav-section {
    min-height: 36px;
    padding: 7px 10px;
  }

  .deadline-panel {
    border-radius: 8px;
  }

  .deadline-legend {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
  }

  .pilotage-save-bar {
    position: sticky;
    top: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    min-height: 0;
    padding: 8px 9px;
  }

  .pilotage-save-bar .primary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .pilotage-save-bar.bottom {
    display: flex;
  }

  .deadline-table-wrap {
    max-height: calc(100vh - 205px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .pilotage-table {
    min-width: 1080px;
  }

  .pilotage-table th:nth-child(1) {
    width: 190px;
  }

  .deadline-table th {
    top: 0;
  }

  .pilotage-table td:first-child {
    position: static;
    box-shadow: none;
  }

  .pilotage-table th:first-child {
    position: sticky;
    top: 0;
    left: auto;
    z-index: 5;
    background: #e7eff9;
    box-shadow: inset 0 -1px 0 #b9c8dc, 0 2px 5px rgba(15, 46, 84, .08);
  }

  .pilotage-table td:first-child {
    background: #fff;
  }

  .tour-panel {
    padding: 11px;
    border-radius: 9px;
  }

  .tour-heading {
    margin: -11px -11px 11px;
    padding: 13px 11px;
    border-radius: 9px 9px 0 0;
  }

  .tour-heading h2 {
    font-size: 20px;
  }

  .tour-agenda-heading,
  .tour-agenda-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .tour-agenda-columns {
    grid-template-columns: 1fr;
  }

  .conseil-deadlines {
    padding: 9px;
  }

  .council-schedule-table {
    font-size: 12px;
  }

  .editor-overlay .actions {
    position: sticky;
    bottom: -14px;
    z-index: 2;
    margin: 2px -14px -14px;
    padding: 11px 14px;
    border-top: 1px solid #d5dfeb;
    background: rgba(255, 255, 255, .97);
  }

  .item-detail {
    gap: 7px;
    padding-right: 9px;
    padding-bottom: 9px;
    padding-left: 9px;
  }

  .detail-toolbar {
    min-height: 27px;
  }

  .item-detail .item-side {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .item-detail .item-side > .side-controls,
  .item-detail .item-side > .assignment-line,
  .item-detail .item-side > .assignment-checkboxes,
  .item-detail .item-side > .review-controls,
  .item-detail .item-side > .start-plan-controls,
  .item-detail .item-side > .presentation-controls,
  .item-detail .item-side > .edit,
  .item-detail .item-side > .done-form,
  .item-detail .item-side > .restore-form,
  .item-detail .item-side > .delete-form {
    grid-column: 1;
    width: 100%;
  }

  .item-detail .item-side > .edit,
  .item-detail .done-form button,
  .item-detail .restore-form button,
  .item-detail .delete-form button {
    min-height: 38px;
    width: 100%;
  }

  .item-detail .details {
    margin-top: 7px;
  }

  .item-detail .detail-block {
    padding: 8px 9px;
  }

  .item-detail .session-note {
    margin-top: 7px;
    padding-top: 7px;
  }

  .postponed-panel {
    margin-top: 18px;
  }

  .postponed-panel .section-heading {
    margin-bottom: 8px;
    padding: 8px 10px;
  }

  .postponed-panel h2 {
    font-size: 15px;
  }

  .tour-grid textarea {
    min-height: 82px;
  }

  .tour-block-form.is-empty textarea {
    min-height: 72px;
  }

  .presentation-controls > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-plan-controls,
  .presentation-controls {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .brand-title span {
    display: none;
  }

  .toolbar.session-toolbar {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .session-toolbar .reset-treated {
    justify-self: stretch;
  }

  .session-toolbar .reset-treated button {
    width: 100%;
  }

  .session-item .item-toggle {
    grid-template-columns: 1fr;
  }

  .session-item .detail-hint {
    justify-self: start;
  }

  .item-row .row-treated {
    padding-right: 6px;
  }

  .item-row .row-treated label {
    padding-right: 7px;
    padding-left: 7px;
  }

  .editor-overlay .actions > * {
    flex: 1 1 100%;
    justify-content: center;
    width: 100%;
  }
}

/* Navigation et palette harmonisées */
.topbar {
  border-bottom-color: var(--brand-dark);
  background: var(--brand);
  box-shadow: 0 3px 12px rgba(29, 63, 168, .18);
}

.brand-identity {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.brand-coat {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(9, 24, 65, .24));
}

.brand-title span {
  color: #fff;
  opacity: .9;
}

.navigation-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 36vw);
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.navigation-tools .views {
  gap: 6px;
  margin: 0;
}

.nav-primary {
  gap: 6px;
}

.nav-primary .new-button,
.nav-primary .nav-section,
.nav-primary .nav-webapp {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #c7d5e4;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(34, 75, 116, .06);
  color: #36516d;
  font-size: 12px;
  font-weight: 800;
}

.nav-primary .new-button {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 3px 9px rgba(38, 81, 212, .2);
  color: #fff;
}

.nav-primary .nav-section:hover,
.nav-primary .nav-webapp:hover {
  border-color: #9ebbd7;
  background: #edf5fc;
  color: #234e78;
}

.nav-primary .nav-section.active,
.nav-primary .nav-webapp.active {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 3px 9px rgba(38, 81, 212, .2);
  color: #fff;
}

.nav-secondary {
  width: fit-content;
  min-height: 34px;
  margin-left: 13px;
  padding: 3px 4px 3px 7px;
  border: 1px solid #cbd5f5;
  border-left: 3px solid var(--brand);
  border-radius: 3px 8px 8px 3px;
  background: #eef1ff;
}

.nav-secondary a {
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 6px;
  color: #36516d;
  font-size: 11px;
}

.nav-secondary a:hover {
  background: #dfe6ff;
}

.nav-secondary a.active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(38, 81, 212, .14);
  color: var(--brand-dark);
}

.nav-secondary a span {
  background: #d5e4f2;
  color: #385975;
}

.nav-secondary a.active span {
  background: #e2e8ff;
  color: var(--brand-dark);
}

.navigation-tools .global-search {
  display: block;
  width: 100%;
  margin: 0;
}

.navigation-tools .global-search-box > input {
  height: 40px;
  min-height: 40px;
  border: 1px solid #b8cce0;
  border-radius: 9px;
  box-shadow: 0 2px 7px rgba(34, 75, 116, .06);
  font-size: 13px;
}

.navigation-tools .global-search-box > input:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(38, 81, 212, .16);
  outline-offset: 0;
}

.toolbar.session-toolbar,
.toolbar.page-toolbar,
.toolbar.page-archives,
.tour-heading {
  background: var(--brand);
  box-shadow: 0 7px 20px rgba(29, 63, 168, .16);
}

.toolbar.session-toolbar .session-kicker,
.toolbar.session-toolbar .session-count,
.toolbar.page-toolbar .page-kicker,
.toolbar.page-toolbar .page-description,
.tour-heading .eyebrow {
  color: #fff;
  opacity: .92;
}

.tour-heading-title .eyebrow::after {
  color: rgba(255, 255, 255, .72);
}

.session-toolbar .reset-treated button,
.tour-heading .autosave-status {
  border-color: rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .14);
}

@media (max-width: 1050px) {
  .navigation-tools {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .navigation-tools .global-search {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .navigation-tools {
    margin-bottom: 10px;
  }

  .nav-primary .new-button,
  .nav-primary .nav-section,
  .nav-primary .nav-webapp {
    min-height: 38px;
    padding: 7px 10px;
  }

  .nav-secondary {
    width: 100%;
    margin-left: 7px;
  }

  .navigation-tools .global-search-box > input {
    height: 38px;
    min-height: 38px;
  }

  .brand-coat {
    height: 31px;
  }
}

/* Sections uniformes de la page Tour de table */
.tour-agenda-panel,
.conseil-deadlines,
.mini-notes-panel,
.tour-notes-panel {
  margin: 0 0 12px;
  padding: 13px 14px;
  border: 1px solid #cbd5f5;
  border-left: 4px solid var(--brand);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(29, 63, 168, .04);
}

.tour-agenda-heading,
.tour-section-heading,
.mini-notes-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tour-section-title {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  align-items: baseline;
}

.tour-section-title h3 {
  margin: 0;
  color: #172f6c;
  font-size: 18px;
  line-height: 1.2;
}

.tour-section-title > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.tour-section-title > span::before {
  margin-right: 9px;
  color: #91a2bc;
  content: '\2014';
}

.tour-agenda-section h4 {
  text-transform: none;
}

.conseil-deadlines-heading h3 {
  margin: 0;
  color: #172f6c;
  font-size: 18px;
  line-height: 1.2;
}

.mini-notes-heading > .mini-note-count {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef1ff;
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 800;
}

.tour-notes-panel .tour-grid {
  margin: 0;
}

.tour-notes-panel .tour-master-save {
  margin: 10px 0 0;
}

.tour-muni-panel.embedded-session {
  overflow: hidden;
  padding: 0;
  border: 1px solid #cbd5f5;
  border-left: 4px solid var(--brand);
  border-radius: 9px;
  background: #f8faff;
  box-shadow: 0 2px 8px rgba(29, 63, 168, .04);
}

.tour-muni-session-toolbar {
  min-height: 104px;
  margin: 0 0 12px;
  border-radius: 0;
  box-shadow: none;
}

.tour-session-group {
  padding: 0 12px 12px;
}

.tour-session-group-later {
  padding-top: 4px;
}

.tour-session-subheading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-left: 4px solid var(--brand);
  border-radius: 0 7px 7px 0;
  background: #eef1ff;
}

.tour-session-subheading h3 {
  margin: 0;
  color: #253f91;
  font-size: 14px;
}

.tour-session-subheading span {
  color: #52647c;
  font-size: 10px;
  font-weight: 800;
}

.tour-session-group-later .tour-session-subheading {
  border-left-color: #7c5ac7;
  background: #f5f1ff;
}

.tour-session-group-later .tour-session-subheading h3 {
  color: #56389b;
}

.session-view-subheading {
  margin-bottom: 8px;
}

.tour-muni-list.list {
  gap: 7px;
}

.tour-muni-item.is-later,
.item-postponed.is-later {
  border-left-color: #7c5ac7;
}

@media (max-width: 820px) {
  .tour-agenda-panel,
  .conseil-deadlines,
  .mini-notes-panel,
  .tour-notes-panel {
    padding: 11px;
  }

  .tour-agenda-heading,
  .tour-section-heading,
  .mini-notes-heading {
    align-items: flex-start;
  }

  .tour-section-title h3,
  .conseil-deadlines-heading h3 {
    font-size: 16px;
  }

  .tour-muni-session-toolbar {
    min-height: 92px;
    padding: 14px;
  }

  .tour-session-group {
    padding-right: 8px;
    padding-bottom: 10px;
    padding-left: 8px;
  }
}

@media (max-width: 520px) {
  .tour-agenda-heading,
  .tour-section-heading,
  .mini-notes-heading {
    flex-direction: column;
  }

  .tour-agenda-actions,
  .council-schedule-toggle,
  .mini-notes-heading > .mini-note-count {
    align-self: stretch;
  }

  .council-schedule-toggle {
    justify-content: center;
  }

  .tour-section-title > span {
    flex-basis: 100%;
  }

  .tour-section-title > span::before {
    display: none;
  }
}

/* Priorité finale des réglages compacts sur les styles historiques. */
.toolbar.session-toolbar,
.toolbar.page-toolbar {
  min-height: 70px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.toolbar.session-toolbar h2,
.toolbar.page-toolbar h2 { font-size: 22px; }

.tour-heading {
  padding-top: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.tour-heading h2 { font-size: 21px; }
.tour-muni-session-toolbar { min-height: 70px; padding: 10px 14px; }

.pilotage-table { min-width: 920px; }
.pilotage-table th:nth-child(1) { width: 34%; }
.pilotage-table th:nth-child(2) { width: 25%; }
.pilotage-table th:nth-child(3) { width: 17%; }
.pilotage-table th:nth-child(4) { width: 17%; }
.pilotage-table th:nth-child(5) { width: 7%; }

.pilotage-summary-row.is-dirty td,
.pilotage-detail-row.is-dirty td { background: #fff6c7 !important; }

@media (max-width: 820px) {
  .toolbar.session-toolbar,
  .toolbar.page-toolbar,
  .tour-muni-session-toolbar {
    min-height: 66px;
    padding: 9px 11px;
  }

  .pilotage-table { min-width: 760px; }
  .pilotage-table th:nth-child(1) { width: 30%; }
  .pilotage-table th:nth-child(2) { width: 27%; }
  .pilotage-table th:nth-child(3) { width: 18%; }
  .pilotage-table th:nth-child(4) { width: 17%; }
  .pilotage-table th:nth-child(5) { width: 8%; }
}

/* Mini-tâches : saisie, affectations et présence compacte en séance. */
.mini-note-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.mini-task-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.mini-task-create-row input { min-width: 0; }
.mini-task-create-row button { min-width: 90px; }

.mini-task-destinations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0;
  border: 0;
  padding: 0;
}

.mini-task-destinations legend {
  width: 100%;
  margin-bottom: 1px;
  color: #73683d;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.mini-task-destinations label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #4d5661;
  font-size: 11px;
  font-weight: 700;
}

.mini-task-destinations input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #b07a12;
}

.mini-note {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.mini-note > .mini-note-toggle { grid-column: 1; }

.mini-task-badges {
  display: flex;
  grid-column: 1;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 25px;
}

.mini-task-badges span {
  border: 1px solid #e0cf91;
  border-radius: 999px;
  padding: 2px 6px;
  background: #fff8d9;
  color: #715a12;
  font-size: 9px;
  font-weight: 800;
}

.mini-note-actions {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-task-editor { position: relative; }

.mini-task-editor > summary {
  min-height: 29px;
  border: 1px solid #d2d8df;
  border-radius: 5px;
  padding: 6px 8px;
  background: #fff;
  color: #4b5968;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  list-style: none;
}

.mini-task-editor > summary::-webkit-details-marker { display: none; }

.mini-task-editor > form {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  width: min(460px, calc(100vw - 42px));
  gap: 10px;
  border: 1px solid #d8c98f;
  border-radius: 8px;
  padding: 12px;
  background: #fffdf6;
  box-shadow: 0 12px 30px rgba(42, 48, 55, .18);
}

.mini-task-editor > form > input { width: 100%; }
.mini-task-editor > form > button { justify-self: end; }

.session-mini-tasks {
  margin: 0 0 10px;
  border: 1px solid #dfca78;
  border-radius: 9px;
  padding: 9px 11px;
  background: #fff9dc;
}

.embedded-session > .session-mini-tasks { margin: 0 10px 10px; }

.session-mini-tasks-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.session-mini-tasks-heading h3 {
  margin: 0;
  color: #674f06;
  font-size: 13px;
}

.session-mini-tasks-heading > span {
  border-radius: 999px;
  padding: 2px 7px;
  background: #ead792;
  color: #5e4b0d;
  font-size: 10px;
  font-weight: 800;
}

.session-mini-task-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 5px 12px;
}

.session-mini-task {
  margin: 0;
  border-radius: 6px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, .72);
}

.session-mini-task label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  color: #3f4650;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.session-mini-task input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #3d7a4e;
}

.session-mini-task.is-done { opacity: .58; }
.session-mini-task.is-done span { text-decoration: line-through; }

@media (max-width: 700px) {
  .mini-task-create-row { grid-template-columns: 1fr; }
  .mini-task-create-row button { width: 100%; }
  .mini-note { grid-template-columns: 1fr; }
  .mini-note-actions { grid-column: 1; grid-row: auto; }
  .mini-task-badges { padding-left: 0; }
  .mini-task-editor > form { right: auto; left: 0; }
  .session-mini-task-list { grid-template-columns: 1fr; }
}

/* Étape 5 : contrôles cohérents et aide clavier. */
.keyboard-help {
  position: relative;
  z-index: 14;
  width: fit-content;
  margin: 5px 0 0 auto;
  color: #536b84;
  font-size: 10px;
}

.keyboard-help > summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.keyboard-help > summary::-webkit-details-marker { display: none; }
.keyboard-help > summary::before { content: '?'; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 5px; border: 1px solid #b8c9da; border-radius: 50%; background: #fff; }

.keyboard-help > div {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  gap: 7px;
  border: 1px solid #b9c9dc;
  border-radius: 9px;
  padding: 11px 12px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 46, 84, .2);
  color: #334155;
  text-align: left;
}

.keyboard-help span { display: block; }
.keyboard-help p { margin: 3px 0 0; border-top: 1px solid #e3e9f0; padding-top: 8px; color: #5c6f82; line-height: 1.45; }

kbd {
  display: inline-block;
  min-width: 22px;
  border: 1px solid #b8c4d0;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 5px;
  background: #f7f9fb;
  color: #20384f;
  font: 700 10px/1.2 system-ui, sans-serif;
  text-align: center;
}

.assignment-checks input[type="checkbox"],
.pilotage-assignments input[type="checkbox"],
.assignment-checkboxes input[type="checkbox"],
.treated-toggle input[type="checkbox"],
.mini-task-destinations input[type="checkbox"],
.mini-note-toggle input[type="checkbox"] {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--brand);
}

.pilotage-assignments label,
.assignment-checkboxes label,
.mini-task-destinations label {
  cursor: pointer;
}

.pilotage-assignments label {
  min-height: 32px;
  margin: 0;
  border: 1px solid #d7e0eb;
  border-radius: 7px;
  padding: 6px 8px;
  background: #fff;
  color: #29445f;
}

.pilotage-assignments label:has(input:checked),
.assignment-checks .check-line:has(input:checked),
.mini-task-destinations label:has(input:checked) {
  border-color: #9fbbe8;
  background: #eaf2ff;
  color: #173f70;
}

.session-note button,
.start-plan-controls button,
.presentation-controls button,
.order-buttons button,
.mini-note-actions button,
.pilotage-shortcuts button,
.editor-shortcuts button,
.duration-input-row button {
  border-radius: 7px;
  font-weight: 800;
}

.actions button.archive,
.done-form button {
  border-color: #b9c7d8;
  background: #edf2f7;
  color: #34495e;
}

.actions button.archive:hover,
.done-form button:hover {
  border-color: #9bacc0;
  background: #dfe7f0;
}

.history-field textarea {
  min-height: 260px;
  line-height: 1.5;
}

.deadline-section td {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .025em;
  text-transform: none;
}

.tour-calendar-day.is-today {
  background: #fff0a6;
  box-shadow: inset 0 0 0 2px #dfa900, 0 2px 8px rgba(174, 125, 0, .16);
}

@media (max-width: 700px) {
  .keyboard-help > div { position: fixed; top: 112px; right: 12px; left: 12px; width: auto; }
  .brand-title h1 { font-size: 16px; }
  .brand-title span { font-size: 10px; }
}

/* Étape 6 : compte, mémorisation de la connexion et mot de passe. */
.remember-login {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  margin: 0;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  cursor: pointer;
}

.remember-login input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
}

.auth-help {
  margin-top: -8px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
}

.topbar-account {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.topbar-account form { margin: 0; }
.account-menu { position: relative; }

.account-menu > summary {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 7px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
  white-space: nowrap;
}

.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary::after { margin-left: 6px; content: '\25BE'; font-size: 9px; }
.account-menu[open] > summary { background: rgba(255, 255, 255, .2); }

.password-change-form {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: min(390px, calc(100vw - 28px));
  gap: 11px;
  border: 1px solid #b8c9dc;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 46, 84, .25);
}

.account-menu-heading {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid #e3e9f0;
  padding-bottom: 9px;
}

.account-menu-heading strong { color: #153a60; font-size: 15px; }
.account-menu-heading small,
.password-change-form label small { color: #64748b; font-size: 10px; font-weight: 500; }
.password-change-form label { gap: 5px; font-size: 11px; }
.password-change-form input { width: 100%; }
.password-change-form button { min-height: 38px; }
.logout-form { display: flex; }

@media (max-width: 700px) {
  .topbar { align-items: flex-start; }
  .topbar-account { gap: 4px; }
  .account-menu > summary,
  .topbar .logout-form .ghost { min-height: 32px; padding: 7px 8px; font-size: 10px; }
  .password-change-form { position: fixed; top: 58px; right: 10px; left: 10px; width: auto; max-height: calc(100vh - 76px); overflow-y: auto; }
}

/* Étape 7 : formulaires compacts, veille, Mini-tâches et raccourcis visibles. */
.editor-overlay .editor {
  width: min(1180px, 100%);
}

.duration-input-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.duration-manual {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.duration-manual input[type="number"] {
  flex: 0 0 76px;
  width: 76px;
  min-height: 36px;
}

.duration-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  gap: 6px;
}

.editor-shortcuts button,
.duration-presets button {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
}

.edit-planning-card {
  grid-template-columns: 132px minmax(235px, 1fr) minmax(260px, .9fr) minmax(235px, 1fr);
  align-items: stretch;
}

.edit-planning-card .creation-card-heading {
  grid-column: 1 / -1;
}

.edit-planning-card .planning-status {
  grid-column: auto;
}

.edit-planning-card .planning-status-summary {
  display: grid;
  align-content: center;
  justify-content: start;
  gap: 3px;
  min-height: 0;
  padding: 10px;
}

.edit-planning-card .planning-status-summary strong {
  font-size: 13px;
}

.last-update-field {
  width: min(260px, 100%);
}

.watch-select-options {
  display: grid;
  grid-template-columns: minmax(250px, .7fr) minmax(250px, 1fr);
  gap: 10px;
  align-items: start;
}

.watch-select-options > label {
  display: grid;
  gap: 5px;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.watch-select-options select,
.watch-select-options input[type="date"] {
  width: 100%;
  min-height: 38px;
}

.watch-custom-date {
  display: grid !important;
  grid-template-columns: 1fr;
}

.watch-custom-date[hidden] {
  display: none !important;
}

.watch-custom-date .localized-date-preview {
  grid-column: 1;
}

.council-rule-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

[data-shortcut]::after {
  display: inline-block;
  margin-left: 7px;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 1px 4px;
  content: attr(data-shortcut);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  opacity: .72;
  white-space: nowrap;
}

.session-mini-task-list {
  grid-template-columns: 1fr;
}

.mini-note {
  min-height: 52px;
  padding: 10px 11px;
}

.mini-note-toggle label {
  gap: 9px;
  font-size: 13px;
  line-height: 1.4;
}

.mini-note-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.mini-task-badges {
  gap: 5px;
  padding-left: 27px;
}

.mini-task-badges span {
  padding: 3px 7px;
  font-size: 10px;
}

.mini-note-actions button,
.mini-task-editor > summary {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 11px;
}

.session-mini-tasks {
  padding: 11px 12px;
}

.session-mini-tasks-heading h3 {
  font-size: 15px;
}

.session-mini-task-list {
  gap: 7px;
}

.session-mini-task {
  min-height: 42px;
  padding: 9px 10px;
}

.session-mini-task label {
  gap: 9px;
  font-size: 13px;
  line-height: 1.4;
}

.session-mini-task input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.mini-other-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mini-other-toggle {
  display: inline-flex;
  width: fit-content;
  margin-top: 9px;
  border: 1px solid #c9d3df;
  border-radius: 7px;
  padding: 6px 9px;
  background: #f7f9fb;
  color: #53677b;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.mini-other-toggle-input:checked + .mini-other-toggle {
  border-color: #9eb4ce;
  background: #eaf2fb;
  color: #234f79;
}

.mini-other-toggle-input:not(:checked) ~ .mini-note-list .mini-note.is-outside-tour {
  display: none;
}

.mini-task-badges .destination-tour,
.mini-task-destinations .destination-tour:has(input:checked) {
  border-color: #bca7de;
  background: #f3e8ff;
  color: #5b348f;
}

.mini-task-badges .destination-cpds,
.mini-task-destinations .destination-cpds:has(input:checked) {
  border-color: #9ebce8;
  background: #e8f1ff;
  color: #24568f;
}

.mini-task-badges .destination-muni,
.mini-task-destinations .destination-muni:has(input:checked) {
  border-color: #9fcbaa;
  background: #e8f5eb;
  color: #28643a;
}

.mini-task-badges .destination-conseil,
.mini-task-destinations .destination-conseil:has(input:checked) {
  border-color: #dfc676;
  background: #fff5cf;
  color: #70570b;
}

.mini-task-badges .destination-tache,
.mini-task-destinations .destination-tache:has(input:checked) {
  border-color: #e6aca7;
  background: #fce8e6;
  color: #8d3731;
}

.mini-task-badges .destination-none {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #526171;
}

.mini-task-destinations .destination-tour input { accent-color: #7248ad; }
.mini-task-destinations .destination-cpds input { accent-color: #3673b9; }
.mini-task-destinations .destination-muni input { accent-color: #3d7a4e; }
.mini-task-destinations .destination-conseil input { accent-color: #a97a10; }
.mini-task-destinations .destination-tache input { accent-color: #b74d45; }

.session-mini-tasks.mini-theme-cpds {
  border-color: #9ebce8;
  background: #e8f1ff;
}

.session-mini-tasks.mini-theme-muni {
  border-color: #9fcbaa;
  background: #e8f5eb;
}

.session-mini-tasks.mini-theme-conseil {
  border-color: #dfc676;
  background: #fff5cf;
}

.session-mini-tasks.mini-theme-taches {
  border-color: #e6aca7;
  background: #fce8e6;
}

.session-mini-tasks.mini-theme-cpds .session-mini-tasks-heading h3 { color: #24568f; }
.session-mini-tasks.mini-theme-muni .session-mini-tasks-heading h3 { color: #28643a; }
.session-mini-tasks.mini-theme-conseil .session-mini-tasks-heading h3 { color: #70570b; }
.session-mini-tasks.mini-theme-taches .session-mini-tasks-heading h3 { color: #8d3731; }
.session-mini-tasks.mini-theme-cpds .session-mini-tasks-heading > span { background: #bcd2f1; color: #24568f; }
.session-mini-tasks.mini-theme-muni .session-mini-tasks-heading > span { background: #bfe0c7; color: #28643a; }
.session-mini-tasks.mini-theme-conseil .session-mini-tasks-heading > span { background: #ead792; color: #70570b; }
.session-mini-tasks.mini-theme-taches .session-mini-tasks-heading > span { background: #efc4c0; color: #8d3731; }
.session-mini-tasks.mini-theme-cpds input[type="checkbox"] { accent-color: #3673b9; }
.session-mini-tasks.mini-theme-muni input[type="checkbox"] { accent-color: #3d7a4e; }
.session-mini-tasks.mini-theme-conseil input[type="checkbox"] { accent-color: #a97a10; }
.session-mini-tasks.mini-theme-taches input[type="checkbox"] { accent-color: #b74d45; }

@media (max-width: 1050px) {
  .edit-planning-card {
    grid-template-columns: 132px repeat(2, minmax(230px, 1fr));
  }

  .edit-planning-card .planning-section:last-child {
    grid-column: 2 / -1;
  }
}

@media (max-width: 820px) {
  .edit-planning-card,
  .watch-select-options,
  .council-rule-grid {
    grid-template-columns: 1fr;
  }

  .edit-planning-card .planning-section:last-child {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .duration-input-row,
  .duration-presets {
    grid-template-columns: 1fr;
  }

  .duration-manual input[type="number"] {
    width: 72px;
  }
}
