:root {
  --nuit: #1E0910;
  --bordeaux: #3A1019;
  --bordeaux-2: #571523;
  --or: #C9A84C;
  --or-clair: #E3CE8F;
  --or-fonce: #86661C;
  --creme: #FAF6F1;
  --sable: #F3EADF;
  --blanc: #FFFFFF;
  --encre: #3A2A2E;
  --muted: #735D62;
  --trait: #EDE4DA;
  --ok: #2F6B45;
  --err: #A1263A;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); color: var(--bordeaux); font-weight: 600; margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: var(--bordeaux-2); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.loading { padding: 24px 0; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--bordeaux); color: var(--creme); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- Habillage ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--bordeaux); }

.demo-banner {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px;
  background: var(--or-clair); color: var(--nuit);
  font-size: 13px; padding: 6px 14px; text-align: center;
}

.shell { min-height: 100vh; }
.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: rgba(250, 246, 241, 0.94);
  border-bottom: 1px solid var(--trait);
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.has-demo .topbar { top: calc(env(safe-area-inset-top, 0px) + 30px); }
.top-sub { font-size: 13px; color: var(--muted); }
.top-client { font-weight: 600; text-decoration: none; color: var(--bordeaux); background: var(--sable); padding: 6px 12px; border-radius: 999px; font-size: 14px; }

.content { padding: 18px 16px calc(var(--tabbar-h) + 32px); max-width: 860px; margin: 0 auto; outline: none; }

.sidebar { display: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: var(--nuit);
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid rgba(201, 168, 76, 0.3);
}
.tab {
  flex: 1 1 0; min-width: 0; height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #CBB8A9; text-decoration: none; font-size: 11px; font-weight: 500;
  background: none; border: 0; cursor: pointer; padding: 0 2px;
}
.tab span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-icon { font-size: 20px; line-height: 1; }
.tab.active { color: var(--or); }

.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(30, 9, 16, 0.45); display: flex; align-items: flex-end; }
.sheet-panel {
  width: 100%; background: var(--creme); border-radius: 20px 20px 0 0;
  padding: 10px 12px calc(16px + env(safe-area-inset-bottom));
  max-height: 80vh; overflow-y: auto;
}
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--trait); margin: 2px auto 10px; }

.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 12px; border-radius: 12px;
  color: var(--encre); text-decoration: none; font-weight: 500; font-size: 15.5px;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.nav-item:hover { background: var(--sable); }
.nav-item.active { background: var(--bordeaux); color: var(--creme); }
.nav-icon { width: 24px; text-align: center; font-size: 18px; }

/* ---------- Pages ---------- */
.view { display: flex; flex-direction: column; gap: 16px; }
.page-head { padding: 6px 2px 2px; }
.page-head h1 { font-size: clamp(30px, 6vw, 38px); }
.page-sub { color: var(--muted); margin-top: 4px; font-size: 15px; }
.section-title { font-size: 24px; margin-top: 10px; }

.card {
  background: var(--blanc); border: 1px solid var(--trait); border-radius: 18px;
  padding: 18px 16px; box-shadow: 0 4px 18px rgba(58, 16, 25, 0.05);
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.card-title { font-size: 23px; }
.card-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.progress { font-weight: 700; color: var(--or-fonce); font-size: 15px; }
.card h3, .subform h3 { font-size: 20px; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-weight: 600; font-size: 14.5px; color: var(--bordeaux); }
.hint { font-size: 13px; color: var(--muted); }
.hint.err, .form-error { color: var(--err); font-size: 14px; }
.form-error:empty { display: none; }
.row-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="time"], input[type="date"], textarea, .select {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1.5px solid #E3D6C8; border-radius: 12px; background: var(--creme);
  font-size: 16px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, .select:focus { border-color: var(--or); outline: none; box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.25); }
input:disabled, textarea:disabled { background: #F6F1EA; color: var(--encre); opacity: 1; -webkit-text-fill-color: var(--encre); }
.with-unit { position: relative; }
.with-unit input { padding-right: 46px; }
.unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.temp-input { font-size: 22px !important; font-weight: 600; letter-spacing: 0.02em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chips.scroll-x .chip { flex: none; }
.chip {
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid #E3D6C8; background: var(--creme); color: var(--encre);
  font-size: 14.5px; font-weight: 500; cursor: pointer; line-height: 1.2;
}
.chip:hover:not(:disabled) { border-color: var(--or); }
.chip.on { background: var(--bordeaux); border-color: var(--bordeaux); color: var(--creme); }
.chip:disabled { cursor: default; opacity: 0.75; }
.chip.on:disabled { opacity: 1; }
.chips.big .chip { font-size: 24px; min-width: 52px; min-height: 48px; padding: 4px 8px; }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 15.5px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--bordeaux); flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 22px; border-radius: 999px;
  border: 1.5px solid var(--bordeaux); background: var(--bordeaux); color: var(--creme);
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--bordeaux-2); border-color: var(--bordeaux-2); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.wide { width: 100%; }
.btn-ghost { background: transparent; color: var(--bordeaux); border-color: rgba(58, 16, 25, 0.3); }
.btn-ghost:hover { background: var(--sable); border-color: var(--bordeaux); color: var(--bordeaux); }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: 14px; align-self: flex-start; }
.btn.danger, .icon-btn.danger { color: var(--err); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.actions.center { justify-content: center; }
.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  border: 1.5px solid #E3D6C8; background: var(--blanc); color: var(--bordeaux);
  font-size: 22px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.linkish { background: none; border: 0; padding: 0; color: var(--bordeaux-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.center-link { align-self: center; font-size: 14px; }

/* Navigation par date */
.date-nav {
  display: flex; align-items: center; gap: 10px;
  background: var(--sable); border-radius: 16px; padding: 8px;
  position: relative;
}
.date-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.date-label { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--bordeaux); line-height: 1.2; }
.date-small { font-size: 13px; color: var(--muted); }
.date-pick-wrap { position: relative; }
.date-pick { font-size: 18px; }
.date-input { position: absolute; right: 0; top: 0; width: 44px !important; height: 44px; opacity: 0; pointer-events: none; }
.date-input.visible { position: static; opacity: 1; pointer-events: auto; width: auto !important; }

/* Compteur d'eau */
.counter { display: flex; align-items: center; gap: 14px; }
.counter-value { font-weight: 700; font-size: 17px; color: var(--bordeaux); min-width: 130px; text-align: center; }

/* Listes */
.checklist, .plain, .protocol, .sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.plain li::before { content: "🌙 "; }
.protocol li { display: flex; flex-direction: column; padding-bottom: 10px; border-bottom: 1px dashed var(--trait); }
.session { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px; background: var(--creme); border-radius: 12px; }
.subform { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; border-top: 1px solid var(--trait); }

.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shortcut {
  display: flex; flex-direction: column; gap: 4px; padding: 16px;
  background: var(--blanc); border: 1px solid var(--trait); border-radius: 18px;
  text-decoration: none; color: var(--encre); font-weight: 600;
}
.shortcut span:first-child { font-size: 22px; }
.shortcut-state { font-size: 13px; font-weight: 500; color: var(--muted); }
.shortcut-state.ok { color: var(--ok); }

.prose { display: flex; flex-direction: column; gap: 10px; white-space: pre-line; }
.reply { background: var(--sable); border-left: 3px solid var(--or); border-radius: 12px; padding: 14px 16px; }

/* Courbe */
.chart-wrap { display: flex; align-items: flex-start; min-width: 0; }
.chart-axis { flex: none; }
.chart-scroll { flex: 1; min-width: 0; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.chart { display: block; }
.chart .grid { stroke: #F0E7DC; stroke-width: 1; }
.chart .grid.strong { stroke: #E3D6C8; }
.chart .grid.v { stroke: #F6F0E8; }
.chart .axis { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
.chart .curve { stroke: var(--bordeaux-2); stroke-width: 2; }
.chart .pt { fill: var(--bordeaux); stroke: var(--blanc); stroke-width: 1.5; }
.chart .pt.hollow { fill: var(--blanc); stroke: var(--bordeaux); stroke-width: 2; }
.chart .regles { fill: #A1263A; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.lg-pt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--bordeaux); margin-left: 4px; }
.lg-pt.hollow { background: var(--blanc); border: 2px solid var(--bordeaux); }
.lg-regles { display: inline-block; width: 10px; height: 12px; border-radius: 2px; background: #A1263A; margin-left: 4px; }

/* Tableaux */
.table-scroll { overflow-x: auto; margin: 0 -6px; padding: 0 6px; -webkit-overflow-scrolling: touch; }
.table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 560px; }
.table.compact { min-width: 860px; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; padding: 8px 8px; border-bottom: 1.5px solid var(--trait); white-space: nowrap; }
.table td { padding: 9px 8px; border-bottom: 1px solid #F3ECE3; vertical-align: top; white-space: nowrap; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--creme); }
.table td.notes-cell { min-width: 180px; white-space: normal; color: var(--muted); }

/* Bilan */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--creme); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--bordeaux); line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--muted); }

/* Recettes */
.recipes { display: flex; flex-direction: column; gap: 12px; }
.recipe { gap: 0; padding: 0; }
.recipe summary, .add-card summary { list-style: none; cursor: pointer; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.recipe summary::-webkit-details-marker, .add-card summary::-webkit-details-marker { display: none; }
.recipe-title { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--bordeaux); line-height: 1.2; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.recipe-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.ingredients, .steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.add-card { padding: 0; gap: 0; }
.add-card summary { font-weight: 600; color: var(--bordeaux); }
.add-card > form, .add-card > ol { padding: 0 16px 16px; }
.howto { margin: 0; padding-left: 36px !important; display: flex; flex-direction: column; gap: 8px; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--or-clair); color: var(--nuit); }
.badge.soft { background: var(--sable); color: var(--bordeaux); }
.badge.warn { background: #F6E2C8; color: #6B3A10; align-self: flex-start; }

/* Éditeurs coach */
.editor-rows { display: flex; flex-direction: column; gap: 10px; }
.editor-row { display: grid; grid-template-columns: 1fr 44px; gap: 8px; align-items: center; padding: 10px; background: var(--creme); border-radius: 12px; }
.editor-row input:nth-child(2), .editor-row input:nth-child(3) { grid-column: 1; }
.editor-row .icon-btn { grid-column: 2; grid-row: 1; }
.editor-row.one { grid-template-columns: 1fr 44px; }

/* Clientes */
.client-list { display: flex; flex-direction: column; gap: 10px; }
.client-card { flex-direction: row; align-items: center; gap: 14px; text-decoration: none; color: var(--encre); padding: 14px 16px; }
.client-card:hover { border-color: var(--or); }
.client-avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--bordeaux); color: var(--or-clair); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.client-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chev { font-size: 26px; color: var(--muted); }

.infos { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.infos dt { color: var(--muted); }
.infos dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Écrans centrés */
.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(900px 500px at 80% -10%, #4A1420 0%, transparent 60%), linear-gradient(180deg, var(--nuit) 0%, #34101A 100%); }
.narrow-card { width: 100%; max-width: 440px; gap: 16px; }
.narrow-card h1 { font-size: 34px; }
.who-list { display: flex; flex-direction: column; gap: 10px; }
.who { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--trait); background: var(--creme); cursor: pointer; text-align: left; }
.who:hover { border-color: var(--or); }
.who strong { font-family: var(--serif); font-size: 21px; color: var(--bordeaux); }

/* Message */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--nuit); color: var(--creme); padding: 10px 18px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; transition: opacity .2s ease, transform .2s ease;
  width: max-content; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--err); }

/* ---------- Grands écrans ---------- */
@media (min-width: 640px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card { padding: 22px 22px; }
  .editor-row { grid-template-columns: 2fr 1fr 1fr 44px; }
  .editor-row input:nth-child(2), .editor-row input:nth-child(3) { grid-column: auto; }
  .editor-row .icon-btn { grid-column: auto; grid-row: auto; }
  .editor-row.one { grid-template-columns: 1fr 44px; }
}

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
  .shell.has-demo { grid-template-rows: auto 1fr; }
  .shell.has-demo .demo-banner { grid-column: 1 / -1; }
  .sidebar {
    display: flex; flex-direction: column; gap: 14px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 22px 14px; background: var(--blanc); border-right: 1px solid var(--trait);
  }
  .has-demo .sidebar { top: 30px; height: calc(100vh - 30px); }
  .side-head { padding: 0 10px 6px; }
  .side-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
  .side-client { padding: 12px; background: var(--sable); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
  .side-client-name { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--bordeaux); line-height: 1.15; }
  .back-link { font-size: 14px; text-decoration: none; font-weight: 600; }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
  .side-logout { margin-top: auto; background: none; border: 0; color: var(--muted); cursor: pointer; text-align: left; padding: 10px 12px; font-size: 14px; }
  .side-logout:hover { color: var(--bordeaux); }
  .topbar, .tabbar { display: none; }
  .content { padding: 32px 36px 56px; max-width: 1040px; }
  .toast { bottom: 28px; }
  .shortcuts { grid-template-columns: repeat(2, minmax(0, 260px)); }
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

/* ---------- Onglets coach ---------- */
.segmented { display: flex; gap: 4px; padding: 4px; background: var(--sable); border-radius: 999px; }
.seg { flex: 1; min-height: 40px; border: 0; background: transparent; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; padding: 6px 10px; }
.seg.on { background: var(--blanc); color: var(--bordeaux); box-shadow: 0 2px 8px rgba(58, 16, 25, 0.08); }

/* ---------- Repas ---------- */
.meal-plan { background: var(--creme); border-radius: 12px; padding: 12px 14px; font-size: 15.5px; border-left: 3px solid var(--or); }
.meal-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.meal-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.badge.ok { background: #DCEBDF; color: var(--ok); }

/* ---------- Photos et vidéos ---------- */
.media-slot { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.media-label { font-weight: 600; font-size: 14.5px; color: var(--bordeaux); }
.upload-btn {
  width: 100%; min-height: 92px; border: 1.5px dashed #D9C7B4; border-radius: 14px; background: var(--creme);
  color: var(--bordeaux); font-weight: 600; font-size: 15px; cursor: pointer;
}
.upload-btn:hover { border-color: var(--or); background: var(--sable); }
.media-slot.compact .upload-btn { min-height: 56px; }
.uploading { display: flex; align-items: center; justify-content: center; min-height: 92px; border-radius: 14px; background: var(--sable); color: var(--muted); font-size: 14px; }
.media-view { border-radius: 14px; overflow: hidden; background: var(--sable); min-height: 60px; display: flex; align-items: center; justify-content: center; }
.media-thumb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.media-thumb img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.media-view video { display: block; width: 100%; max-height: 360px; background: #000; }
.media-actions { display: flex; gap: 16px; align-items: center; }
.media-empty { padding: 10px 0; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(30, 9, 16, 0.92); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.lb-close { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; }

/* ---------- Séance ---------- */
.session-head { display: flex; flex-direction: column; gap: 2px; padding: 4px 2px 0; }
.session-head h2 { font-size: 30px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--or-fonce); }
.exo-head { display: flex; gap: 12px; align-items: flex-start; }
.exo-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--bordeaux); color: var(--or-clair); display: inline-flex; align-items: center; justify-content: center; font-family: var(--sans); font-weight: 700; font-size: 15px; }
.exo-num.small-num { width: 28px; height: 28px; font-size: 16px; }
.exo-title { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exo-presc { font-weight: 700; color: var(--bordeaux); font-variant-numeric: tabular-nums; }
.exo-consigne { font-size: 15px; color: var(--encre); background: var(--creme); border-radius: 12px; padding: 10px 12px; }
.demo-link { font-weight: 600; font-size: 15px; align-self: flex-start; }
.week-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.week-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 4px; border-bottom: 1px solid #F3ECE3; }
.week-list li.today { font-weight: 700; color: var(--bordeaux); }
.wk-day { min-width: 90px; }
.rest { font-size: 40px; text-align: center; }
.center-text { text-align: center; }

/* ---------- Éditeurs de plan ---------- */
.editor-block { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--creme); border: 1px solid var(--trait); border-radius: 14px; }
.editor-block-head { display: flex; gap: 8px; align-items: center; }
.editor-block-head input { flex: 1; min-width: 0; }
.strong-input { font-weight: 600; }
.presc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.move-btns { display: flex; gap: 4px; }
.icon-btn.mini { width: 34px; height: 34px; font-size: 16px; }
.chip.filled:not(.on) { border-color: var(--or); }
.actions.spread { justify-content: flex-start; }
.copy-select { max-width: 280px; }

/* ---------- Évolution ---------- */
.measures-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.photos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photos-grid .upload-btn { min-height: 120px; font-size: 13.5px; }
.photos-grid .media-thumb img { aspect-ratio: 3 / 4; max-height: none; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.compare .media-thumb img { aspect-ratio: 3 / 4; max-height: none; }
.measure-chart { width: 100%; height: auto; }
.chart .axis.big { font-size: 19px; }
.chart .strong-label { fill: var(--bordeaux); font-weight: 700; }
.table td.num { font-variant-numeric: tabular-nums; }
.table tr.total td { font-weight: 700; color: var(--bordeaux); border-top: 1.5px solid var(--trait); }
.shortcut.wide { grid-column: 1 / -1; }

@media (min-width: 640px) {
  .meal-grid { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .measures-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .presc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photos-grid { gap: 14px; }
}
@media (min-width: 960px) {
  .shortcut.wide { grid-column: auto; }
  .shortcuts { grid-template-columns: repeat(3, minmax(0, 240px)); }
}

.days-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.days-grid .chip { padding: 8px 0; min-width: 0; font-size: 13.5px; text-align: center; }
