/* ARC — design system */

:root {
  --rose: #F1EAE6;
  --ivory: #FAF8F6;
  --champagne: #E5D8CE;
  --taupe: #C7B5A8;
  --brown: #59463F;
  --black: #242220;

  --bg: var(--ivory);
  --surface: #FFFFFF;
  --surface-2: var(--rose);
  --line: #ECE3DD;
  --line-strong: var(--champagne);
  --text: var(--black);
  --text-2: #7A6A62;
  --text-3: #A8988E;
  --accent: var(--brown);

  --menses: #C4544B;
  --follicular: #6E95BD;
  --ovulation: #D9B544;
  --luteal: #9C9893;
  --sport-done: #F3D3D8;
  --sport-missed: #D98078;

  --radius-s: 10px;
  --radius: 14px;
  --radius-l: 20px;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 1px 2px rgba(36, 34, 32, .04), 0 6px 18px rgba(89, 70, 63, .06);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
.serif { font-family: var(--serif); }
.muted { color: var(--text-2); }
.small { font-size: 13px; color: var(--text-2); }
.tiny { font-size: 11.5px; color: var(--text-3); letter-spacing: .02em; }
.ic { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.hidden { display: none !important; }

/* ---------- Structure ---------- */

#app { min-height: 100dvh; }
.page {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 14px) 18px calc(var(--nav-h) + var(--safe-b) + 28px);
  animation: page-in .28s var(--ease);
}
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 6px 0 18px;
}
.page-head h1 { font-family: var(--serif); font-size: 30px; letter-spacing: -.01em; }
.page-head .eyebrow { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brown); transition: background .2s var(--ease);
  flex-shrink: 0;
}
.icon-btn:active { background: var(--rose); }
.icon-btn.soft { background: var(--surface); box-shadow: var(--shadow); }
.icon-btn.sm { width: 32px; height: 32px; }

/* ---------- Navigation ---------- */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(250, 248, 246, .92);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabbar-inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.tab {
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: 10.5px; letter-spacing: .01em; position: relative;
  transition: color .2s var(--ease);
}
.tab.active { color: var(--black); }
.tab.active::after { content: ''; position: absolute; top: 0; width: 22px; height: 2px; border-radius: 2px; background: var(--black); }

/* ---------- Cartes ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-l);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-title { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); font-weight: 500; }
.card-link { font-size: 13.5px; color: var(--brown); padding: 6px 0 6px 8px; }

.dark-card {
  background: #0E0D0C;
  color: #F7F3F0;
  border-radius: var(--radius-l);
  padding: 18px 20px 16px;
  border: 1px solid #2A2826;
  margin-bottom: 16px;
}
.dark-card .label { font-size: 15px; font-weight: 600; }
.dark-card .big { font-size: 28px; font-weight: 600; margin: 2px 0 12px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.dark-card .sub { color: #A39D98; font-size: 13.5px; margin-top: 10px; }
.dark-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bar { height: 10px; background: #ECE6E1; border-radius: 6px; overflow: hidden; position: relative; }
.bar > span { display: block; height: 100%; background: #2C2927; border-radius: 6px; transition: width .6s var(--ease); min-width: 0; }
.bar.light { background: var(--rose); }
.bar.light > span { background: var(--black); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px;
  font-size: 15px; font-weight: 500;
  transition: transform .15s var(--ease), background .2s var(--ease), opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn-primary { background: var(--black); color: var(--ivory); }
.btn-secondary { background: var(--rose); color: var(--black); }
.btn-ghost { color: var(--brown); }
.btn-danger { background: #8E3B33; color: #fff; }
.btn-outline { border: 1px solid var(--line-strong); color: var(--brown); background: var(--surface); }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; white-space: nowrap; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; }
.link-danger { color: #9B4038; font-size: 14px; padding: 8px 0; }

.fab {
  position: fixed; right: max(18px, calc(50% - 262px)); bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 30;
  width: 52px; height: 52px; border-radius: 50%; background: var(--black); color: var(--ivory);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(36, 34, 32, .22);
  transition: transform .15s var(--ease);
}
.fab:active { transform: scale(.94); }

.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; color: var(--text); white-space: nowrap;
}
.chip.active { background: var(--black); color: var(--ivory); border-color: var(--black); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.segmented { display: inline-flex; background: var(--rose); border-radius: 11px; padding: 3px; gap: 2px; }
.segmented button { height: 30px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); transition: background .2s, color .2s; }
.segmented button.active { background: var(--surface); color: var(--black); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.segmented.full { display: flex; }
.segmented.full button { flex: 1; padding: 0 4px; white-space: nowrap; font-size: 13px; }

/* ---------- Formulaires ---------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field-label { font-size: 13px; color: var(--text-2); }
.field-hint { font-size: 12px; color: var(--text-3); }
.input {
  width: 100%; min-width: 0; height: 46px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
  font-size: 16px; outline: none; transition: border-color .2s;
  -webkit-appearance: none; appearance: none;
}
textarea.input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2359463F' stroke-width='1.5'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input:focus { border-color: var(--brown); }
input[type="date"].input, input[type="time"].input { display: flex; align-items: center; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; }
input[type="color"].color-input { width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; padding: 0; background: none; overflow: hidden; -webkit-appearance: none; appearance: none; flex-shrink: 0; }
input[type="color"].color-input::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"].color-input::-webkit-color-swatch { border: none; border-radius: 50%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-2 > * { min-width: 0; }
.form-error { color: #9B4038; font-size: 13.5px; margin: -4px 0 12px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.toggle-row:last-child { border-bottom: 0; }
.switch { position: relative; width: 48px; height: 29px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; z-index: 1; cursor: pointer; }
.switch-track { position: absolute; inset: 0; background: var(--champagne); border-radius: 20px; transition: background .2s var(--ease); }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .22s var(--ease); }
.switch input:checked + .switch-track { background: var(--black); }
.switch input:checked + .switch-track::after { transform: translateX(19px); }

.check {
  width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--taupe);
  display: inline-flex; align-items: center; justify-content: center; color: transparent; flex-shrink: 0;
  transition: background .18s var(--ease), border-color .18s, color .18s;
}
.check.checked { background: var(--black); border-color: var(--black); color: var(--ivory); }
.check.round { border-radius: 50%; }

/* ---------- Listes ---------- */

.list { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.row-item:last-child { border-bottom: 0; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .title { font-size: 15px; overflow-wrap: anywhere; }
.row-item .meta { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.row-item.done .title { text-decoration: line-through; color: var(--text-3); }
.row-actions { display: flex; gap: 2px; flex-shrink: 0; }
.event-bar { width: 4px; align-self: stretch; border-radius: 3px; flex-shrink: 0; }
.time-col { width: 46px; font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--text-2); flex-shrink: 0; }

.empty { text-align: center; color: var(--text-3); padding: 18px 8px; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.section { margin-bottom: 22px; }
.section-title { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); font-weight: 500; margin: 0 2px 10px; }

.inline-add { display: flex; gap: 8px; margin-top: 8px; }
.inline-add .input { height: 42px; }
.inline-add .btn { height: 42px; flex-shrink: 0; }

/* ---------- Accueil ---------- */

.greeting h1 { font-family: var(--serif); font-size: 32px; line-height: 1.1; letter-spacing: -.01em; }
.greeting .date { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.greeting .sub { color: var(--text-2); margin-top: 8px; font-size: 15px; }
.phase-pill { display: inline-flex; align-items: center; gap: 8px; }
.phase-swatch { width: 14px; height: 14px; border-radius: 5px; border: 1.5px solid; flex-shrink: 0; }
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.kpi-row .card { margin: 0; }
.kpi-value { font-family: var(--serif); font-size: 22px; margin-top: 6px; overflow-wrap: anywhere; }

.phase-banner {
  position: relative; background: var(--surface); border-radius: var(--radius-l);
  padding: 14px 44px 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow);
  border-left: 4px solid var(--luteal);
  animation: banner-in .35s var(--ease);
}
@keyframes banner-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.phase-banner .title { font-family: var(--serif); font-size: 18px; }
.phase-banner .details { font-size: 13px; color: var(--text-2); margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.phase-banner .icon-btn { position: absolute; top: 6px; right: 4px; }

/* ---------- Calendrier ---------- */

.cal-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; gap: 8px; }
.cal-title { display: flex; align-items: center; gap: 4px; min-width: 0; }
.cal-title h2 { font-family: var(--serif); font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-btn { font-size: 13.5px; color: var(--brown); padding: 6px 10px; border-radius: 10px; background: var(--rose); }

.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 6px; }
.weekdays span { text-align: center; font-size: 11.5px; color: var(--text-3); letter-spacing: .06em; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.day-cell {
  position: relative; aspect-ratio: 1 / 1.18; min-height: 50px;
  background: var(--surface); border-radius: 11px;
  border: 1.5px solid transparent;
  padding: 5px 0 0 6px; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .12s var(--ease);
  box-shadow: 0 1px 1.5px rgba(36,34,32,.035);
  overflow: hidden;
}
.day-cell:active { transform: scale(.96); }
.day-cell.out { opacity: .38; }
.day-num { font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1; }
.day-cell.today .day-num { background: var(--black); color: var(--ivory); border-radius: 7px; padding: 3px 5px; margin: -3px 0 0 -3px; align-self: flex-start; }
.day-cell.estimated { border-style: dashed; }
.day-dots { display: flex; flex-wrap: wrap; gap: 0; padding: 0 2px 3px 0; align-items: center; }
.day-dot { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; margin-left: -3px; }
.day-dot:first-child { margin-left: -4px; }
.day-dot i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.day-more { font-size: 9.5px; color: var(--text-2); margin-left: 1px; }
.task-mark { position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--taupe); }
.weight-mark { position: absolute; top: 5px; right: 6px; font-size: 9px; color: var(--text-3); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 16px 2px 0; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid; }

.year-card { padding: 16px 18px 14px; }
.year-card .big { font-size: 22px; margin: 0 0 10px; }

/* Vue semaine */
.week-wrap { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.week-head { display: grid; grid-template-columns: 38px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface); }
.week-head button { padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--text-3); border-radius: 10px; margin: 3px 1px; border: 1.5px solid transparent; }
.week-head button b { font-size: 15px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.week-head button.today b { background: var(--black); color: var(--ivory); border-radius: 8px; padding: 1px 6px; }
.week-allday { display: grid; grid-template-columns: 38px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); min-height: 8px; }
.week-allday .cell { padding: 3px 1px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.week-scroll { height: min(62dvh, 600px); overflow-y: auto; position: relative; -webkit-overflow-scrolling: touch; }
.week-grid { display: grid; grid-template-columns: 38px repeat(7, minmax(0, 1fr)); position: relative; }
.hour-labels { position: relative; }
.hour-labels span { position: absolute; right: 6px; font-size: 10px; color: var(--text-3); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.day-col { position: relative; border-left: 1px solid var(--line); }
.day-col .hour-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.day-col.today-col { background: rgba(241, 234, 230, .45); }
.week-event {
  position: absolute; left: 2px; right: 2px; border-radius: 6px; padding: 3px 4px;
  font-size: 10.5px; line-height: 1.2; overflow: hidden; color: var(--black); text-align: left;
  border-left: 3px solid; min-height: 18px;
}
.week-event b { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; hyphens: auto; font-size: 10px; }
.week-event small { color: rgba(36,34,32,.65); font-size: 9.5px; }
.now-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid var(--brown); z-index: 3; }
.now-line::before { content: ''; position: absolute; left: -4px; top: -4.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--brown); }
.week-status { height: 3px; margin: 0 6px; border-radius: 2px; }

/* ---------- Feuilles ---------- */

#sheets { position: relative; z-index: 60; }
.sheet-overlay { position: fixed; inset: 0; background: rgba(36, 34, 32, .28); opacity: 0; transition: opacity .25s var(--ease); z-index: 60; }
.sheet-overlay.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-width: 560px; margin: 0 auto;
  max-height: calc(100dvh - var(--safe-t) - 28px);
  background: var(--ivory); border-radius: 22px 22px 0 0;
  display: flex; flex-direction: column;
  transform: translateY(102%); transition: transform .3s var(--ease);
  box-shadow: 0 -8px 30px rgba(36,34,32,.12);
}
.sheet.open { transform: none; }
.sheet-grip { width: 38px; height: 4px; border-radius: 3px; background: var(--champagne); margin: 8px auto 0; flex-shrink: 0; }
.sheet-head { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 20px; flex-shrink: 0; }
.sheet-title { font-family: var(--serif); font-size: 22px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-actions { display: flex; gap: 2px; }
.sheet-body { overflow-y: auto; padding: 6px 20px calc(var(--safe-b) + 24px); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

.dialog-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(36,34,32,.32); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; transition: opacity .2s; }
.dialog-overlay.open { opacity: 1; }
.dialog { background: var(--ivory); border-radius: 20px; padding: 22px 20px 16px; width: 100%; max-width: 360px; box-shadow: 0 20px 50px rgba(0,0,0,.18); transform: scale(.96); transition: transform .2s var(--ease); }
.dialog-overlay.open .dialog { transform: none; }
.dialog h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 8px; }
.dialog p { margin-bottom: 12px; font-size: 15px; }
.dialog-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.dialog-buttons .btn { flex: 1; }
.dialog-celebrate { text-align: center; }
.celebrate-mark { width: 54px; height: 54px; border-radius: 50%; background: var(--rose); color: var(--brown); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); z-index: 95;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--black); color: var(--ivory); border-radius: 14px; padding: 11px 16px;
  font-size: 14px; display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 32px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-action { color: var(--champagne); font-weight: 600; }

/* ---------- Progression ---------- */

.chart-wrap { position: relative; width: 100%; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-tip { position: absolute; background: var(--black); color: var(--ivory); border-radius: 9px; padding: 5px 9px; font-size: 12px; pointer-events: none; white-space: nowrap; transform: translate(-50%, -120%); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--rose); border-radius: 12px; padding: 10px 10px; min-width: 0; }
.stat .v { font-family: var(--serif); font-size: 18px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.milestones { display: flex; gap: 5px; margin-top: 12px; }
.milestones span { flex: 1; height: 4px; border-radius: 2px; background: #3A3633; }
.milestones span.on { background: #F1EAE6; }

/* ---------- Nutrition ---------- */

.recipe-card { position: relative; background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 16px 16px 14px 18px; margin-bottom: 12px; border: 1.5px solid transparent; transition: background .25s var(--ease), border-color .25s; }
.recipe-card.validated { background: #F6ECE8; border-color: var(--taupe); }
.recipe-card .head { display: flex; gap: 12px; align-items: flex-start; }
.recipe-card h3 { font-family: var(--serif); font-size: 19px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.recipe-meta { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); margin-top: 6px; }
.recipe-ings { margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--text); }
.recipe-ings li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px dashed var(--line); }
.recipe-ings li span:last-child { color: var(--text-2); text-align: right; flex-shrink: 0; max-width: 45%; overflow-wrap: anywhere; }
.validated-badge { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brown); }
.ing-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 34px; gap: 6px; margin-bottom: 8px; align-items: center; }
.ing-row .input { height: 42px; }

/* ---------- Programme ---------- */

.week-plan { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-bottom: 16px; }
.week-plan .wp { background: var(--surface); border-radius: 11px; padding: 8px 2px; text-align: center; box-shadow: 0 1px 1.5px rgba(36,34,32,.035); border: 1.5px solid transparent; min-width: 0; }
.week-plan .wp .d { font-size: 11px; color: var(--text-3); }
.week-plan .wp .n { font-size: 12px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.week-plan .wp.rest .n { color: var(--text-3); }
.week-plan .wp.today { border-color: var(--black); }
.session-card { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; }
.session-card .head { display: flex; align-items: center; gap: 12px; }
.session-card .head .grow { flex: 1; min-width: 0; }
.session-card h3 { font-family: var(--serif); font-size: 19px; overflow-wrap: anywhere; }
.session-card.done { background: #FBF1F3; }
.ex-list { margin-top: 10px; border-top: 1px solid var(--line); }
.ex-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.ex-row:last-child { border-bottom: 0; }
.ex-row .n { width: 20px; color: var(--text-3); font-size: 12px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.ex-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ex-row .detail { color: var(--text-2); font-size: 13px; }

/* ---------- Paramètres ---------- */

.settings-group { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 4px 16px; margin-bottom: 18px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; font-size: 15px; min-width: 0; }
.settings-row:last-child { border-bottom: 0; }
.settings-row .grow { flex: 1; min-width: 0; }
.settings-row .val { color: var(--text-2); font-size: 14px; text-align: right; flex-shrink: 0; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-row .chev { color: var(--text-3); }
.cat-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cat-row:last-child { border-bottom: 0; }
.cat-row .input { height: 40px; }
.note { background: var(--rose); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; color: var(--brown); line-height: 1.45; margin-bottom: 14px; }
.note b { font-weight: 600; }
.status-ok { color: #4F7A5A; }
.status-warn { color: #9B4038; }
.day-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.day-chips button { width: 38px; height: 34px; border-radius: 10px; border: 1px solid var(--line-strong); font-size: 13px; background: var(--surface); }
.day-chips button.on { background: var(--black); color: var(--ivory); border-color: var(--black); }

/* ---------- Onboarding ---------- */

.welcome { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-t) + 30px) 26px calc(var(--safe-b) + 30px); max-width: 480px; margin: 0 auto; }
.welcome .logo { font-family: var(--serif); font-size: 64px; letter-spacing: .08em; margin-bottom: 6px; }
.welcome p { color: var(--text-2); margin-bottom: 26px; }

@media (min-width: 600px) {
  .day-cell { aspect-ratio: 1 / 1; }
}
@media (max-width: 360px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .month-grid, .weekdays { gap: 4px; }
  .day-num { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
