/* === DESIGN SYSTEM TOKENS === */
:root {
  /* Categorical */
  --c-biberon: #FFE05C;
  --c-eau: #7CB9D8;
  --c-change: #9BCFB2;
  --c-sieste: #3D5A6C;
  --c-repas: #D85C8E;
  --c-medic: #D58FA8;
  --c-temp: #F29B88;
  --c-humeur: #B6A8DC;
  --c-activite: #EEA05C;
  --c-photo: #6FBEB8;
  --c-vomi: #C97D6D;
  --c-anomalie: #D58FA8;

  /* Mood adaptive (default = Calme) */
  --bg: #F4EBD9;
  --bg-tint: #FBF3E4;
  --accent: #6B9E8F;
  --caveat: #6B9E8F;

  /* Neutrals */
  --paper: #FBF3E4;
  --card: #FFFFFF;
  --text: #3D5A6C;
  --text-2: rgba(61,90,108,.7);
  --muted: rgba(61,90,108,.5);
  --divider: rgba(61,90,108,.08);
  --stroke: rgba(61,90,108,.18);

  /* Alerts */
  --critical: #B85450;
  --success: #6B9E8F;
  --warning: #D9A85C;
}

/* Mood variations */
body[data-mood="joyeux"] { --bg: #FBF3DC; --bg-tint: #FFF6D9; --accent: #FFD166; --caveat: #FF8C5A; }
body[data-mood="difficile"] { --bg: #F2E4E1; --bg-tint: #F9EBE6; --accent: #E88DA6; --caveat: #B85450; }
body[data-mood="nuit"] {
  --bg: #1A2433; --bg-tint: #222D3F; --accent: #D9A85C; --caveat: #D9A85C;
  --paper: #1A2433; --card: #27334A;
  --text: #F4EBD9; --text-2: rgba(244,235,217,.65); --muted: rgba(244,235,217,.45);
  --divider: rgba(244,235,217,.10); --stroke: rgba(244,235,217,.18);
}

/* === RESET === */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
/* iOS : les inputs time/date gardent une largeur intrinsèque native qui ignore
   width:100% et débordent à droite. On neutralise l'apparence native + min-width.
   On leur donne aussi un VRAI look de champ (bordure/fond/texte lisible) : sinon,
   après appearance:none, ils paraissent vides et la valeur hérite d'une couleur
   estompée → on ne sait pas où cliquer (signalé sur iPhone). */
input[type="time"],input[type="date"] {
  -webkit-appearance: none; appearance: none;
  min-width: 0; max-width: 100%;
  background: var(--bg-tint);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 16px; /* >=16px : évite le zoom auto au focus sur iOS */
}
/* iOS Safari : les inputs texte/number/textarea ont une largeur intrinsèque native
   qui dépasse leur conteneur (débordement à droite signalé sur plusieurs formulaires).
   On neutralise l'apparence native + on borne la largeur. (Look : bordure/fond/padding
   viennent des classes existantes type .ob-field — on ne les redéfinit pas ici.) */
input[type="text"], input[type="number"], input[type="email"], input[type="password"],
input[type="search"], input[type="tel"], input[type="url"], input:not([type]), textarea {
  -webkit-appearance: none; appearance: none;
  min-width: 0; max-width: 100%;
}
html,body { height: 100%; overflow-x: hidden; overscroll-behavior: none; max-width: 100%; }
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease;
}
input,button,textarea,select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

.serif { font-family: 'Fraunces', serif; font-weight: 700; }
.caveat { font-family: 'Caveat', cursive; font-size-adjust: 0.52; font-weight: 700; color: var(--caveat); }

/* Preview banner */
#preview-banner {
  background: linear-gradient(90deg, var(--c-repas), var(--c-medic));
  color: #FBF3E4;
  text-align: center;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}
#preview-banner a { text-decoration: underline; opacity: .9; }

/* App container */
#app { min-height: calc(100vh - 36px); }

/* === LOGIN VIEW === */
.login-screen {
  min-height: calc(100vh - 36px);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--card);
  border-radius: 28px;
  padding: 40px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 12px 30px rgba(0,0,0,.06);
}
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}
.login-logo .logo {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #FBF3E4;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 24px;
}
.login-logo .name {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 26px;
}
.login-eyebrow {
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  font-weight: 700;
  font-size: 22px;
  color: var(--caveat);
  margin-bottom: 6px;
}
.login-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 22px;
}
.login-form { display: flex; flex-direction: column; gap: 14px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--bg-tint);
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: #FBF3E4;
  padding: 16px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  width: 100%;
  transition: transform .1s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(107,158,143,.3); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-outline {
  background: transparent;
  color: var(--text);
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-weight: 600;
  font-size: 15px;
  width: 100%;
}
.login-error {
  color: var(--critical);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.login-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
}
.login-foot a { color: var(--caveat); font-weight: 600; }
.login-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--divider);
}

/* === SHELL APP (post-login) === */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.shell-header {
  /* + safe-area : sinon la barre Simple/Pro passe sous l'encoche/Dynamic Island iPhone */
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
}
.role-switch {
  display: flex;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 4px;
}
.role-switch button {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  color: var(--text-2);
  transition: background .2s;
}
.role-switch button.active {
  background: var(--accent);
  color: #FBF3E4;
}
.shell-header .spacer { flex: 1; }
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-repas);
  color: #FBF3E4;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: transform .15s;
}
.avatar:hover { transform: scale(1.05); }
.moment-toggle {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--stroke);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  margin-right: 4px;
}

.header-chat {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--stroke);
  font-size: 18px;
  cursor: pointer;
  margin-right: 4px;
}
.header-chat:hover { transform: scale(1.05); }
.header-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--critical, #c0584f);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.shell-main { flex: 1; padding: 16px 20px 100px; overflow-y: auto; }

/* === BOUSSOLE MATIN === */
.mood-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-tint);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
/* Chip d'identité du bébé courant (accueil) — savoir QUEL bébé on consulte */
.baby-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-tint, var(--bg-tint));
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  margin: 0 8px 12px 0;
  cursor: default;
  -webkit-appearance: none;
  max-width: 100%;
}
.baby-chip[data-goto-tab], .baby-chip[data-open-babyswitch] { cursor: pointer; }
/* Chip nounou cliquable (changer de bébé) */
.mood-chip--switch { border: none; cursor: pointer; -webkit-appearance: none; font-family: inherit; }
/* Sélecteur d'enfant dans le header (nounou) — à la place de l'ancien Simple/Avancé */
.hdr-baby {
  height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--stroke);
  font-size: 13px; font-weight: 800; color: var(--text);
  white-space: nowrap; cursor: pointer; -webkit-appearance: none; font-family: inherit;
  max-width: 60vw; overflow: hidden; text-overflow: ellipsis;
}
/* Sélecteur rapide de bébé (sheet) */
.baby-switch-list { display: flex; flex-direction: column; gap: 8px; }
.baby-switch-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 1.5px solid var(--stroke); border-radius: 16px;
  padding: 14px 16px; font-size: 16px; font-weight: 700; color: var(--text);
  cursor: pointer; -webkit-appearance: none; text-align: left;
}
.baby-switch-row.is-current { border-color: var(--accent); background: var(--bg-tint); }
.baby-switch-row .emoji { font-size: 22px; }
.baby-switch-row .lbl { flex: 1; }
.baby-switch-row .baby-switch-cur { color: var(--accent); font-weight: 800; }
/* Bandeau masquerade (admin « connecté à la place de ») */
.masq-banner { display: flex; align-items: center; gap: 10px; background: #3D5A6C; color: #FBF3E4; font-size: 13px; font-weight: 700; padding: 8px 16px; }
.masq-banner button { margin-left: auto; background: rgba(255,255,255,.2); color: #fff; border: none; border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 13px; cursor: pointer; -webkit-appearance: none; }
/* Admin — lignes utilisateurs */
.admin-user { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--stroke); }
.admin-user:last-child { border-bottom: 0; }
.admin-user.is-off { opacity: .55; }
.admin-user-ava { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--c-repas); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.admin-user-info { flex: 1; min-width: 0; }
.admin-user-name { font-size: 14.5px; font-weight: 700; color: var(--text); }
.admin-off-tag { font-size: 11px; font-weight: 700; color: var(--critical); background: rgba(0,0,0,.05); border-radius: 6px; padding: 1px 6px; }
.admin-user-meta { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.admin-act { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--stroke); background: var(--card); font-size: 16px; cursor: pointer; -webkit-appearance: none; }
.admin-act.off { color: var(--critical); }
.admin-act.on { color: var(--accent); }
/* Récap "nuit enregistrée" sur l'accueil Matin */
.night-recap {
  background: var(--bg-tint);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}
.baby-chip .baby-chip__name { white-space: nowrap; }
.baby-chip .baby-chip__age { font-weight: 600; opacity: 0.8; }
.baby-chip .baby-chip__switch { font-weight: 600; opacity: 0.7; font-size: 13px; }
/* Bandeau "sieste en cours" (accueil parent + nounou) — tap pour terminer */
.nap-ongoing {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--c-sieste, #3D5A6C); color: #FBF3E4;
  border: none; border-radius: 16px; padding: 12px 16px; margin: 0 0 12px;
  cursor: pointer; text-align: left; -webkit-appearance: none;
  box-shadow: 0 3px 12px rgba(61,90,108,.28);
}
.nap-ongoing__ic { font-size: 24px; line-height: 1; }
.nap-ongoing__txt { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.nap-ongoing__txt strong { font-size: 15px; font-weight: 800; }
.nap-ongoing__since { font-size: 13px; opacity: .85; }
.nap-ongoing__end {
  flex: 0 0 auto; font-weight: 800; font-size: 14px;
  background: rgba(255,255,255,.18); padding: 8px 14px; border-radius: 999px;
}
.greeting {
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  font-weight: 700;
  font-size: 22px;
  color: var(--caveat);
  margin-bottom: 4px;
}
.question {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.btn-big-primary {
  background: var(--accent);
  color: #FBF3E4;
  padding: 18px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  width: 100%;
  margin-bottom: 12px;
  transition: transform .1s, box-shadow .15s;
}
.btn-big-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.btn-big-secondary {
  background: var(--card);
  color: var(--text);
  padding: 16px 24px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-weight: 600;
  font-size: 15px;
  width: 100%;
  margin-bottom: 20px;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.macro {
  text-align: center;
  padding: 14px 6px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: transform .1s;
}
.macro:hover { transform: scale(0.97); }
.macro .emoji { font-size: 28px; display: block; margin-bottom: 4px; }
.macro.bib { background: var(--c-biberon); }
.macro.eau { background: var(--c-eau); }
.macro.change { background: var(--c-change); }
.macro.sieste { background: var(--c-sieste); color: #FBF3E4; }
.macro.repas { background: var(--c-repas); color: #FBF3E4; }
.macro.medic { background: var(--c-medic); color: #FBF3E4; }
.macro.temp { background: var(--c-temp); }
.macro.humeur { background: var(--c-humeur); }
.macro.activite { background: var(--c-activite); }
.macro.photo { background: var(--c-photo); }
.macro.vomi { background: var(--c-vomi); color: #FBF3E4; }

/* Cards */
.card {
  background: var(--card);
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.card-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}

/* Pro grid */
.pro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.pro-stat {
  background: var(--card);
  padding: 16px;
  border-radius: 18px;
}
.pro-stat .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.pro-stat .value {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
}
.pro-stat .sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

/* === P03 — Boussole matin Pro (Détails) === */
.md-back {
  background: none;
  border: 0;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  margin: -4px 0 8px -8px;
  line-height: 1;
}
.md-card {
  border-radius: 22px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--card);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.md-card-bib    { background: #FFF6D6; }
.md-card-change { background: #DCEEE2; }
.md-card-soins  { background: var(--card); }
.md-card-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 10px;
}
.md-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}
.md-row .md-time { font-weight: 700; min-width: 52px; }
.md-row .md-val  { font-weight: 600; }
.md-row .md-sub  { color: var(--text-2); font-size: 12px; margin-left: auto; }
.md-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.md-dot.dot-bib    { background: var(--c-biberon); }
.md-dot.dot-change { background: var(--c-change); }
.md-empty {
  color: var(--text-2);
  font-size: 13px;
  padding: 4px 0 8px;
}
.md-add {
  width: 100%;
  background: var(--card);
  border: 1px dashed rgba(0,0,0,.12);
  border-radius: 14px;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  margin-top: 8px;
}
.md-card-bib    .md-add { color: #B89500; border-color: rgba(184,149,0,.3); }
.md-card-change .md-add { color: #4D8B66; border-color: rgba(77,139,102,.3); }
.soins-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.soin-pill {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.soin-pill.on {
  background: var(--accent);
  color: #FBF3E4;
  border-color: var(--accent);
}
.soin-pill .soin-check { font-size: 12px; }
.md-note-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  margin: 14px 0 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.md-note {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  padding: 10px 0;
  outline: none;
  color: var(--text);
}
.md-mic {
  background: none;
  border: 0;
  font-size: 18px;
  padding: 6px 8px;
  cursor: pointer;
}
.md-save {
  background: var(--accent);
  color: #FBF3E4;
  border: 0;
  border-radius: 999px;
  width: 100%;
  padding: 18px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 90px;
  cursor: pointer;
}
.md-save:hover { opacity: 0.92; }

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--card);
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 10px 8px 28px;
  gap: 2px;
}
.nav-tab .icon { font-size: 22px; }
.nav-tab .label { font-size: 10px; font-weight: 700; }
.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
}
.nav-tab.active { color: var(--accent); }
.nav-tab .icon { font-size: 22px; display: inline-flex; align-items: center; justify-content: center; height: 24px; }
.nav-tab .icon svg { width: 24px; height: 24px; }
.nav-tab .label { font-size: 11px; font-weight: 700; }
.nav-fab {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #FBF3E4;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -16px;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: 'Caveat', cursive; font-size-adjust: 0.52;
  font-weight: 700;
  font-size: 22px;
  color: var(--caveat);
}

/* Mood selector (debug for preview) */
.mood-selector {
  position: fixed;
  bottom: 100px;
  right: 16px;
  background: var(--card);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  display: flex;
  gap: 4px;
  z-index: 50;
  font-size: 10px;
}
.mood-selector button {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 14px;
}
.mood-selector button.active { background: var(--accent); color: #FBF3E4; }

/* Coming soon placeholder */
.coming-soon {
  padding: 60px 20px;
  text-align: center;
}
.coming-soon h2 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  margin-bottom: 8px;
}
.coming-soon p {
  color: var(--text-2);
  font-size: 15px;
}
/* Journal — vue synthétique (mode Simple) */
.journal-synth { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.synth-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--stroke); border-radius: 16px; padding: 14px 16px; font-size: 15.5px; font-weight: 700; color: var(--text); }
.synth-ic { font-size: 22px; line-height: 1; }
/* Repas — tuiles-icônes (pictos universels) */
.repas-tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.repas-tile { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--stroke); cursor: pointer; -webkit-appearance: none; }
.repas-tile-ic { font-size: 26px; line-height: 1; }
.repas-tile-lbl { font-size: 10.5px; font-weight: 700; color: var(--text); text-align: center; line-height: 1.15; }
.repas-tile.active { background: var(--accent); border-color: var(--accent); }
.repas-tile.active .repas-tile-lbl { color: #fff; }
.repas-tile.other { border-style: dashed; background: var(--bg-tint); }
.repas-tile.other .repas-tile-lbl { color: var(--text-2); }
/* Feedback (Donner mon avis) */
.fb-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-cat { flex: 1; min-width: 90px; padding: 10px 8px; border-radius: 12px; border: 1.5px solid var(--stroke); background: var(--card); font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; -webkit-appearance: none; }
.fb-cat.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Stats — vue Simple : grandes cartes visuelles (mode parent Simple) */
.stat-simple-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-simple-card {
  background: var(--card); border: 1.5px solid var(--stroke); border-radius: 20px;
  padding: 18px 16px; text-align: center;
}
.stat-simple-card .ssc-emoji { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.stat-simple-card .ssc-big { font-family: Georgia, 'Times New Roman', serif; font-size: 28px; font-weight: 700; color: var(--text-1); line-height: 1.1; }
.stat-simple-card .ssc-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* Chat — sélecteur de réaction multi-emoji (ouvert au clic sur 🤍) */
.chat-react-pick { display: flex; gap: 4px; margin-top: 4px; background: var(--card); border: 1px solid var(--stroke); border-radius: 18px; padding: 4px 6px; width: fit-content; box-shadow: 0 4px 14px rgba(0,0,0,.10); }
.chat-msg.me .chat-react-pick { margin-left: auto; }
.chat-react-emoji { background: none; border: 0; font-size: 20px; line-height: 1; padding: 4px; border-radius: 50%; cursor: pointer; -webkit-appearance: none; }
.chat-react-emoji:active { transform: scale(1.2); }
/* Chat — bouton « haut de la conversation » */
.chat-to-top { position: absolute; top: 64px; right: 12px; z-index: 5; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--stroke); background: var(--card); color: var(--text-2); font-size: 15px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); opacity: .85; -webkit-appearance: none; }

/* Chat — bouton micro en enregistrement (pulse rouge) + icône note vocale dans la bulle */
.chat-mic.recording { background: #E8574A !important; color: #fff; animation: bd-rec-pulse 1s ease-in-out infinite; }
@keyframes bd-rec-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,87,74,.5); } 50% { box-shadow: 0 0 0 8px rgba(232,87,74,0); } }
.bubble-voice-ic { font-size: 16px; margin-right: 4px; vertical-align: middle; }
