/* ==========================================================================
   Outdyssey v2 — styles
   Clair (aurore) et sombre (nuit) ne changent que des variables. Police : DM Sans.
   ========================================================================== */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url(/fonts/dm-sans-latin-wght-normal.woff2) format("woff2-variations"), url(/fonts/dm-sans-latin-wght-normal.woff2) format("woff2");
  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: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url(/fonts/dm-sans-latin-ext-wght-normal.woff2) format("woff2-variations"), url(/fonts/dm-sans-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Thèmes ---------- */
:root, [data-theme="aurore"], [data-theme="sorbet"] {
  color-scheme: light;
  --bg: #fbfbfe; --surface: #ffffff; --surface2: #f2f3fb; --text: #120d26; --muted: #747688; --border: #e8e9f2;
  --primary: #5669ff; --primary-2: #4a43ec; --primary-ink: #ffffff; --primary-soft: rgba(86,105,255,.11);
  --accent: #00d8e0; --accent-soft: #d6fdff;
  --ok: #1fbf7e; --warn: #f59762; --bad: #f0635a;
  --shadow: 0 8px 30px rgba(80,85,136,.08); --shadow-lg: 0 16px 40px rgba(80,85,136,.14);
  --radius: 18px; --radius-sm: 12px; --border-w: 1px;
  --hero-grad: linear-gradient(160deg, #5669ff 0%, #4a43ec 100%);
  --illu-bg: #eef3ff;
}
[data-theme="nuit"], [data-theme="ardoise"] {
  color-scheme: dark;
  --bg: #0e0f1d; --surface: #181a2e; --surface2: #22243c; --text: #f2f2ff; --muted: #9ea0bb; --border: #2b2d48;
  --primary: #7180ff; --primary-2: #5a52f0; --primary-ink: #ffffff; --primary-soft: rgba(113,128,255,.18);
  --accent: #34e6ee; --accent-soft: #10343a;
  --ok: #34d399; --warn: #fbad7c; --bad: #ff7b72;
  --shadow: 0 8px 26px rgba(0,0,0,.35); --shadow-lg: 0 16px 40px rgba(0,0,0,.45);
  --radius: 18px; --radius-sm: 12px; --border-w: 1px;
  --hero-grad: linear-gradient(160deg, #3c45c9 0%, #2c2a9a 100%);
  --illu-bg: #1f2340;
}

/* Couleur propre à chaque type d'activité.
   --tc       : couleur d'identité (illustrations, pictogrammes, fonds pâles) ;
   --tc-chip  : fond des pastilles (texte blanc), --tc-text : texte des étiquettes.
   Mode clair : contraste texte/fond ≥ 4,5:1 (WCAG AA ; vérifié par test/types.test.js). --tc-chip et --tc-text sont la
   même teinte, plus profonde (clarté OKLCH réduite au minimum, teinte et saturation conservées). Exceptions : Dispo,
   Bar, Resto, Sport et Shopping gardent leur couleur claire avec un texte foncé (--chip-ink), sinon ils deviendraient
   presque identiques à un autre type (Dispo et Balade, Resto et Spectacle, Bar et Café, Sport et Conférence) ou brun. */
[data-type="dispo"]      { --tc: #1fbf7e; --tc-chip: #1fbf7e; --tc-text: #007c4f; --chip-ink: #12131f; }
[data-type="bar"]        { --tc: #f58c4b; --tc-chip: #f58c4b; --tc-text: #b05200; --chip-ink: #12131f; }
[data-type="resto"]      { --tc: #f0635a; --tc-chip: #f0635a; --tc-text: #c23834; --chip-ink: #12131f; }
[data-type="cafe"]       { --tc: #b97a4c; --tc-chip: #a46638; --tc-text: #985c2d; }
[data-type="cine"]       { --tc: #7d67ee; --tc-chip: #765fe6; --tc-text: #6b53d8; }
[data-type="sport"]      { --tc: #2ea8f5; --tc-chip: #2ea8f5; --tc-text: #0672ac; --chip-ink: #12131f; }
[data-type="balade"]     { --tc: #3aa66b; --tc-chip: #03864e; --tc-text: #027b46; }
[data-type="jeux"]       { --tc: #5669ff; --tc-chip: #5264fa; --tc-text: #4856eb; }
[data-type="concert"]    { --tc: #ee5a9f; --tc-chip: #cd3b83; --tc-text: #c02c78; }
[data-type="soiree"]     { --tc: #c446e0; --tc-chip: #b838d4; --tc-text: #aa27c6; }
[data-type="culture"]    { --tc: #13a99a; --tc-chip: #058377; --tc-text: #04786d; }
[data-type="spectacle"]  { --tc: #d23a52; --tc-chip: #d23a52; --tc-text: #c22946; }
[data-type="conference"] { --tc: #4a6fa5; --tc-chip: #4a6fa5; --tc-text: #44699f; }
[data-type="shopping"]   { --tc: #e0a100; --tc-chip: #e0a100; --tc-text: #906602; --chip-ink: #12131f; }
[data-type="autre"]      { --tc: #8a89a8; --tc-chip: #737290; --tc-text: #696886; }
[data-type] { --tt: color-mix(in srgb, var(--tc) 14%, var(--surface)); }
/* Thèmes sombres : spectacle et conférence en teinte plus claire ; pastilles avec texte foncé sur la couleur du type
   (Ciné et Jeux : fond un peu plus clair) ; étiquettes avec texte éclairci (couleur du type à 70 %, blanc à 30 %). */
[data-theme="nuit"] [data-type="spectacle"], [data-theme="ardoise"] [data-type="spectacle"]   { --tc: #f06a80; }
[data-theme="nuit"] [data-type="conference"], [data-theme="ardoise"] [data-type="conference"] { --tc: #86a6dc; }
[data-theme="nuit"], [data-theme="ardoise"] { --chip-ink: #12131f; }
[data-theme="nuit"] [data-type], [data-theme="ardoise"] [data-type] { --tc-chip: var(--tc); --tc-text: color-mix(in srgb, var(--tc) 70%, #fff); }
[data-theme="nuit"] [data-type="cine"], [data-theme="ardoise"] [data-type="cine"] { --tc-chip: #8a76f0; }
[data-theme="nuit"] [data-type="jeux"], [data-theme="ardoise"] [data-type="jeux"] { --tc-chip: #6778ff; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100dvh; font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.5;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; font-optical-sizing: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--primary); }
.muted { color: var(--muted); } .small { font-size: 13px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 10px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .55rem 1.2rem; border-radius: 14px;
  border: 0; background: var(--surface2); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .08s, filter .15s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn.outline { background: var(--surface); color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
.btn.gray { background: var(--surface2); color: var(--muted); letter-spacing: .06em; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.danger { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.btn.danger-outline { background: var(--surface); color: var(--bad); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 55%, transparent); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: .3rem .9rem; font-size: 13px; border-radius: 10px; box-shadow: none; }
.btn[disabled] { opacity: .55; cursor: default; }
/* Gros bouton bleu en capitales avec flèche ronde à droite */
.btn.cta { position: relative; min-height: 58px; padding: 0 3.6rem; border-radius: 16px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; font-size: 15px; }
.cta-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, #000 14%, var(--primary)); color: #fff; }
.link-btn { border: 0; background: transparent; color: var(--primary); font-weight: 600; padding: .4rem; min-height: 40px; }
.link-btn[disabled] { color: var(--text); cursor: default; } .link-btn b { color: var(--primary); font-weight: 600; }
.icon-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text); flex: none; }
.icon-btn:active { background: var(--primary-soft); }
.icon-btn.on-dark { color: #fff; }
.icon-btn.on-dark:active { background: rgba(255,255,255,.18); }
.icon-btn svg { display: block; }
.pill-btn { display: inline-flex; align-items: center; gap: .35rem; border: 0; border-radius: 999px; padding: .35rem .8rem; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .08em; min-height: 32px; }

/* ---------- Avatars (animaux) ---------- */
.avatar { --hue: 200; display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; font-size: 1.15rem; line-height: 1;
  background: hsl(var(--hue) 75% 88%); }
[data-theme="nuit"] .avatar, [data-theme="ardoise"] .avatar { background: hsl(var(--hue) 40% 30%); }
.avatar.xs { width: 24px; height: 24px; font-size: .8rem; } .avatar.sm { width: 28px; height: 28px; font-size: .9rem; }
.avatar.md { width: 44px; height: 44px; font-size: 1.4rem; } .avatar.lg { width: 50px; height: 50px; font-size: 1.6rem; }
.avatar.xl { width: 66px; height: 66px; font-size: 2.2rem; } .avatar.xxl { width: 112px; height: 112px; font-size: 3.6rem; }

/* ---------- Champs ---------- */
.field { display: grid; gap: .4rem; margin-bottom: .9rem; }
.field > label, .label { font-size: 13px; font-weight: 500; color: var(--muted); }
.input { width: 100%; min-height: 54px; padding: .6rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.input { min-height: 84px; resize: vertical; }
.field-ico { position: relative; display: block; }
.field-ico > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field-ico .input { padding-left: 50px; }
.error { color: var(--bad); font-weight: 500; font-size: 14px; min-height: 1.2em; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { max-width: 100%; overflow-wrap: anywhere; min-height: 40px; padding: .35rem 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: transparent; box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 28%, transparent); }
.chip.box { min-height: 46px; padding-inline: 1.15rem; }
.chip.muted-type[aria-pressed="true"] { text-decoration: line-through; background: var(--surface2); color: var(--muted); box-shadow: none; }
.chip.multi { border-style: dashed; color: var(--primary); }
.group { display: grid; gap: .55rem; }
.group > h3 { font-size: 16px; font-weight: 600; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; }
.row.center { justify-content: center; }

/* ---------- Connexion ---------- */
.auth { min-height: 100dvh; padding: 1rem 1.4rem 2rem; max-width: 480px; margin: 0 auto;
  background: radial-gradient(28rem 22rem at 110% -5%, color-mix(in srgb, #ffb4b4 20%, transparent), transparent 70%), radial-gradient(28rem 22rem at -10% 105%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 70%); }
.auth-top { display: flex; justify-content: flex-end; padding-top: env(safe-area-inset-top); }
.auth-card { display: grid; gap: 1rem; padding-top: .5rem; }
.auth-card > .back { margin-left: -10px; }
.auth-brand { display: grid; justify-items: center; gap: .4rem; margin: 1rem 0 .6rem; }
.auth-brand img { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow-lg); }
.auth-brand span { font-size: 33px; font-weight: 600; letter-spacing: -.02em; color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.auth-h { font-size: 24px; font-weight: 600; }
.auth-p { color: var(--text); opacity: .8; }
.auth-form { display: grid; gap: .8rem; }
.auth-form .cta { margin: .6rem auto 0; width: min(100%, 300px); }
.auth-center { text-align: center; justify-self: center; }
.or { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin: .4rem 0 0; }
.btn.oauth { width: min(100%, 300px); justify-self: center; background: var(--surface); color: var(--text); box-shadow: var(--shadow); min-height: 56px; font-weight: 500; gap: .8rem; }
.btn.oauth .g { font-style: normal; font-weight: 800; font-size: 1.15rem; color: #4285f4; }
.btn.oauth.apple svg { color: var(--text); }
.otp { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: .55rem; margin: .4rem 0; cursor: text; }
.otp-box { display: grid; place-items: center; height: 58px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 22px; font-weight: 600; transition: border-color .15s, box-shadow .15s; }
.otp-box:empty::after { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--border); }
.otp-box.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.otp-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; caret-color: transparent; }
.invite-card { display: flex; gap: .8rem; align-items: center; padding: .8rem 1rem; border-radius: 16px; background: var(--primary-soft); }
.invite-card .ie { font-size: 1.7rem; width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: 14px; background: var(--surface); }
.invite-card > div { display: grid; min-width: 0; }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface2); border-radius: 999px; }
.lang-btn { border: 0; background: transparent; border-radius: 999px; min-height: 32px; padding: 0 .6rem; font-weight: 600; font-size: 12px; color: var(--muted); }
.lang-btn[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.logo { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 19px; }
.logo img { width: 36px; height: 36px; border-radius: 11px; }
.auth .tagline { color: var(--muted); }
.auth h1:not(.auth-h) { font-size: 24px; margin: .8rem 0 .2rem; }

/* ---------- Coque : colonne de téléphone, barre du bas ---------- */
.shell { max-width: 520px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); position: relative; }
.shell.tab-detail { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
.feed-body, .sec, .detail, .dt-body, .sheet-body, .row-list, .dt-sec, .group, .hero-head, .auth-card, .empty-state { grid-template-columns: minmax(0, 1fr); }
.page > *, .sec, .ev-row, .row-list { min-width: 0; }
.nav { position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%); width: min(520px, 100%);
  display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: end; padding: .5rem .5rem calc(.45rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 96%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 -6px 26px rgba(80,85,136,.10); border-radius: 22px 22px 0 0; }
.nav .tab { display: grid; justify-items: center; gap: 2px; border: 0; background: transparent; color: color-mix(in srgb, var(--muted) 60%, var(--surface)); font-size: 12px; font-weight: 500; min-height: 52px; padding: .2rem; }
.nav .tab .ico { line-height: 0; }
.nav .tab[aria-current="page"] { color: var(--primary); }
.nav .new { justify-self: center; width: 60px; height: 60px; margin-bottom: 14px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--primary); box-shadow: 0 0 0 6px var(--bg), 0 12px 24px color-mix(in srgb, var(--primary) 45%, transparent); }
.nav .new:active { transform: scale(.94); }
.kb-open .nav, .kb-open .cta-bar { display: none; }

/* ---------- En-tête des pages ---------- */
.phead { display: flex; align-items: center; gap: .3rem; padding: calc(.8rem + env(safe-area-inset-top)) 1rem .2rem; min-height: 64px; }
.phead h1 { font-size: 24px; font-weight: 600; flex: 1; min-width: 0; }
.phead .icon-btn:first-child { margin-left: -6px; }
.ph-act { display: flex; gap: .1rem; }
.page > :not(.phead):not(.hero-head):not(.cats):not(.feed-body):not(.detail) { margin-inline: 1.2rem; }

/* ---------- Accueil : en-tête bleu ---------- */
.hero-head { background: var(--hero-grad); color: #fff; border-radius: 0 0 34px 34px; padding: calc(.7rem + env(safe-area-inset-top)) 1rem 3.3rem; display: grid; gap: 1rem; }
.hh-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.hh-circle { display: grid; justify-items: center; border: 0; background: transparent; color: #fff; min-width: 0; padding: .2rem .5rem; border-radius: 12px; }
.hh-circle small { display: inline-flex; align-items: center; gap: .3rem; font-size: 12px; opacity: .72; }
.hh-circle b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.bell-btn { background: rgba(255,255,255,.12); }
.bell-btn .count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; background: var(--accent); color: #003b3e; box-shadow: 0 0 0 2px var(--primary-2); }
.hh-search { display: flex; align-items: center; gap: .6rem; padding: 0 .3rem 0 .4rem; }
.hs-ico { opacity: .9; line-height: 0; }
.search-input { flex: 1 1 0; width: 0; min-width: 0; border: 0; border-left: 1.5px solid rgba(255,255,255,.35); background: transparent; color: #fff; font-size: 20px; padding: .2rem .7rem; min-height: 40px; -webkit-appearance: none; appearance: none; }
.search-input::placeholder { color: rgba(255,255,255,.5); }
.search-input:focus { outline: none; border-left-color: #fff; }
.search-input::-webkit-search-cancel-button { filter: invert(1); }
.flt-btn { display: inline-flex; align-items: center; gap: .45rem; border: 0; border-radius: 999px; padding: .35rem .85rem .35rem .4rem; min-height: 40px; background: rgba(255,255,255,.16); color: #fff; font-size: 13px; }
.flt-btn .fb-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.25); }
.flt-btn b { min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #003b3e; font-size: 11px; display: grid; place-items: center; }

/* Catégories : pastilles colorées qui chevauchent le bas de l'en-tête */
.cats { display: flex; gap: .7rem; overflow-x: auto; margin-top: -1.65rem; padding: .2rem 1.2rem 1rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: .55rem; border: 0; border-radius: 999px; padding: 0 1.15rem 0 .5rem; min-height: 46px;
  background: var(--tc-chip, var(--tc)); color: var(--chip-ink, #fff); font-size: 15px; font-weight: 500; box-shadow: 0 8px 18px color-mix(in srgb, var(--tc) 35%, transparent); }
.cat .ci { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); }
.cat:active { transform: scale(.96); }

.feed-body { display: grid; gap: 1.4rem; }
.feed-body > * { margin-inline: 1.2rem; }
.feed-body > .sec { margin-inline: 0; }
.sec { display: grid; gap: .8rem; }
.sec > :not(.ev-row):not(.avail-row) { margin-inline: 1.2rem; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sec-head h2 { font-size: 18px; font-weight: 500; }
.see-all { display: inline-flex; align-items: center; gap: .2rem; border: 0; background: transparent; color: var(--muted); font-size: 14px; padding: .3rem 0; }
.see-all svg { transform: rotate(-90deg); }

/* Cartes d'idées (défilement horizontal) */
.ev-row { display: flex; gap: 1rem; overflow-x: auto; padding: .2rem 1.2rem 1rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ev-row::-webkit-scrollbar { display: none; }
.ev-card { position: relative; flex: none; width: min(258px, 76vw); scroll-snap-align: start; background: var(--surface); border-radius: 18px; padding: .6rem .6rem 1rem; box-shadow: var(--shadow); display: grid; gap: .55rem; }
.ev-card.joined { box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--primary) 55%, transparent); }
.ev-open { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; border-radius: inherit; }
.ev-cover { position: relative; height: 136px; border-radius: 12px; overflow: hidden; }
.cover { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(150deg, color-mix(in srgb, var(--tc) 14%, var(--surface)), color-mix(in srgb, var(--tc) 30%, var(--surface))); overflow: hidden; }
.cover .c1, .cover .c2 { position: absolute; border-radius: 50%; background: color-mix(in srgb, var(--tc) 22%, transparent); }
.cover .c1 { width: 70%; aspect-ratio: 1; right: -12%; top: -30%; } .cover .c2 { width: 46%; aspect-ratio: 1; left: -10%; bottom: -26%; background: color-mix(in srgb, var(--tc) 16%, transparent); }
.cover .cv-ico { position: relative; color: var(--tc); line-height: 0; filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--tc) 40%, transparent)); }
.date-badge { position: absolute; left: 8px; top: 8px; z-index: 2; display: grid; justify-items: center; min-width: 46px; padding: .3rem .5rem .25rem; border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--bad); line-height: 1.05; }
.date-badge b { font-size: 18px; font-weight: 700; } .date-badge small { font-size: 10px; text-transform: uppercase; font-weight: 600; letter-spacing: .04em; }
.date-badge.live { color: var(--ok); }
.fav-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); flex: none; }
.fav-btn[aria-pressed="true"] { color: var(--bad); }
.fav-btn.on-cover { position: absolute; right: 8px; top: 8px; z-index: 2; background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--bad); }
.fav-btn.on-cover[aria-pressed="false"] { color: var(--muted); }
.fav-btn.on-dark { background: rgba(255,255,255,.2); color: #fff; }
.my-tag { display: inline-flex; align-items: center; padding: .12rem .55rem; border-radius: 8px; font-size: 11px; font-weight: 600; background: var(--primary-soft); color: var(--primary); white-space: nowrap; }
.my-tag.maybe { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: color-mix(in srgb, var(--warn) 70%, #6b3500); }
.my-tag.out { background: var(--surface2); color: var(--muted); }
.ev-cover .my-tag { position: absolute; left: 8px; bottom: 8px; z-index: 2; background: var(--primary); color: #fff; }
.ev-cover .my-tag.maybe { background: var(--warn); color: #fff; } .ev-cover .my-tag.out { background: var(--muted); color: #fff; }
.ev-title { font-size: 18px; font-weight: 500; padding: 0 .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.going { display: flex; align-items: center; gap: .55rem; padding: 0 .3rem; color: var(--primary); font-size: 13px; font-weight: 600; }
.going.none { color: var(--muted); font-weight: 500; }
.av-stack { display: inline-flex; padding-left: 8px; }
.av-stack .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); }
.ev-place { display: flex; align-items: center; gap: .4rem; padding: 0 .3rem; color: var(--muted); font-size: 13px; min-width: 0; }
.ev-place span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-place svg { flex: none; opacity: .75; }
.ev-empty { margin-inline: 1.2rem; }

/* Lignes (recherche, agenda, terminées) */
.row-list { display: grid; gap: .8rem; }
.row-card { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; padding: .55rem .9rem .55rem .55rem; border: 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); position: relative; }
.row-card.ended { opacity: .7; }
.rc-thumb { position: relative; flex: none; width: 76px; height: 82px; border-radius: 12px; overflow: hidden; }
.rc-txt { display: grid; gap: .1rem; min-width: 0; flex: 1; }
.rc-date { color: var(--primary); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; }
.rc-txt b { font-size: 17px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-dot { position: absolute; right: 12px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.my-dot.maybe { background: var(--warn); } .my-dot.out { background: var(--border); }

/* Bandeau « Invite tes ami·e·s » */
.invite-banner { position: relative; display: flex; align-items: center; overflow: hidden; border-radius: 16px; padding: 1.1rem 1.1rem; background: var(--accent-soft); min-height: 150px; }
.ib-txt { position: relative; z-index: 1; display: grid; gap: .3rem; justify-items: start; max-width: 62%; }
.ib-txt h3 { font-size: 18px; font-weight: 500; } .ib-txt p { color: var(--muted); font-size: 13px; }
.ib-btn { margin-top: .5rem; min-height: 38px; border-radius: 8px; padding: 0 1.2rem; background: var(--accent); color: #fff; font-size: 13px; letter-spacing: .08em; font-weight: 600; }
[data-theme="aurore"] .ib-btn, :root .ib-btn { background: #00c2cc; }
.ib-art { position: absolute; right: -6px; bottom: 0; width: 46%; height: auto; }

/* Disponibilités */
.avail-row { display: flex; gap: .9rem; overflow-x: auto; padding: .1rem 1.2rem .4rem; scrollbar-width: none; }
.avail-row::-webkit-scrollbar { display: none; }
.avail { flex: none; width: 72px; display: grid; justify-items: center; gap: .15rem; text-align: center; }
.avail .av-wrap { position: relative; }
.avail .av-wrap .orb { position: absolute; right: -3px; bottom: -2px; }
.avail .nm { font-size: 13px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avail .sl { font-size: 11px; color: var(--muted); line-height: 1.15; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Bannières (statut en pause, installation, notifications) */
.banner { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; padding: .85rem 1rem; border-radius: 16px; background: var(--primary-soft); }
.banner .grow { flex: 1 1 9rem; min-width: 0; font-size: 14px; }
.banner .ico { font-size: 1.4rem; }
.banner.paused { background: color-mix(in srgb, var(--sc, var(--muted)) 12%, var(--surface)); }

/* États vides illustrés */
.empty-state { display: grid; justify-items: center; text-align: center; gap: .6rem; padding: 1.6rem .6rem 1rem; }
.empty-state .illu { width: 168px; height: 168px; margin-bottom: .4rem; }
.empty-state h2 { font-size: 22px; font-weight: 500; }
.empty-state p { max-width: 30ch; line-height: 1.6; }
.empty-state .cta, .empty-state .row { margin-top: .8rem; }
.empty-state .cta { min-width: 260px; }

/* ---------- Détail d'une sortie ---------- */
.detail { display: grid; }
.dt-hero { position: relative; height: calc(232px + env(safe-area-inset-top)); overflow: hidden; }
.dt-hero .cover { background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 72%, #1d1b3a), color-mix(in srgb, var(--tc) 92%, #000)); }
.dt-hero .cover .c1, .dt-hero .cover .c2 { background: rgba(255,255,255,.1); }
.dt-hero .cover .cv-ico { color: rgba(255,255,255,.92); filter: drop-shadow(0 10px 20px rgba(0,0,0,.25)); margin-top: 10px; }
.dt-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: .4rem; padding: calc(.6rem + env(safe-area-inset-top)) .8rem .6rem; }
.dt-bar-t { flex: 1; color: #fff; font-size: 22px; font-weight: 500; }
.dt-pill { position: relative; z-index: 3; display: flex; align-items: center; gap: .7rem; margin: -30px auto 0; width: calc(100% - 52px); min-height: 60px; padding: .45rem .5rem .45rem 1rem;
  background: var(--surface); border-radius: 30px; box-shadow: var(--shadow-lg); }
.dt-pill .gp-t { flex: 1; min-width: 0; color: var(--primary); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-pill .btn { min-height: 38px; padding: 0 1.1rem; border-radius: 8px; }
.dt-body { display: grid; gap: 1.2rem; padding: 1.4rem 1.4rem 1rem; }
.dt-tags { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.type-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 8px; background: var(--tt); color: var(--tc-text, var(--tc)); font-size: 12px; font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--surface2); color: var(--muted); }
.badge.live { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.dt-title { font-size: 33px; font-weight: 400; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.info-row { display: flex; align-items: center; gap: 1rem; color: var(--text); text-decoration: none; }
.ir-ico { flex: none; width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.ir-txt { display: grid; gap: .1rem; min-width: 0; flex: 1; }
.ir-txt b { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; } .ir-txt small { color: var(--muted); font-size: 13px; }
a.info-row .ir-txt small { color: var(--primary); }
.org-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.org-row .avatar { border-radius: 12px; }
.org-circles { display: flex; gap: .35rem; flex-wrap: wrap; }
.cbadge { padding: .2rem .55rem; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 500; }
.dt-sec { display: grid; gap: .6rem; }
.dt-sec > h2 { display: flex; align-items: center; gap: .5rem; font-size: 18px; font-weight: 500; }
.cnt { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 .4rem; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.dt-note { font-size: 16px; line-height: 1.75; color: color-mix(in srgb, var(--text) 85%, var(--muted)); overflow-wrap: anywhere; }
.people-list { display: grid; gap: .7rem; }
.pl-row { display: flex; align-items: center; gap: .8rem; }
.pl-row .ir-txt small { font-style: italic; }
.msg-row { display: flex; gap: .5rem; align-items: center; }
.msg-row .input { flex: 1; min-width: 0; }
.icon-btn.send { background: var(--primary); color: #fff; width: 50px; height: 50px; border-radius: 14px; }
.cta-bar { position: fixed; z-index: 25; bottom: 0; left: 50%; transform: translateX(-50%); width: min(520px, 100%); display: flex; gap: .6rem; align-items: center;
  padding: 1.6rem 1.2rem calc(1rem + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--bg) 38%); }
.cta-bar > .btn { flex: 1; min-height: 56px; }
.cta-bar .cta.grow { flex: 2; padding: 0 3.2rem 0 1rem; }
.cta-bar .cta.done { background: var(--ok); box-shadow: 0 10px 24px color-mix(in srgb, var(--ok) 30%, transparent); }
.cta-bar .cta.done .cta-arrow { background: rgba(0,0,0,.14); }
.cta-alt { display: grid; gap: .4rem; flex: 1; }
.cta-alt .alt { min-height: 26px; border: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); font-size: 12px; font-weight: 600; padding: .25rem .4rem; }
.cta-alt .alt[aria-pressed="true"].maybe { background: var(--warn); color: #fff; box-shadow: none; }
.cta-alt .alt[aria-pressed="true"].out { background: var(--muted); color: #fff; box-shadow: none; }
.info-link { display: inline-flex; align-items: center; gap: .25rem; padding: 0; border: 0; background: transparent; color: var(--primary); font: inherit; text-decoration: underline dotted color-mix(in srgb, var(--primary) 60%, transparent) 2px; text-underline-offset: 5px; cursor: pointer; }
.info-link svg { flex: none; opacity: .8; }

/* ---------- Agenda ---------- */
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface2); margin-inline: 2rem !important; }
.seg2 button { border: 0; background: transparent; border-radius: 999px; min-height: 42px; font-size: 14px; letter-spacing: .04em; color: var(--muted); }
.seg2 button[aria-selected="true"] { background: var(--surface); color: var(--primary); box-shadow: 0 6px 16px rgba(80,85,136,.14); }

/* ---------- Notifications ---------- */
.bell-hint { margin-top: -.6rem; }
.bell-list { display: grid; gap: 1.1rem; }
.bell-row { position: relative; display: flex; align-items: flex-start; gap: .9rem; }
.bell-row.unread::before { content: ""; position: absolute; left: -12px; top: 20px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.br-open { position: absolute; inset: -6px; z-index: 0; border: 0; background: transparent; border-radius: 12px; }
.bell-row > .avatar, .br-txt, .br-when { position: relative; z-index: 1; pointer-events: none; }
.br-txt { flex: 1; min-width: 0; display: grid; gap: .5rem; padding-top: .1rem; }
.br-txt p { font-size: 15px; line-height: 1.55; color: color-mix(in srgb, var(--text) 75%, var(--muted)); overflow-wrap: anywhere; }
.br-txt p b { color: var(--text); font-weight: 600; }
.br-act { display: flex; gap: .6rem; pointer-events: auto; }
.br-act .btn { min-width: 110px; min-height: 40px; border-radius: 8px; font-weight: 500; }
.br-act .btn.outline { box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); }
.br-txt .my-tag { justify-self: start; }
.br-when { flex: none; font-size: 12px; color: var(--muted); padding-top: .2rem; }

/* ---------- Menu latéral ---------- */
.drawer { position: fixed; inset: 0; z-index: 110; }
.dr-scrim { position: absolute; inset: 0; background: rgba(12,12,30,.45); opacity: 0; transition: opacity .2s; }
.dr-panel { position: absolute; left: 0; top: 0; bottom: 0; width: min(310px, 84vw); background: var(--surface); display: flex; flex-direction: column; gap: 1.4rem;
  padding: calc(2.2rem + env(safe-area-inset-top)) 1.5rem calc(1.4rem + env(safe-area-inset-bottom)); transform: translateX(-102%); transition: transform .24s cubic-bezier(.2,.8,.2,1); box-shadow: 10px 0 40px rgba(0,0,0,.18); overflow-y: auto; }
.drawer.show .dr-scrim { opacity: 1; } .drawer.show .dr-panel { transform: none; }
.dr-me { display: grid; gap: .6rem; justify-items: start; }
.dr-me b { font-size: 19px; font-weight: 600; }
.dr-list { display: grid; gap: .2rem; flex: 1; }
.dr-item { display: flex; align-items: center; gap: 1rem; border: 0; background: transparent; color: var(--text); font-size: 16px; min-height: 52px; padding: 0 .4rem; border-radius: 12px; text-align: left; }
.dr-item svg { color: var(--muted); flex: none; }
.dr-item:active, .dr-item:focus-visible { background: var(--primary-soft); }
.dr-badge { margin-left: auto; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px; display: grid; place-items: center; background: var(--warn); color: #fff; font-size: 11px; }
.dr-invite { display: inline-flex; align-items: center; gap: .7rem; align-self: flex-start; border: 0; border-radius: 10px; padding: .8rem 1.1rem; background: var(--accent-soft); color: #00a3ad; font-weight: 600; }
[data-theme="nuit"] .dr-invite { color: var(--accent); }

/* ---------- Profil ---------- */
.prof { display: grid; justify-items: center; gap: .8rem; text-align: center; margin-top: .4rem !important; }
.prof-av { position: relative; }
.prof-av .status-btn { position: absolute; right: -2px; bottom: 2px; background: var(--surface); border-radius: 50%; min-width: 40px; min-height: 40px; padding: 0; box-shadow: var(--shadow); }
.prof-av.center { justify-self: center; }
.prof-name { font-size: 24px; font-weight: 500; }
.stats { display: flex; align-items: center; gap: 1.6rem; }
.stats > div { display: grid; justify-items: center; }
.stats b { font-size: 16px; font-weight: 600; } .stats small { color: var(--muted); font-size: 13px; }
.stats > i { width: 1px; height: 34px; background: var(--border); }
.prof .btn.outline { min-height: 52px; padding: 0 1.6rem; border-radius: 12px; }
.status-line { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.int-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.int-chip { padding: .45rem 1rem; border-radius: 999px; background: var(--tc-chip, var(--tc)); color: var(--chip-ink, #fff); font-size: 14px; font-weight: 500; }
.status-btn { display: inline-flex; align-items: center; gap: .6rem; min-height: 46px; min-width: 46px; justify-content: center; padding: 0 .4rem; border: 0; border-radius: 999px; background: transparent; color: var(--text); }
.status-btn.with-label { padding: 0 1rem 0 .5rem; background: var(--surface2); }
.status-btn .sb-txt { font-weight: 500; font-size: 14px; }

/* ---------- Réglages ---------- */
.set-list { display: grid; gap: .55rem; }
.set-row { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; min-height: 62px; padding: .55rem .9rem; border: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.sheet .set-row { box-shadow: none; background: var(--surface2); }
.set-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.set-txt { display: grid; gap: 1px; min-width: 0; flex: 1; }
.set-txt b { font-weight: 500; } .set-txt small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.set-chev { color: var(--muted); display: grid; }
.panel { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 1rem; display: grid; gap: .8rem; }
.panel.flat { box-shadow: none; background: var(--surface2); padding: .7rem .9rem; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 46px; }
.tg-txt { display: grid; gap: 1px; min-width: 0; } .tg-txt small { font-size: 12px; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--primary); } .switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid var(--primary-soft); outline-offset: 2px; }
.time-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.time-row label { display: grid; gap: .25rem; font-size: 13px; color: var(--muted); }
.sec-note { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 14px; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); color: var(--text); }
.sec-note svg { flex: none; color: var(--ok); } .sec-note p { font-size: 14px; line-height: 1.55; }
.danger-zone > summary { display: flex; align-items: center; gap: .5rem; color: var(--bad); cursor: pointer; padding: .6rem .2rem; list-style: none; font-weight: 500; }
.danger-zone > summary::-webkit-details-marker { display: none; }
.field.inner { margin: .3rem 0 0; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.theme-card { display: grid; gap: .45rem; text-align: left; padding: .6rem; border-radius: 16px; border: 2px solid var(--border); background: var(--bg); color: var(--text); }
.theme-card[aria-pressed="true"] { border-color: var(--primary); }
.theme-card .mini { display: grid; gap: 4px; padding: .4rem; border-radius: 10px; background: var(--surface); }
.theme-card .mini .mh { height: 16px; border-radius: 6px; background: var(--hero-grad); }
.theme-card .mini b { height: 6px; border-radius: 3px; background: var(--text); opacity: .7; width: 70%; }
.theme-card .mini u { height: 5px; border-radius: 3px; background: var(--muted); opacity: .4; width: 90%; text-decoration: none; } .theme-card .mini u.s { width: 55%; }
.theme-card .nm { font-weight: 600; font-size: 14px; } .theme-card .ds { font-size: 11px; color: var(--muted); }

/* ---------- Choix (cercle, langue) ---------- */
.pick-list { display: grid; gap: .45rem; }
.pick-row { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; min-height: 60px; padding: .5rem .8rem; border: 0; border-radius: 14px; background: var(--surface2); color: var(--text); }
.pick-row[aria-pressed="true"] { background: var(--primary-soft); }
.pick-row .ce { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); font-size: 1.35rem; }
.pick-row .ce.code { font-size: 13px; font-weight: 700; color: var(--primary); }
.pick-row svg { color: var(--muted); flex: none; }
.pk-check { color: var(--primary); display: grid; } .pk-check svg { color: var(--primary); }
.pick-row.boxed { background: var(--surface); border: 1px solid var(--border); }
.pick-row.boxed .ir-ico { width: 42px; height: 42px; }

/* Catégories rondes (filtres, fenêtre « Prévenir mes amis », centres d'intérêt) */
.tcats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem .5rem; }
.tcat { display: grid; justify-items: center; gap: .4rem; border: 0; background: transparent; color: var(--text); padding: 0; }
.tc-ico { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: color-mix(in srgb, var(--tc) 70%, var(--muted)); transition: background .15s, box-shadow .15s, transform .1s; }
.tc-l { font-size: 12px; line-height: 1.2; text-align: center; color: var(--muted); }
.tcat[aria-pressed="true"] .tc-ico { background: var(--primary); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 35%, transparent); }
.tcat[aria-pressed="true"] .tc-l { color: var(--text); font-weight: 500; }
.tcat:active .tc-ico { transform: scale(.94); }

/* ---------- Partage ---------- */
.sh-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem .4rem; padding: .4rem 0 .6rem; }
.sh-t { display: grid; justify-items: center; gap: .45rem; border: 0; background: transparent; color: var(--text); text-decoration: none; font-size: 13px; text-align: center; padding: 0; }
.sh-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; box-shadow: 0 8px 16px rgba(0,0,0,.1); }
.sh-t.copy .sh-ico { background: var(--surface2); color: var(--text); }
.sh-t.wa .sh-ico { background: #25d366; } .sh-t.ms .sh-ico { background: linear-gradient(135deg, #2e7bff, #a334fa); }
.sh-t.tg .sh-ico { background: #229ed9; } .sh-t.sms .sh-ico { background: #34c759; }
.sh-t.mail .sh-ico { background: #2f6bff; } .sh-t.more .sh-ico { background: var(--surface2); color: var(--muted); }

/* ---------- Fenêtres (feuilles) ---------- */
dialog#composer { border: 0; padding: 0; color: var(--text); background: var(--surface); box-shadow: 0 -10px 50px rgba(0,0,0,.3);
  width: min(520px, 100%); max-width: 100%; max-height: min(94dvh, calc(var(--vvh, 100dvh) - 12px)); margin: auto auto var(--kb, 0px); border-radius: 30px 30px 0 0; overflow: hidden; animation: sheet .24s cubic-bezier(.2,.8,.2,1); }
dialog#composer::backdrop { background: rgba(12,12,30,.5); animation: fade .2s; }
@keyframes sheet { from { transform: translateY(60px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet { display: grid; grid-template-rows: auto auto 1fr auto; max-height: min(94dvh, calc(var(--vvh, 100dvh) - 12px)); }
.grab { width: 36px; height: 5px; border-radius: 3px; background: var(--border); margin: .6rem auto 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem 1.4rem .4rem; }
.sheet-head h2 { font-size: 24px; font-weight: 500; }
.close-x { color: var(--muted); margin-right: -8px; }
.sheet-body { overflow-y: auto; padding: .4rem 1.4rem 1.2rem; display: grid; gap: 1.1rem; align-content: start; overscroll-behavior: contain; }
.sheet-body > * { min-width: 0; }
.sheet-foot { padding: .6rem 1.4rem calc(1rem + env(safe-area-inset-bottom)); display: grid; gap: .5rem; }
.sheet-foot:empty { display: none; }
.sheet-foot.two { grid-template-columns: 1fr 1.6fr; gap: .8rem; }
.sheet-foot.two .btn { min-height: 56px; letter-spacing: .08em; font-weight: 600; }
.sheet-foot.two .btn.outline { box-shadow: inset 0 0 0 1px var(--border); color: var(--text); }
.pick-friends { display: grid; gap: .35rem; max-height: 200px; overflow: auto; padding: .2rem; }
.pick-friends label { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem; border-radius: 10px; cursor: pointer; }
.pick-friends input { width: 20px; height: 20px; accent-color: var(--primary); }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: .45rem; }
.avatar-grid button { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--border); background: var(--surface2); font-size: 1.4rem; }
.avatar-grid button[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--surface); }

/* ---------- Cercles ---------- */
.circ-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.circ-actions .btn { box-shadow: none; }
.circ-actions .btn.outline { box-shadow: inset 0 0 0 1.5px var(--primary); }
.circle-list { display: grid; gap: .8rem; }
.circle-card { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; padding: .8rem 1rem; border: 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.circle-card .ce { font-size: 1.6rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--primary-soft); flex: none; }
.circle-card .cn { display: grid; flex: 1; min-width: 0; }
.circle-card .cn b { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .circle-card .cn small { font-size: 13px; }
.circle-card .chev { color: var(--muted); display: grid; }
.code-box { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9rem; padding: .7rem .9rem; background: var(--surface2); border-radius: 12px; user-select: all; overflow-wrap: anywhere; }
.members { display: grid; gap: .6rem; }
.member { display: flex; align-items: center; gap: .8rem; }
.member .nm { font-weight: 500; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.member-st { color: var(--muted); font-weight: 400; font-size: 13px; }
.member-menu { position: relative; }
.member-menu summary { list-style: none; cursor: pointer; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 1.2rem; color: var(--muted); }
.member-menu summary::-webkit-details-marker { display: none; }
.member-menu[open] summary { background: var(--surface2); }
.menu-pop { position: absolute; right: 0; top: 40px; z-index: 5; display: grid; gap: .35rem; padding: .5rem; min-width: 190px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); }
.menu-pop .btn { justify-content: flex-start; }
.fav-list { display: grid; gap: .6rem; }
.fav-row { position: relative; display: flex; align-items: center; gap: .8rem; padding: .5rem .6rem; border-radius: 14px; background: var(--surface2); }
.fav-row .rc-thumb { width: 54px; height: 54px; }
.fav-row .fr-txt { display: grid; gap: 2px; min-width: 0; flex: 1; pointer-events: none; }
.fav-row .fav-btn { position: relative; z-index: 2; color: var(--bad); }
.fav-row .br-open { inset: 0; }

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; bottom: calc(108px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 130;
  background: var(--text); color: var(--bg); padding: .75rem 1.2rem; border-radius: 14px; font-weight: 500; font-size: 14px; max-width: 90vw; text-align: center; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.kb-open #toast { bottom: calc(var(--kb, 0px) + 16px); }
input, textarea { scroll-margin-block: 90px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
/* ---- Installation de l'app + invitation aux notifications ---- */
.inst { display: grid; gap: .9rem; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; counter-reset: none; }
.inst-steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .75rem; align-items: start; padding: .7rem .8rem; border: var(--border-w) solid var(--border); border-radius: var(--radius-sm); background: var(--surface2); }
.inst-steps .n { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--primary); color: var(--primary-ink); }
.inst-steps b { overflow-wrap: anywhere; }
.inst-steps p { margin: .15rem 0 0; }
.share-ico { display: inline-grid; vertical-align: -3px; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface); border: var(--border-w) solid var(--border); color: var(--primary); margin-left: .15rem; }
.inst-note { padding: .6rem .8rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.inst-inapp { display: grid; gap: .6rem; justify-items: start; }
.onb { justify-items: center; text-align: center; padding: .5rem 0 .2rem; }
.onb .bell { font-size: 3.2rem; line-height: 1; animation: ring 1.6s ease-in-out 2; transform-origin: 50% 10%; }
.onb p { font-size: 1.05rem; max-width: 26ch; margin: 0; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .onb .bell { animation: none; } }


/* ---- Pastille de statut « en relief » ---- */
.orb { --s: 28px; --c1: #cfd3e4; --c2: #8d93ad; position: relative; flex: none; display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; color: #fff;
  background:
    radial-gradient(120% 90% at 30% 14%, rgba(255,255,255,.75) 0, rgba(255,255,255,0) 46%),
    radial-gradient(circle at 50% 78%, var(--c1) 0, var(--c2) 100%);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.25), inset 0 1px 1.5px rgba(255,255,255,.7),
    0 0 0 2px var(--surface), 0 0 0 3px color-mix(in srgb, var(--c2) 60%, transparent),
    0 5px 12px color-mix(in srgb, var(--c2) 45%, transparent); }
.orb svg { width: 62%; height: 62%; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.orb[data-st="free"]        { --c1: #7df0ab; --c2: #12a455; }
.orb[data-st="flex"]        { --c1: #ffe08a; --c2: #e39206; }
.orb[data-st="busy"]        { --c1: #ff9a8a; --c2: #d8283f; }
.orb[data-st="unavailable"] { --c1: #f26a86; --c2: #9d1634; }
.orb[data-st="sleep"]       { --c1: #a9a6ff; --c2: #4a3fd1; }
.orb[data-st="focus"]       { --c1: #d9a6ff; --c2: #7a2bcf; }
.orb[data-st="vacation"]    { --c1: #8fe3ff; --c2: #0482c8; }
.orb[data-st="none"]        { --c1: var(--surface2); --c2: var(--muted); color: var(--muted);
  background: radial-gradient(120% 90% at 30% 14%, rgba(255,255,255,.8) 0, rgba(255,255,255,0) 50%), radial-gradient(circle at 50% 80%, var(--surface) 0, var(--surface2) 100%);
  box-shadow: inset 0 -1.5px 2px rgba(0,0,0,.1), 0 0 0 2px var(--surface), 0 0 0 3px var(--border), 0 4px 10px rgba(0,0,0,.08); }
.orb[data-st="none"] svg { filter: none; }
.orb[data-st="free"]::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #12a455; opacity: 0; animation: orb-ping 2.8s ease-out infinite; pointer-events: none; }
@keyframes orb-ping { 0% { transform: scale(.9); opacity: .55; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .orb::after { animation: none !important; } }

.orb { transition: transform .15s; }

/* Menu de statuts : bulle qui s'ouvre vers la gauche, sous la pastille */
.status-menu { position: fixed; z-index: 120; background: color-mix(in srgb, var(--surface) 96%, transparent); color: var(--text);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border: var(--border-w) solid var(--border); border-radius: 20px; padding: .4rem; box-shadow: 0 18px 44px rgba(10,10,30,.28), 0 2px 6px rgba(10,10,30,.1);
  transform-origin: calc(100% - 20px) 0; opacity: 0; transform: translateY(-6px) scale(.94); transition: opacity .16s ease, transform .18s cubic-bezier(.2,.9,.3,1.15); }
.status-menu.up { transform-origin: calc(100% - 20px) 100%; transform: translateY(6px) scale(.94); }
.status-menu.show { opacity: 1; transform: none; }
.status-menu .sm-arrow { position: absolute; top: -6px; left: calc(var(--ax, 90%) - 6px); width: 12px; height: 12px; transform: rotate(45deg);
  background: inherit; border-left: var(--border-w) solid var(--border); border-top: var(--border-w) solid var(--border); border-radius: 3px 0 0 0; }
.status-menu.up .sm-arrow { top: auto; bottom: -6px; transform: rotate(225deg); }
.sm-list { display: grid; gap: 2px; }
.sm-item { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 50px; padding: .35rem .6rem; text-align: left; border: 0; border-radius: 14px; background: transparent; color: inherit; }
.sm-item:hover, .sm-item:focus-visible { background: var(--primary-soft); outline: none; }
.sm-item[aria-checked="true"] { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.sm-item .orb { margin: 0 .15rem; }
.sm-txt { display: grid; gap: 1px; min-width: 0; flex: 1; }
.sm-txt b { font-size: .95rem; font-weight: 700; } .sm-txt small { font-size: .72rem; color: var(--muted); }
.sm-check { color: var(--primary); font-weight: 800; }
.sm-foot { display: flex; flex-wrap: wrap; gap: .2rem .6rem; justify-content: space-between; padding: .5rem .7rem .3rem; margin-top: .3rem; border-top: var(--border-w) solid var(--border); }
.sm-link { border: 0; background: transparent; color: var(--primary); font-weight: 700; font-size: .85rem; padding: .3rem 0; min-height: 36px; }


/* ---- Fiche « En savoir plus » ---- */
.info { display: grid; gap: .9rem; }
.info-img { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--radius); background: var(--surface2); box-shadow: var(--shadow); }
.info-credit { display: block; margin-top: -.5rem; font-size: 12px; text-align: right; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.info-title { font-size: 1.35rem; letter-spacing: -.02em; margin: 0; }
.info-sum { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
/* Fiches des sujets choisis : description courte, repères (année, auteur, dates, adresse…), logo de club entier */
.info-desc { margin: -.5rem 0 0; color: var(--muted); }
.info-facts { margin: 0; display: grid; gap: .35rem; padding: .7rem .9rem; border-radius: 14px; background: var(--surface2); }
.info-facts .if-row { display: grid; grid-template-columns: minmax(84px, auto) 1fr; gap: .8rem; }
.info-facts dt { color: var(--muted); font-size: 14px; }
.info-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.info-img.logo { object-fit: contain; max-height: 160px; padding: 12px; background: #ffffff; }
.info-row.as-btn { width: 100%; padding: 0; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.info-row.as-btn > svg { flex: none; margin-left: auto; color: var(--primary); }
.dt-subj { font-size: .7em; white-space: nowrap; }
.info-loading { display: flex; align-items: center; gap: .8rem; padding: 1.4rem .2rem; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.track-list { display: grid; gap: .4rem; }
.track { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border-radius: calc(var(--radius) - 4px); background: var(--surface2); border: var(--border-w) solid var(--border); }
.track .tr-txt { display: grid; gap: 1px; min-width: 0; flex: 1; } .track .tr-txt b, .track .tr-txt small { overflow-wrap: anywhere; }
.play-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 4px 10px color-mix(in srgb, var(--primary) 35%, transparent); }
.play-btn[aria-pressed="true"] { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent); }
.play-btn.off { background: var(--border); color: var(--muted); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } }

/* ---- v2 : ajustements des blocs repris (pastille, statut, fiche) ---- */
.status-btn { min-height: 46px; }
.fav-btn { margin: 0; }
.info-img { border-radius: 16px; box-shadow: var(--shadow); }
.info-title { font-size: 24px; font-weight: 500; }
.play-btn { background: var(--primary); }
.empty.small-empty { text-align: center; display: grid; gap: .5rem; justify-items: center; padding: 1.2rem .5rem; }
.empty.small-empty .big { font-size: 2.2rem; }
.inst-steps li { border: 0; background: var(--surface2); border-radius: 14px; }
.onb .bell { font-size: 3rem; }
.ev-row, .cats, .avail-row { scroll-padding-inline: 1.2rem; }
.banner { flex-wrap: nowrap; position: relative; padding-right: 2.6rem; }
.banner > .btn.sm:last-child:not(.primary) { position: absolute; right: 4px; top: 4px; min-height: 32px; width: 32px; padding: 0; background: transparent; color: var(--muted); }

/* ---------- Formulaire « une phrase à compléter » (livraison 6a ; maquette docs/maquettes/Main.dc.html) ----------
   Variables propres au formulaire, en clair et en sombre (contrastes vérifiés par test/phrase-unit.test.js).
   --phr-act : mot actif, bouton d'envoi, choix retenu (texte blanc) ; --phr-fill : mot rempli ; mot vide : tirets ;
   --phr-off : bouton désactivé (« Choisissez une activité ») ; --phr-ph : texte d'exemple des champs ; --phr-hint : aides. */
.phr-sheet { --phr-act: #4f63f7; --phr-act-ink: #ffffff; --phr-fill: #eef0ff; --phr-fill-ink: #3446d9; --phr-empty-ink: #5d5e73; --phr-empty-line: #b9bccf;
  --phr-track: #f1f2f8; --phr-off: #e3e6ff; --phr-off-ink: #3446d9; --phr-ph: #6a6b80; --phr-hint: #6a6b80; --phr-ok: #e3f4ec; --phr-ok-ink: #2e8c6a; }
[data-theme="nuit"] .phr-sheet, [data-theme="ardoise"] .phr-sheet { --phr-act: #4f63f7; --phr-act-ink: #ffffff; --phr-fill: #262a55; --phr-fill-ink: #c9cfff; --phr-empty-ink: #a9abc2; --phr-empty-line: #4a4d6e;
  --phr-track: #262842; --phr-off: #262a55; --phr-off-ink: #c9cfff; --phr-ph: #9ea0bb; --phr-hint: #9ea0bb; --phr-ok: #173a30; --phr-ok-ink: #34d399; }
.phr-sheet { display: flex; flex-direction: column; height: min(94dvh, calc(var(--vvh, 100dvh) - 12px), 880px); }
.phr-head { display: flex; align-items: flex-start; gap: .5rem; padding: .5rem 1.25rem .1rem; }
.phr-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-top: 4px; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.phr-circle { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 44px; padding: 0 10px 0 14px; border: 0; border-radius: 999px;
  background: var(--phr-fill); color: var(--phr-fill-ink); font-size: 18px; font-weight: 700; }
.phr-circle .pc-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phr-circle.on { background: var(--phr-act); color: var(--phr-act-ink); }
.phr-circle.static { min-height: 36px; padding: 0 14px; }
.phr-sentence { position: relative; margin: 0; padding: .6rem 1.25rem .8rem; font-size: 23px; line-height: 1.7; font-weight: 500; overflow-wrap: anywhere; }
.phr-sentence b { font-weight: 700; }
.phr-mode { display: inline-flex; vertical-align: middle; margin: 0 2px 6px 0; padding: 3px; border-radius: 999px; background: var(--phr-track); }
.phr-mode button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--phr-empty-ink); font-size: 19px; font-weight: 700; }
.phr-mode button[aria-checked="true"] { background: var(--phr-act); color: var(--phr-act-ink); box-shadow: 0 3px 10px color-mix(in srgb, var(--phr-act) 35%, transparent); }
.phr-word { display: inline-block; vertical-align: middle; max-width: 100%; margin: 0 2px 6px 0; padding: 0 12px; min-height: 44px; line-height: 40px; border: 2px solid transparent; border-radius: 999px;
  font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phr-word.on { background: var(--phr-act); color: var(--phr-act-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--phr-act) 35%, transparent); }
.phr-word.full { background: var(--phr-fill); color: var(--phr-fill-ink); }
.phr-word.empty { background: var(--surface); color: var(--phr-empty-ink); border: 2px dashed var(--phr-empty-line); }
.phr-mode-static { margin-right: 2px; }
.phr-rule { height: 1px; margin: 0 1.25rem; background: var(--border); flex: none; }
.phr-panel { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: .8rem; padding: 1rem 1.25rem .6rem; }
.phr-panel > * { min-width: 0; }
.phr-ph-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.phr-panel h3, .phr-label { font-size: 17px; font-weight: 700; }
.phr-panel h3:focus, .phr-label:focus { outline: none; }
.phr-panel .phr-sub { margin-top: .3rem; }
.phr-hint { font-size: 13px; color: var(--phr-hint); }
.phr-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.phr-opt { min-height: 48px; max-width: 100%; padding: 0 16px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.phr-opt[aria-pressed="true"] { background: var(--phr-act); color: var(--phr-act-ink); border-color: transparent; }
.phr-opt[disabled] { opacity: .55; cursor: default; }
.phr-opt.dashed { border-style: dashed; border-color: var(--phr-empty-line); color: var(--phr-fill-ink); }
.phr-opt.dashed[aria-pressed="true"] { color: var(--phr-act-ink); }
.phr-types { gap: 10px 6px; }
.phr-types .tc-ico { width: 52px; height: 52px; }
.phr-types .tcat { min-height: 76px; }
.phr-field { width: 100%; height: 54px; padding: 0 16px; border: 2px solid var(--phr-act); border-radius: 16px; background: var(--surface); color: var(--text); font-size: 18px; outline: none; }
.phr-field:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--phr-act) 25%, transparent); }
.phr-field.soft { height: 52px; border: 1.5px solid var(--border); font-size: 16px; }
.phr-field.soft:focus { border-color: var(--phr-act); }
.phr-field::placeholder { color: var(--phr-ph); opacity: 1; }
/* Détail / où : ✕ (effacer) et → (valider et continuer) dans le champ, visibles seulement s'il contient du texte.
   Zone de toucher 44 px ; le disque bleu visible de la flèche fait 36 px (fond limité au contenu). */
.phr-fieldbox { position: relative; }
.phr-fieldbox.has-q .phr-field { padding-right: 100px; }
.phr-in { position: absolute; top: 50%; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  transform: translateY(-50%); opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility .15s; }
.phr-fieldbox.has-q .phr-in { opacity: 1; visibility: visible; }
.phr-go { right: 5px; padding: 4px; background: var(--phr-act); background-clip: content-box; color: var(--phr-act-ink); }
.phr-clear-q { right: 49px; background: transparent; color: var(--phr-hint); }
.phr-in:focus-visible { outline: 2px solid var(--phr-act); outline-offset: 0; }
@media (prefers-reduced-motion: reduce) { .phr-in { transition: none; } }
.phr-keep { justify-self: start; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 44px; padding: .4rem 16px; border: 1.5px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--phr-fill-ink); font-size: 15px; font-weight: 600; text-align: left; overflow-wrap: anywhere; }
.phr-keep.dashed { border-style: dashed; border-color: var(--phr-empty-line); }
.phr-acts { display: grid; justify-items: start; gap: .8rem; }
.phr-skip { justify-self: start; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--phr-hint); font-size: 14px; font-weight: 600; text-decoration: underline; }
/* Détail : « Retirer « … » » et « Changer d'activité (…) », sur une ligne (retour à la ligne si besoin) */
.phr-more { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.phr-more .phr-skip { max-width: 100%; text-align: left; overflow-wrap: anywhere; }
.phr-custom { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: var(--surface2); }
.phr-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; scroll-padding-inline: 2px; }
.phr-day { flex: none; display: grid; place-content: center; justify-items: center; gap: 2px; width: 52px; height: 60px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); }
.phr-day small { font-size: 11px; font-weight: 600; } .phr-day b { font-size: 18px; font-weight: 700; }
.phr-day[aria-pressed="true"] { background: var(--phr-act); color: var(--phr-act-ink); border-color: transparent; }
.phr-day.other { width: 64px; border-style: dashed; border-color: var(--phr-empty-line); color: var(--phr-fill-ink); font-size: 12px; font-weight: 700; line-height: 1.2; }
.phr-day.other[aria-expanded="true"] { background: var(--phr-fill); }
.phr-calbox { display: grid; gap: 4px; }
.phr-cal-nav { display: flex; align-items: center; justify-content: space-between; }
.phr-cal-nav span { font-size: 15px; font-weight: 700; text-transform: capitalize; }
.phr-cal-nav button { width: 44px; height: 44px; border: 0; border-radius: 22px; background: var(--surface); color: var(--text); font-size: 20px; font-weight: 700; }
.phr-cal-nav button[disabled] { opacity: .4; cursor: default; }
.phr-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.phr-cal [role="row"] { display: contents; }
.phr-cal .wd { padding: 2px 0; font-size: 11px; font-weight: 700; color: var(--phr-hint); }
.phr-cal [role="gridcell"] { display: grid; place-items: center; }
.phr-cal button { width: 100%; max-width: 44px; height: 44px; border: 0; border-radius: 22px; background: transparent; color: var(--text); font-size: 14px; font-weight: 600; }
.phr-cal button.today { background: var(--phr-fill); color: var(--phr-fill-ink); }
.phr-cal button.sel { background: var(--phr-act); color: var(--phr-act-ink); }
.phr-cal button[disabled] { color: var(--phr-hint); opacity: .5; cursor: default; }
.phr-dt { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.phr-dt-f { display: grid; gap: 4px; font-size: 13px; color: var(--phr-hint); }
.phr-dt-f:first-child:not(:last-child) { flex: 1; min-width: 120px; }
.phr-dt-val { display: flex; align-items: center; height: 44px; padding: 0 10px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 16px; font-weight: 600; }
.phr-hm { display: flex; align-items: center; gap: 4px; color: var(--text); }
.phr-hm select { height: 44px; padding: 0 6px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 16px; }
.phr-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.phr-row2 button { min-height: 44px; border: 0; border-radius: 12px; font-size: 15px; font-weight: 600; }
.phr-cancel { background: var(--surface); color: var(--text); }
.phr-apply { background: var(--phr-act); color: var(--phr-act-ink); font-weight: 700; }
.phr-foot { display: grid; gap: 6px; padding: .5rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.phr-foot .error:empty { display: none; }
.phr-sum { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--phr-hint); }
.phr-sum span { min-width: 0; overflow-wrap: anywhere; }
.phr-sum button { flex: none; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--phr-fill-ink); font-size: 14px; font-weight: 600; }
.kb-open .phr-sum { display: none; }        /* clavier ouvert : seul le bouton reste */

/* Mode compact : clavier ouvert, ou peu de hauteur visible. En-tête sur une ligne, phrase sur une ligne (défile de côté,
   mots toujours touchables), champ en haut du panneau, « Garder » et « Passer » côte à côte, bouton collé au clavier. */
.kb-open dialog#composer, .kb-open .phr-sheet { max-height: calc(var(--vvh, 100dvh) - 4px); }
.kb-open .phr-sheet { height: calc(var(--vvh, 100dvh) - 4px); }
.kb-open .phr-sheet .grab, .low-h .phr-sheet .grab, .kb-open .phr-rule, .low-h .phr-rule { display: none; }
.kb-open .phr-head, .low-h .phr-head { align-items: center; padding: .35rem .75rem .1rem 1rem; }
.kb-open .phr-title, .low-h .phr-title { flex-wrap: nowrap; gap: 6px; padding-top: 0; font-size: 16px; white-space: nowrap; }
.kb-open .phr-title > span:first-child, .low-h .phr-title > span:first-child { flex: none; }
.kb-open .phr-circle, .low-h .phr-circle { min-width: 0; min-height: 32px; padding: 0 6px 0 10px; font-size: 14px; }
.kb-open .phr-head .close-x, .low-h .phr-head .close-x { width: 40px; height: 40px; }
.kb-open .phr-sentence, .low-h .phr-sentence { flex: none; padding: .25rem 1rem .4rem; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow-x: auto; overflow-y: hidden;
  overscroll-behavior: contain; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.kb-open .phr-sentence::-webkit-scrollbar, .low-h .phr-sentence::-webkit-scrollbar { display: none; }
.kb-open .phr-word, .low-h .phr-word { min-height: 34px; line-height: 30px; margin: 0 1px 0 0; padding: 0 9px; font-size: 15px; max-width: 70vw; }
.kb-open .phr-mode, .low-h .phr-mode { margin: 0 1px 0 0; padding: 2px; }
.kb-open .phr-mode button, .low-h .phr-mode button { min-height: 30px; padding: 0 9px; font-size: 15px; }
.kb-open .phr-panel, .low-h .phr-panel { gap: .5rem; padding: .4rem 1rem .4rem; border-top: 1px solid var(--border); }
.kb-open .phr-panel .phr-label, .low-h .phr-panel .phr-label { font-size: 13px; color: var(--phr-hint); }
.kb-open .phr-field, .low-h .phr-field { height: 48px; font-size: 16px; }           /* 16 px : Safari ne zoome pas */
.kb-open .phr-acts, .low-h .phr-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.kb-open .phr-keep, .kb-open .phr-skip, .low-h .phr-keep, .low-h .phr-skip { min-height: 40px; }
.kb-open .phr-foot { padding: .4rem 1rem .5rem; gap: 4px; }       /* le clavier couvre la zone de sécurité du bas */
.kb-open .phr-send, .low-h .phr-send { min-height: 48px; border-radius: 14px; font-size: 16px; box-shadow: none; }

/* ---------------------------------------------------------------- Suggestions pendant la saisie (livraison 6b, public/suggest-box.js)
   Couleurs du formulaire (--phr-*), donc contrastes déjà vérifiés en clair et en sombre. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sg-head { margin: 0; font-size: 13px; font-weight: 700; color: var(--phr-hint); }
.sg-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.sg-opt { border-radius: 14px; cursor: pointer; }
.sg-opt[aria-selected="true"], .sg-opt:hover { background: var(--phr-fill); }
.sg-opt[aria-selected="true"] { box-shadow: inset 0 0 0 2px var(--phr-act); }
.sg-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 8px 4px 4px; }
.sg-thumb { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: var(--phr-track); color: var(--phr-fill-ink); }
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sg-txt { flex: 1; min-width: 0; display: grid; }
.sg-txt b { font-size: 16px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-txt small { font-size: 13px; color: var(--phr-hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-tag { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--phr-fill); color: var(--phr-fill-ink); font-size: 12px; font-weight: 700; }
.sg-opt[aria-selected="true"] .sg-tag, .sg-opt:hover .sg-tag { background: var(--surface); }
.sg-foot { margin: 0; font-size: 12px; color: var(--phr-hint); }
/* Clavier ouvert : options plus basses, liste juste sous le champ (au moins 2 suggestions visibles) */
.kb-open .sg-row, .low-h .sg-row { min-height: 44px; padding: 2px 6px 2px 2px; }
.kb-open .sg-thumb, .low-h .sg-thumb { width: 36px; height: 36px; border-radius: 10px; }
.kb-open .sg-txt small, .low-h .sg-txt small { font-size: 12px; }
.kb-open .sg-head, .low-h .sg-head { display: none; }            /* la liste garde ce nom pour les lecteurs d'écran */
.kb-open .phr-panel .phr-label, .low-h .phr-panel .phr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- Aides au premier lancement (livraison 6c)
   Bulle : maquette docs/maquettes/Bulles.dc.html. --hb-* : couleurs (contrastes vérifiés par test/helps-unit.test.js).
   En sombre : la même bulle, contour 1 px #6B7BFF et ombre plus forte. */
:root { --hb-bg: #3f51e6; --hb-ink: #ffffff; --hb-step: #dde1ff; --hb-skip: #e6e8ff; --hb-btn: #ffffff; --hb-btn-ink: #2f3fc8;
  --hb-edge: transparent; --hb-shadow: 0 16px 40px rgba(63,81,230,.35); }
[data-theme="nuit"], [data-theme="ardoise"] { --hb-edge: #6b7bff; --hb-shadow: 0 16px 40px rgba(0,0,0,.6); }
.help-bubble { position: absolute; z-index: 5; display: flex; flex-direction: column; align-items: flex-start; --arrow-x: 40px; }
.help-bubble.up { flex-direction: column-reverse; }                 /* bulle au-dessus de l'élément : flèche en bas */
.hb-arrow { width: 0; height: 0; margin-left: var(--arrow-x); border-left: 12px solid transparent; border-right: 12px solid transparent; }
.help-bubble.down .hb-arrow { border-bottom: 14px solid var(--hb-bg); }
.help-bubble.up .hb-arrow { border-top: 14px solid var(--hb-bg); }
.hb-box { width: 100%; display: grid; gap: 10px; padding: 16px 18px; border-radius: 20px; background: var(--hb-bg); color: var(--hb-ink);
  border: 1px solid var(--hb-edge); box-shadow: var(--hb-shadow); overflow-y: auto; overscroll-behavior: contain; }
.hb-step { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--hb-step); }
.hb-title { font-size: 18px; font-weight: 700; }
.hb-text { margin: 0; font-size: 15px; line-height: 1.5; }
.hb-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hb-skip { min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--hb-skip); font-size: 14px; font-weight: 600; }
.hb-next { min-height: 44px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--hb-btn); color: var(--hb-btn-ink); font-size: 16px; font-weight: 700; }
.hb-skip:focus-visible, .hb-next:focus-visible { outline: 3px solid var(--hb-ink); outline-offset: 2px; }
.phr-sheet { position: relative; }
.phr-help { flex: none; width: 44px; height: 44px; border-radius: 22px; border: 1.5px solid var(--border); background: var(--surface); color: var(--phr-fill-ink); font-size: 18px; font-weight: 700; }
.kb-open .phr-help, .low-h .phr-help { display: none; }
/* Visite de l'accueil : calque qui bloque la page, contour blanc autour de l'élément, le reste assombri */
.tour-layer { position: fixed; inset: 0; z-index: 1000; touch-action: none; }    /* au-dessus de la barre du bas, du bouton Démo et des messages */
.tour-ring { position: absolute; pointer-events: none; box-shadow: 0 0 0 4px #ffffff, 0 12px 30px rgba(0,0,0,.25), 0 0 0 200vmax rgba(15,16,40,.55);
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease; }
@media (prefers-reduced-motion: reduce) { .tour-ring { transition: none; } }
.tour-on .shell { padding-bottom: calc(96px + 60vh + env(safe-area-inset-bottom)); }   /* page courte : place pour défiler */
.ev-card.example { filter: grayscale(.35); opacity: .9; }
.ev-card.example .ev-cover { position: relative; }
.ev-card.example .ev-title { white-space: normal; }
.ex-tag { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border-radius: 999px; background: #1b1b2f; color: #ffffff; font-size: 12px; font-weight: 700; }
.ev-who { margin: 0; padding: 0 .4rem; }

/* La feuille garde ses gestes de défilement ; la page derrière est figée (voir lockPage dans app.js) */
dialog#composer, .phr-sheet { overscroll-behavior: contain; }
html.sheet-lock, html.sheet-lock body { overflow: hidden; }
.phr-send { width: 100%; min-height: 56px; border: 0; border-radius: 18px; background: var(--phr-act); color: var(--phr-act-ink); font-size: 18px; font-weight: 700; padding: 0 1rem;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--phr-act) 30%, transparent); }
.phr-send[disabled] { background: var(--phr-off); color: var(--phr-off-ink); box-shadow: none; cursor: default; }
.phr-sent { flex: 1; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 24px 28px; text-align: center; }
.phr-ok { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 44px; background: var(--phr-ok); color: var(--phr-ok-ink); }
.phr-sent h3 { font-size: 26px; font-weight: 700; } .phr-sent h3:focus { outline: none; }
.phr-recap { font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.phr-to { font-size: 14px; color: var(--phr-hint); }
/* Rappels personnels (livraison 6e-4) : éditeur commun (formulaire et détail), pastille avec une cloche, bloc du détail.
   Hors du formulaire, les couleurs du formulaire (--phr-*) sont reprises des couleurs générales (contrastes ≥ 4,5:1). */
.sheet:not(.phr-sheet) .rem-ed { --phr-act: var(--primary-2); --phr-act-ink: var(--primary-ink); --phr-fill: var(--primary-soft); --phr-fill-ink: var(--text);
  --phr-empty-line: var(--border); --phr-hint: var(--muted); }
.rem-ed { display: grid; gap: .7rem; min-width: 0; }
.rem-chosen { display: flex; flex-wrap: wrap; gap: 8px; }
.rem-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px 0 14px; border: 0; border-radius: 999px;
  background: var(--phr-act); color: var(--phr-act-ink); font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; }
/* Grille de 8 bascules sur 2 lignes (4 colonnes), tout visible sans défilement ; un choix impossible reste en place, grisé */
.rem-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.rem-head h3 { font-size: 17px; font-weight: 700; } .rem-head h3:focus { outline: none; }
.rem-count { font-size: 13px; color: var(--phr-hint); }
.rem-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rem-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; border: 1.5px solid var(--border);
  border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.rem-cell[aria-pressed="true"] { background: var(--phr-act); border-color: transparent; color: var(--phr-act-ink); }
.rem-cell:disabled { opacity: .42; cursor: default; }
.rem-cell .rc-h { font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--phr-hint); }
.rem-cell[aria-pressed="true"] .rc-h { color: inherit; opacity: .9; }
.rem-other { justify-self: start; min-height: 44px; padding: 0 14px; border: 1.5px dashed var(--phr-empty-line); border-radius: 999px; background: var(--surface); color: var(--phr-fill-ink); font: inherit; font-size: 14px; font-weight: 600; }
.rem-sum { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface2); font-size: 13px; line-height: 1.45; color: var(--text); }
.rem-done { min-height: 48px; border: 0; border-radius: 14px; background: var(--phr-act); color: var(--phr-act-ink); font: inherit; font-size: 16px; font-weight: 700; }
.rem-custom { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: var(--surface2); }
.rem-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }     /* en grille, sans défilement de côté */
.rem-days .phr-day { width: auto; }
.rem-time { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rem-time .phr-apply { margin-left: auto; min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; }
.rem-custom .error:empty { display: none; }
.phr-word.phr-rem { display: inline-flex; align-items: center; gap: 6px; }
.phr-word.phr-rem svg { flex: none; }
.rem-sec { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem; border-radius: 14px; background: var(--surface2); }
.rem-sec-ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--surface); color: var(--primary-2); }
.rem-sec .ir-txt { flex: 1; min-width: 0; display: grid; }
.rem-sec .ir-txt small { color: var(--muted); overflow-wrap: anywhere; }
.rem-sec .btn { flex: none; min-height: 44px; }
/* « Je viens +1 » : accompagnants hors cercle (livraison 6e-3) */
.guests { display: grid; gap: .5rem; padding: .8rem .9rem; border-radius: 14px; background: var(--surface2); }
.gs-l { font-size: 14px; font-weight: 600; color: var(--muted); }
.gs-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.gs-opts button { min-height: 44px; min-width: 56px; padding: 0 14px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; }
.gs-opts button[aria-checked="true"] { background: var(--primary-2); border-color: transparent; color: var(--primary-ink); }   /* ≥ 4,5:1 en clair et en sombre */
/* Son à l'envoi : bouton discret de l'écran « C'est envoyé ! » (maquette) ; liens des messages ; « Ajouter à mon agenda » */
.phr-sound { min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--phr-hint); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.msg-link { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
a.set-row { text-decoration: none; }
.set-row.toggle-row { padding: .55rem .9rem; }
.set-row.toggle-row .toggle { flex: 1; }
.set-list.flat { display: grid; gap: .6rem; }
.phr-new { margin-top: 12px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 16px; background: var(--phr-fill); color: var(--phr-fill-ink); font-size: 16px; font-weight: 700; }
.dt-suis { margin-top: -.4rem; color: var(--muted); font-size: 15px; }
@media (max-height: 700px) { .phr-sentence { font-size: 20px; line-height: 1.6; } .phr-word, .phr-mode button { font-size: 18px; } }

/* ---------- « Un mot pour <organisateur> » (livraison 6f, maquettes Sortie et SortieSam) ----------
   --msg-* : couleurs (contrastes vérifiés par test/messages-unit.test.js). */
:root { --msg-act: #4f63f7; --msg-act-ink: #ffffff; --msg-ink: #3446d9; --msg-hint: #5d5e73; --msg-note: #3f4054; --msg-ok: #e3f4ec; --msg-ok-ink: #1f6b4f; --msg-err: #b3261e; --msg-line: #8083a0; }
[data-theme="nuit"], [data-theme="ardoise"] { --msg-ink: #c9cfff; --msg-hint: #a9abc2; --msg-note: #d3d5e6; --msg-ok: #173a30; --msg-ok-ink: #5fe3b3; --msg-err: #ff9a92; --msg-line: #7c7fa3; }
/* Bouton de 36 px comme dans la maquette, zone de toucher de 44 px (::after) ; badges des cercles à la ligne */
.msg-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--msg-ink); font: inherit; font-size: 13px; font-weight: 600; }
.msg-btn::after, .msg-idea::after { content: ""; position: absolute; inset: -5px 0; }
.msg-btn.on { background: var(--msg-act); border-color: transparent; color: var(--msg-act-ink); }
.org-row.has-msg .org-circles { flex-basis: 100%; }
.org-row.has-msg .org-circles:empty { display: none; }
.dt-qa { font-size: 14px; line-height: 1.5; color: var(--msg-hint); overflow-wrap: anywhere; }
.dt-qa-a { color: var(--text); }
.dt-qa .msg-link, .msg-sheet .msg-link { color: var(--msg-ink); }
/* ---------- Discussion (livraison 6g, maquette JourFil) : sur la fiche, carte « Bon à savoir » et barre « Discussion ».
   --chat-* : couleurs (contrastes vérifiés par test/chat-unit.test.js). Texte courant 17 px, 14 px au moins. */
:root { --chat-good: #fff6e2; --chat-good-line: #f1dfb4; --chat-good-ink: #7a4b00; --chat-good-text: #2e2410; --chat-good-who: #6b5223; --chat-live: #2fa36b; --chat-live-ink: #136b63; --chat-priv-line: #6f7ce8; }
[data-theme="nuit"], [data-theme="ardoise"] { --chat-good: #2b2414; --chat-good-line: #5c4822; --chat-good-ink: #f3c46b; --chat-good-text: #f4ead8; --chat-good-who: #d9c39a; --chat-live: #3ccf8a; --chat-live-ink: #5fe3b3; --chat-priv-line: #8b95e8; }
.good-card { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--chat-good); border: 1px solid var(--chat-good-line); color: var(--chat-good-text); font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.good-card h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 700; color: var(--chat-good-ink); }
.good-card h2 svg { flex: none; }
.good-card p { margin: 0; }
.good-who { color: var(--chat-good-who); font-size: 15px; }
.good-card .msg-link { color: var(--chat-good-ink); }
.cta-bar.has-chat { flex-wrap: wrap; padding-top: 1rem; }
.cta-bar.has-chat > .chat-bar { flex: 1 1 100%; }
.shell.tab-detail:has(.chat-bar) { padding-bottom: calc(196px + env(safe-area-inset-bottom)); }
.chat-bar { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 56px; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--chat-live) 35%, var(--border));
  border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font: inherit; text-align: left; }
.chat-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--chat-live); }
.chat-bar-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.chat-bar-txt > b { font-size: 15px; font-weight: 700; color: var(--chat-live-ink); }
.chat-bar-last { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-bar-last b { font-weight: 600; }
.chat-count { flex: none; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--msg-act); color: var(--msg-act-ink); font-size: 14px; font-weight: 700; }
/* Taille du texte de la feuille : 17 px au moins, plus si le téléphone est réglé sur un texte plus grand. Tout le contenu
   suit (em, « font: inherit »). Android (Chrome) : preferred-text-scale, 1 si inconnu. iPhone et iPad : la police
   « corps de texte » du système (17 px par défaut), avec notre police. Ne pas ajouter <meta name="text-scale"> sans
   retirer ce calcul : le texte serait agrandi deux fois. */
.msg-sheet { font-size: calc(17px * env(preferred-text-scale, 1)); line-height: 1.4; max-height: min(85dvh, calc(var(--vvh, 100dvh) - 12px)); }
@supports (font: -apple-system-body) and (-webkit-touch-callout: default) {
  .msg-sheet { font: -apple-system-body; font-family: inherit; line-height: 1.4; }
}
.msg-sheet > * { font-size: max(17px, 1em); }
.kb-open .msg-sheet { max-height: calc(var(--vvh, 100dvh) - 12px); }
.msg-sheet .sheet-head { padding: .2rem 1.2rem 0; }
.msg-sheet .sheet-head h2 { min-width: 0; font-size: max(24px, 1.1em); line-height: 1.2; overflow-wrap: anywhere; }
.msg-sheet .sheet-body { gap: .7rem; padding: .3rem 1.2rem .5rem; }
.msg-sheet .sheet-foot { padding: .4rem 1.2rem calc(.8rem + env(safe-area-inset-bottom)); }
.msg-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.msg-card { display: grid; gap: .5rem; padding: 10px 12px; border-radius: 12px; background: var(--surface2); overflow-wrap: anywhere; outline: none; }
.msg-card p, .msg-hint, .msg-error { margin: 0; }
.msg-card b { font-weight: 600; }
.msg-answer { padding-left: 10px; border-left: 2px solid var(--msg-line); }
.msg-hint { color: var(--msg-note); }
.msg-error { color: var(--msg-err); font-weight: 500; }
.msg-error:empty, .msg-status:empty { position: absolute; padding: 0; }      /* toujours présents (annoncés dès qu'ils se remplissent), sans espace dans la grille */
.msg-status { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--msg-ok); color: var(--msg-ok-ink); }
.msg-status svg { flex: none; }
.msg-ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-idea { position: relative; min-height: 36px; padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; line-height: 1.25; text-align: left; }
.msg-compose { display: flex; align-items: center; gap: 8px; }
.msg-input { width: 100%; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--msg-line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; }   /* 17 px au moins (Safari zoome sous 16 px) */
.msg-input::placeholder { color: var(--msg-hint); opacity: 1; }
.msg-input:focus { outline: 2px solid var(--msg-act); outline-offset: -1px; }
.msg-send { border-radius: 12px; background: var(--msg-act); color: var(--msg-act-ink); }
.msg-share { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.msg-share input { flex: none; width: 22px; height: 22px; accent-color: var(--msg-act); }
.msg-reply { justify-self: end; min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--msg-act); color: var(--msg-act-ink); font: inherit; font-weight: 600; }
.msg-del { justify-self: start; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--msg-note); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Discussion : la feuille (texte : celui de .msg-sheet, qui suit le réglage du téléphone ; ici, seulement des tailles
   relatives, 14 px au moins). Message privé : contour pointillé. Destinataire : vrais boutons radio (clavier, lecteurs d'écran). */
.chat-sheet .sheet-body { gap: .8rem; }
.chat-head { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.chat-sheet .good-card, .chat-sheet .good-card h2, .chat-sheet .good-who { font-size: inherit; }
.chat-good:empty { display: none; }
.chat-mute { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.chat-mute-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--msg-line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; }
.chat-muted { display: inline-flex; align-items: center; gap: 6px; color: var(--chat-good-ink); font-weight: 600; }
.chat-unmute { min-height: 44px; padding: 0 6px; border: 0; background: transparent; color: var(--msg-ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.chat-list { display: grid; justify-items: start; gap: 12px; margin: 0; padding: 0; list-style: none; }
.chat-msg { display: grid; justify-items: start; gap: 4px; max-width: 88%; outline: none; }
.chat-msg.mine { justify-self: end; justify-items: end; }
.chat-msg:has(.chat-reply) { width: 88%; }
.chat-bubble { padding: 10px 12px; border-radius: 16px 16px 16px 4px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); overflow-wrap: anywhere; }
.chat-bubble p { margin: 0; }
.chat-msg.mine > .chat-bubble:first-child { border-radius: 16px 16px 4px 16px; border-color: transparent; background: var(--msg-act); color: var(--msg-act-ink); }
.chat-msg.mine > .chat-bubble:first-child .msg-link { color: inherit; }
.chat-msg.priv > .chat-bubble { border: 1.5px dashed var(--chat-priv-line); background: var(--surface); color: var(--text); }
.chat-who { display: block; color: var(--msg-ink); font-weight: 600; }
.chat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 0; padding: 0 4px; color: var(--msg-note); font-size: max(14px, .82em); }
.chat-priv { display: inline-flex; align-items: center; gap: 4px; color: var(--msg-ink); }
.chat-priv svg, .chat-priv-hint svg { flex: none; }
.chat-pinned { color: var(--chat-good-ink); font-weight: 600; }
.chat-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; width: 100%; }
.chat-msg.mine .chat-acts { justify-content: flex-end; }
.chat-pin { min-height: 44px; padding: 0 2px; border: 0; background: transparent; color: var(--msg-note); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.chat-pin.suggest { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--chat-good-line); border-radius: 999px; background: var(--chat-good); color: var(--chat-good-ink); text-decoration: none; }
.chat-reply { display: grid; gap: 6px; width: 100%; }
.chat-to { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.chat-to-opt { position: relative; display: inline-flex; }
.chat-to-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chat-to-opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--msg-line); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; }
.chat-to-opt input:checked + span { border-color: transparent; background: var(--text); color: var(--surface); }
.chat-to-opt input[value="org"]:checked + span { background: var(--msg-act); color: var(--msg-act-ink); }
.chat-to-opt input:focus-visible + span { outline: 2px solid var(--msg-act); outline-offset: 2px; }
.chat-priv-hint { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--msg-ink); font-size: max(14px, .82em); }
.msg-compose.priv .msg-input { border-style: dashed; border-color: var(--chat-priv-line); }
