/* Site Berry Games — thème marin (bleu nuit / or), repris de la page des paliers Patreon */
:root {
  --bg: #0b141d;
  --bg-2: #0f1b27;
  --surface: #13212e;
  --surface-2: #182a3a;
  --border: #23384a;
  --text: #e8eef3;
  --muted: #8a9ba8;
  --sea: #5fb4d9;
  --sea-strong: #3d9cc7;
  --gold: #dab25f;
  --berry: #e0567a;
  --ok: #5fc98a;
  --danger: #e06a5f;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font-display: "Fredoka", system-ui, sans-serif;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 70% -10%, #16324a 0%, transparent 60%), var(--bg);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- En-tête ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 20, 29, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-2); }
.spacer { flex: 1; }
.user-area { display: flex; align-items: center; gap: 10px; }
.gems-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(95, 180, 217, 0.12); border: 1px solid rgba(95, 180, 217, 0.3);
  font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums;
}
.gem-icon { width: 16px; height: 16px; flex: none; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; background: var(--surface-2);
  display: grid; place-items: center; font-weight: 700; color: var(--sea);
  border: 2px solid var(--border); flex: none;
}
.lang-btn { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.lang-btn:hover { color: var(--text); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--surface-2); color: var(--text); border-color: var(--border);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; background: #1f3549; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-patreon { background: #ff424d; border-color: #ff424d; color: #fff; }
.btn-patreon:hover { background: #ff5a63; }
.btn-primary { background: var(--sea-strong); border-color: var(--sea-strong); color: #fff; }
.btn-primary:hover { background: var(--sea); }
.btn-gold { background: rgba(218, 178, 95, 0.15); border-color: rgba(218, 178, 95, 0.4); color: var(--gold); }
.btn-small { padding: 6px 12px; font-size: 14px; }
.btn-ghost { background: none; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }

/* ---------- Badges de palier ---------- */
.tier-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px solid;
}
.tier-badge.sailor { color: var(--sea); background: rgba(95, 180, 217, 0.12); border-color: rgba(95, 180, 217, 0.35); }
.tier-badge.captain { color: var(--gold); background: rgba(218, 178, 95, 0.12); border-color: rgba(218, 178, 95, 0.4); }
.tier-badge.none { color: var(--muted); background: var(--surface); border-color: var(--border); }

/* ---------- Héros ---------- */
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 10px; }
.hero h1 span { color: var(--gold); }
.hero p { color: var(--muted); max-width: 560px; font-size: 17px; }
.hero .actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: 24px 0; overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; }
.tab {
  background: none; border: none; color: var(--muted); font: inherit; font-weight: 600;
  padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 20px; }

.game { display: grid; grid-template-columns: 360px 1fr; overflow: hidden; margin-bottom: 24px; }
.game-cover { position: relative; background: var(--bg-2); min-height: 220px; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.game-body h2 { font-size: 28px; }
.game-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.version-pill { background: rgba(224, 86, 122, 0.15); color: #f28aa6; border: 1px solid rgba(224, 86, 122, 0.35); padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.downloads { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-locked { background: var(--bg-2); color: var(--muted); border-style: dashed; cursor: default; }
.dl-locked:hover { background: var(--bg-2); }
.lock-note { font-size: 14px; color: var(--muted); }

.notes { font-size: 15px; color: #cfd9e1; }
.notes h4 { font-size: 16px; color: var(--text); margin: 10px 0 4px; }
.notes ul { padding-left: 20px; margin: 4px 0; }
.notes p { margin: 4px 0; }
details.older { border-top: 1px solid var(--border); padding-top: 10px; }
details.older summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
details.older summary:hover { color: var(--text); }
.old-release { margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--border); }
.old-release .game-meta { margin-bottom: 4px; }

@media (max-width: 760px) {
  .game { grid-template-columns: 1fr; }
  .game-cover { min-height: 180px; aspect-ratio: 16 / 10; }
  .logo span { display: none; }
}
@media (max-width: 640px) {
  .topbar .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; row-gap: 4px; gap: 10px; }
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .nav a { padding: 6px 10px; }
  .user-area { gap: 6px; }
  .user-area .btn-ghost { padding: 6px 8px; }
}

/* ---------- Réseau social (aperçu) ---------- */
.feed { display: grid; gap: 16px; max-width: 620px; }
.post { padding: 16px; }
.post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), #1d3245, var(--surface-2)); border-radius: 8px; }
.post-img { aspect-ratio: 4 / 3; border-radius: 10px; display: grid; place-items: center; color: var(--muted); font-weight: 600; text-align: center; padding: 16px; }
.soon { padding: 24px; text-align: center; }
.soon h3 { font-size: 22px; margin-bottom: 6px; }

/* ---------- Profil ---------- */
.profile-head { position: relative; overflow: hidden; margin: 32px 0 24px; }
.profile-banner { height: 120px; background: linear-gradient(120deg, #173a55, #2a2118 70%, #3b2a14); }
.profile-id { display: flex; gap: 20px; align-items: flex-end; padding: 0 24px 24px; margin-top: -48px; flex-wrap: wrap; }
.profile-id .avatar { width: 112px; height: 112px; font-size: 40px; border: 4px solid var(--surface); }
.profile-id h1 { font-size: 30px; }
.profile-id .sub { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 6px; }
.profile-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }
.section-title { font-size: 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.section-title .tag { font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.stack { display: grid; gap: 24px; }

.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slot {
  aspect-ratio: 3 / 4; border-radius: 12px; border: 2px dashed var(--border);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 48px; color: var(--border);
  background: var(--bg-2);
}
.played { display: grid; gap: 10px; }
.played-row { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; background: var(--bg-2); }
.played-row img { width: 72px; height: 44px; object-fit: cover; border-radius: 6px; }
.played-row .hours { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty { padding: 18px; border-radius: 10px; background: var(--bg-2); color: var(--muted); font-size: 15px; }

.gem-balance { display: flex; align-items: center; gap: 10px; font-size: 40px; font-weight: 800; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.gem-balance .gem-icon { width: 32px; height: 32px; }
.history { list-style: none; display: grid; gap: 6px; margin-top: 12px; font-size: 14px; }
.history li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--bg-2); border-radius: 8px; }
.history .plus { color: var(--ok); font-weight: 700; font-variant-numeric: tabular-nums; }
.history .minus { color: var(--danger); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Formulaires (admin) ---------- */
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sea-strong); outline-offset: 0; border-color: transparent; }
textarea { min-height: 160px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.link-row { display: grid; grid-template-columns: 120px 1fr 150px auto; gap: 8px; margin-bottom: 8px; }
@media (max-width: 640px) { .link-row { grid-template-columns: 1fr 1fr; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
td.num { font-variant-numeric: tabular-nums; }
.inline-form { display: flex; gap: 6px; }
.inline-form input { width: 90px; padding: 6px 8px; }
.release-list { display: grid; gap: 8px; margin-top: 12px; }
.release-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--bg-2); border-radius: 8px; flex-wrap: wrap; }

/* ---------- Divers ---------- */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 12px 18px; border-radius: 10px; z-index: 50; max-width: calc(100% - 32px);
}
.modal-back { position: fixed; inset: 0; background: rgba(4, 8, 12, 0.85); backdrop-filter: blur(6px); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { max-width: 440px; width: 100%; padding: 28px; text-align: center; }
.modal h2 { font-size: 24px; margin-bottom: 8px; }
.modal p { color: var(--muted); margin-bottom: 20px; }
.modal .form-actions { justify-content: center; }
footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.dev-panel { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px 10px; border: 1px dashed var(--gold); border-radius: 10px; }
.dev-panel strong { color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }

/* ===================== V2 : cartes, boutique, livre ===================== */
.rarity-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 2px 7px; border-radius: 6px; border: 1px solid; }
.r-C { color: #b8c7d3; border-color: #4a6275; background: rgba(184, 199, 211, 0.08); }
.r-R { color: #c3b2ff; border-color: #5d4ba8; background: rgba(140, 115, 255, 0.12); }
.r-UR { color: #ffd77a; border-color: #a8832e; background: rgba(255, 200, 90, 0.12); }
.r-skin { color: #ff9cbc; border-color: #9c3a5c; background: rgba(255, 120, 160, 0.1); }
.r-accessory { color: #8ff0e2; border-color: #2a8077; background: rgba(100, 230, 210, 0.1); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.card-grid.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.tcard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.tcard .btn { white-space: normal; }
.tcard-art {
  position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  background: var(--bg-2); border: 2px solid #4a6275;
}
.tcard-art img { width: 100%; height: 100%; object-fit: cover; }
.tcard.C .tcard-art { border-color: #4a6275; }
.tcard.R .tcard-art { border-color: #7a64d8; box-shadow: 0 0 18px rgba(122, 100, 216, 0.25); }
.tcard.UR .tcard-art { border-color: #e0b04e; box-shadow: 0 0 24px rgba(224, 176, 78, 0.35); }
.tcard.UR .tcard-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 236, 170, 0.35) 45%, transparent 60%);
  background-size: 250% 100%; animation: shine 3.5s ease-in-out infinite;
}
@keyframes shine { 0% { background-position: 150% 0; } 60%, 100% { background-position: -100% 0; } }
.tcard.skin .tcard-art { border-color: #c94f78; }
.tcard.accessory .tcard-art { border-color: #36a397; }
.tcard .badge-corner { position: absolute; top: 8px; left: 8px; }
.tcard .owned-mark {
  position: absolute; top: 8px; right: 8px; background: rgba(11, 20, 29, 0.85); color: var(--ok);
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.tcard-name { font-size: 14px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.price { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tcard.missing .tcard-art { border-style: dashed; display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--bg-2), var(--bg-2) 10px, #0d1822 10px, #0d1822 20px); }
.tcard.missing .q { font-family: var(--font-display); font-size: 44px; color: var(--border); }
.tcard.showcased .tcard-art { outline: 3px solid var(--gold); outline-offset: 2px; }

.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 32px 0 8px; }
.shop-head h1 { font-size: clamp(28px, 4vw, 38px); }
.timer { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.shop-section { margin-top: 28px; }
.shop-section > h2 { font-size: 22px; margin-bottom: 4px; }
.shop-section > p.muted { margin-bottom: 14px; font-size: 15px; }

.booster { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 20px; align-items: center; }
@media (max-width: 700px) { .booster { grid-template-columns: 1fr; } }
.booster-pack {
  aspect-ratio: 3 / 4; border-radius: 14px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #1d4a6a, #0f2232 55%, #3b2a14);
  border: 2px solid var(--gold); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  display: grid; place-items: center; text-align: center; max-width: 220px; width: 100%; margin: 0 auto;
}
.booster-pack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.booster-pack .pack-label { position: relative; font-family: var(--font-display); font-size: 26px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); padding: 12px; }
.booster-pack .pack-label small { display: block; font-family: var(--font); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); }
.odds { width: 100%; max-width: 420px; margin: 10px 0; }
.odds td, .odds th { padding: 6px 8px; }
.odds td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pity { font-size: 14px; color: var(--gold); }

/* Ouverture d'un booster */
.reveal-back { position: fixed; inset: 0; z-index: 90; background: rgba(4, 8, 12, 0.92); backdrop-filter: blur(6px); overflow-y: auto; padding: 32px 16px; }
.reveal { max-width: 980px; margin: 0 auto; text-align: center; }
.reveal h2 { font-size: 28px; margin-bottom: 6px; }
.reveal .card-grid { margin: 24px 0; grid-template-columns: repeat(auto-fit, minmax(140px, 170px)); justify-content: center; }
.flip { perspective: 1000px; cursor: pointer; background: none; border: none; color: inherit; font: inherit; text-align: left; padding: 0; }
.flip-inner { position: relative; transition: transform 0.6s cubic-bezier(.2, .7, .3, 1); transform-style: preserve-3d; }
.flip.open .flip-inner { transform: rotateY(180deg); }
.flip-face, .flip-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-face { transform: rotateY(180deg); }
.flip-back {
  position: absolute; inset: 0; aspect-ratio: 3 / 4; border-radius: 12px;
  background: linear-gradient(160deg, #1d4a6a, #0f2232 55%, #3b2a14); border: 2px solid var(--gold);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 40px; color: var(--gold);
}
.new-tag { color: var(--ok); font-weight: 800; font-size: 12px; letter-spacing: 1px; }
.dup-tag { color: var(--muted); font-size: 12px; }

/* Livre */
.book-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 32px 0 16px; }
.book-head h1 { font-size: clamp(26px, 4vw, 34px); }
.progress { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; width: 220px; max-width: 100%; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--sea), var(--gold)); }
.girl { padding: 20px; margin-bottom: 20px; }
.girl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.girl-head h2 { font-size: 22px; }
.girl-sub { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { color: var(--text); border-color: var(--sea); background: rgba(95, 180, 217, 0.12); }
.showcase .slot img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.showcase .slot.filled { border-style: solid; overflow: hidden; padding: 0; }

/* ===================== V3 : réseau social, liaison ===================== */
.post-body { margin-bottom: 12px; white-space: normal; overflow-wrap: anywhere; }
.post-photo { width: 100%; border-radius: 10px; margin-bottom: 10px; background: var(--bg-2); }
.post-locked { background: repeating-linear-gradient(45deg, var(--bg-2), var(--bg-2) 12px, #0d1822 12px, #0d1822 24px); border: 1px dashed var(--border); margin-bottom: 10px; }
.post-actions { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.like-btn { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 5px 12px; font: inherit; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.like-btn:hover { color: var(--text); }
.like-btn.liked { color: #ff7a9c; border-color: rgba(255, 122, 156, 0.5); background: rgba(255, 122, 156, 0.1); }
.code-input { font-family: ui-monospace, Consolas, monospace; font-size: 28px; letter-spacing: 6px; text-transform: uppercase; text-align: center; max-width: 280px; }

/* ===================== Mise en page du 07/11 (croquis) : barre latérale ===================== */
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 28px; padding: 22px 18px;
  background: rgba(11, 20, 29, 0.85); border-right: 1px solid var(--border);
}
.side-logo { justify-content: center; }
.side-nav { display: flex; flex-direction: column; gap: 16px; }
.side-pill {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 64px; padding: 14px 18px; border-radius: 999px;
  border: 2px solid var(--border); background: var(--surface);
  color: var(--text); font: 600 20px var(--font-display); cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.side-pill:hover { text-decoration: none; background: var(--surface-2); border-color: var(--sea); }
.side-pill:active { transform: translateY(1px); }
.side-pill.active { border-color: var(--gold); background: rgba(218, 178, 95, 0.12); color: var(--gold); }
.side-lang { min-height: 52px; font-size: 17px; }
.side-logout { margin-top: auto; }
.content { min-width: 0; display: flex; flex-direction: column; }
.content > main { flex: 1; width: 100%; }
.topline { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 18px 24px 0; min-height: 62px; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; z-index: 20; height: auto; flex-direction: row; align-items: center;
    gap: 10px; padding: 10px 16px; border-right: none; border-bottom: 1px solid var(--border); overflow-x: auto;
  }
  .side-logo span { display: none; }
  .side-nav { flex-direction: row; gap: 8px; }
  .side-pill { min-height: 40px; padding: 8px 14px; font-size: 15px; white-space: nowrap; border-width: 1px; }
  .side-lang { min-height: 40px; font-size: 14px; }
  .side-logout { margin-top: 0; margin-left: auto; white-space: nowrap; }
  .topline { padding: 12px 16px 0; min-height: 0; }
}

/* Accueil : titre centré + deux onglets */
.home-head { text-align: center; padding: 8px 0 0; }
.home-title { font-size: clamp(38px, 6vw, 64px); letter-spacing: -0.5px; }
.home-title span { color: var(--gold); }
.home-head .tabs { justify-content: center; border-bottom: none; margin: 18px 0 28px; gap: 16px; }
.home-head .tab {
  border: 2px solid var(--border); border-radius: 12px; padding: 10px 26px; margin: 0;
  font-size: 17px; background: var(--surface);
}
.home-head .tab[aria-selected="true"] { border-color: var(--gold); color: var(--gold); background: rgba(218, 178, 95, 0.1); }
#panel-social .feed { margin: 0 auto; }

/* Profil : avatar + nom en haut, puis Image 1 | Jeux joués | Image 2 */
.p-top { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0 28px; flex-wrap: wrap; text-align: left; }
.p-top .avatar { width: 96px; height: 96px; font-size: 38px; border-width: 3px; }
.p-top h1 { font-size: clamp(28px, 4vw, 40px); }
.p-top .sub { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 6px; }
.p-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.p-image .tcard-art, .p-image .slot { aspect-ratio: 3 / 4; }
.p-image .slot { display: grid; place-items: center; align-content: center; gap: 6px; font-size: 54px; }
.p-image .slot small { font-family: var(--font); font-size: 14px; color: var(--muted); }
.p-image .tcard-name { text-align: center; }
.p-played { min-height: 100%; }
.p-links { text-align: center; margin-top: 14px; font-size: 14px; }
.p-gems { margin-top: 28px; }
.p-gems summary { cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; list-style: none; }
.p-gems summary::-webkit-details-marker { display: none; }
.p-gems summary .gem-balance { font-size: 30px; }
@media (max-width: 860px) {
  .p-cols { grid-template-columns: 1fr 1fr; grid-template-areas: "img1 img2" "played played"; }
  .p-cols > :nth-child(1) { grid-area: img1; }
  .p-cols > :nth-child(2) { grid-area: played; }
  .p-cols > :nth-child(3) { grid-area: img2; }
}
.feed { grid-template-columns: minmax(0, 1fr); width: 100%; }
