/* Compléments propres aux écrans. Les couleurs globales sont dans style.css. */
.brand > span {
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.04em;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
}
.local-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 15px 12px;
  color: var(--muted);
  font-size: 0.85rem;
}
.sidebar-version {
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
  padding: 15px 12px 0;
}
.nav-count {
  margin-left: auto;
  background: var(--mint);
  color: var(--ink);
  padding: 1px 7px;
  border-radius: 7px;
  font-size: 0.75rem;
}
.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  background: none;
  border: 0;
  font-size: 0.9rem;
}
.search-trigger kbd {
  font-size: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
  margin-left: 10px;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 34px;
  color: var(--muted);
  font-size: 0.75rem;
}
.pending {
  color: var(--orange);
}
.error,
.form-error {
  color: var(--red);
}
.form-error {
  margin: 10px 0 0;
  white-space: pre-wrap;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wrap {
  flex-wrap: wrap;
}
.grow {
  flex: 1;
}
.full {
  grid-column: 1/-1;
}
.text-button {
  color: var(--ink);
  background: none;
  border: 0;
  text-align: left;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.text-button:hover {
  color: var(--teal);
  text-decoration: underline;
}
.text-link {
  color: var(--teal);
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.875rem;
  text-decoration: underline;
  cursor: pointer;
}
.cell-sub {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 5px;
}
.task-title {
  font-weight: 550;
  min-width: 200px;
  max-width: 450px;
}
.progress-cell {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 105px;
}
.progress-cell .progress-track {
  width: 70px;
}
.progress-cell > span {
  font-size: 0.8rem;
}
.checkbox-field {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 0.9rem;
  cursor: pointer;
}
.checkbox-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}
.toolbar select {
  max-width: 340px;
}
.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 170px;
}
.filter-search input {
  width: 100%;
}
.stat-value small {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
}
.stat-card .progress-track {
  margin-top: 10px;
}
.text-amber {
  color: var(--orange);
}
.overview-columns {
  grid-template-columns: 1.65fr 1fr;
}
.stats-grid {
  margin-bottom: 24px;
}
.card + .card,
.grid + .grid,
.grid + .card,
.card + .grid {
  margin-top: 24px;
}
.page-content > .grid,
.page-content > .card {
  margin-bottom: 24px;
}
.chart-caption {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 10px;
}
.load-days {
  display: flex;
  gap: 5px;
  margin: 18px 0;
  overflow: auto;
  padding-bottom: 4px;
}
.load-day {
  flex: 1;
  min-width: 31px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--canvas);
  padding: 8px 3px;
  color: var(--ink);
  font-size: 0.85rem;
}
.load-day small {
  font-size: 0.65rem;
}
.load-day b {
  font-size: 0.7rem;
  padding: 2px 5px;
  border-radius: 5px;
  background: #dbe9e8;
}
.load-day.peak {
  border-color: #d9a16b;
  background: var(--orange-soft);
}
.load-day.peak b {
  background: #ead3b4;
}
.project-summary {
  display: block;
  border-bottom: 1px solid var(--line);
  padding: 0 0 14px;
  color: var(--ink);
}
.project-summary .progress-track {
  margin: 10px 0 5px;
}
.project-summary small {
  color: var(--muted);
}
.project-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.agenda-list-item {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  padding: 0 0 16px;
  color: var(--ink);
}
.agenda-list-item strong {
  display: block;
  font-size: 0.94rem;
}
.agenda-list-item small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3px;
}
.date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 52px;
  border-radius: 10px;
  background: var(--teal-soft);
}
.date-block b {
  font-size: 1.3rem;
}
.date-block small {
  font-size: 0.65rem;
  margin: 0;
}
.priority {
  font-size: 0.8rem;
  color: var(--muted);
}
.priority.high {
  color: #9d6338;
}
.priority.low {
  color: #75918c;
}
.project-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 13px;
  margin-bottom: 17px;
}
.project-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 13px;
  color: var(--ink);
  font-size: 0.85rem;
}
.project-chip.active {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.project-chip small {
  font-size: 0.7rem;
  color: var(--muted);
}
.scope-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px;
}
.scope-card h2 {
  margin: 8px 0;
}
.scope-card p {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 650px;
}
.subproject-strip {
  margin-bottom: 20px;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 15px;
  color: var(--muted);
  font-size: 0.8rem;
}
.project-directory {
  padding: 18px 22px;
}
.project-directory summary,
details > summary {
  cursor: pointer;
}
.project-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.directory-child {
  display: block;
  margin: 8px 0 0 16px;
  color: var(--muted);
  font-size: 0.85rem;
}
.kanban-board {
  grid-template-columns: repeat(4, minmax(285px, 1fr));
  align-items: start;
  padding-bottom: 20px;
  overflow-x: auto;
}
.kanban-column {
  background: #eaf0f2;
  padding: 14px;
  border-radius: 15px;
}
.kanban-heading {
  gap: 8px;
}
.kanban-heading h2 {
  font-size: 0.95rem;
  flex: 1;
  margin: 0;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #97aeb7;
  flex-shrink: 0;
}
.status-dot.doing {
  background: #4a8eb2;
}
.status-dot.blocked {
  background: #cc8c55;
}
.status-dot.done {
  background: #5e9479;
}
.kanban-card {
  border-top: 3px solid var(--project-color);
  padding: 17px;
}
.kanban-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 12px 0;
}
.kanban-card p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 12px;
}
.project-tag {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kanban-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.73rem;
  color: var(--muted);
  margin: 13px 0;
}
.kanban-meta > span:first-child {
  display: flex;
  gap: 5px;
  align-items: center;
}
.kanban-card select {
  width: 100%;
  font-size: 0.8rem;
  min-height: 34px;
  padding: 6px 9px;
  background: #f8fafb;
}
.kanban-empty {
  color: var(--muted);
  font-size: 0.8rem;
  padding: 35px 5px;
  text-align: center;
}
.drag-over {
  outline: 2px dashed #669d9e;
  background: #e1eeeb;
}
.timeline-scroll {
  overflow: auto;
  max-height: 680px;
  border-bottom: 1px solid var(--line);
}
.timeline {
  display: flex;
  width: calc(260px + var(--timeline-width));
  position: relative;
}
.timeline-labels {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
  border-right: 1px solid var(--line);
}
.timeline-head,
.timeline-dates {
  height: 52px;
  position: sticky;
  top: 0;
  background: #f6f9fa;
  z-index: 6;
  border-bottom: 1px solid var(--line);
}
.timeline-head {
  padding: 17px 15px;
  font-size: 0.8rem;
  color: var(--muted);
}
.timeline-label {
  height: 43px;
  padding: 11px 13px;
  font-size: 0.8rem;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  align-items: center;
}
.timeline-label.group {
  height: 33px;
  background: #eaf1f3;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--teal);
}
.timeline-chart {
  position: relative;
  width: var(--timeline-width);
  background: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(var(--day-width) - 1px),
    #e8edef calc(var(--day-width) - 1px),
    #e8edef var(--day-width)
  );
}
.timeline-dates {
  display: flex;
}
.timeline-dates > span {
  width: var(--day-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 0.72rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
}
.timeline-dates small {
  font-size: 0.6rem;
}
.timeline-dates .is-today {
  background: var(--mint);
  color: var(--ink);
}
.timeline-track {
  height: 43px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.timeline-track.group {
  height: 33px;
  background: #eaf1f380;
}
.timeline-bar {
  position: absolute;
  top: 9px;
  height: 25px;
  border: 0;
  border-radius: 5px;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  color: var(--bar-color);
  background: #d9e7e8;
  font-size: 0.68rem;
  padding: 4px 7px;
}
.timeline-bar > span:last-child {
  position: relative;
  z-index: 2;
}
.timeline-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--bar-color);
  opacity: 0.26;
}
.timeline-bar.done {
  background: #e0eddf;
  color: #397356;
}
.timeline-bar.blocked {
  background: #f7e1cb;
  color: #945527;
}
.timeline-bar.doing {
  background: #d9e9f3;
}
.today-line {
  position: absolute;
  top: 52px;
  bottom: 0;
  border-left: 2px dashed #bb7151;
  opacity: 0.65;
  pointer-events: none;
  z-index: 3;
}
.month-scroll {
  overflow-x: auto;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  min-width: 850px;
}
.weekday {
  padding: 10px;
  color: var(--muted);
  text-align: center;
  background: #f6f9fa;
  font-size: 0.8rem;
}
.month-day {
  min-height: 140px;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.month-day.outside {
  background: #f8fafb;
  opacity: 0.65;
}
.day-number {
  border: 0;
  background: none;
  color: var(--ink);
  align-self: flex-start;
  border-radius: 50%;
  height: 27px;
  width: 27px;
  font-size: 0.8rem;
}
.month-day.today .day-number {
  background: var(--teal);
  color: #fff;
}
.calendar-event,
.calendar-task {
  text-align: left;
  width: 100%;
  font-size: 0.69rem;
  line-height: 1.4;
  border: 0;
  border-radius: 5px;
  padding: 4px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-event {
  background: #e5f0f0;
  color: var(--teal);
}
.calendar-task {
  background: #f2f0e7;
  color: #7d7455;
}
.month-day > small {
  font-size: 0.65rem;
}
.note-excerpt {
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 0.9rem;
}
.note-card h2 {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-top: 15px;
}
.search-input {
  width: 100%;
  margin-bottom: 15px;
}
.search-result {
  display: block;
  padding: 13px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  color: var(--ink);
}
.search-result strong {
  font-size: 0.9rem;
}
.search-result small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.loading-screen {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
.auth-aside {
  padding: 60px;
  align-self: center;
  max-width: 640px;
  color: #c6dade;
}
.auth-aside h1 {
  color: #fff;
  font-size: 3.6rem;
  line-height: 1.1;
  font-weight: 500;
  margin: 25px 0;
}
.auth-aside .eyebrow {
  display: block;
  color: #a8cbbd;
  margin-top: 30px;
  letter-spacing: 0.15em;
}
.auth-aside p {
  line-height: 1.7;
  max-width: 350px;
}
.auth-feature {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
  font-size: 0.9rem;
}
.auth-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--teal);
  min-height: 100vh;
  padding: 40px;
}
.auth-card {
  width: 100%;
  max-width: 450px;
  margin: auto;
  padding: 40px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 90px #0002;
}
.auth-card h2 {
  font-size: 1.6rem;
}
.auth-card .stack {
  margin: 25px 0;
}
.auth-foot {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 25px;
}
.scan-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}
.scan-list {
  min-width: 0;
}
.scan-list-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  margin: 3px 0;
}
.scan-list-item:hover {
  text-decoration: none;
  background: #fff;
}
.scan-list-item.active {
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.scan-list-item strong {
  display: block;
  font-size: 0.85rem;
  word-break: break-all;
}
.scan-list-item small {
  display: block;
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: 4px;
}
.scan-list-icon {
  width: 34px;
  height: 39px;
  display: grid;
  place-items: center;
  background: var(--teal-soft);
  color: var(--teal);
  border-radius: 7px;
}
.scan-inbox-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
}
.scan-inbox-title h2 {
  font-size: 0.9rem;
  margin: 0;
}
.scan-welcome {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
  padding: 70px 50px;
}
.scan-welcome > svg {
  color: var(--teal);
  margin-bottom: 30px;
}
.scan-welcome h2 {
  font-size: 1.8rem;
}
.scan-welcome p {
  max-width: 500px;
  margin: 15px auto 25px;
  color: var(--muted);
}
.scan-steps {
  display: flex;
  gap: 25px;
  justify-content: center;
  margin: 40px 0;
}
.scan-steps span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.scan-steps b {
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--teal-soft);
}
.scan-review {
  min-width: 0;
}
.scan-review > .card {
  overflow: hidden;
}
.scan-meta-strip {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  background: #f4f8f8;
  border-top: 1px solid var(--line);
  padding: 13px 20px;
  color: var(--muted);
  font-size: 0.78rem;
}
.scan-meta-strip > span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.scan-review .notice {
  margin: 16px 20px;
}
.scan-review-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(280px, 1.1fr);
  gap: 20px;
  padding: 20px;
  align-items: start;
}
.scan-photo-panel {
  position: sticky;
  top: 15px;
  min-width: 0;
}
.scan-photo-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-bottom: 12px;
  gap: 6px;
}
.scan-photo-frame {
  position: relative;
  background: #f0f2f3;
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid var(--line);
}
.scan-photo-frame img {
  width: 100%;
  height: auto;
}
.scan-highlight {
  position: absolute;
  background: #d4a14328;
  border: 2px solid #c98f39;
  box-shadow: 0 0 0 999px #102a3326;
  pointer-events: none;
}
.scan-candidates {
  min-width: 0;
  max-height: 920px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 5px;
}
.candidate-toolbar {
  padding: 0 0 14px;
}
.candidate-heading {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 13px;
}
.candidate-heading .badge {
  font-size: 0.65rem;
}
.scan-candidate {
  margin: 0 0 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.scan-candidate.excluded {
  opacity: 0.55;
  background: #f7f9fa;
}
.candidate-fields > .field {
  margin-bottom: 12px;
}
.candidate-fields .field > span {
  font-size: 0.76rem;
}
.candidate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.candidate-fields input,
.candidate-fields select {
  font-size: 0.84rem;
  min-height: 39px;
  padding: 7px 9px;
  max-width: 100%;
}
.candidate-suggestion,
.candidate-warning {
  font-size: 0.73rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 3px 0 13px;
}
.candidate-warning {
  color: #9c6836;
  display: flex;
  align-items: start;
  gap: 5px;
}
.candidate-fields small {
  font-size: 0.73rem;
  line-height: 1.5;
  display: block;
  margin: 8px 0 12px;
  color: var(--muted);
}
.raw-reading {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 14px;
}
.raw-reading p {
  margin: 10px 0;
  white-space: pre-wrap;
}
.scan-confirm {
  border-top: 1px solid var(--line);
  background: #fbfcfc;
  padding: 22px;
}
.scan-confirm > .row {
  margin-top: 18px;
}
.scan-confirm .muted {
  font-size: 0.75rem;
}
.scan-processing {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.spinner {
  display: block;
  border: 3px solid #d4e3e4;
  border-top-color: var(--teal);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin: 0 auto 15px;
  animation: spin 1.1s linear infinite;
}
.processing-dot {
  background: #6eab9b;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.notice.success {
  background: #edf5ed;
  color: #397356;
  border-color: #cee4d0;
}
.goal-card {
  display: block;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  padding: 22px;
  border-radius: 14px;
  color: var(--ink);
}
.goal-card strong {
  display: block;
  font-size: 0.95rem;
}
.goal-card small {
  display: block;
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: 4px;
}
.goal-card p {
  font-size: 0.9rem;
  margin: 20px 0 10px;
}
.goal-card p b {
  font-size: 1.5rem;
}
.goal-icon {
  width: 38px;
  height: 42px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
}
.habit-table {
  font-size: 0.85rem;
}
.habit-head,
.habit-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) repeat(7, 30px);
  gap: 5px;
  align-items: center;
  margin-bottom: 10px;
}
.habit-head {
  color: var(--muted);
  font-size: 0.7rem;
}
.habit-head > span:not(:first-child) {
  text-align: center;
}
.habit-row > strong {
  font-weight: 500;
  font-size: 0.8rem;
}
.habit-cell {
  border: 0;
  background: #f1f4f4;
  border-radius: 7px;
  color: #9aadb1;
  width: 30px;
  height: 30px;
}
.habit-cell.checked {
  background: #e1efdb;
  color: #507049;
}
.sport-bars {
  display: grid;
  gap: 15px;
  margin-top: 25px;
  font-size: 0.8rem;
}
.sport-bars .progress-track {
  margin-top: 6px;
}
.meals-table {
  min-width: 800px;
}
.meals-table th {
  white-space: nowrap;
}
.meals-table td {
  min-width: 95px;
}
.meal-label {
  font-size: 0.8rem;
  display: block;
  margin: 3px 0;
}
.settings-row small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin: 3px 0;
}
.backup-list {
  font-size: 0.78rem;
}
.backup-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.backup-list a > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.rule-list {
  max-height: 250px;
  overflow: auto;
}
.history-list details {
  font-size: 0.8rem;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.history-list pre {
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f5f7f8;
  padding: 12px;
  border-radius: 10px;
}
.modal-body > .field {
  margin-bottom: 17px;
}
details > summary {
  padding: 10px 0;
}
details .row {
  margin: 15px 0;
}
.notice {
  font-size: 0.85rem;
  line-height: 1.6;
}
.button svg {
  width: 18px;
  height: 18px;
}
.toast {
  max-width: 470px;
}
.stat-foot {
  font-size: 0.78rem;
}
.icon-button {
  flex-shrink: 0;
}
.field > input,
.field > select,
.field > textarea {
  width: 100%;
}
.form-grid {
  align-items: start;
}
.modal {
  max-height: 90dvh;
}
.modal-body {
  overflow: auto;
}
.topbar {
  position: relative;
}
.topbar-actions > a {
  white-space: nowrap;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (min-width: 1500px) {
  .page-content {
    max-width: 1800px;
    margin: 0 auto;
  }
  .kanban-board {
    grid-template-columns: repeat(4, minmax(300px, 1fr));
  }
}
@media (max-width: 1200px) {
  .search-trigger kbd {
    display: none;
  }
  .scan-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .scan-review-grid {
    grid-template-columns: 1fr;
  }
  .scan-photo-panel {
    position: static;
    max-width: 500px;
    margin: auto;
  }
  .scan-candidates {
    max-height: none;
  }
  .overview-columns {
    grid-template-columns: 1fr;
  }
  .habit-head,
  .habit-row {
    grid-template-columns: minmax(90px, 1fr) repeat(7, 25px);
  }
  .habit-cell {
    width: 25px;
    height: 28px;
  }
}
@media (max-width: 900px) {
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
  .grid.four {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-trigger > span {
    display: none;
  }
  .project-directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading > .row {
    justify-content: flex-start;
  }
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
  .auth-aside {
    padding: 0 20px 30px;
    margin: auto;
    max-width: 450px;
  }
  .auth-aside h1 {
    font-size: 2.6rem;
    margin: 15px 0;
  }
  .auth-aside .auth-feature,
  .auth-aside p {
    display: none;
  }
  .auth-aside img {
    width: 42px;
    height: 42px;
  }
  .auth-aside .eyebrow {
    margin-top: 10px;
  }
  .auth-card {
    padding: 30px;
  }
  .scan-layout {
    grid-template-columns: 1fr;
  }
  .scan-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .scan-list .dropzone {
    grid-column: 1/-1;
    min-height: 135px;
  }
  .scan-list .dropzone > svg {
    width: 24px;
    height: 24px;
  }
  .scan-inbox-title {
    grid-column: 1/-1;
    margin: 0;
  }
  .scan-list-item {
    margin: 0;
    padding: 10px;
  }
  .scan-list #upload-status {
    grid-column: 1/-1;
  }
  .scan-review-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .scope-card {
    flex-direction: column;
    align-items: start;
  }
  .page-content > .grid {
    gap: 20px;
  }
}
@media (max-width: 600px) {
  .page-content {
    padding: 24px 16px;
  }
  .topbar {
    padding: 12px 16px;
    gap: 6px;
    min-height: 68px;
  }
  .topbar-actions {
    gap: 2px;
  }
  .topbar-actions > a {
    padding: 9px;
  }
  .topbar-actions > a > span {
    display: none;
  }
  .topbar-actions .button {
    font-size: 0.78rem;
    padding: 10px 12px;
  }
  .app-footer {
    padding: 16px;
    font-size: 0.65rem;
  }
  .app-footer > span:last-child {
    display: none;
  }
  .page-heading {
    display: block;
    margin-bottom: 22px;
  }
  .page-heading > div:last-child.row {
    margin-top: 15px;
  }
  .page-title {
    font-size: 1.6rem;
  }
  .page-subtitle {
    font-size: 0.85rem;
    line-height: 1.6;
  }
  .stat-card {
    padding: 17px;
  }
  .stat-value {
    font-size: 2rem;
  }
  .stat-label {
    font-size: 0.75rem;
  }
  .stat-value small {
    font-size: 0.7rem;
  }
  .stat-foot {
    font-size: 0.65rem;
  }
  .grid.four {
    gap: 12px;
  }
  .card-header {
    padding: 17px;
    gap: 10px;
  }
  .card-header h2 {
    font-size: 1rem;
  }
  .card-body {
    padding: 17px;
  }
  .toolbar {
    padding: 14px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .toolbar select {
    width: 100%;
    max-width: 100%;
  }
  .filter-search {
    min-width: 100%;
  }
  .timeline-labels {
    width: 170px;
  }
  .timeline {
    width: calc(170px + var(--timeline-width));
  }
  .timeline-label {
    font-size: 0.72rem;
  }
  .timeline-head {
    font-size: 0.68rem;
    padding: 17px 10px;
  }
  .timeline-label.group {
    font-size: 0.65rem;
  }
  .timeline-label {
    padding: 11px 9px;
  }
  .project-directory-grid {
    grid-template-columns: 1fr;
  }
  .month-grid {
    grid-template-columns: repeat(7, 120px);
  }
  .card-header .text-link {
    font-size: 0.7rem;
  }
  .scan-list {
    grid-template-columns: 1fr;
  }
  .scan-list-item {
    display: flex;
  }
  .scan-list .dropzone {
    grid-column: auto;
  }
  .scan-list-item:not(.active) {
    display: none;
  }
  .scan-inbox-title {
    grid-column: auto;
  }
  .scan-list:focus-within .scan-list-item,
  .scan-list:hover .scan-list-item {
    display: flex;
  }
  .scan-welcome {
    padding: 35px 22px;
  }
  .scan-welcome h2 {
    font-size: 1.4rem;
  }
  .scan-steps {
    gap: 14px;
  }
  .scan-steps span {
    font-size: 0.75rem;
    gap: 5px;
  }
  .scan-review .card-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .scan-review-grid {
    padding: 14px;
    gap: 20px;
  }
  .scan-candidate {
    padding: 13px;
  }
  .scan-confirm {
    padding: 16px;
  }
  .scan-confirm .row .button {
    flex: 1;
    justify-content: center;
  }
  .scan-confirm .row > .muted {
    flex-basis: 100%;
  }
  .candidate-grid {
    gap: 8px;
  }
  .auth-shell {
    padding: 25px 15px;
  }
  .auth-aside {
    padding-left: 10px;
  }
  .auth-aside h1 {
    font-size: 2.2rem;
  }
  .auth-card {
    padding: 25px;
  }
  .modal.wide,
  .modal {
    width: calc(100vw - 24px);
    max-height: 94dvh;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-footer {
    padding: 15px;
  }
  .habit-head,
  .habit-row {
    grid-template-columns: minmax(88px, 1fr) repeat(7, 25px);
    gap: 3px;
  }
  .candidate-heading .badge {
    font-size: 0.6rem;
  }
  .scope-card {
    padding: 18px;
  }
  .button {
    min-height: 40px;
  }
  .icon-button {
    min-height: 38px;
    min-width: 38px;
  }
  .scan-photo-tools {
    font-size: 0.65rem;
  }
  .search-trigger {
    padding: 7px;
  }
  .search-trigger > svg {
    width: 18px;
  }
  .note-card {
    padding: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
/* Contrôles visuels après vérification sur le navigateur. */
.stat-card .stat-label,
.stat-card .stat-value,
.stat-card .stat-foot {
  display: block;
}
.stat-card .stat-value {
  margin: 10px 0 7px;
  line-height: 1.1;
}
.stat-label {
  min-height: 40px;
}
.progress-fill {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}
.progress-track {
  overflow: hidden;
  min-height: 6px;
}
.grid > .card,
.grid > .grid {
  margin-top: 0;
}
.kanban-board {
  display: grid;
}
.kanban-column {
  min-width: 285px;
}
.sidebar .nav-label {
  font-size: 0.75rem;
}
.mobile-menu {
  display: none;
}
.google-conflict {
  border-top: 1px solid #e7c9a4;
  padding: 15px 0;
}
.google-conflict p {
  margin: 0 0 10px;
}
.card-header h2 {
  margin: 0;
}
.form-grid input[type="date"] {
  min-width: 0;
}
.timeline-label {
  font-size: 0.875rem;
}
.candidate-fields .field > span {
  font-size: 0.875rem;
}
.candidate-fields input,
.candidate-fields select {
  font-size: 0.875rem;
}
.kanban-meta {
  font-size: 0.8rem;
}
.project-tag {
  font-size: 0.75rem;
}
.priority {
  font-size: 0.875rem;
}
.cell-sub {
  font-size: 0.8rem;
}
@media (max-width: 900px) {
  .mobile-menu {
    display: inline-flex;
  }
  .scan-photo-panel {
    max-width: 100%;
  }
}
@media (max-width: 600px) {
  .scan-list-item:not(.active) {
    display: flex;
  }
  .scan-list {
    max-height: 380px;
    overflow: auto;
  }
  .timeline-label {
    font-size: 0.8rem;
  }
  .stat-label {
    min-height: 35px;
  }
  .stat-card .stat-value {
    margin: 8px 0;
  }
  .candidate-fields .field > span {
    font-size: 0.875rem;
  }
  .scan-photo-frame {
    max-height: 600px;
    overflow: auto;
  }
}
/* Les libellés et dates utilisés pour décider restent lisibles sans zoom. */
.stat-label,
.kanban-meta,
.calendar-event,
.calendar-task {
  font-size: 0.875rem;
}
.month-day > small {
  font-size: 0.75rem;
}

/* V2 : la preuve visuelle reste près du texte, sur écran large et téléphone. */
.candidate-source {
  display: block;
  width: 100%;
  max-height: 100px;
  object-fit: contain;
  object-position: left center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 10px;
}
.reading-alternative {
  font: inherit;
  font-size: 0.875rem;
  border: 1px solid #c6dde1;
  background: #edf6f7;
  color: var(--teal, #0c4654);
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 12px;
  max-height: 320px;
  overflow: auto;
  margin: 18px 0;
}
.upload-preview-grid figure {
  margin: 0;
  padding: 8px;
  background: #f2f6f7;
  border-radius: 10px;
}
.upload-preview-grid img {
  width: 100%;
  height: 130px;
  object-fit: contain;
}
.upload-preview-grid figcaption {
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.upload-preview-grid small {
  display: block;
  color: var(--muted);
}
.region-editor {
  position: relative;
  max-width: 420px;
  margin: 16px auto;
  touch-action: none;
  cursor: crosshair;
  border: 1px solid var(--line);
  user-select: none;
}
.region-editor img {
  width: 100%;
  display: block;
  pointer-events: none;
}
.region-selection {
  position: absolute;
  border: 2px solid #087f8c;
  background: rgba(8, 127, 140, 0.15);
  pointer-events: none;
}
.draft-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-height: 50vh;
  overflow: auto;
}
.draft-comparison section {
  min-width: 0;
}
.draft-comparison p {
  overflow-wrap: anywhere;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
@media (max-width: 550px) {
  .draft-comparison {
    grid-template-columns: 1fr;
  }
  .region-editor {
    max-width: 100%;
  }
  .candidate-source {
    max-height: 120px;
  }
}
