/* Rapport nocturne : un graphique pleine largeur par repas du soir. */
.nights-page .nights-night {scroll-margin-top: 120px;}
.nights-page .nights-filters .form-group {margin: 0;min-width: 240px;}
.nights-page .nights-count {color: var(--color-muted);margin: 16px 0 0;}
.nights-page .nights-heading {align-items: start;gap: 12px;}
.nights-page .nights-window {margin: 8px 0 0;}
.nights-page .nights-status {padding-top: 4px;}
.nights-page .nights-meal {margin: 16px 0 8px;}
.nights-page .nights-chart-shell {margin: 18px 0 5px;}
.nights-page .nights-chart {display: block;width: 100%;min-width: 900px;height: auto;overflow: visible;}
.nights-page .nights-axis {fill: var(--color-muted);font-size: 13px;}
.nights-page .nights-elapsed {fill: #8a8d92;}
.nights-page .nights-time-grid {stroke: #e4e7ec;stroke-width: .7;}
.nights-page .nights-curve {fill: none;stroke: #8d99a5;stroke-width: 1.3;pointer-events: none;}
.nights-page .nights-future {fill: var(--color-border);opacity: .5;}
.nights-page .nights-event-label {fill: var(--event-injection);}
.nights-page .nights-event--lantus .meal-injection-marker {stroke: var(--event-injection);stroke-dasharray: none;stroke-width: 2;}
.nights-page .nights-event--meal .meal-injection-marker {stroke: var(--event-meal);}
.nights-page .nights-event--meal .nights-event-label {fill: var(--event-meal);}
.nights-page .nights-measure:hover .glucose-point, .nights-page .nights-measure:focus .glucose-point {stroke: #233344;stroke-width: 1.7;r: 5.7;}
.nights-page .nights-chart-key {display: flex;flex-wrap: wrap;align-items: center;gap: 6px 10px;margin: 8px 0 20px;color: var(--color-muted);}
.nights-page .nights-lantus-key, .nights-page .nights-dose-key, .nights-page .nights-meal-key {display: inline-block;width: 15px;height: 0;border-top: 2px solid var(--event-injection);margin-left: 9px;}
.nights-page .nights-dose-key {border-top-style: dashed;}
.nights-page .nights-meal-key {border-color: var(--event-meal);border-top-style: dashed;}
.nights-page .nights-numbers {display: grid;grid-template-columns: repeat(5, minmax(0, 1fr));gap: 10px;}
.nights-page .nights-numbers .metric-tile {display: grid;gap: 8px;min-width: 0;padding: 12px;}
.nights-page .nights-numbers strong {font-variant-numeric: tabular-nums;}
.nights-page .nights-numbers small {white-space: nowrap;}
.nights-page .nights-report {margin: 18px 0;}
.nights-page .nights-lantus-report {padding: 14px 18px;border-left: 3px solid #a485b0;background: #f8f5fa;border-radius: 0 8px 8px 0;}
.nights-page .nights-lantus-report h3 {margin: 0 0 8px;}
.nights-page .nights-lantus-report p {margin: 6px 0;}
.nights-page .nights-details {margin-top: 18px;}
.nights-page .nights-details summary {cursor: pointer;color: var(--color-muted);}
.nights-page .nights-meal-choice {margin: 18px 0;}
.nights-page .nights-meal-choice .form-group {flex: 1 1 260px;min-width: 0;margin: 0;}
.nights-page .nights-meal-choice select {width: 100%;min-width: 0;}
@media (max-width: 900px) {.nights-page .nights-numbers {grid-template-columns: repeat(3, minmax(0, 1fr));}}
@media (max-width: 600px) {.nights-page .nights-numbers {grid-template-columns: repeat(2, minmax(0, 1fr));}.nights-page .nights-filters .form-group {width: 100%;min-width: 0;}.nights-page .nights-filters select, .nights-page .nights-filters .site-button {width: 100%;}.nights-page .nights-heading {display: block;}.nights-page .nights-status {display: block;margin-top: 12px;}}
.meal-heading, .meal-actions {display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;gap: 14px;}
.meal-description {white-space: pre-wrap;overflow-wrap: anywhere;}
.meal-metrics {display: grid;grid-template-columns: repeat(4, minmax(0, 1fr));gap: 12px;margin: 20px 0;}
.meal-metrics .metric-tile {display: grid;gap: 7px;}
.meal-metrics strong {font-variant-numeric: tabular-nums;}
.meal-foods > summary {cursor: pointer;margin: 16px 0;}
.meal-table {--table-min-width: 620px;--table-cell-padding: 12px;}
.meal-table td {overflow-wrap: anywhere;}
.meal-samples-table {--table-min-width: 430px;--table-cell-padding: 12px;}
.meal-chart {display: block;width: 100%;min-width: 520px;height: auto;max-height: 220px;margin: 0;}
.meal-grid {stroke: var(--color-border);stroke-width: 1;stroke-dasharray: 3 5;}
.meal-axis {fill: var(--color-muted);font-size: 12px;}
.meal-curve {stroke: #1769aa;stroke-width: 2.5;fill: none;}
.meal-point {fill: #1769aa;}
.meal-injection-marker {stroke: var(--event-injection);stroke-width: 1.5;stroke-dasharray: 4 5;}
.meal-chart-legend {display: flex;flex-wrap: wrap;align-items: center;gap: 8px;color: var(--color-muted);}
.meal-line-key {width: 24px;border-top: 3px solid #1769aa;}
.meal-injection-key {height: 16px;border-left: 2px dashed var(--event-injection);margin-left: 16px;}

.meal-connection-details {display: grid;grid-template-columns: auto 1fr;gap: 12px 24px;}
.meal-connection-details dd {margin: 0;overflow-wrap: anywhere;}
@media (max-width: 600px) {.meal-metrics {grid-template-columns: repeat(2, minmax(0, 1fr));}.meal-connection-details {grid-template-columns: 1fr;gap: 6px;}.meal-connection-details dd {margin-bottom: 12px;}}

.meal-overview > .card, .report-visual-grid > .card {margin-bottom: 0;}
.sensor-card {display: grid;grid-column: 1 / -1;grid-template-columns: 1fr auto;align-items: center;gap: 16px;}
.sensor-sn {overflow-wrap: anywhere;}
.sensor-dates {margin-top: 8px;}
.sensor-countdown {text-align: right;}
.sensor-countdown strong {display: block;}
.sensor-status {display: inline-block;margin-top: 8px;padding: 6px 10px;border-radius: 999px;background: var(--color-success-soft);color: var(--color-success);}
.sensor-status.warning {background: var(--color-warning-soft);color: var(--color-warning);}
.sensor-status.error {background: var(--color-error-soft);color: var(--color-error);}
.diabetes-kpi {display: flex;justify-content: space-between;gap: 12px;padding: 10px 0;border-bottom: 1px solid #eef0f2;}
.diabetes-kpi:last-child {border: 0;}
.diabetes-kpi span {color: var(--color-muted);}
.diabetes-kpi strong {font-variant-numeric: tabular-nums;}
.range-dot {display: inline-block;flex: 0 0 auto;width: 12px;height: 12px;border-radius: 50%;}

.period {margin: -7px 0 12px;}
.medical-note {margin-top: 18px;}
.db-error {margin-bottom: 18px;padding: 14px 16px;overflow-wrap: anywhere;border: 1px solid #f0c8c8;border-radius: 12px;background: #fff0f0;color: #891f1f;}
.empty-state {padding: 14px 0;color: var(--color-muted);}
@media (max-width: 720px) {.sensor-card {grid-column: auto;grid-template-columns: 1fr;}.sensor-countdown {text-align: left;}}
.period-selector {display: flex;flex-wrap: wrap;gap: 8px;margin-bottom: 18px;}
#glycemies-recentes {scroll-margin-top: 120px;}
.abbott-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px;}
.abbott-status {background:var(--color-accent-soft);color:var(--color-accent-strong);border-radius:20px;padding:8px 14px;}
.abbott-history {list-style:none;padding-left:20px;border-left:3px solid var(--color-accent-border);margin:24px 0 0 8px;}
.abbott-history li {padding:0 0 26px 16px;}
.abbott-history h3 {margin:8px 0;}
.abbott-content {white-space:pre-wrap;overflow-wrap:anywhere;}
.abbott-history details {margin:12px 0;}
.abbott-history summary {cursor:pointer;}
@media(max-width:600px){.abbott-history {padding-left:8px;}.abbott-history li {padding-left:10px;}}
.abbott-sensor {background:var(--color-surface-subtle);border-radius:var(--radius-card);padding:var(--panel-padding);margin-top:var(--space-section);}
.abbott-sensor h3 {margin:0 0 12px;}
.abbott-sensor > :last-child {margin-bottom:0;}
.abbott-exchanges {margin-top:var(--space-section);}
.abbott-exchanges>summary {cursor:pointer;}
.sensor-table {--table-cell-padding: 14px 12px;--table-font-size: 1rem;--table-heading-size: 1rem;}
.abbott-sensor-dates {display: flex;flex-wrap: wrap;gap: 14px 32px;margin: 12px 0;}
.abbott-sensor-dates div {display: grid;gap: 4px;}
.abbott-sensor-dates dd {margin: 0;font-variant-numeric: tabular-nums;}
.sensor-coverage-headline {display: flex;align-items: baseline;flex-wrap: wrap;gap: 8px 14px;margin: 14px 0 12px;}
.sensor-coverage-headline strong {font-variant-numeric: tabular-nums;}
.sensor-coverage-headline > span {color: var(--color-muted);}
.sensor-comparison-bar {display: flex;height: 12px;overflow: hidden;border-radius: 999px;background: #e7ebee;}
.sensor-comparison-bar > span {min-width: 0;}
.sensor-bar-used {flex: 0 0 auto;background: #148345;}
.sensor-bar-uncovered {flex: 1;background: #df433a;}
.sensor-bar-theoretical {flex: 1;background: #e7ebee;}
.sensor-coverage-legend {display: grid;grid-template-columns: repeat(2, minmax(0,1fr));gap: 16px;margin: 12px 0 16px;}
.sensor-coverage-legend dt {color: #148345;}
.sensor-coverage-legend > div:nth-child(2) dt {color: #bc332c;}
.sensor-coverage-legend dd {margin: 4px 0 0;font-variant-numeric: tabular-nums;}
.sensor-coverage-legend .sensor-coverage-total {color: #8a8f96;}
.sensor-statistics-bottom {display: grid;grid-template-columns: repeat(2, minmax(0,1fr));gap: 20px;padding-top: 16px;border-top: 1px solid var(--color-border);}
.sensor-statistics-bottom h3 {margin: 0 0 8px;}
.sensor-statistic-value {margin: 0;font-variant-numeric: tabular-nums;}
.sensor-statistic-caption {margin: 5px 0 0;}
.sensor-life-bar {height: 8px;margin-top: 10px;}
.sensor-life-scale {display: flex;justify-content: space-between;gap: 10px;margin: 5px 0 0;font-variant-numeric: tabular-nums;}
.sensor-statistics-footnote {margin: 14px 0 8px;}
.sensor-statistics-method summary {cursor: pointer;}
.sensors-page .sensor-current-card .empty-state {margin: 0;padding: 0;}
@media (max-width: 600px) {.sensor-statistics-bottom {gap: 16px;}}
/* Palette sémantique : les zones et événements gardent le même code sur chaque vue. */
.diabetes-page {--event-meal: var(--color-accent-strong);--event-meal-soft: var(--color-accent-soft);--event-injection: #80518f;--event-injection-soft: #f4edfa;--event-activity: #245b9b;--event-activity-soft: #eaf2fc;--glucose-very-low: #171717;--glucose-low: #e90032;--glucose-target: #7bc96b;--glucose-high: #ffca05;--glucose-very-high: #ff9f0a;}
.diabetes-page .glucose-zone-0 {background: var(--glucose-very-low);fill: var(--glucose-very-low);}
.diabetes-page .glucose-zone-1 {background: var(--glucose-low);fill: var(--glucose-low);}
.diabetes-page .glucose-zone-2 {background: var(--glucose-target);fill: var(--glucose-target);}
.diabetes-page .glucose-zone-3 {background: var(--glucose-high);fill: var(--glucose-high);}
.diabetes-page .glucose-zone-4 {background: var(--glucose-very-high);fill: var(--glucose-very-high);}

.glucose-trend {display: block;width: 100%;height: auto;margin: 12px 0;overflow: visible;}
.glucose-target-band {fill: #f0f8ed;}
.glucose-grid-line {stroke: #dfe5df;stroke-width: 1;stroke-dasharray: 3 5;}
.glucose-axis-label {fill: var(--color-muted);font: 14px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;}
.glucose-point {stroke: #fff;stroke-width: .65;}
.glucose-trend-caption {margin: 8px 0 18px;}
.glucose-trend-empty {display: flex;align-items: center;justify-content: center;min-height: 230px;text-align: center;}
.glucose-zone-legend {display: flex;flex-wrap: wrap;gap: 10px 16px;padding: 0;margin: 20px 0 0;list-style: none;color: var(--color-muted);}
.glucose-zone-legend li {display: inline-flex;align-items: center;gap: 6px;}









.diabetes-reading-notes {grid-column: 1 / -1;}

.glucose-trend-metrics {display: grid;grid-template-columns: repeat(3, minmax(0, 1fr));gap: 8px;margin: 18px 0;}
.glucose-trend-metrics .metric-tile {min-width: 0;padding: 10px;}
.glucose-trend-metrics dd {margin: 6px 0 0;font-variant-numeric: tabular-nums;}
.glucose-trend-metrics small {display: block;margin-top: 2px;}
/* Résumé du dernier repas et de la journée. */
.meal-overview {display: grid;grid-template-columns: repeat(2, minmax(0, 1fr));gap: var(--space-section);align-items: start;margin-bottom: var(--space-section);}
.meal-overview > .card {min-width: 0;}
.meal-overview .meal-metrics {grid-template-columns: repeat(2, minmax(0, 1fr));}
.meal-day-card .meal-table {--table-min-width: 380px;--table-cell-padding: 10px 6px;--table-font-size: .8rem;--table-heading-size: .75rem;table-layout: fixed;}
.meal-day-card .meal-table th:first-child {width: 42%;}
.meal-overview .panel-heading {flex-wrap: wrap;}
/* Repères chronologiques des repas et injections sur la glycémie. */
.glucose-events {display: flex;flex-wrap: wrap;gap: 8px;list-style: none;padding: 0;margin: 18px 0 10px;}
.glucose-event {display: inline-flex;align-items: center;gap: 7px;padding: 7px 10px;border-radius: 9px;}
.glucose-event--repas {background: var(--event-meal-soft);color: var(--event-meal);}
.glucose-event--injection {background: var(--event-injection-soft);color: var(--event-injection);}
.glucose-event a {color: inherit;text-decoration: underline;text-underline-offset: 3px;}
.glucose-event-number {display: inline-grid;place-items: center;flex: 0 0 auto;min-width: 20px;height: 20px;border: 1px solid currentColor;border-radius: 50%;}
.glucose-event-marker--repas {color: var(--event-meal);}
.glucose-event-marker--injection {color: var(--event-injection);}
.glucose-event-marker line {stroke: currentColor;stroke-width: 1.3;stroke-dasharray: 4 4;}
.glucose-event-marker circle {fill: currentColor;}
.glucose-event-marker text {fill: #fff;font: 11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;font-weight: 700;}
.glucose-event-marker:focus {outline: none;}
.glucose-event-marker:focus line, .glucose-event-marker:hover line {stroke-width: 2.5;stroke-dasharray: none;}
@media (max-width: 800px) {.meal-overview {grid-template-columns: 1fr;}}
.meal-connection-footer {display: flex;justify-content: flex-end;margin: var(--space-section) 0;}
.meal-macro-distribution {margin: 22px 0;}
.meal-macro-caption {margin: 0 0 10px;}
.meal-macro-bar {display: flex;height: 14px;overflow: hidden;border-radius: 999px;background: #eef0f2;}
.meal-macro-segment {flex-basis: 0;min-width: 0;}
.meal-macro-segment + .meal-macro-segment {border-left: 2px solid #fff;}
.meal-macro--glucides {background: #d67b2c;}
.meal-macro--proteines {background: #39877a;}
.meal-macro--lipides {background: #9269b5;}
.meal-macro-note {margin: 10px 0 0;}
.meal-history-table {--table-min-width: 760px;--table-cell-padding: 14px 10px;}
.meal-history-table th:nth-child(2) {width: 38%;}
.meal-history-table td:last-child {min-width: 190px;}
.meal-history-injections {list-style: none;padding: 0;margin: 0;}
.meal-history-injections li {display: grid;gap: 4px;}
.meal-history-injections li + li {border-top: 1px solid var(--color-border);margin-top: 10px;padding-top: 10px;}
.meal-history-injections span {color: var(--color-muted);}
/* Les deux cartes partagent leurs rangées : la description la plus longue fixe
   automatiquement la place réservée avant les valeurs nutritionnelles. */
@media (min-width: 801px) {.meal-overview--aligned {align-items: stretch;row-gap: 0;}.meal-overview--aligned > .card {display: grid;grid-template-columns: minmax(0, 1fr);grid-template-rows: subgrid;grid-row: span 7;row-gap: 0;}.meal-overview--aligned > .card > .panel-heading {align-self: start;align-items: flex-start;margin: 0 0 16px;}.meal-overview--aligned > .card > .meal-description, .meal-overview--aligned > .card > .meal-day-caption {margin: 0;}.meal-overview--aligned > .card > .meal-metrics {margin: 20px 0;}.meal-overview--aligned > .card > .meal-macro-distribution {margin: 0 0 20px;}.meal-overview--aligned > .card > .medical-note {margin: 18px 0 0;}}
.meal-chart-shell {position: relative;margin-top: 12px;}
.meal-chart-viewport {overflow-x: auto;}
.meal-target-band {fill: #e2f2df;}
.meal-target-boundary {stroke: #8fba87;stroke-width: 1;stroke-dasharray: 4 4;}
.meal-target-key {width: 22px;height: 12px;border-radius: 3px;background: #e2f2df;border: 1px solid #8fba87;}
.meal-chart-event {cursor: pointer;}
.meal-chart-event:focus {outline: none;}
.meal-point-hit {fill: transparent;}
.meal-injection-hit {stroke: transparent;stroke-width: 16;}
.meal-chart-event:hover .meal-point, .meal-chart-event:focus .meal-point {stroke: #fff;stroke-width: 2;r: 6;}
.meal-chart-event:hover .meal-injection-marker, .meal-chart-event:focus .meal-injection-marker {stroke-width: 3;}
.meal-chart-tooltip {position: absolute;z-index: 2;max-width: min(270px, 90%);padding: 9px 12px;border-radius: 8px;background: #233344;color: #fff;box-shadow: 0 3px 12px #0002;font-size: .85rem;line-height: 1.5;pointer-events: none;}
.meal-chart-tooltip[hidden] {display: none;}

.report-period-form {display: flex;align-items: center;flex-wrap: wrap;gap: 12px;}
.report-metrics .metric-tile {display: grid;gap: 8px;}
.report-metrics .metric-tile > small {color: var(--color-muted);}
.report-source-table {--table-min-width: 900px;}
.report-source-table th:nth-child(2) {width: 35%;}
.report-visual-grid {display: grid;grid-template-columns: repeat(2, minmax(0, 1fr));gap: var(--space-section);margin-bottom: var(--space-section);}
.report-visual-grid > .card {min-width: 0;}
.report-visual-caption {margin: 8px 0 18px;}
.report-visual-note {margin: 14px 0 0;}
.report-zone-period {margin: 20px 0;}
.report-zone-period h3 {margin: 0 0 10px;}
.report-zone-bar {display: flex;height: 22px;border-radius: 8px;overflow: hidden;background: #eef0f2;}
.report-zone-bar > span {flex-basis: 0;min-width: 0;}
.report-comparison-table {--table-min-width: 300px;--table-font-size: .85rem;--table-cell-padding: 10px 8px;}
.report-comparison-table caption {text-align: left;padding-bottom: 10px;}
.report-figures > summary, .report-meal-description > summary {cursor: pointer;}
.report-figures .table-wrap {margin-top: 12px;}
.report-hour-bars {display: grid;gap: 22px;margin: 24px 0;}
.report-hour-row {display: grid;grid-template-columns: 80px minmax(0, 1fr) 24px;gap: 12px;align-items: center;}
.report-hour-track {height: 15px;border-radius: 999px;background: #edf0f4;overflow: hidden;}
.report-hour-track > span {display: block;height: 100%;border-radius: inherit;background: #d67b2c;}
.report-meal-results {--table-min-width: 760px;--table-cell-padding: 13px 10px;--table-font-size: .85rem;}
.report-meal-description {margin-top: 7px;max-width: 300px;}
.report-status {display: block;margin-top: 7px;color: var(--color-muted);}
.report-linked-dose + .report-linked-dose {margin-top: 8px;}
.report-linked-dose small {display: block;margin-top: 4px;color: var(--color-muted);}
.report-reading {display: inline-block;min-width: 38px;padding: 5px 7px;text-align: center;border-radius: 6px;}
.report-reading--target {background: #e9f5e5;color: #296823;}
.report-reading--low {background: #fce6eb;color: #9b2042;}
.report-reading--high {background: #fff2d5;color: #885700;}
.report-reading--missing {color: var(--color-muted);}
.report-sensor-grid {display: grid;grid-template-columns: repeat(2, minmax(0, 1fr));gap: 35px;}
.report-sensor-value {margin: 12px 0;}
.report-sensor-track > span {background: #39877a;}
@media (max-width: 750px) {.report-visual-grid, .report-sensor-grid {grid-template-columns: 1fr;}}
.glucose-event--activite {background: var(--event-activity-soft);color: var(--event-activity);}
.glucose-event-marker--activite {color: var(--event-activity);}
.glucose-activity-band {fill: #c7dff9;fill-opacity: .45;}
.meal-activity-context {margin: 16px 0;padding: 12px 14px;border-left: 3px solid var(--event-activity);background: #f0f6fd;border-radius: 0 8px 8px 0;}
.meal-activity-context ul {padding-left: 20px;margin: 8px 0;}
.meal-activity-context small {color: var(--color-muted);}
.notifications-page code {overflow-wrap: anywhere;}
.notifications-page .notifications-key {margin: 18px 0;}
.notifications-page .notifications-key summary {cursor: pointer;}
.notifications-page .notifications-table {--table-min-width: 850px;--table-font-size: .85rem;}
.notifications-page .notifications-table td:nth-child(2) {min-width: 280px;}
.meal-insulin-summary {display: grid;gap: 12px;min-width: 0;margin: 12px 0 0;}
.meal-insulin-summary--day {grid-template-columns: repeat(2, minmax(0, 1fr));}
.meal-insulin-summary .metric-tile {display: grid;align-content: start;gap: 7px;min-width: 0;overflow-wrap: anywhere;}
.meal-history-filters {display: flex;flex-wrap: wrap;align-items: end;gap: 16px;margin: 20px 0;}
.meal-history-filters label {display: grid;gap: 6px;flex: 1 1 200px;}
.meal-history-filters input {width: 100%;box-sizing: border-box;}
.meal-carb-filter {flex: 1 1 260px;min-width: 0;margin: 0;padding: 0;border: 0;}
.meal-carb-filter legend {margin-bottom: 6px;padding: 0;}
.meal-carb-range {position: relative;height: 30px;margin: 0 12px;}
.meal-carb-track {position: absolute;inset: 12px 0;border-radius: 6px;background: linear-gradient(to right, var(--color-border) var(--carb-min), var(--color-accent-strong) var(--carb-min), var(--color-accent-strong) var(--carb-max), var(--color-border) var(--carb-max));}
.meal-carb-range input[type="range"] {position: absolute;inset: 0;width: 100%;height: 30px;margin: 0;padding: 0;appearance: none;-webkit-appearance: none;background: transparent;pointer-events: none;}
.meal-carb-range input:last-child {z-index: 2;}
.meal-carb-range input[type="range"]::-webkit-slider-runnable-track {height: 6px;background: transparent;}
.meal-carb-range input[type="range"]::-moz-range-track {height: 6px;background: transparent;}
.meal-carb-range input[type="range"]::-webkit-slider-thumb {appearance: none;-webkit-appearance: none;width: 24px;height: 24px;margin-top: -9px;border: 2px solid var(--color-accent-strong);border-radius: 50%;background: #fff;pointer-events: auto;cursor: grab;}
.meal-carb-range input[type="range"]::-moz-range-thumb {width: 20px;height: 20px;border: 2px solid var(--color-accent-strong);border-radius: 50%;background: #fff;pointer-events: auto;cursor: grab;}
.meal-carb-range input:focus-visible {outline: none;}
.meal-carb-range input:focus-visible::-webkit-slider-thumb {box-shadow: 0 0 0 4px var(--color-accent-border);}
.meal-carb-range input:focus-visible::-moz-range-thumb {box-shadow: 0 0 0 4px var(--color-accent-border);}
.meal-carb-scale {display: flex;justify-content: space-between;color: var(--color-muted);}
.meal-page .meal-samples-table {--table-cell-padding: 5px 8px;--table-font-size: .82rem;}
.meal-page .meal-samples-table tbody td {border-bottom: 0;border-top: 0;}
.meal-followup-details {margin-top: 16px;}
.meal-event-food .meal-injection-marker {stroke: var(--event-meal);}
.meal-food-key {height: 16px;border-left: 2px dashed var(--event-meal);margin-left: 16px;}
.meal-page .meal-samples-table th:nth-child(2), .meal-page .meal-samples-table td:nth-child(2) {min-width: 100px;white-space: nowrap;}

/* Lecture compacte des nuits et comparaison privée. */
.nights-page .nights-toolbar {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 20px;}
.nights-page .nights-toolbar .nights-count {margin:0;}
.nights-page .nights-card-actions {display:flex;align-items:center;gap:16px;flex-wrap:wrap;}
.nights-page .nights-card-actions label, .nights-page .nights-selection label {display:inline-flex;align-items:center;gap:6px;cursor:pointer;}
.nights-page input[type="checkbox"] {accent-color:var(--color-accent);}
.nights-page .nights-table-wrap {margin-top:12px;}
.nights-page .nights-data-table {--table-min-width:650px;--table-cell-padding:7px 10px;--table-font-size:.85rem;--table-heading-size:.8rem;--table-cell-align:middle;font-variant-numeric:tabular-nums;}
.nights-page .nights-table-caption {text-align:left;margin:0 0 8px;font-weight:600;color:var(--color-text);}
.nights-page .nights-data-table tbody th {font-weight:500;white-space:nowrap;}
.nights-page .nights-duration-strip {display:flex;flex-wrap:wrap;gap:8px 24px;margin:12px 0;}
.nights-page .nights-duration-strip > div {display:flex;gap:8px;align-items:baseline;}
.nights-page .nights-duration-strip dt {color:var(--color-muted);font-size:.8rem;}
.nights-page .nights-duration-strip dd {margin:0;font-weight:600;font-variant-numeric:tabular-nums;}
.nights-page .nights-compact-note {color:var(--color-muted);font-size:.75rem;margin:6px 0;}
.nights-page .nights-context {display:flex;flex-wrap:wrap;gap:6px 18px;padding:12px 0;border-top:1px solid var(--color-border);font-size:.8rem;}
.nights-page .nights-details {margin-top:4px;font-size:.85rem;}
.nights-page .nights-method {font-size:.8rem;color:var(--color-muted);}
.nights-page .nights-method summary {cursor:pointer;}
.nights-page .nights-selection {display:flex;flex-wrap:wrap;gap:8px 16px;min-width:0;margin:12px 0;padding:0;border:0;font-size:.85rem;}
.nights-page .nights-selection legend {margin-bottom:8px;color:var(--color-muted);}
.nights-page .nights-compare-filters {margin:16px 0 8px;}
.nights-page .nights-anchor-choices {display:flex;flex-wrap:wrap;gap:12px;}
.nights-page .nights-anchor-choices .form-group {flex:1;min-width:220px;}
.nights-page .nights-anchor-choices select {max-width:100%;}
.nights-page .nights-comparison-legend {display:flex;flex-wrap:wrap;gap:6px 20px;margin:12px 0;font-size:.85rem;font-weight:600;}
.nights-page .nights-crosshair {stroke:var(--color-muted);stroke-dasharray:4 3;pointer-events:none;}
.nights-page .nights-cursor {display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:12px 0;font-size:.85rem;}
.nights-page .nights-cursor input {flex:1;min-width:160px;accent-color:var(--color-accent);}
.nights-page .nights-cursor-values {display:flex;flex-wrap:wrap;gap:6px 18px;flex-basis:100%;font-variant-numeric:tabular-nums;}
@media (max-width:600px) {.nights-page .nights-compare-filters .form-group {width:100%;min-width:0;}.nights-page .nights-compare-filters select {width:100%;}.nights-page .nights-heading .nights-card-actions {margin-top:8px;}.nights-page .nights-heading .nights-status {margin:0;}.nights-page .nights-duration-strip {gap:6px 14px;}}

.nights-page .nights-comparison-summary {cursor:pointer;margin:0;}
.nights-page .nights-comparison-summary::-webkit-details-marker {display:none;}
.nights-page .nights-comparison[open] .nights-comparison-summary {margin-bottom:16px;}

@media (max-width:600px) {
    .nights-page .nights-analysis .nights-data-table {display:block;min-width:0;}
    .nights-page .nights-analysis .nights-data-table thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
    .nights-page .nights-analysis .nights-data-table tbody {display:block;}
    .nights-page .nights-analysis .nights-data-table tr {display:grid;grid-template-columns:1fr 1fr;gap:5px 12px;padding:9px 0;border-bottom:1px solid var(--color-border);}
    .nights-page .nights-analysis .nights-data-table th {grid-column:1 / -1;color:var(--color-text);font-weight:600;}
    .nights-page .nights-analysis .nights-data-table th, .nights-page .nights-analysis .nights-data-table td {display:block;padding:0;border:0;white-space:normal;font-size:.8rem;}
    .nights-page .nights-analysis .nights-data-table td::before {content:attr(data-label);display:block;color:var(--color-muted);font-size:.65rem;}
    .nights-page .nights-comparison .nights-data-table tbody th {position:sticky;left:0;background:var(--color-surface);white-space:normal;min-width:130px;}
}

/* Profil public : étendue min/max, composant graphique glycémique spécifique. */
.glucose-profile-range {stroke: var(--color-muted);stroke-width: 1.5;opacity: .65;}
