/* === BOTTOM SHEETS === */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61,90,108,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 200;
}
.sheet-overlay.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: var(--paper);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.2);
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
  z-index: 201;
  max-height: 90vh;
  overflow-y: auto;
  padding-bottom: 40px;
}
.sheet.open { transform: translateX(-50%) translateY(0); }

.sheet-handle {
  width: 40px; height: 4px;
  background: var(--stroke);
  border-radius: 999px;
  margin: 12px auto 0;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px 0;
}
.sheet-header .emoji { font-size: 22px; }
.sheet-header h2 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
}
.sheet-body { padding: 16px 24px 0; }
.sheet-footer {
  padding: 16px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet-time {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  padding: 8px 0;
}
.sheet-time .modify {
  color: var(--caveat);
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  font-weight: 700;
  font-size: 15px;
  margin-left: 8px;
}

.sheet-btn-save {
  width: 100%;
  padding: 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  color: #FBF3E4;
}
.sheet-btn-save.bib { background: #C9A93A; color: var(--text); }
.sheet-btn-save.eau { background: var(--c-eau); }
.sheet-btn-save.change { background: var(--c-change); }
.sheet-btn-save.sieste { background: var(--c-sieste); }
.sheet-btn-save.repas { background: var(--c-repas); }
.sheet-btn-save.medic { background: var(--c-medic); }
.sheet-btn-save.temp { background: var(--success); }

/* === BIBERON SHEET (vraie bouteille verticale) === */
.bib-hint {
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  font-weight: 700;
  font-size: 18px;
  color: var(--caveat);
  text-align: center;
  margin: 14px 0 6px;
}
.bib-bottle-wrap {
  position: relative;
  margin: 12px auto 0;
  width: 220px;
  height: 320px;
  user-select: none;
  touch-action: none;
}
.bib-cap {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 36px;
  background: var(--c-biberon);
  border-radius: 8px 8px 4px 4px;
  z-index: 2;
}
.bib-cap::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 60px; height: 14px;
  background: var(--c-biberon);
  border-radius: 0 0 10px 10px;
}
.bib-bottle {
  position: absolute;
  top: 46px;
  left: 30px;
  right: 30px;
  bottom: 0;
  background: var(--card);
  border: 3px solid var(--stroke);
  border-radius: 18px 18px 28px 28px;
  overflow: hidden;
  cursor: ns-resize;
}
.bib-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--c-biberon);
  opacity: .55;
  transition: height .12s ease-out;
}
.bib-level-line {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--c-biberon);
  border-radius: 2px;
  pointer-events: none;
  transition: bottom .12s ease-out;
  z-index: 2;
}
.bib-graduations {
  position: absolute;
  top: 56px;
  left: 0;
  width: 30px;
  height: calc(100% - 56px);
  pointer-events: none;
}
.bib-grad {
  position: absolute;
  left: 0;
  width: 100%;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: var(--text-2);
  text-align: right;
  padding-right: 4px;
  transform: translateY(50%);
}
.bib-grad::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  width: 6px; height: 1px;
  background: var(--text-2);
}
.bib-chip {
  position: absolute;
  right: -6px;
  background: var(--c-biberon);
  color: var(--text);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 18px;
  padding: 4px 14px;
  border-radius: 999px;
  pointer-events: none;
  transition: bottom .12s ease-out;
  transform: translate(50%, 50%);
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

/* === EAU SHEET (jauge verticale) === */
.eau-glass-wrap {
  position: relative;
  width: 140px; height: 200px;
  margin: 18px auto 0;
}
.eau-glass {
  width: 140px; height: 200px;
  margin: 0;
  position: relative;
  background: var(--bg-tint);
  border: 2px solid var(--stroke);
  border-radius: 16px 16px 24px 24px;
  overflow: hidden;
  cursor: ns-resize;
  user-select: none;
  touch-action: none;
}
.eau-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--c-eau);
  opacity: .55;
  transition: height .12s ease-out;
}
.eau-level-line {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--c-eau);
  z-index: 2;
  transition: bottom .12s ease-out;
}
.bib-chip.eau {
  background: var(--c-eau);
}

/* === CHANGE TOGGLES === */
.change-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.toggle-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.toggle-card.active {
  background: var(--c-change);
  border-color: var(--c-change);
}
.toggle-card .emoji { font-size: 28px; display: block; margin-bottom: 4px; }
.toggle-card .label { font-weight: 700; font-size: 13px; }
.toggle-card.active .label { color: var(--text); }

.consistance {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  margin-top: 8px;
  border-left: 4px solid var(--warning);
  display: none;
}
.consistance.show { display: block; }
.consistance .label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.consistance-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.consistance-chip {
  padding: 8px 14px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.consistance-chip.active { background: var(--c-repas); color: #FBF3E4; border-color: var(--c-repas); }

/* === SIESTE SHEET (chrono) === */
.chrono-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}
.chrono-circle {
  width: 240px; height: 240px;
  border-radius: 50%;
  background: var(--bg-tint);
  border: 3px solid var(--stroke);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.chrono-value {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 52px;
}
.chrono-label {
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  font-weight: 700;
  color: var(--muted);
  margin-top: -4px;
}
.chrono-meta {
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
}
.chrono-meta .modify {
  color: var(--caveat);
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  font-weight: 700;
  font-size: 15px;
  margin-left: 6px;
  cursor: pointer;
}

/* === REPAS SHEET (catégories + smileys) === */
.repas-cats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.repas-cat-label {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}
.repas-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.repas-chip {
  padding: 6px 12px;
  border: 1px solid var(--c-repas);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.repas-chip.active { background: var(--c-repas); color: #FBF3E4; }

.smiley-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}
/* Toggle « A vomi » dans la feuille Repas — discret, devient rouge si actif */
.vomit-toggle {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 6px; padding: 11px 14px;
  border: 1.5px solid var(--stroke); border-radius: 14px;
  background: var(--bg-tint); color: var(--text-2);
  font-size: 14px; font-weight: 700; cursor: pointer; -webkit-appearance: none;
  transition: all .15s ease;
}
.vomit-toggle .emoji { font-size: 18px; }
.vomit-toggle.active {
  background: #FDE8E6; border-color: #E8857A; color: #C0392B;
}
.smiley-card {
  padding: 10px 4px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--card);
  text-align: center;
  cursor: pointer;
  transition: all .15s;
}
.smiley-card.active { background: var(--c-repas); border-color: var(--c-repas); }
.smiley-card .emoji { font-size: 22px; display: block; margin-bottom: 2px; }
.smiley-card .label { font-size: 10px; font-weight: 700; }
.smiley-card.active .label { color: #FBF3E4; }

/* === MEDIC SHEET (autocomplete style) === */
.medic-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--card);
  font-size: 15px;
  margin-bottom: 8px;
  outline: none;
}
.medic-suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.medic-sugg {
  padding: 6px 12px;
  border: 1px solid var(--c-medic);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.medic-sugg.active { background: var(--c-medic); color: #FBF3E4; }
.medic-qty { max-width: 160px; }
.medic-sugg.unit { text-transform: none; }
.medic-dose-hint {
  display: none;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-2);
  margin-top: 10px;
}
.sheet-time-input {
  font: inherit;
  font-size: 15px;
  padding: 4px 10px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  outline: none;
}

/* === TEMP SHEET === */
.temp-display {
  text-align: center;
  margin: 20px 0 8px;
}
.temp-value {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 56px;
}
.temp-state {
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  font-weight: 700;
  font-size: 18px;
  margin-top: 4px;
}
.temp-state.normal { color: var(--success); }
.temp-state.warn { color: var(--warning); }
.temp-state.fever { color: var(--critical); }
.temp-slider {
  margin: 16px 8px 0;
  position: relative;
}
.temp-slider input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  background: linear-gradient(90deg, #7CB9D8 0%, #6B9E8F 35%, #D9A85C 60%, #B85450 100%);
  border-radius: 999px;
  outline: none;
}
.temp-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--paper);
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.temp-slider input[type=range]::-moz-range-thumb {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--paper);
  cursor: grab;
}
.temp-marks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  padding: 0 8px;
}

/* === TOAST (confirmation save) === */
.toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #FBF3E4;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 300;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === SAISIE SPONTANÉE === */
.saisie-spontanee {
  padding: 16px 24px 0;
}
.saisie-q {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
  text-align: center;
  margin-bottom: 20px;
}
.saisie-macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.saisie-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--card);
  font-size: 15px;
  outline: none;
}
.saisie-divider {
  text-align: center;
  margin: 12px 0;
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  color: var(--caveat);
  font-size: 15px;
}
.saisie-now {
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.saisie-now .modify { color: var(--caveat); font-family: 'Caveat', cursive; font-size-adjust: 0.52; font-weight: 700; font-size: 15px; margin-left: 6px; }

/* === JOURNAL === */
.journal-view { padding-bottom: 120px; }
.journal-day-cav {
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  font-weight: 700;
  font-size: 22px;
  color: var(--caveat);
  margin-bottom: 4px;
}
.journal-day-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 16px;
}
.journal-period {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 18px;
  margin: 16px 0 8px;
}
.journal-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.journal-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.journal-dot.bib { background: var(--c-biberon); }
.journal-dot.eau { background: var(--c-eau); }
.journal-dot.change { background: var(--c-change); }
.journal-dot.sieste { background: var(--c-sieste); }
.journal-dot.repas { background: var(--c-repas); }
.journal-dot.medic { background: var(--c-medic); }
.journal-event-emoji { font-size: 16px; }
.journal-event-text { font-size: 14px; font-weight: 600; flex: 1; }
.journal-event-text .time { color: var(--text-2); font-weight: 600; }
.journal-event-text .val { color: var(--text-2); font-weight: 400; margin-left: 6px; }
.journal-end-cav {
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  font-weight: 700;
  color: var(--caveat);
  text-align: center;
  margin-top: 24px;
  font-size: 18px;
}
