/* =========================================================
   Communauté Renaskia — feuille de style
   Les couleurs de marque viennent de /theme.css (réglables dans .env)
   ========================================================= */
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --brand: #2D67E5; --brand-accent: #6C28DA; --brand-ink: #0B1440;
  --brand-hover: color-mix(in srgb, var(--brand) 85%, black);
  --brand-soft: color-mix(in srgb, var(--brand) 9%, white);
  --brand-softer: color-mix(in srgb, var(--brand) 5%, white);
  --link: color-mix(in srgb, var(--brand) 86%, black); /* contraste AA même sur fond bleuté */
  --bg: #F4F6FA; --surface: #FFFFFF; --surface-2: #F1F4F9;
  --text: #101828; --muted: #556075; --border: #E3E8F0; --border-strong: #CBD3E1;
  --danger: #C8281E; --success: #127A4B;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .12);
  --shadow-lg: 0 24px 64px -16px rgba(11, 27, 52, .35);
  --radius: 18px; --radius-sm: 12px;
  --focus: var(--brand);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --topbar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand-hover: color-mix(in srgb, var(--brand) 80%, white);
    --brand-soft: color-mix(in srgb, var(--brand) 22%, #0E1626);
    --brand-softer: color-mix(in srgb, var(--brand) 12%, #0E1626);
    --link: color-mix(in srgb, var(--brand) 50%, white);
    --bg: #0A111E; --surface: #111A2B; --surface-2: #17223A;
    --text: #E8EDF6; --muted: #9AA6BC; --border: #22304A; --border-strong: #33456A;
    --danger: #FF7A70; --success: #4ADE9B;
    --shadow-sm: none; --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px -12px rgba(0,0,0,.6);
    --focus: color-mix(in srgb, var(--brand) 45%, white);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -.01em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1.25em; height: 1.25em; flex-shrink: 0; vertical-align: -.25em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.pad { padding: 1rem; }
.grow { flex: 1; min-width: 0; }
.ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.error { color: var(--danger); font-weight: 500; margin: 0; }
.error:empty { display: none; }
ul.plain { list-style: none; margin: 0; padding: 0; }
.row-wrap { display: flex; flex-wrap: wrap; gap: .5rem; }
.row-center { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

/* Focus visible, très lisible (RGAA 10.7) */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible, .icon-btn:focus-visible { box-shadow: 0 0 0 2px var(--surface); }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; background: var(--brand); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 12px 12px; font-weight: 600; }
.skip-link:focus { top: 0; }

/* ---------- Boutons & champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 42px; padding: .5rem 1.15rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: .95rem; line-height: 1.2;
  transition: background .15s, border-color .15s, transform .1s; text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { color: var(--danger); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { min-height: 34px; padding: .3rem .85rem; font-size: .85rem; }
.btn.block { width: 100%; }
.btn.light { background: #fff; color: var(--brand-ink); border-color: #fff; }
.btn.light:hover { background: #E9EEFF; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn.ghost-light:hover { background: rgba(255,255,255,.12); }
.btn.icon-only { padding: 0; width: 44px; min-height: 44px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); transition: background .15s, color .15s; cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { background: var(--brand-soft); color: var(--link); }
.link { color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

:where(input:not([type=checkbox]):not([type=file]), textarea) {
  width: 100%; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); padding: .65rem .9rem;
  transition: border-color .15s, box-shadow .15s; }
:where(input, textarea):focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; }
.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field > small { display: block; margin-top: .3rem; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .92rem; margin-bottom: .6rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--brand); flex-shrink: 0; }

/* ---------- Barre supérieure ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--brand-ink); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 6px 24px -12px rgba(0,0,0,.5); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-accent)); }
.topbar-inner { max-width: 1240px; margin: 0 auto; height: var(--topbar-h); padding: 0 20px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none !important; flex-shrink: 0; }
.brand img { object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.brand-hl { color: color-mix(in srgb, var(--brand-accent) 55%, white); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.02em; }
.brand-sub { font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: color-mix(in srgb, var(--brand-accent) 70%, white); font-weight: 600; }
.top-search { flex: 1; max-width: 460px; position: relative; display: flex; align-items: center; }
.top-search .i { position: absolute; left: 14px; color: rgba(255,255,255,.75); pointer-events: none; }
.top-search input { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding-left: 2.6rem; min-height: 42px; }
.top-search input::placeholder { color: rgba(255,255,255,.75); }
.top-search input:focus { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.6); box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.top-actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.topbar :focus-visible { outline-color: #fff; }
.site-link { display: inline-flex; align-items: center; gap: .35rem; color: rgba(255,255,255,.9); font-size: .9rem; font-weight: 500; padding: .45rem .8rem; border-radius: 999px; }
.site-link:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.site-link #site-host { font-weight: 700; }
#me-box { display: flex; gap: .4rem; align-items: center; }
#me-box .btn.ghost { color: #fff; }
#me-box .btn.ghost:hover { background: rgba(255,255,255,.1); }
.me-chip { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 600; padding: 3px 12px 3px 3px; border-radius: 999px; background: rgba(255,255,255,.08); }
.me-chip:hover { background: rgba(255,255,255,.16); text-decoration: none; }

/* ---------- Mise en page ---------- */
.layout { display: grid; grid-template-columns: 236px minmax(0, 640px) 300px; gap: 28px; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.sidebar, .right { position: sticky; top: var(--topbar-h); align-self: start; max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; padding: 24px 0; scrollbar-width: thin; }
main { padding: 24px 0 80px; min-height: calc(100vh - var(--topbar-h)); outline: none; }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar a { position: relative; display: flex; align-items: center; gap: .85rem; padding: .7rem 1rem; border-radius: 14px; color: var(--text); font-weight: 500; transition: background .15s; }
.sidebar a:hover { background: var(--surface); text-decoration: none; box-shadow: var(--shadow-sm); }
.sidebar a .i { color: var(--muted); }
.sidebar a.current { background: var(--surface); color: var(--link); font-weight: 700; box-shadow: var(--shadow); }
.sidebar a.current .i { color: var(--link); }
.sidebar a.current::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: linear-gradient(var(--brand), var(--brand-accent)); }
.side-cta { margin-top: 1.25rem; }
.side-cta p { margin: 0 0 .75rem; color: var(--muted); }
.auth-only, .auth-only-block { display: none !important; }
body.logged .auth-only { display: list-item !important; }
body.logged .auth-only-block { display: block !important; }
body.logged .guest-only { display: none !important; }
.hide-desktop { display: none; }
.badge { display: none; margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700; align-items: center; justify-content: center; }
.badge.on { display: inline-flex; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 16px; box-shadow: var(--shadow); }
.card-title { font-size: 1.02rem; margin: 0 0 .9rem; display: flex; align-items: center; gap: .5rem; }
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.75rem; margin: 0 0 .25rem; }
.page-head p { margin: 0; }
.section-title { font-size: 1.15rem; margin: 1.5rem 0 .8rem; }
.back { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1rem; font-weight: 600; }
.about-card { background: linear-gradient(160deg, var(--brand-ink), color-mix(in srgb, var(--brand-ink) 70%, var(--brand))); color: #fff; border: 0; position: relative; overflow: hidden; }
.about-card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, black, transparent); pointer-events: none; }
.about-card .card-title { font-size: 1.3rem; }
.about-card .tagline { font-family: var(--font-display); font-size: 1.05rem; color: color-mix(in srgb, var(--brand-accent) 55%, white); margin: 0 0 1rem; font-weight: 600; }
.site-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; position: relative; }
.site-links a { display: flex; align-items: center; justify-content: space-between; color: #fff; padding: .5rem .65rem; border-radius: 10px; font-size: .92rem; font-weight: 500; }
.site-links a:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.site-links .i { opacity: .7; width: 1em; height: 1em; }
.about-card :focus-visible { outline-color: #fff; }
.trend { display: flex; align-items: center; gap: .8rem; padding: .5rem .4rem; border-radius: 12px; color: var(--text); }
.trend:hover { background: var(--surface-2); text-decoration: none; }
.trend > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.rank { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--link); font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.user-row { display: flex; align-items: center; gap: .7rem; padding: .45rem .4rem; border-radius: 12px; color: var(--text); }
.user-row:hover { background: var(--surface-2); text-decoration: none; }
.user-row > span { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font); font-size: .72rem; font-weight: 700; background: var(--brand-soft); color: var(--link); padding: 3px 10px; border-radius: 999px; vertical-align: middle; letter-spacing: 0; }
.pill .i { width: 1em; height: 1em; }

.avatar { border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; vertical-align: middle;
  color: #fff; font-weight: 700; font-family: var(--font-display); background: linear-gradient(135deg, hsl(var(--h, 220) 60% 42%), hsl(calc(var(--h, 220) + 40) 60% 34%)); }

/* ---------- Héros (visiteurs) ---------- */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 2.25rem 2rem; margin-bottom: 20px; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--brand-accent) 45%, transparent) 0%, transparent 45%),
              linear-gradient(135deg, var(--brand-ink) 0%, color-mix(in srgb, var(--brand-ink) 55%, var(--brand)) 60%, var(--brand) 100%);
  box-shadow: var(--shadow-lg); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: radial-gradient(80% 90% at 80% 20%, black, transparent); }
.hero > * { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .9rem; padding: .3rem .8rem; border-radius: 999px; background: rgba(255,255,255,.12); font-size: .82rem; font-weight: 600; letter-spacing: .02em; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 .75rem; max-width: 16ch; }
.hero p { margin: 0 0 1.5rem; max-width: 52ch; color: rgba(255,255,255,.9); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero :focus-visible { outline-color: #fff; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm); }
.tabs a { flex: 1; text-align: center; padding: .6rem .8rem; border-radius: 999px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.tabs a.on { color: #fff; background: var(--brand); box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--brand) 60%, transparent); }

/* ---------- Rédaction ---------- */
.composer { display: flex; gap: .9rem; }
.composer textarea { border: 0; background: transparent; box-shadow: none; padding: .55rem 0; font-size: 1.08rem; resize: none; min-height: 52px; }
.composer textarea:focus { box-shadow: none; }
.composer:focus-within { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.composer-bar { display: flex; align-items: center; gap: .15rem; border-top: 1px solid var(--border); padding-top: .65rem; margin-top: .5rem; }
.composer-bar label.icon-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.composer-bar .icon-btn { color: var(--link); }
.counter { margin-left: auto; margin-right: .75rem; }
.preview { position: relative; margin: .6rem 0; display: inline-block; }
.preview img { max-height: 320px; border-radius: 14px; display: block; }
.preview .rm { position: absolute; top: 8px; right: 8px; background: rgba(10,17,30,.75); color: #fff; }
.alt-field, .link-field { margin: .4rem 0 .6rem; }
.new-posts { position: sticky; top: calc(var(--topbar-h) + 12px); z-index: 20; display: flex; align-items: center; gap: .4rem; margin: 0 auto 14px; width: max-content;
  background: var(--brand); color: #fff; padding: .55rem 1.15rem; border-radius: 999px; font-weight: 600; box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--brand) 70%, transparent); }

/* ---------- Publication ---------- */
.post { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem .5rem; margin-bottom: 16px; box-shadow: var(--shadow); }
.repost-label { display: flex; align-items: center; gap: .4rem; margin: -.1rem 0 .7rem; font-size: .85rem; color: var(--muted); font-weight: 500; }
.repost-label a { color: var(--muted); font-weight: 700; }
.post-head { display: flex; align-items: center; gap: .8rem; }
.post-head .meta { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.name { font-weight: 700; color: var(--text); }
.name:hover { color: var(--link); }
.content { margin: .8rem 0 .6rem; overflow-wrap: anywhere; font-size: 1.03rem; }
.tag, .mention { font-weight: 600; }
.post-img { display: block; width: 100%; max-height: 560px; object-fit: cover; border-radius: 14px; margin: .5rem 0; border: 1px solid var(--border); background: var(--surface-2); }
.link-card { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; margin: .6rem 0; border: 1px solid var(--border); border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-softer), var(--surface)); color: var(--text); transition: border-color .15s; }
.link-card:hover { border-color: var(--brand); text-decoration: none; }
.lc-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; flex-shrink: 0; }
.lc-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.lc-text span { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card > .i { color: var(--muted); }
.quoted .post { margin: .7rem 0; box-shadow: none; background: var(--surface-2); }
.quoted .post .actions, .quoted .post .stats, .quoted .menu-wrap { display: none; }
.stats { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem 0; min-height: 2.4rem; }
.react-summary { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--muted); }
.react-bubbles { display: inline-flex; }
.react-bubbles span { width: 22px; height: 22px; display: grid; place-items: center; font-size: .8rem; border-radius: 50%; background: var(--surface); border: 2px solid var(--surface); margin-left: -6px; box-shadow: 0 0 0 1px var(--border); }
.react-bubbles span:first-child { margin-left: 0; }
.actions { display: flex; gap: 4px; border-top: 1px solid var(--border); padding-top: .35rem; }
.actions > button, .react-wrap > button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .5rem; border-radius: 12px;
  color: var(--muted); font-weight: 600; font-size: .92rem; transition: background .15s, color .15s; }
.actions > button:hover, .react-wrap > button:hover { background: var(--brand-soft); color: var(--link); }
.actions button.active { color: var(--link); }
.actions > button.bm { flex: 0 0 auto; width: 48px; }
.actions > button.bm.active .i { fill: currentColor; }
.emoji { font-size: 1.15rem; line-height: 1; }
.react-wrap { flex: 1; position: relative; display: flex; }
.react-wrap > button { width: 100%; }
.react-picker { position: absolute; bottom: calc(100% + 6px); left: 0; display: flex; gap: 2px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(8px) scale(.96); transform-origin: bottom left; transition: opacity .15s, transform .15s, visibility 0s .15s; z-index: 10; }
.react-wrap:hover .react-picker { transition-delay: .4s; }
.react-wrap:hover .react-picker, .react-wrap:focus-within .react-picker { opacity: 1; visibility: visible; transform: none; }
.react-wrap:focus-within .react-picker { transition-delay: 0s; }
.react-picker button { font-size: 1.6rem; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: transform .12s; }
.react-picker button:hover, .react-picker button:focus-visible { transform: scale(1.25) translateY(-3px); }
.react-picker button[aria-pressed=true] { background: var(--brand-soft); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 30; }
.menu button { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; padding: .6rem .8rem; border-radius: 10px; font-weight: 500; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }

/* Squelettes de chargement */
.skeleton { pointer-events: none; padding-bottom: 1.1rem; }
.sk-head { display: flex; gap: .8rem; align-items: center; }
.sk-circle { width: 44px; height: 44px; border-radius: 50%; }
.sk-lines { flex: 1; display: grid; gap: 8px; }
.sk-lines i { height: 10px; border-radius: 6px; width: 40%; }
.sk-lines i + i { width: 25%; }
.sk-block { display: block; height: 64px; border-radius: 10px; margin-top: 1rem; }
.sk-circle, .sk-lines i, .sk-block, .skeleton-line { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton-line { height: 12px; border-radius: 6px; margin: .6rem 0; }
.skeleton-line.short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Commentaires ---------- */
.comments { border-top: 1px solid var(--border); padding: .9rem 0 .5rem; }
.comment-form { display: flex; gap: .6rem; align-items: center; margin-bottom: .75rem; }
.comment-form input[name=content] { border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.comment-form input[name=content]:focus { background: var(--surface); border-color: var(--brand); }
.comment-form .send { color: var(--link); }
.login-hint { background: var(--brand-softer); padding: .75rem 1rem; border-radius: 12px; margin: 0 0 .75rem; }
.reply-to { margin: -.4rem 0 .6rem 48px; color: var(--muted); }
.comment-list, .replies { list-style: none; margin: 0; padding: 0; }
.comment { display: flex; gap: .6rem; margin: .65rem 0; }
.c-body { flex: 1; min-width: 0; }
.bubble { display: inline-block; max-width: 100%; padding: .55rem .9rem; border-radius: 4px 18px 18px 18px; background: var(--surface-2); overflow-wrap: anywhere; }
.bubble .name { display: block; font-size: .9rem; }
.c-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .9rem; padding: .25rem .7rem; }
.c-actions button { color: var(--muted); font-weight: 700; font-size: .82rem; min-height: 28px; }
.c-actions button:hover { color: var(--link); }
.c-actions button.active { color: var(--link); }
.replies { margin-left: .25rem; padding-left: .75rem; border-left: 2px solid var(--border); }
.replies .avatar { width: 28px !important; height: 28px !important; font-size: 12px !important; }

/* ---------- Profil ---------- */
.profile { padding: 0; overflow: hidden; }
.cover { height: 160px; position: relative;
  background: radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--brand-accent) 55%, transparent), transparent 55%),
              linear-gradient(120deg, var(--brand-ink), var(--brand)); }
.cover::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 24px 24px; }
.p-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; padding: 0 1.5rem; margin-top: -52px; position: relative; }
.p-head .avatar { border: 5px solid var(--surface); box-shadow: var(--shadow); }
.p-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: .4rem; }
.p-body { padding: .75rem 1.5rem 1.5rem; }
.p-body h1 { font-size: 1.6rem; margin: 0 0 .2rem; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.p-body > p { margin: 0 0 .5rem; }
.bio { font-size: 1.02rem; }
.p-stats { display: flex; gap: 1.75rem; margin: 1rem 0 0; }
.p-stats div { display: flex; flex-direction: column-reverse; }
.p-stats dt { color: var(--muted); font-size: .85rem; }
.p-stats dd { margin: 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }

/* ---------- Recherche ---------- */
.search-form { display: flex; align-items: center; gap: .6rem; padding: .6rem .6rem .6rem 1rem; }
.search-form input { border: 0; box-shadow: none !important; padding-left: .2rem; background: transparent; }
.search-form > .i { color: var(--muted); }

/* ---------- Notifications ---------- */
.list-card { padding: .5rem; }
.notif { display: flex; gap: .9rem; align-items: center; padding: .8rem; border-radius: 14px; color: var(--text); }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.unread { background: var(--brand-softer); }
.notif.unread::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-left: auto; flex-shrink: 0; }
.n-avatar { position: relative; flex-shrink: 0; }
.n-type { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--brand); border: 2px solid var(--surface); }
.n-type .i { width: 12px; height: 12px; }
.t-follow { background: #7C3AED; } .t-repost { background: #0F7A5A; } .t-mention { background: #B45309; } .t-like { background: #C8281E; }

/* ---------- Messagerie ---------- */
.chat { display: grid; grid-template-columns: 260px 1fr; padding: 0; height: min(72vh, 720px); overflow: hidden; }
.conv-list { border-right: 1px solid var(--border); overflow-y: auto; padding: .4rem; }
.conv { display: flex; gap: .75rem; align-items: center; padding: .7rem; border-radius: 14px; color: var(--text); }
.conv:hover { background: var(--surface-2); text-decoration: none; }
.conv[aria-current] { background: var(--brand-soft); }
.conv .grow { display: flex; flex-direction: column; }
.conv-av { position: relative; }
.dot { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: #8A94A6; border: 2.5px solid var(--surface); }
.dot.on { background: #16A34A; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); }
.chat-empty .i { width: 48px; height: 48px; opacity: .5; }
.chat-head { display: flex; align-items: center; gap: .65rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.chat-head a { color: var(--text); }
.back-m { display: none !important; }
.msgs { flex: 1; overflow-y: auto; padding: 1rem; background: var(--bg); }
.msg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.msg { align-self: flex-start; max-width: 76%; padding: .55rem .9rem; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 1px solid var(--border); overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 18px 18px 6px 18px; }
.msg.mine a { color: #fff; text-decoration: underline; }
.msg small { display: block; font-size: .72rem; opacity: .8; margin-top: 2px; }
.msg-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--border); }
.msg-form input { border-radius: 999px; }

/* ---------- Paramètres ---------- */
.avatar-edit { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.avatar-edit label:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch { display: flex; align-items: flex-start; gap: .9rem; cursor: pointer; margin-bottom: 1rem; position: relative; }
.switch input { position: absolute; opacity: 0; width: 46px; height: 26px; margin: 0; cursor: pointer; }
.switch .track { width: 46px; height: 26px; border-radius: 999px; background: var(--border-strong); position: relative; flex-shrink: 0; transition: background .2s; margin-top: 2px; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.code { background: var(--brand-ink); color: #E6EDF7; padding: 1rem; border-radius: 12px; overflow-x: auto; font-size: .85rem; line-height: 1.6; }
.reports li { border-top: 1px solid var(--border); padding: .8rem 0; }
.reports p { margin: 0 0 .4rem; color: var(--text); }
.reports blockquote { margin: 0 0 .6rem; padding: .5rem .8rem; border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--text); }

/* ---------- États vides & pages ---------- */
.empty-state { text-align: center; padding: 2.5rem 1.5rem; }
.empty-state h1, .empty-state h2 { font-size: 1.3rem; margin: .8rem 0 .4rem; }
.empty-state p { margin: 0 0 1.2rem; }
.empty-art { width: 64px; height: 64px; margin: 0 auto; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-accent)); box-shadow: 0 12px 24px -10px var(--brand); }
.empty-art .i { width: 30px; height: 30px; }
.prose { padding: 2rem; font-size: 1.02rem; }
.prose h1 { font-size: 1.9rem; margin-top: 0; }
.prose h2 { font-size: 1.2rem; margin: 1.8rem 0 .6rem; }
.prose .lead { font-size: 1.12rem; color: var(--muted); }
.prose li { margin-bottom: .35rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 1.5rem 20px 2rem; text-align: center; }
.site-footer ul { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.4rem; }
.site-footer a { color: var(--text); font-size: .9rem; font-weight: 500; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--link); }
.site-footer p { margin: 0; }

/* ---------- Fenêtres modales ---------- */
dialog.modal { border: 0; border-radius: 22px; padding: 1.75rem; background: var(--surface); color: var(--text); width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(6, 12, 24, .6); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
dialog.modal h2 { margin: 0 0 1rem; font-size: 1.35rem; padding-right: 2rem; }
.modal .close { position: absolute; top: 12px; right: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.auth-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.auth-brand img { object-fit: contain; }
.auth-brand p { margin: 0; font-family: var(--font-display); font-weight: 600; }
.register-only { display: none; }
dialog.register .register-only { display: block; }
dialog.register .login-only { display: none; }
.consent { background: var(--surface-2); border-radius: 14px; padding: .9rem 1rem .5rem; margin-bottom: 1rem; }
.consent a { text-decoration: underline; }
#auth-form .btn.block { margin-top: .5rem; }
.share-list { display: grid; gap: 4px; margin-bottom: 1rem; }
.share-list button { display: flex; align-items: center; gap: .9rem; padding: .75rem .9rem; border-radius: 14px; text-align: left; }
.share-list button:hover { background: var(--surface-2); }
.share-list .i { width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--brand-soft); color: var(--link); }
.share-list span { display: flex; flex-direction: column; line-height: 1.3; }
.share-list small { color: var(--muted); }
.share-ext { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .4rem; }
.share-ext button { padding: .6rem .3rem; border: 1px solid var(--border-strong); border-radius: 12px; font-weight: 600; font-size: .85rem; }
.share-ext button:hover { border-color: var(--brand); color: var(--link); }

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translate(-50%, 20px); max-width: min(92vw, 480px);
  background: var(--brand-ink); color: #fff; padding: .8rem 1.3rem; border-radius: 14px; font-weight: 500; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility 0s .2s; }
#toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
#toast:empty { display: none; }

/* ---------- Widget intégré ---------- */
body.embed { background: transparent; padding: 2px; }
body.embed:has(dialog[open]) { min-height: 720px; }
.embed-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .75rem; }
.embed-title { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; margin: 0; }
.embed-title .muted { font-family: var(--font); font-weight: 500; font-size: .9rem; }
.embed-user { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.post.thread > .post-head, .post.thread > .content, .post.thread > .link-card, .post.thread > .repost-label { display: none; }
.post.thread { padding-top: .25rem; }
.embed-foot { text-align: center; color: var(--muted); }
.embed-foot .i { width: 1em; height: 1em; }
.embed #toast { bottom: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); }
  .right { display: none; }
}
@media (max-width: 780px) {
  :root { --topbar-h: 58px; }
  .topbar-inner { gap: 12px; padding: 0 12px; }
  .top-search, .site-link span, .hide-mobile { display: none !important; }
  .hide-desktop { display: list-item; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 0 10px; }
  .sidebar { position: fixed; z-index: 60; inset: auto 0 0 0; top: auto; max-height: none; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); overflow: visible;
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px -10px rgba(0,0,0,.2); }
  .sidebar ul { flex-direction: row; justify-content: space-around; }
  .sidebar li { flex: 1; }
  .sidebar a { flex-direction: column; gap: 2px; padding: .45rem .2rem; font-size: .68rem; border-radius: 12px; }
  .sidebar a.current { box-shadow: none; background: var(--brand-soft); }
  .sidebar a.current::before { display: none; }
  .sidebar a .i { width: 22px; height: 22px; }
  .sidebar .badge { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: .65rem; }
  main { padding: 14px 0 96px; }
  .site-footer { padding-bottom: 96px; }
  .hero { padding: 1.75rem 1.4rem; border-radius: 20px; }
  body.logged .sidebar .side-cta, body.logged .sidebar li.hide-mobile { display: none !important; }
  .tabs a { font-size: .9rem; padding: .55rem .4rem; }
  .composer textarea { min-height: 5.2em; }
  .post { padding: 1rem 1rem .4rem; }
  .actions > button span, .react-wrap > button span:not(.emoji) { font-size: .85rem; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - var(--topbar-h) - 200px); }
  .chat.has-chat .conv-list { display: none; }
  .chat:not(.has-chat) .chat-pane { display: none; }
  .back-m { display: inline-flex !important; }
  .p-head { padding: 0 1rem; }
  .p-body { padding: .75rem 1rem 1.25rem; }
  .prose { padding: 1.4rem; }
}
@media (max-width: 420px) {
  .actions > button span:not(.emoji), .react-wrap > button span:not(.emoji) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Préférences d'accessibilité ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .card, .post, .tabs a.on { border: 1px solid CanvasText; }
  .sidebar a.current { outline: 2px solid Highlight; }
}
@media print {
  .topbar, .sidebar, .right, .actions, .site-footer, .composer { display: none !important; }
  .layout { display: block; }
}

/* =========================================================
   v3 : sécurité, Premium, administration, retours
   ========================================================= */
/* Fenêtre de connexion : affichage selon l'étape */
#auth-dialog .m-login, #auth-dialog .m-register, #auth-dialog .m-2fa, #auth-dialog .m-forgot { display: none; }
#auth-dialog[data-mode=login] .m-login, #auth-dialog[data-mode=register] .m-register,
#auth-dialog[data-mode="2fa"] .m-2fa, #auth-dialog[data-mode=forgot] .m-forgot { display: block; }
#auth-dialog[data-mode=login] .auth-links .m-login { display: inline; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: .4rem; margin-top: .8rem; }
.auth-logo-wide { height: 64px; width: auto; max-width: 260px; object-fit: contain; }
@media (prefers-color-scheme: dark) { .auth-logo-wide { background: #fff; padding: 6px 12px; border-radius: 12px; } }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
.pw-meter { display: block; height: 4px; border-radius: 4px; background: var(--border); margin-top: .45rem; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.pw-meter[data-score="1"] i { width: 25%; background: var(--danger); }
.pw-meter[data-score="2"] i { width: 50%; background: #D97706; }
.pw-meter[data-score="3"] i { width: 75%; background: #65A30D; }
.pw-meter[data-score="4"] i { width: 100%; background: var(--success); }
.code-input { font-size: 1.4rem !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success { color: var(--success); font-weight: 500; margin: 0; }
.success:empty { display: none; }

/* Badges */
.name-row { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.badge-premium, .badge-supporter { font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; line-height: 1.4; }
.badge-premium { color: #fff; background: linear-gradient(135deg, #B7791F, #D69E2E); }
.badge-supporter { color: var(--link); background: var(--brand-soft); }
.badge-staff { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-accent)); }
.badge-staff .i { width: 12px; height: 12px; }
.pill.ok { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: #0B5E38; }
@media (prefers-color-scheme: dark) { .pill.ok { color: var(--success); } }
.pill.warn { background: color-mix(in srgb, #B45309 12%, var(--surface)); color: #92400E; }
@media (prefers-color-scheme: dark) { .pill.warn { color: #FBBF24; } }
.pill.premium { background: linear-gradient(135deg, #B7791F, #D69E2E); color: #fff; }
.pill.supporter { background: var(--brand-soft); color: var(--link); }

/* Encadrés */
.notice { display: flex; align-items: center; gap: .9rem; }
.notice > .i { width: 28px; height: 28px; color: var(--link); flex-shrink: 0; }
.notice > div { flex: 1; }
.notice.warn { border-color: color-mix(in srgb, #D97706 45%, var(--border)); background: color-mix(in srgb, #D97706 7%, var(--surface)); }
.notice.ok { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); background: color-mix(in srgb, var(--success) 7%, var(--surface)); }
.notice.ok > .i { color: var(--success); }
.narrow { max-width: 460px; margin: 0 auto; }
.narrow h1 { font-size: 1.4rem; margin-top: 0; }
.inline-form { display: flex; gap: .5rem; margin-bottom: 1rem; }
.inline-form input { flex: 1; }

/* Sécurité */
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sec-row > div:first-child { flex: 1; min-width: 220px; }
.sub-title { font-size: .95rem; margin: 1.2rem 0 .4rem; }
.sessions li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.sessions li > .i { width: 26px; height: 26px; color: var(--muted); }
.qr { display: grid; place-items: center; margin: 1rem 0 .5rem; }
.qr img { border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--border); }
.secret { font-size: .95rem; letter-spacing: .05em; word-break: break-all; }
.steps { padding-left: 1.2rem; margin: 0 0 .5rem; }
.codes { list-style: none; padding: 1rem; margin: 1rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1rem; background: var(--surface-2); border-radius: 12px; font-size: 1.05rem; }

/* Premium */
.premium-hero { background: radial-gradient(120% 120% at 100% 0%, rgba(214,158,46,.45) 0%, transparent 45%), linear-gradient(135deg, var(--brand-ink) 0%, color-mix(in srgb, var(--brand-ink) 55%, var(--brand)) 70%, var(--brand) 100%); }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.perks li { display: flex; gap: .6rem; align-items: flex-start; font-size: 1.02rem; }
.perks .i { color: #FCD34D; margin-top: .15rem; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 1rem; }
.offer { position: relative; display: flex; flex-direction: column; margin: 0; }
.offer h2 { font-size: 1.1rem; margin: 0 0 .4rem; }
.offer .btn { margin-top: auto; }
.offer.featured { border: 2px solid var(--brand); box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--brand) 60%, transparent); }
.offer-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.price { margin: .2rem 0 .8rem; }
.price b { font-family: var(--font-display); font-size: 1.9rem; }
.price span { color: var(--muted); }
.pay-trust { max-width: 52ch; margin: 0 auto 1rem; }
.nav-premium .i { color: #B7791F !important; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* Administration */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stat b { font-family: var(--font-display); font-size: 1.6rem; }
.stat small { color: var(--muted); }
.fb-item { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.fb-item.s-résolu, .fb-item.s-archiv { opacity: .65; }
.fb-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.fb-msg { white-space: pre-wrap; margin: .6rem 0; overflow-wrap: anywhere; }
.fb-shot { max-width: 260px; max-height: 180px; border-radius: 10px; border: 1px solid var(--border); display: block; margin: .4rem 0; }
.fb-actions select, .fb-actions input { width: auto; min-height: 34px; padding: .3rem .6rem; border-radius: 10px; border: 1.5px solid var(--border-strong); background: var(--surface); }
.fb-actions input { flex: 1; min-width: 160px; }
.pill.t-bug { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.stars-ro { color: #D69E2E; letter-spacing: .05em; }

/* Formulaire de retour */
.field-legend { font-weight: 600; font-size: .92rem; margin-bottom: .45rem; padding: 0; }
.feedback-form fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.fb-types { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .85rem; border-radius: 999px; border: 1.5px solid var(--border-strong); font-weight: 600; font-size: .9rem; }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 1.9rem; color: var(--border-strong); cursor: pointer; line-height: 1; padding: 0 2px; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #D69E2E; }
.stars input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.feedback-form input[type=file] { font-size: .9rem; }
dialog.modal:has(.feedback-form) { width: min(520px, calc(100vw - 24px)); }
.side-feedback { display: flex; align-items: center; gap: .6rem; width: 100%; margin-top: 1rem; padding: .7rem 1rem; border-radius: 14px; border: 1.5px dashed var(--border-strong); color: var(--muted); font-size: .88rem; font-weight: 600; text-align: left; }
.side-feedback:hover { border-color: var(--brand); color: var(--link); background: var(--surface); }
.link-btn { color: var(--text); font-size: .9rem; font-weight: 500; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.link-btn:hover { color: var(--link); }
.fab-feedback { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.1rem; border-radius: 999px;
  background: var(--brand-ink); color: #fff; font-weight: 600; box-shadow: var(--shadow-lg); transition: transform .15s; }
.fab-feedback:hover { transform: translateY(-2px); }
.admin-only { display: none !important; }
body.is-admin .admin-only { display: list-item !important; }
.embed-logo { object-fit: contain; }

@media (max-width: 1140px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 780px) {
  .fab-feedback { bottom: calc(84px + env(safe-area-inset-bottom)); right: 12px; padding: .65rem; }
  .fab-feedback span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  body.is-admin .sidebar li.admin-only { display: none !important; }
}

/* ---------- Logo Renaskia bien visible ---------- */
.brand.has-wide #brand-logo, .brand.has-wide .brand-text { display: none; }
.brand #brand-wide { height: 54px; width: auto; display: block; }
.brand.has-wide::after { content: "Communauté"; align-self: flex-end; margin: 0 0 6px -2px; font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700;
  color: color-mix(in srgb, var(--brand-accent) 45%, white); }
.about-logo { display: block; height: 66px; width: auto; max-width: 100%; margin: 0 0 .9rem; position: relative; }
.hero.has-mark { padding-right: 250px; min-height: 300px; }
.hero-mark { position: absolute !important; right: 18px; top: 50%; transform: translateY(-50%); width: 220px; height: auto;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); pointer-events: none; }
.footer-logo { display: inline-block; margin-bottom: .8rem; }
.footer-logo img { height: 56px; width: auto; }
@media (prefers-color-scheme: dark) { .footer-logo img { background: #fff; padding: 6px 14px; border-radius: 12px; } }
.embed-logo { height: 42px; width: auto; }
@media (max-width: 780px) {
  .brand #brand-wide { height: 36px; }
  .brand.has-wide::after { display: none; }
  .hero.has-mark { padding-right: 1.4rem; padding-top: 150px; }
  .hero-mark { top: 16px; right: 50%; transform: translateX(50%); width: 130px; }
}
