:root { --bg: #0f1419; --card: #16191e; --line: #2f3336; --text: #e7e9ea; --muted: #71767b; --accent: #f9a03f; --hover: rgba(231, 233, 234, .04); }
* { box-sizing: border-box; }
html { scrollbar-color: #3e4144 transparent; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.i { flex: none; }
.muted { color: var(--muted); }
.app { display: grid; grid-template-columns: 260px 600px 350px; justify-content: center; min-height: 100vh; }

/* Navigation */
.nav { position: sticky; top: 0; height: 100vh; padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.nav .logo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--accent); font-weight: 800; font-size: 24px; letter-spacing: -.02em; border-radius: 999px; }
.nav .item { display: flex; align-items: center; gap: 18px; padding: 12px; border-radius: 999px; font-size: 19px; transition: background .15s; }
.nav a.item:hover, .nav .logo:hover { background: rgba(231, 233, 234, .1); }
.nav .item.on { font-weight: 700; }
.nav .item.off { color: var(--muted); cursor: default; }
.nav .cta { margin-top: 14px; width: 100%; padding: 15px; border: 0; border-radius: 999px; background: var(--accent); color: #0f1419; font-weight: 800; font-size: 17px; text-align: center; opacity: .55; cursor: not-allowed; }

/* Colonne centrale */
.col { border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(15, 20, 25, .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar h2 { margin: 0; padding: 14px 16px; font-size: 20px; font-weight: 800; }
.back { display: flex; align-items: center; gap: 28px; padding: 4px 16px; min-height: 53px; }
.back a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.back a:hover { background: rgba(231, 233, 234, .1); }
.back h2 { padding: 0; font-size: 20px; }
.back small { color: var(--muted); font-size: 13px; }
.tabs { display: flex; }
.tabs > * { flex: 1; text-align: center; padding: 16px 8px; color: var(--muted); font-weight: 500; position: relative; }
.tabs > a:hover { background: rgba(231, 233, 234, .1); }
.tabs .on { color: var(--text); font-weight: 700; }
.tabs .on::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 56px; height: 4px; border-radius: 4px; background: var(--accent); }

.notice { margin: 12px 16px; padding: 12px 14px; border: 1px solid rgba(249, 160, 63, .35); background: rgba(249, 160, 63, .07); border-radius: 14px; font-size: 14px; color: #f3d6b4; }
.notice a, .notice code { color: var(--accent); }
.composer { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.composer .fake { flex: 1; font-size: 20px; color: var(--muted); padding: 10px 0; }
.composer button { border: 0; border-radius: 999px; background: var(--accent); color: #0f1419; font-weight: 700; padding: 8px 18px; opacity: .5; cursor: not-allowed; }

/* Avatars */
.av { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 17px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.av.xl { width: 134px; height: 134px; font-size: 54px; border: 4px solid var(--bg); }
.av.sm { width: 32px; height: 32px; font-size: 14px; }

/* Profil */
.banner { height: 200px; position: relative; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .35)); }
.phead-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 16px; }
.phead-row .av.xl { margin-top: -70px; position: relative; z-index: 1; }
.pinfo { padding: 4px 16px 0; }
.pinfo h1 { margin: 4px 0 0; font-size: 20px; font-weight: 800; line-height: 1.2; }
.pinfo .handle { color: var(--muted); }
.pinfo .bio { margin: 12px 0; white-space: pre-line; }
.pinfo .bio a, .ptext a { color: var(--accent); }
.pinfo .bio a:hover { text-decoration: underline; }
.pmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); }
.pmeta span { display: inline-flex; gap: 4px; align-items: center; }
.counts { display: flex; gap: 18px; margin: 12px 0 4px; color: var(--muted); }
.counts b { color: var(--text); }

.btn-follow { margin-top: 12px; padding: 8px 18px; border-radius: 999px; border: 0; background: var(--text); color: #0f1419; font-weight: 700; transition: .15s; }
.btn-follow:hover { background: #d7dbdc; }
.btn-follow.on { background: transparent; color: var(--text); border: 1px solid #536471; }
.btn-follow.sm { margin: 0; padding: 6px 14px; font-size: 14px; }

/* Posts */
.post { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background .15s; position: relative; animation: rise .45s both; }
.post:hover { background: var(--hover); }
.post.thread { border-bottom: 0; }
.post.thread .avlink::after { content: ""; position: absolute; left: 35px; top: 58px; bottom: 0; width: 2px; background: #333639; }
.pbody { min-width: 0; flex: 1; }
.phead { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.phead .name { font-weight: 700; }
.phead .name:hover { text-decoration: underline; }
.replyto { font-size: 14px; margin-top: 2px; }
.replyto a { color: var(--accent); }
.ptext { margin-top: 2px; overflow-wrap: anywhere; }
.pimg { display: block; width: 100%; margin-top: 12px; border-radius: 16px; border: 1px solid var(--line); }
.actions { display: flex; justify-content: space-between; max-width: 425px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.act { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: inherit; padding: 0; transition: color .15s; }
.act .i { width: 34px; height: 34px; padding: 8px; margin: -8px -4px -8px -8px; border-radius: 50%; transition: background .15s; }
.act.reply:hover { color: #1d9bf0; } .act.reply:hover .i { background: rgba(29, 155, 240, .12); }
.act.rt:hover { color: #00ba7c; } .act.rt:hover .i { background: rgba(0, 186, 124, .12); }
.act.like:hover, .act.like.on { color: #f91880; } .act.like:hover .i { background: rgba(249, 24, 128, .12); }
.act.like.on .i { fill: #f91880; animation: pop .35s; }
.act.views:hover, .act.share:hover { color: var(--accent); }

/* Recherche et listes de comptes */
.sbox { display: flex; align-items: center; gap: 10px; background: #202327; border: 1px solid transparent; border-radius: 999px; padding: 0 16px; color: var(--muted); }
.sbox:focus-within { border-color: var(--accent); background: var(--bg); color: var(--accent); }
.sbox input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; padding: 12px 0; }
.topbar .sbox { margin: 8px 16px; }
.ucell { display: flex; gap: 12px; padding: 12px 16px; align-items: flex-start; transition: background .15s; animation: rise .35s both; }
.ucell:hover { background: var(--hover); }
.ucell .who { flex: 1; min-width: 0; }
.ucell .who b { display: block; }
.ucell .who b:hover { text-decoration: underline; }
.ucell .ubio { margin-top: 4px; font-size: 14px; }
.empty { padding: 32px 24px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 24px; margin: 0 0 6px; }

/* Colonne de droite */
.side { padding: 6px 24px 40px; display: flex; flex-direction: column; gap: 16px; }
.side > .sbox { position: sticky; top: 0; z-index: 3; margin-top: 2px; }
.card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.card h3 { margin: 0; padding: 12px 16px; font-size: 20px; font-weight: 800; }
.card p { margin: 0; padding: 0 16px 14px; color: var(--muted); font-size: 14px; }
.trend { padding: 12px 16px; transition: background .15s; }
.trend:hover { background: var(--hover); }
.trend small { color: var(--muted); font-size: 13px; display: block; }
.trend b { display: block; margin: 2px 0; }
.foot { color: var(--muted); font-size: 13px; padding: 0 16px; line-height: 1.8; }
.foot a:hover { text-decoration: underline; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { 50% { transform: scale(1.3); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

@media (max-width: 1280px) { .app { grid-template-columns: 88px 600px 350px; } .nav { align-items: center; } .nav .label { display: none; } .nav .cta { width: 52px; height: 52px; padding: 0; font-size: 0; } .nav .cta::before { content: "+"; font-size: 26px; } }
@media (max-width: 1040px) { .side { display: none; } .app { grid-template-columns: 88px minmax(0, 600px); } }
@media (max-width: 640px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .nav { position: fixed; z-index: 10; inset: auto 0 0; height: auto; flex-direction: row; justify-content: space-around; background: rgba(15, 20, 25, .95); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 0; }
  .nav .logo, .nav .cta, .nav .item.off { display: none; }
  .col { border: 0; padding-bottom: 64px; }
  .banner { height: 130px; } .av.xl { width: 88px; height: 88px; font-size: 36px; } .phead-row .av.xl { margin-top: -44px; }
}
