/* ============================================================ Polices embarquées (licence OFL, voir fonts/LICENCES.txt) */
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-latin-wght-normal.woff2') format('woff2'); font-weight: 300 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 300 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Caveat'; src: url('/fonts/caveat-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('/fonts/caveat-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('/fonts/caveat-latin-ext-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1E9F, U+A720-A7FF; }
@font-face { font-family: 'Mulish'; src: url('/fonts/mulish-latin-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Mulish'; src: url('/fonts/mulish-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cabin Sketch'; src: url('/fonts/cabin-sketch-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cabin Sketch'; src: url('/fonts/cabin-sketch-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

/* ============================================================ Jetons des deux habillages */
.theme-cafe {
  --font: 'Mulish', 'Segoe UI', system-ui, sans-serif; --display: 'Cabin Sketch', 'Comic Sans MS', cursive;
  --bg: #DCE5D6; --surface: #FFFFFF; --ink: #3A2418; --muted: #5E4030; --line: #E6E1D8; --out: #626A5C; --out-bg: #EEF2EB;
  --primary: #B04E18; --primary-ink: #FFFFFF; --alert: #F2C14E; --alert-ink: #3A2418; --good: #2F8072; --good-ink: #FFFFFF; --danger: #C23B2E;
  --slate: #2F3A33; --chalk: #F2F0E8; --chalk2: #C9D1C6; --wood: #7A4A2C; --wood-dark: #4A2C1D; --sofa: #D9661F; --sofa-dark: #C9581C; --tuft: #A9461A; --cream: #FBE7D6; --honey: #F2C14E;
  --yes: #2F8072; --yes-ink: #FFFFFF; --maybe: #F2C14E; --maybe-ink: #3A2418; --no: #C23B2E; --no-ink: #FFFFFF;
  --btn-radius: 23px; --field-bg: #FBF8F2; --field-border: #D8D2C6; --answer-border: #3A2418;
}
.theme-fridge {
  --font: 'Figtree', 'Segoe UI', system-ui, sans-serif; --display: 'Caveat', 'Comic Sans MS', cursive;
  --bg: #E1E9E5; --surface: #FFFFFF; --ink: #1E3832; --muted: #52665F; --line: #E4ECE8; --out: #667873; --out-bg: #F6F9F7;
  --primary: #1E3832; --primary-ink: #FFFFFF; --alert: #FFE36B; --alert-ink: #1E3832; --good: #A9E29A; --good-ink: #1E3832; --danger: #B8402D;
  --frame: #C5D3CD; --red: #B8402D; --blue: #2E6BC6;
  --yes: #A9E29A; --yes-ink: #1E3832; --maybe: #FFE36B; --maybe-ink: #1E3832; --no: #FFC2B5; --no-ink: #1E3832;
  --btn-radius: 12px; --field-bg: #E1E9E5; --field-border: #C5D3CD; --answer-border: #C5D3CD;
}

/* ============================================================ Base */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.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: 13.5px; }
.strong { font-weight: 800; }
.hand { font-family: var(--display); font-weight: 700; }
.chalk { font-family: 'Cabin Sketch', cursive; color: var(--chalk); }
.chalk-dark { font-family: var(--display); font-weight: 700; font-size: 26px; margin: 0 0 8px; }
.empty { color: var(--muted); margin: 6px 0 12px; }
[hidden] { display: none !important; }

/* Boutons */
.btn {
  height: 46px; padding: 0 18px; border: 2px solid transparent; border-radius: var(--btn-radius);
  background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 800; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.ghost { border-color: var(--ink); background: transparent; }
.btn.soft { background: var(--surface); }
.btn.alert { background: var(--alert); color: var(--alert-ink); }
.btn.decide { background: var(--good); color: var(--good-ink); }
.btn.danger { background: transparent; color: var(--danger); padding: 0 8px; }
.btn.danger:hover { text-decoration: underline; }
.btn.dashed { border: 2px dashed var(--ink); background: transparent; align-self: flex-start; margin-top: 10px; height: 44px; font-size: 14px; }
.btn.icon { width: 46px; padding: 0; border-radius: 50%; }
.btn.icon.small { width: 40px; height: 40px; }
.btn.wide { width: 100%; height: 50px; font-size: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 800; text-decoration: underline; cursor: pointer; min-height: 32px; }
.link.small { font-size: 13.5px; }
.danger-link { color: var(--danger); font-size: 13px; }
.short { display: none; }
.tag { align-self: flex-start; padding: 2px 9px; border-radius: 10px; background: var(--alert); color: var(--alert-ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.tag.good { background: var(--good); color: var(--good-ink); }
.tag.quiet { background: var(--line); color: var(--muted); }

/* ============================================================ Décor café-librairie */
.shelf { background: var(--wood-dark); padding-top: 8px; }
.shelf-books { display: flex; align-items: flex-end; gap: 2px; height: 52px; padding: 0 24px; overflow: hidden; }
.book { flex: none; border-radius: 2px 2px 0 0; background: var(--c); border-top: 5px solid var(--band); }
.book.tilt { transform: rotate(-8deg); transform-origin: bottom left; margin-left: 6px; }
.plank { height: 9px; background: var(--wood); box-shadow: 0 3px 0 #5E3720; }
.slate { background: var(--slate); color: var(--chalk); }
.slate.framed { border: 8px solid var(--wood); border-radius: 6px; }

.sofa-wrap { position: relative; padding-top: 58px; }
.wall-shelf { position: absolute; left: 6px; right: 6px; top: 0; height: 150px; background: #5E3720; border: 6px solid var(--wood); border-bottom: 0; border-radius: 4px 4px 0 0; padding: 0 6px; }
.wall-shelf .shelf-books { height: 58px; padding: 0; }
.wall-shelf .plank { margin: 0 -6px; height: 7px; box-shadow: none; }
.sofa { position: relative; }
.sofa-back { height: 66px; margin: 0 26px; background: var(--sofa); border-radius: 30px 30px 8px 8px; box-shadow: inset 0 -10px 0 var(--sofa-dark); display: flex; justify-content: space-around; align-items: center; padding: 0 20px 10px; }
.tuft { width: 9px; height: 9px; border-radius: 50%; background: var(--tuft); }
.sofa-body { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; margin-top: -30px; }
.sofa-arm { background: var(--sofa-dark); border-radius: 20px 20px 6px 10px; box-shadow: inset 0 14px 0 var(--sofa); }
.sofa-arm:last-child { border-radius: 20px 20px 10px 6px; }
.sofa-seat { background: var(--sofa); padding: 12px 6px 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sofa-cushions { height: 30px; margin: 4px -6px 0; background: var(--sofa-dark); border-radius: 10px 10px 4px 4px; display: grid; grid-template-columns: 1fr 1fr; box-shadow: inset 0 3px 0 #E07A35; }
.sofa-cushions span:first-child { border-right: 2px solid var(--tuft); }
.sofa-legs { display: flex; justify-content: space-between; padding: 0 22px; }
.sofa-legs span { width: 12px; height: 14px; background: var(--ink); border-radius: 0 0 3px 3px; }

/* ============================================================ Décor frigo */
.pin { position: absolute; top: -9px; left: 50%; margin-left: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--pin); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.15); }
.postit { position: relative; background: var(--c); color: #1E3832; border-radius: 2px; box-shadow: 0 10px 14px -10px rgba(30, 56, 50, 0.55); }
.notepad { position: relative; background: #FFFFFF; border-radius: 4px; box-shadow: 0 2px 0 var(--frame); }
.notepad::before { content: ''; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: #F2A69A; }
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--c); color: #1E3832; font-weight: 800; font-size: 13px; }

/* ============================================================ En-tête */
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 20px; max-width: 1280px; margin: 0 auto; padding: 24px 40px 18px; }
.brand { display: flex; flex-direction: column; justify-self: start; }
.theme-cafe .brand { padding: 10px 24px 12px; }
.kicker { font-size: 15px; font-weight: 700; color: var(--muted); }
.theme-cafe .brand .kicker { font-size: 18px; color: var(--honey); font-weight: 400; }
.month { margin: 0; line-height: 1; }
.theme-cafe .month { font-weight: 700; font-size: clamp(38px, 5vw, 58px); }
.theme-fridge .month { font-size: clamp(60px, 8vw, 96px); line-height: 0.85; }
.month .year { font-family: var(--font); font-size: 0.34em; font-weight: 700; opacity: 0.85; }
.theme-cafe .month .year { font-family: inherit; font-size: 1em; opacity: 1; }
.nav { display: flex; gap: 8px; align-items: center; }
.theme-fridge .nav .btn { box-shadow: 0 2px 0 var(--frame); }
.actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.theme-fridge .btn.alert { border-radius: 4px; transform: rotate(-1deg); box-shadow: 0 6px 10px -6px rgba(30, 56, 50, 0.45); }
.me-btn { margin-left: auto; height: 46px; padding: 0 14px 0 8px; border: 0; border-radius: 23px; background: var(--surface); color: var(--ink); font-weight: 800; display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* ============================================================ Grille du mois */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 30px; align-items: start; max-width: 1280px; margin: 0 auto; padding: 0 40px 48px; }
.board { display: flex; flex-direction: column; gap: 6px; }
.theme-fridge .board { background: #FFFFFF; border: 8px solid var(--frame); border-radius: 20px; padding: 12px 14px 16px; gap: 4px; }
.wkbar, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.theme-fridge .wkbar, .theme-fridge .grid { gap: 4px; }
.theme-cafe .wkbar { background: var(--slate); border-radius: 8px; padding: 6px; }
.wkbar > span { padding: 0 6px; }
.theme-cafe .wkbar > span { font-family: 'Cabin Sketch', cursive; font-weight: 700; font-size: 17px; color: var(--chalk); }
.theme-fridge .wkbar > span { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--muted); }
.wk-mini { display: none; }
.cell { min-height: 108px; border-radius: 10px; padding: 7px 8px 9px; display: flex; flex-direction: column; gap: 5px; min-width: 0; cursor: pointer; }
.theme-cafe .cell { background: var(--surface); }
.theme-fridge .cell { border: 2px solid transparent; padding: 4px 6px 8px; }
.cell.out { background: var(--out-bg); }
.cell.out .num { color: var(--out); }
.theme-cafe .cell.selected { background: var(--cream); box-shadow: inset 0 0 0 3px var(--sofa); }
.theme-fridge .cell.selected { background: #EEF4F1; border: 2px dashed var(--ink); }
.daynum { align-self: flex-start; display: flex; align-items: center; gap: 5px; min-height: 30px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.theme-cafe .num { font-weight: 800; font-size: 16px; }
.today-label { font-size: 11.5px; font-weight: 800; }
.theme-fridge .num { min-width: 32px; height: 32px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; border: 2.5px solid transparent; border-radius: 50% 44% 52% 46%; }
.theme-fridge .cell.today .num { border-color: var(--red); }
.chips { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.chip { display: block; width: 100%; border: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; line-height: 1.25; cursor: pointer; color: var(--ink); }
.chip b { font-weight: 800; margin-right: 0.3em; }
.theme-cafe .chip { position: relative; background: none; padding: 0 0 0 10px; }
.theme-cafe .chip::before { content: ''; position: absolute; left: 0; top: 1px; bottom: 1px; width: 4px; border-radius: 2px; background: var(--c); }
.theme-fridge .chip { background: var(--c); border-radius: 3px; padding: 4px 7px; font-weight: 600; color: #1E3832; }
.chip.cont { opacity: 0.8; }
.more { font-size: 12px; font-weight: 800; color: var(--muted); }
.dots { display: none; }

/* ============================================================ Colonne de droite */
.side { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.side h2.hand { font-size: 34px; margin: 0 0 8px; line-height: 1; }
.polls-panel .notes { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 10px; }
.poll-card { text-align: left; border: 0; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font: inherit; }
.theme-cafe .poll-card { border-radius: 12px; background: var(--cream); color: var(--ink); padding: 11px 12px; box-shadow: 0 3px 0 var(--tuft); }
.poll-title { font-weight: 800; font-size: 16px; }
.poll-meta { font-size: 13px; color: var(--muted); }
.theme-fridge .poll-card.postit { flex: 1 1 140px; min-height: 150px; padding: 22px 14px 12px; transform: rotate(var(--rot)); gap: 6px; }
.theme-fridge .poll-card .poll-title { font-family: var(--display); font-size: 28px; line-height: 1; }
.theme-fridge .poll-card .poll-meta { color: #1E3832; }
.theme-fridge .poll-card .tag { margin-top: auto; background: none; color: #8E2C1F; padding: 0; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; font-size: 13.5px; }

.day-panel { padding: 14px 16px 12px; display: flex; flex-direction: column; }
.theme-fridge .day-panel { padding-left: 32px; }
.day-panel h2 { margin: 0 0 6px; line-height: 1.1; }
.theme-cafe .day-panel h2 { font-size: 24px; color: var(--honey); font-weight: 700; }
.theme-fridge .day-panel h2 { font-size: 32px; }
.day-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; width: 100%; border: 0; background: transparent; color: inherit; padding: 9px 0; text-align: left; cursor: pointer; }
.theme-cafe .day-row { border-top: 1px dashed #5E6B62; }
.theme-fridge .day-row { border-bottom: 1px solid #CFE0EA; align-items: center; }
.day-time { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.theme-cafe .day-time { font-family: 'Cabin Sketch', cursive; font-weight: 700; font-size: 18px; }
.day-main { display: flex; flex-direction: column; min-width: 0; }
.day-title { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.theme-cafe .day-title { font-family: 'Cabin Sketch', cursive; font-weight: 400; font-size: 19px; line-height: 1.15; }
.day-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.theme-cafe .day-meta { color: var(--chalk2); font-size: 12.5px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--c); flex: none; }
.com-badge { display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 800; color: var(--muted); }
.theme-cafe .com-badge { color: var(--honey); }
.theme-cafe .day-panel .empty { color: var(--chalk2); }
.theme-cafe .day-panel .btn.dashed { border-color: var(--chalk2); color: var(--chalk); }

.upcoming h2 { margin: 0 0 6px; }
.up-row { display: grid; grid-template-columns: 8px 92px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; border: 0; border-top: 1px solid rgba(58, 36, 24, 0.14); background: transparent; color: inherit; padding: 8px 0; text-align: left; cursor: pointer; }
.up-mark { width: 8px; height: 24px; border-radius: 2px 2px 0 0; background: var(--c); }
.theme-fridge .up-mark { width: 10px; height: 10px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(30, 56, 50, 0.25); }
.up-date { font-size: 13px; font-weight: 800; color: var(--muted); }
.up-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================ Fenêtres */
dialog { width: min(34rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: 18px; background: var(--bg); color: var(--ink); box-shadow: 0 24px 70px rgba(10, 15, 30, 0.35); }
dialog::backdrop { background: rgba(14, 19, 30, 0.5); }
.dlg-inner { padding: 14px 18px 20px; }
.dlg-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.bar-spacer { width: 46px; }
.dlg-kicker { font-size: 14px; font-weight: 700; color: var(--muted); }
.view, .form { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border-radius: 16px; padding: 14px 16px; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.spacer { flex: 1; }

.ev-slate { border-radius: 14px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.ev-slate.compact { padding: 12px 14px; }
.ev-kicker { margin: 0; font-size: 16px; color: var(--honey); }
.ev-title { margin: 0; overflow-wrap: anywhere; }
.theme-cafe .ev-title { font-weight: 700; font-size: 30px; line-height: 1.08; }
.ev-sub { margin: 0; font-size: 13px; color: var(--chalk2); }
.ev-status { margin: 2px 0 0; font-weight: 800; color: var(--honey); }
.ev-note { padding: 28px 18px 18px; transform: rotate(-1deg); display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ev-note.compact { padding: 22px 14px 12px; }
.theme-fridge .ev-title { font-size: 42px; line-height: 0.95; }
.theme-fridge .ev-note.compact .ev-title { font-size: 30px; }
.ev-when { margin: 0; font-weight: 800; font-size: 16px; }
.ev-where { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.ev-desc { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ev-by { margin: 2px 0 0; font-size: 13px; }
.ev-card { display: flex; flex-direction: column; gap: 4px; }
.ev-card p { margin: 0; }

.rsvp, .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg { gap: 6px; }
.btn.answer { height: 48px; padding: 0 6px; border: 2px solid var(--answer-border); background: var(--surface); color: var(--ink); border-radius: 24px; font-size: 14px; line-height: 1.1; white-space: normal; }
.seg .btn.answer { height: 44px; }
.btn.answer.on { border-color: var(--ink); }
.btn.answer.yes.on { background: var(--yes); color: var(--yes-ink); }
.btn.answer.maybe.on { background: var(--maybe); color: var(--maybe-ink); }
.btn.answer.no.on { background: var(--no); color: var(--no-ink); }
.theme-cafe .btn.answer.yes.on, .theme-cafe .btn.answer.no.on { border-color: transparent; }

.who { display: flex; flex-direction: column; gap: 12px; }
.who-group { display: flex; flex-direction: column; gap: 8px; }
.who-group + .who-group { border-top: 1px solid var(--line); padding-top: 12px; }
.who-h { font-size: 13px; font-weight: 800; color: var(--muted); }
.people { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.person { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.theme-fridge .person { background: #F3F7F5; border-radius: 16px; padding: 3px 10px 3px 3px; font-size: 14px; }
.faded { opacity: 0.6; }

.com-cta { display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; gap: 10px; align-items: center; width: 100%; text-align: left; border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.theme-cafe .com-cta { border: 0; background: var(--slate); color: var(--chalk); }
.theme-fridge .com-cta { border: 2px solid var(--ink); background: var(--surface); color: var(--ink); }
.com-cta.empty-cta { border-style: dashed; }
.theme-cafe .com-cta.empty-cta { border: 2px dashed var(--chalk2); }
.theme-fridge .com-cta.empty-cta { background: transparent; }
.com-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.theme-cafe .com-ico { background: var(--honey); color: var(--ink); }
.theme-fridge .com-ico { background: #A9E29A; }
.com-txt { display: flex; flex-direction: column; min-width: 0; }
.com-txt b { font-size: 16px; }
.com-txt span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-cafe .com-txt span { color: var(--chalk2); }
.theme-fridge .com-txt span { color: var(--muted); }

/* Commentaires */
.com-h { margin: 4px 0 0; }
.theme-cafe .com-h { font-size: 18px; font-weight: 800; }
.theme-fridge .com-h { font-size: 32px; line-height: 1; }
.com-list { display: flex; flex-direction: column; gap: 10px; }
.comment { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; }
.com-avatar { padding-top: 4px; display: grid; place-items: center; }
.bubble { background: var(--surface); border-radius: 4px 14px 14px 14px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.com-meta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 13px; }
.com-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .link { align-self: flex-start; }
.com-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 16px; text-align: center; }
.com-empty p { margin: 0; max-width: 22rem; }
.empty-slate { border: 6px solid var(--wood); border-radius: 6px; padding: 8px 16px; font-weight: 700; font-size: 24px; }
.empty-note { width: 180px; min-height: 140px; display: grid; place-items: center; padding: 26px 14px 14px; transform: rotate(-3deg); font-size: 30px; line-height: 1; text-align: center; }
.composer { position: sticky; bottom: -20px; display: flex; gap: 8px; align-items: flex-end; padding: 10px 0 4px; background: var(--bg); }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; border-radius: 23px; padding: 11px 16px; }
.btn.send { background: var(--primary); color: var(--primary-ink); flex: none; }

/* Sondages */
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; flex-direction: column; gap: 6px; border: 3px solid transparent; }
.theme-cafe .opt.best { border-color: var(--sofa); }
.theme-fridge .opt.best { border-color: #3A8A4F; }
.opt.past { opacity: 0.6; }
.opt-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.voters { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.opt-names { margin: 0; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; }
.btn.choose { align-self: flex-start; margin-top: 4px; height: 42px; }

/* Formulaires */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 800; margin: 4px 0 0; }
.hint { font-size: 13px; color: var(--muted); margin: 0; font-weight: 500; }
.form-hint { margin-top: -6px; }
input, textarea { width: 100%; height: 48px; border: 2px solid var(--field-border); border-radius: 12px; padding: 0 14px; background: var(--field-bg); color: var(--ink); font-size: 16px; }
textarea { height: auto; padding: 10px 14px; resize: vertical; }
input:focus, textarea:focus { outline: 3px solid var(--ink); outline-offset: 0; border-color: transparent; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { min-height: 1.2em; margin: 0; color: var(--danger); font-weight: 800; }
.form-error:empty { min-height: 0; }
.opt-inputs { display: flex; flex-direction: column; gap: 8px; }
.opt-input { display: grid; grid-template-columns: minmax(0, 1fr) 8rem 2.6rem; gap: 8px; align-items: center; }
.form-h { margin: 0; font-size: 26px; }
.theme-cafe .form-h { font-weight: 800; }
.theme-fridge .form-h { font-size: 40px; line-height: 1; }

/* Compte */
.account section { display: flex; flex-direction: column; gap: 8px; }
.account h3 { margin: 6px 0 0; font-size: 16px; }
.account-head { display: flex; align-items: center; gap: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch-btn, .swatches .swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme-cafe .swatches .swatch { background: var(--surface); }
.swatches .swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-size: 13.5px; height: 46px; }

/* ============================================================ Connexion */
.auth-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.auth-hero { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.auth-side { flex: 1 1 360px; max-width: 440px; }
.auth-hero .slate { padding: 18px 28px 22px; display: flex; flex-direction: column; gap: 6px; }
.auth-hero .kicker { margin: 0; font-size: 15px; }
.theme-cafe .auth-hero .kicker { font-size: 22px; color: var(--honey); }
.hero-title { margin: 0; line-height: 1.02; }
.theme-cafe .hero-title { font-weight: 700; font-size: clamp(40px, 5vw, 58px); }
.theme-fridge .hero-title { font-size: clamp(56px, 7vw, 84px); line-height: 0.9; }
.hero-tag { margin: 0; color: var(--chalk2); }
.hero-sofa { width: min(375px, 100%); }
.deco-notes { position: relative; width: 100%; height: 330px; }
.deco-note { position: absolute; display: grid; place-items: center; width: 150px; height: 128px; border-radius: 2px; background: var(--c); transform: rotate(var(--rot)); box-shadow: 0 10px 14px -10px rgba(30, 56, 50, 0.5); font-family: var(--display); font-weight: 700; font-size: 26px; color: #1E3832; }
.deco-note:nth-child(1) { left: 10px; top: 30px; }
.deco-note:nth-child(2) { left: 190px; top: 0; }
.deco-note:nth-child(3) { left: 70px; top: 180px; }
.deco-note:nth-child(4) { left: 260px; top: 160px; }
.deco-note:nth-child(5) { left: 370px; top: 50px; width: 120px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; padding: 28px 30px; border-radius: 18px; }
.auth-form.notepad { border-radius: 6px; padding-left: 46px; }
.auth-head { display: flex; flex-direction: column; gap: 4px; }
.auth-head p { margin: 0; }
.auth-title { margin: 0; }
.theme-cafe .auth-title { font-size: 28px; font-weight: 800; }
.theme-fridge .auth-title { font-size: 48px; line-height: 0.95; }
.auth-switch { margin: 0; font-size: 14px; }

/* ============================================================ Toast */
#toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0)); transform: translate(-50%, 1rem); max-width: calc(100vw - 2rem); padding: 0.7rem 1.1rem; border-radius: 999px; background: var(--ink); color: var(--surface); font-weight: 700; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 10; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* ============================================================ Écrans moyens et mobiles */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 18rem; gap: 22px; }
}
@media (max-width: 760px) {
  .top { grid-template-columns: 1fr; padding: 12px 12px 10px; gap: 10px; }
  .theme-cafe .brand { padding: 8px 16px 10px; }
  .theme-cafe .month { font-size: 38px; }
  .theme-fridge .month { font-size: 56px; }
  .nav { justify-self: start; }
  .long, .me-name { display: none; }
  .short { display: inline; }
  .actions { gap: 8px; }
  .actions .btn.alert, .actions .btn.decide { flex-basis: 100%; }
  .actions .btn.ghost, .actions .btn.primary { flex: 1; padding: 0 10px; }
  .me-btn { margin-left: 0; padding: 0 8px; }
  .layout { grid-template-columns: 1fr; padding: 0 12px 32px; gap: 20px; }
  .theme-fridge .board { border-width: 6px; border-radius: 16px; padding: 6px; }
  .wk-long { display: none; }
  .wk-mini { display: inline; }
  .wkbar > span { text-align: center; padding: 0; }
  .theme-cafe .wkbar { padding: 4px 0; border-radius: 8px 8px 0 0; }
  .grid { gap: 2px; }
  .cell { min-height: 50px; padding: 2px; align-items: center; gap: 2px; border-radius: 8px; }
  .daynum { align-self: center; min-height: 26px; }
  .chips, .more, .today-label, .daynum svg { display: none; }
  .dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
  .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
  .theme-fridge .dots i { border-radius: 1px; box-shadow: 0 0 0 0.5px rgba(30, 56, 50, 0.35); width: 7px; height: 7px; }
  .theme-cafe .cell.today .num { background: var(--honey); border-radius: 12px; padding: 1px 6px; }
  .theme-fridge .num { min-width: 28px; height: 28px; font-size: 21px; }
  dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .dlg-inner { padding: 12px 14px calc(18px + env(safe-area-inset-bottom, 0)); }
  .auth { padding: 18px 16px; gap: 18px; }
  .auth-hero { gap: 12px; align-items: stretch; }
  .hero-sofa, .deco-notes, .hero-tag { display: none; }
  .theme-cafe .hero-title { font-size: 34px; }
  .theme-fridge .hero-title { font-size: 48px; }
  .auth-form { padding: 20px 18px; }
  .auth-form.notepad { padding-left: 38px; }
  .theme-fridge .auth-title { font-size: 40px; }
  .shelf-books { height: 30px; padding: 0 10px; }
}
@media (max-width: 420px) {
  .two { grid-template-columns: 1fr; }
  .opt-input { grid-template-columns: minmax(0, 1fr) 6.8rem 2.6rem; gap: 6px; }
}
