/* Charte « Des mots et des idées » : jour par défaut, nuit automatique. */
:root {
  color-scheme: light;
  --brand-green: #56C732; --brand-red: #EB1B24; --brand-red-dark: #A71C10; --brand-pink: #F76083; --brand-yellow: #FDD619;
  --page: #FFF9EB; --surface: #FFFFFF; --surface-soft: #F8F1DE;
  --text: #29251F; --text-muted: #625B50; --link: #A71C10; --link-hover: #7E160D;
  --border: #D9D0BC; --field-border: #C9BEA6; --focus: #005FCC;
  --button-bg: #56C732; --button-text: #17330D; --button-hover: #45A923;
  --accent-soft: #FBE3DF; --accent-text: #7E160D;
  --ok: #2F6B12; --ok-soft: #E7F4DD; --warn: #9A4A00;
  --postit: #FFF1A8; --postit-2: #FFE5B8; --postit-text: #4A3B00;
  --wa-bubble: #DCF8C6; --wa-text: #14321A; --wa-border: #2E9150; --wa-btn-text: #17633A;
  --radius: 14px;
  --display: Inter, "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", Inter, Arial, sans-serif;
  --data: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #252B33; --surface: #303842; --surface-soft: #39434E;
  --text: #FFF9EB; --text-muted: #D4CCBD; --link: #FF9BAE; --link-hover: #FFC1CC;
  --border: #58616C; --field-border: #6B7581; --focus: #FDD619;
  --button-bg: #FDD619; --button-text: #29251F; --button-hover: #FFE36A;
  --accent-soft: #4A3A44; --accent-text: #FFC1CC;
  --ok: #9EE07F; --ok-soft: #2F4A2E; --warn: #FFB86B;
  --postit: #5A5020; --postit-2: #5C4528; --postit-text: #FFF3C4;
  --wa-bubble: #1F4A35; --wa-text: #E2F7E4; --wa-border: #4FBF7A; --wa-btn-text: #9BE6B5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #252B33; --surface: #303842; --surface-soft: #39434E;
    --text: #FFF9EB; --text-muted: #D4CCBD; --link: #FF9BAE; --link-hover: #FFC1CC;
    --border: #58616C; --field-border: #6B7581; --focus: #FDD619;
    --button-bg: #FDD619; --button-text: #29251F; --button-hover: #FFE36A;
    --accent-soft: #4A3A44; --accent-text: #FFC1CC;
    --ok: #9EE07F; --ok-soft: #2F4A2E; --warn: #FFB86B;
    --postit: #5A5020; --postit-2: #5C4528; --postit-text: #FFF3C4;
    --wa-bubble: #1F4A35; --wa-text: #E2F7E4; --wa-border: #4FBF7A; --wa-btn-text: #9BE6B5;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 16px/1.5 var(--body); padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
a { color: var(--link); text-underline-offset: .16em; }
a:hover { color: var(--link-hover); }
::selection { background: var(--brand-yellow); color: #29251F; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--text); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 8px; }
h1 { font-size: 26px; }
h2 { font-size: 20px; margin-top: 28px; }
h3 { font-size: 17px; }
.serif, .serif-big { font-family: var(--display); }
.serif-big { font-size: 28px; color: var(--link); }
p { margin: 0 0 8px; }
main { max-width: 560px; margin: 0 auto; padding: 8px 16px 24px; }
.sr-only, .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { position: sticky; top: 0; z-index: 5; background: var(--page); border-bottom: 1px solid var(--border); padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.brand { display: block; max-width: 560px; margin: 0 auto; }
.brand img { display: block; height: 32px; width: auto; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; min-height: 56px; font-size: 12px; font-weight: 700; color: var(--text-muted); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--link); }
.tabs a[aria-current="page"] .ico { background: var(--accent-soft); }
.ico { display: grid; place-items: center; width: 52px; height: 28px; border-radius: 999px; }

.flash { max-width: 560px; margin: 10px auto 0; padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 600; width: calc(100% - 32px); }

.page-head { margin: 12px 0 8px; }
.kicker { font-size: 13px; color: var(--text-muted); font-weight: 600; margin: 0 0 4px; }
.muted { color: var(--text-muted); }
.hint { color: var(--text-muted); font-size: 14px; }
.hint.ok, .ok { color: var(--ok); }
.warn { color: var(--warn) !important; }
.strong { font-weight: 700; }
.big { font-size: 22px; font-weight: 700; font-family: var(--display); color: var(--text); margin: 0; }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.count { color: var(--text-muted); font-size: 14px; white-space: nowrap; }
.footnote { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 16px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 700; text-decoration: none; }
.back svg { width: 20px; height: 20px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.card.soft { background: var(--surface-soft); border-color: transparent; }
.card h2, .card h3:first-child { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.pad { padding: 12px 0 4px; }
.empty { text-align: center; padding: 28px 16px; }

.tour { font-family: var(--display); font-size: 13px; font-weight: 700; color: var(--link); text-transform: none; margin: 20px 0 2px; }
.books { list-style: none; margin: 0; padding: 0; }
.book { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.books.compact .book:first-child { border-top: 0; }
.book-link { flex-shrink: 0; text-decoration: none; }
.book-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.book-title { font-weight: 700; color: var(--text); text-decoration: none; font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
a.book-title:hover { color: var(--link); }
.book-sub { font-size: 13px; color: var(--text-muted); }
.book-act { flex-shrink: 0; }
.postit-hint { font-size: 13px; color: var(--postit-text); background: var(--postit); border-radius: 6px; padding: 1px 8px; align-self: flex-start; margin-top: 4px; text-decoration: none; font-weight: 700; }

.cover { display: grid; place-items: center; border-radius: 4px; font-family: var(--display); font-weight: 600; overflow: hidden; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-s { width: 34px; height: 48px; font-size: 12px; }
.cover-m { width: 42px; height: 60px; font-size: 14px; }
.cover-l { width: 104px; height: 148px; font-size: 30px; border-radius: 6px; }

.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; }
.pill-muted { background: var(--surface-soft); color: var(--text-muted); }

.check label { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; accent-color: var(--brand-green); margin: 0; flex-shrink: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--field-border); background: var(--surface); color: var(--text); font: 700 15px var(--display); text-decoration: none; cursor: pointer; }
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--button-bg); border-color: var(--button-bg); color: var(--button-text); }
.btn.primary:hover { background: var(--button-hover); border-color: var(--button-hover); }
.btn.wa { border-color: var(--wa-border); color: var(--wa-btn-text); }
.btn.danger { border-color: var(--brand-red); color: var(--link); }
.btn.small { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn.block { display: flex; width: 100%; margin-top: 10px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; padding: 0 10px; }
.link-btn { background: none; border: 0; color: var(--text-muted); font: 600 13px var(--body); text-decoration: underline; cursor: pointer; padding: 4px 0; }
.small-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; text-decoration: none; min-height: 44px; }
.small-link svg { width: 18px; height: 18px; }

.sticky-actions { margin-top: 20px; }
.summary { text-align: center; color: var(--text-muted); font-weight: 600; }
.voice-status { text-align: center; font-weight: 700; color: var(--link); margin: 8px 0 0; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; color: var(--text-muted); }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  font: 16px var(--body); color: var(--text); background: var(--surface); border: 1.5px solid var(--field-border); border-radius: 12px; padding: 10px 12px; min-height: 48px; width: 100%;
}
textarea { resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch { flex-direction: row; align-items: center; justify-content: space-between; min-height: 44px; color: var(--text); font-size: 16px; }
.seg { display: flex; gap: 8px; border: 0; padding: 0; margin: 0; }
.seg label { flex: 1; flex-direction: row; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1.5px solid var(--field-border); border-radius: 12px; color: var(--text); cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--brand-green); background: var(--accent-soft); color: var(--accent-text); }
.with-mic { display: flex; gap: 8px; }
.mic { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--field-border); background: var(--surface); color: var(--link); display: grid; place-items: center; cursor: pointer; }
.mic.listening, .btn.listening { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.photo-drop { align-items: center; justify-content: center; text-align: center; min-height: 150px; border: 2px dashed var(--field-border); border-radius: var(--radius); background: var(--surface-soft); color: var(--link); cursor: pointer; padding: 12px; }
.photo-drop span { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.photo-drop img { max-height: 220px; border-radius: 8px; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-size: 13px !important; }

.changes { margin: 0; padding-left: 18px; }
.changes li { margin: 4px 0; }

.wa-bubble { background: var(--wa-bubble); color: var(--wa-text); border-radius: 14px 14px 4px 14px; padding: 12px 14px; margin: 16px 0 6px auto; max-width: 92%; font-size: 15px; line-height: 1.5; }

.profile { display: flex; align-items: center; gap: 14px; margin: 14px 0; }
.profile h1 { margin: 0; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-red-dark); color: #FFF9EB; display: grid; place-items: center; font: 600 24px var(--display); flex-shrink: 0; }
.avatar.small { width: 36px; height: 36px; font-size: 16px; }
.messages, .plain { list-style: none; margin: 0; padding: 0; }
.messages a, .plain a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; }
.messages .muted { font-weight: 400; font-size: 13px; white-space: nowrap; }
details.out { margin-top: 12px; }
details.out summary { cursor: pointer; color: var(--text-muted); font-weight: 700; min-height: 44px; display: flex; align-items: center; }

.postit { background: var(--postit); color: var(--postit-text); padding: 12px 14px; border-radius: 3px; margin: 12px 4px; font-size: 15px; line-height: 1.45; transform: rotate(-.8deg); box-shadow: 0 2px 6px rgba(80,60,0,.10); }
.postit:nth-of-type(even) { transform: rotate(.7deg); background: var(--postit-2); }
.postit-who { display: block; font-size: 12px; font-weight: 800; margin-bottom: 2px; }
.postit .inline { display: inline; margin-left: 8px; }

.book-hero { display: flex; gap: 16px; align-items: flex-end; margin: 8px 0 4px; }
.book-hero h1 { margin: 0 0 4px; }

.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 18px; bottom: -2px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--text-muted); background: var(--page); flex-shrink: 0; margin-top: 4px; position: relative; z-index: 1; }
.timeline li.current .dot { background: var(--brand-green); border-color: var(--brand-green); }
.timeline li.current .strong { color: var(--link); }
.timeline p { margin: 0; }

.laws ol { margin: 8px 0 0; padding-left: 24px; }
.laws li { margin: 6px 0; }
.laws li::marker { font-family: var(--data); font-weight: 600; color: var(--link); }
.laws h2 { color: var(--link); }

.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { border-top: 1px solid var(--border); }
.agenda summary { display: flex; align-items: center; gap: 14px; padding: 10px 0; cursor: pointer; list-style: none; min-height: 56px; }
.agenda summary::-webkit-details-marker { display: none; }
.date-badge { width: 50px; text-align: center; display: flex; flex-direction: column; line-height: 1.1; }
.date-badge b { font: 600 22px var(--data); color: var(--link); }
.date-badge small { color: var(--text-muted); font-weight: 700; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inline-form summary { list-style: none; }
.inline-form summary::-webkit-details-marker { display: none; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface-soft); border-radius: 12px; padding: 12px; }
.stat small { display: block; color: var(--text-muted); font-weight: 700; }
.stat b { font: 600 26px var(--data); color: var(--text); }
.stat.ok { background: var(--ok-soft); }
.stat.ok b { color: var(--ok); }

.members { list-style: none; margin: 0; padding: 0; }
.members li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.member-actions { display: flex; gap: 6px; }
.member-actions .btn { width: 44px; padding: 0; }

.hero { text-align: center; padding: 24px 4px; }
.hero-logo { width: 100%; max-width: 360px; height: auto; margin: 8px auto 16px; display: block; }
.lead { font: 700 20px var(--display); color: var(--link); }
.hero form { text-align: left; }

@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grow .pill { align-self: flex-start; }
.credit { text-align: center; font-size: 11px; color: var(--text-muted); padding: 4px 16px 16px; }
.center { text-align: center; }
.photo-drop.online img { max-height: 200px; }
.avatar-img { border-radius: 50%; object-fit: cover; background: var(--surface); border: 1px solid var(--border); flex-shrink: 0; }
.avatar-s { width: 40px; height: 40px; }
.avatar-l { width: 64px; height: 64px; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.inline-check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.members li.inactive { opacity: .6; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.switch.compact { gap: 10px; }
.hint.forgot { margin-top: 12px; }
.next-meeting { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); }
.hero.left { text-align: left; padding: 12px 0 0; }
.hero-picto { margin: 8px 0 12px; }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin: 10px 0; }
.links li { padding: 8px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.subnav { position: sticky; top: calc(53px + env(safe-area-inset-top)); z-index: 4; display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px; margin: 0 -16px 8px; background: var(--page); border-bottom: 1px solid var(--border); scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field-border); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.subnav a:hover { border-color: var(--link); color: var(--link); }
[id] { scroll-margin-top: 120px; }
.subnav a.subnav-cta { background: var(--button-bg); border-color: var(--button-bg); color: var(--button-text); }
.subnav a.subnav-cta:hover { background: var(--button-hover); color: var(--button-text); }
.stars { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; white-space: nowrap; }
.stars-bg { position: relative; display: inline-block; color: var(--border); letter-spacing: 1px; line-height: 1; }
.stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--brand-yellow); white-space: nowrap; }
.stars-num { font-family: var(--data); font-weight: 600; color: var(--text); }
.hero-stars { margin: 6px 0 0; }
.crit-list { list-style: none; margin: 0; padding: 0; }
.crit-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.inoubliable-badge { display: inline-block; margin: 12px 0 4px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 14px; }
.avis { margin: 12px 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.avis p { margin: 0 0 6px; }
.avis footer { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.crit-input { padding-top: 6px; border-top: 1px solid var(--border); }
.crit-input .hint { margin: 0; }
.star-input { border: 0; padding: 0; margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.star-input legend { float: left; font-weight: 700; color: var(--text); padding: 0; }
.star-row { display: inline-flex; flex-direction: row-reverse; }
.star-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-row label { font-size: 30px; line-height: 1; color: var(--border); cursor: pointer; padding: 6px 3px; min-height: 44px; display: inline-flex; align-items: center; flex-direction: row; }
.star-row input:checked ~ label, .star-row label:hover, .star-row label:hover ~ label { color: var(--brand-yellow); }
.star-row input:focus-visible + label { outline: 3px solid var(--focus); border-radius: 6px; }
.inline-check.big { font-size: 16px; min-height: 44px; }
.row-links { display: flex; gap: 12px; }
.head-with-action { align-items: center; }
.head-with-action h1 { margin: 0; }
.btn.cta { background: var(--button-bg); border-color: var(--button-bg); color: var(--button-text); flex-shrink: 0; }
.btn.cta:hover { background: var(--button-hover); border-color: var(--button-hover); }
.laws ol { padding-left: 38px; }
.take-tools h2 { margin-top: 0; }
.take-tools .btn.small { margin-top: 8px; }
.take-panel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.take-list li { padding: 6px 0; }
.take-list .inline-check { align-items: flex-start; font-weight: 600; }
.many-row { padding: 12px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.many-main { display: flex; gap: 12px; align-items: flex-start; }
.many-main .stack { flex: 1; gap: 8px; }
.many-cover { width: 54px; height: 78px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.many-link { margin-bottom: 4px; }
label.btn { flex-direction: row; color: var(--text); font-size: 15px; }
label.btn.primary { color: var(--button-text); }
