/* Kizuna — site du jeu. Même thème que le jeu : ciel de nuit violet, nébuleuse, étoiles. */
:root {
  --top: #14111d;
  --bottom: #060509;
  --nebula: #ad99db;
  --cream: #f4f4f6;
  --ink: #111113;
  --muted: #9a97a6;
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(14, 12, 22, 0.72);
  --card: rgba(18, 15, 28, 0.78);
  --card-hi: rgba(28, 24, 42, 0.9);
  --miss: #ff4d5e;
  --t-easy: #4ade80; --t-moyen: #38bdf8; --t-hard: #fb923c;
  --t-tempete: #f43f5e; --t-abysse: #a855f7; --t-eternite: #fde047;
  --radius: 20px;
  --wrap: 1180px;
  color-scheme: dark;
}
/* police hébergée sur le site (pas de Google Fonts : aucune donnée envoyée à un tiers) */
@font-face { font-family: "Nunito"; src: url("fonts/Nunito.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--cream);
  background: var(--bottom);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button, input { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.wrap { width: min(var(--wrap), 100% - 32px); margin: 0 auto; }

/* --- barre du haut --------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 12px max(16px, calc((100% - var(--wrap)) / 2));
  background: rgba(10, 8, 16, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 24px; letter-spacing: -0.5px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 9px 14px; border-radius: 12px; font-weight: 700; color: rgba(244, 244, 246, 0.65); transition: background .15s, color .15s; }
.nav a:hover { color: var(--cream); background: rgba(255, 255, 255, 0.05); }
.nav a.on { color: var(--cream); background: rgba(255, 255, 255, 0.09); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 14px; font-weight: 700; }
.me:hover { background: rgba(255, 255, 255, 0.06); }
.me .av { width: 34px; height: 34px; }

/* --- boutons, champs ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06); font-weight: 800; font-size: 16px; cursor: pointer;
  transition: transform .15s, background .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-light { background: var(--cream); color: var(--ink); border-color: transparent; box-shadow: 0 8px 30px rgba(173, 153, 219, 0.35); }
.btn-light:hover { background: #fff; box-shadow: 0 10px 40px rgba(173, 153, 219, 0.55); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 12px; }
.btn-big { padding: 18px 34px; font-size: 19px; border-radius: 20px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.field {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05); outline: none; font-size: 16px; transition: border-color .15s, background .15s;
}
.field:focus { border-color: rgba(173, 153, 219, 0.8); background: rgba(255, 255, 255, 0.08); }
.field::placeholder { color: rgba(244, 244, 246, 0.4); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 16px; border-radius: 999px; border: none; background: rgba(255, 255, 255, 0.06); font-weight: 700; font-size: 14px; cursor: pointer; color: rgba(244, 244, 246, 0.8); }
.chip:hover { background: rgba(255, 255, 255, 0.1); }
.chip.on { background: var(--cream); color: var(--ink); }

/* --- cartes ------------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(6px); }
.section { padding: 56px 0 8px; }
.section h2 { font-size: 30px; font-weight: 900; margin: 0 0 6px; letter-spacing: -0.5px; }
.section .sub { margin: 0 0 24px; color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; justify-content: space-between; padding: 40px 0 22px; }
.page-head h1 { font-size: 42px; font-weight: 900; margin: 0; letter-spacing: -1px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* --- accueil ------------------------------------------------------------ */
.hero { min-height: calc(100vh - 62px); display: grid; place-items: center; text-align: center; padding: 40px 0; }
.hero-logo { width: clamp(150px, 24vw, 250px); aspect-ratio: 1; border-radius: 22%; margin: 0 auto; box-shadow: 0 0 80px rgba(173, 153, 219, 0.45); animation: bob 4.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.hero h1 { font-size: clamp(64px, 11vw, 120px); font-weight: 900; margin: 16px 0 0; letter-spacing: -3px; line-height: 1; }
.hero .tag { font-size: clamp(17px, 2.2vw, 22px); color: rgba(244, 244, 246, 0.8); margin: 14px auto 32px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero .meta { margin-top: 14px; font-size: 14px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 46px; }
.stat { padding: 18px; text-align: center; }
.stat b { display: block; font-size: 30px; font-weight: 900; }
.stat span { color: var(--muted); font-size: 14px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { padding: 24px; }
.feature .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(173, 153, 219, 0.15); margin-bottom: 16px; }
.feature h3 { margin: 0 0 8px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 15px; }
.tiers-row { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.tier-pill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; border: 1px solid currentColor; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.steps { counter-reset: s; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.steps li::before { content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--cream); color: var(--ink); font-weight: 900; display: grid; place-items: center; }
.steps b { display: block; margin-bottom: 2px; }
.steps span { color: var(--muted); font-size: 15px; line-height: 1.45; }

/* --- maps --------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.toolbar .field { max-width: 360px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.map-card { padding: 8px 8px 14px; display: block; transition: transform .18s, border-color .18s, box-shadow .18s, background .18s; }
.map-card:hover { transform: translateY(-4px); border-color: rgba(173, 153, 219, 0.7); box-shadow: 0 10px 34px rgba(173, 153, 219, 0.22); background: var(--card-hi); }
.cover { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.05); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.72); font-size: 12px; font-weight: 800; }
.map-card h3 { margin: 12px 6px 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-card .artist { margin: 2px 6px 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dots { display: flex; align-items: center; gap: 4px; margin: 10px 6px 0; }
.dots i { width: 15px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); }
.dots em { font-style: normal; font-size: 12px; font-weight: 800; margin-left: 6px; color: #d9dbe1; }
.by { display: flex; align-items: center; gap: 8px; margin: 12px 6px 0; font-size: 12px; color: rgba(244, 244, 246, 0.7); }
.by .av { width: 20px; height: 20px; }
.by .plays { color: var(--muted); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

/* --- détail d'une map ------------------------------------------------------- */
.map-hero { position: relative; overflow: hidden; border-radius: 26px; margin-top: 28px; }
.map-hero .blur { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) brightness(.45) saturate(1.2); }
.map-hero .in { position: relative; display: flex; gap: 28px; align-items: flex-end; padding: 32px; }
.map-hero .big { width: 220px; flex: none; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.map-hero h1 { font-size: 40px; margin: 0; font-weight: 900; letter-spacing: -1px; }
.map-hero .artist { font-size: 20px; color: rgba(244, 244, 246, 0.8); margin: 4px 0 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { padding: 6px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.35); font-size: 14px; font-weight: 700; }
.tier-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 16px; }
.tier-tab { padding: 10px 16px; border-radius: 14px; border: 1px solid currentColor; background: transparent; cursor: pointer; font-weight: 800; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 112px; }
.tier-tab small { font-size: 12px; font-weight: 700; opacity: .85; }
.tier-tab.on { background: currentColor; }
.tier-tab.on span, .tier-tab.on small { color: var(--ink); }
.tier-tab[disabled] { opacity: .3; cursor: default; }

/* --- tableaux (classement, top 10) ------------------------------------------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; padding: 12px 16px; }
.table td { padding: 12px 16px; border-top: 1px solid var(--line); }
.table tr.row { cursor: pointer; transition: background .12s; }
.table tr.row:hover td { background: rgba(255, 255, 255, 0.04); }
.table tr.mine td { background: rgba(173, 153, 219, 0.12); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { font-weight: 900; width: 56px; color: var(--muted); }
.player { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.player small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.player .av { width: 38px; height: 38px; }
.rix { font-weight: 900; }
.grade { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-weight: 900; background: rgba(255, 255, 255, 0.08); }
.g-S { background: #fde047; color: var(--ink); } .g-A { background: #4ade80; color: var(--ink); }
.g-B { background: #38bdf8; color: var(--ink); } .g-C { background: #fb923c; color: var(--ink); }
.g-D { background: #f43f5e; } .g-F { background: rgba(255, 255, 255, 0.12); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 16px; align-items: end; margin-bottom: 22px; }
.pod { padding: 22px 16px 18px; text-align: center; display: block; transition: transform .18s, border-color .18s; }
.pod:hover { transform: translateY(-4px); border-color: rgba(173, 153, 219, 0.7); }
.pod .av { width: 76px; height: 76px; margin: 0 auto 12px; }
.pod.p1 { padding-top: 34px; box-shadow: 0 0 60px rgba(253, 224, 71, 0.15); border-color: rgba(253, 224, 71, 0.45); }
.pod.p1 .av { width: 96px; height: 96px; }
.pod .place { font-size: 13px; font-weight: 900; letter-spacing: .1em; color: var(--muted); }
.pod.p1 .place { color: #fde047; } .pod.p2 .place { color: #d9dbe1; } .pod.p3 .place { color: #fb923c; }
.pod b { display: block; font-size: 18px; margin-top: 4px; }
.pod .handle { font-size: 13px; color: var(--muted); }
.pod .rix { display: inline-block; margin-top: 10px; padding: 6px 14px; border-radius: 999px; background: var(--cream); color: var(--ink); }

/* --- photos de profil -------------------------------------------------------- */
.av { border-radius: 50%; overflow: hidden; flex: none; background: rgba(255, 255, 255, 0.08); display: grid; place-items: center; font-weight: 900; border: 1px solid rgba(255, 255, 255, 0.18); }
.av img { width: 100%; height: 100%; object-fit: cover; }

/* --- profil ---------------------------------------------------------------- */
.profile { margin-top: 28px; overflow: hidden; }
.banner { height: clamp(160px, 26vw, 300px); background-size: cover; background-position: center; position: relative; }
.banner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(transparent, var(--card)); }
.pro-head { display: flex; align-items: flex-end; gap: 22px; padding: 0 32px; margin-top: -78px; position: relative; flex-wrap: wrap; }
.pro-head .av { width: 148px; height: 148px; border: 6px solid #120f1c; box-shadow: 0 0 50px rgba(173, 153, 219, 0.45); font-size: 54px; }
.pro-head .names { flex: 1; min-width: 200px; padding-bottom: 10px; }
.pro-head h1 { margin: 0; font-size: 36px; font-weight: 900; letter-spacing: -0.5px; }
.pro-head .handle { color: #d9dbe1; font-size: 17px; }
.rix-pill { margin-bottom: 18px; padding: 12px 22px; border-radius: 999px; background: var(--cream); color: var(--ink); font-weight: 900; font-size: 19px; box-shadow: 0 6px 30px rgba(173, 153, 219, 0.5); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 24px 32px; }
.tile { padding: 16px; text-align: center; border-radius: 16px; background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.07); }
.tile b { display: block; font-size: 26px; font-weight: 900; }
.tile span { font-size: 13px; color: var(--muted); }
.pro-actions { display: flex; gap: 10px; padding: 0 32px 28px; flex-wrap: wrap; }
.best { padding: 0 32px 32px; }
.best h2 { font-size: 20px; margin: 4px 0 12px; }
.score-row { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; transition: background .12s; }
.score-row:hover { background: rgba(255, 255, 255, 0.05); }
.score-row img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.score-row .no-cover { width: 52px; height: 52px; border-radius: 10px; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.score-row .t { flex: 1; min-width: 0; }
.score-row .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-row .t span { font-size: 13px; color: var(--muted); }
.score-row .sc { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-row .sc small { display: block; color: var(--muted); font-weight: 600; }

/* --- compte ------------------------------------------------------------- */
.auth { max-width: 460px; margin: 48px auto; padding: 32px; }
.auth h1 { margin: 0 0 6px; text-align: center; font-size: 30px; }
.auth .sub { text-align: center; color: var(--muted); margin: 0 0 22px; }
.auth form { display: grid; gap: 12px; }
.handle-field { display: flex; align-items: center; gap: 8px; }
.handle-field span { font-weight: 900; font-size: 22px; color: #d9dbe1; }
.pick-avatar { width: 108px; height: 108px; margin: 0 auto 6px; border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.05); display: grid; place-items: center; cursor: pointer; overflow: hidden; position: relative; }
.pick-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pick-avatar .plus { position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--cream); color: var(--ink); display: grid; place-items: center; font-weight: 900; }
.pick-banner { height: 150px; border-radius: 16px; background-size: cover; background-position: center; display: grid; place-items: center; cursor: pointer; position: relative; overflow: hidden; }
.pick-banner::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); transition: background .15s; }
.pick-banner:hover::before { background: rgba(0, 0, 0, 0.5); }
.pick-banner span { position: relative; padding: 10px 20px; border-radius: 999px; background: var(--cream); color: var(--ink); font-weight: 800; }
.switch { text-align: center; margin-top: 16px; }
.switch button { background: none; border: none; color: rgba(244, 244, 246, 0.7); cursor: pointer; font-weight: 700; }
.switch button:hover { color: var(--cream); text-decoration: underline; }
.msg { min-height: 22px; text-align: center; font-size: 14px; font-weight: 700; color: #d9dbe1; }
.msg.err { color: var(--miss); }

.foot { margin-top: auto; padding: 40px 16px; display: flex; flex-direction: column; gap: 14px; align-items: center; font-weight: 900; }
.foot-brand { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; font-weight: 700; font-size: 14px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--cream); text-decoration: underline; }
/* pages légales */
.legal { max-width: 820px; margin: 40px auto; padding: 34px 38px; line-height: 1.65; }
.legal h1 { font-size: 34px; margin: 0 0 4px; }
.legal .updated { color: var(--muted); margin: 0 0 26px; font-size: 14px; }
.legal h2 { font-size: 20px; margin: 30px 0 8px; }
.legal p, .legal li { color: rgba(244, 244, 246, 0.86); font-size: 15.5px; }
.legal ul { padding-left: 20px; }
.legal a { text-decoration: underline; }
.legal table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14.5px; }
.legal td, .legal th { border-top: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: rgba(244, 244, 246, 0.8); text-align: left; line-height: 1.45; }
.consent input { margin-top: 3px; width: 16px; height: 16px; accent-color: #f4f4f6; flex: none; }
.consent a { text-decoration: underline; }
.danger { border-color: rgba(255, 77, 94, 0.5) !important; color: #ff8a95 !important; }
.foot img { width: 26px; height: 26px; border-radius: 7px; }
.foot .muted { font-weight: 600; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; padding: 14px 22px; border-radius: 14px; background: var(--cream); color: var(--ink); font-weight: 800; transition: opacity .25s, transform .25s; pointer-events: none; z-index: 50; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }
.fade-in { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

/* --- petits écrans ---------------------------------------------------------- */
@media (max-width: 900px) {
  .features { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .top { gap: 10px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .top-right .btn { display: none; }
  .me span { display: none; }
  .features { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .podium { grid-template-columns: 1fr; }
  .map-hero .in { flex-direction: column; align-items: flex-start; padding: 22px; }
  .map-hero .big { width: 160px; }
  .table .hide-sm { display: none; }
  .pro-head, .tiles, .pro-actions, .best { padding-left: 18px; padding-right: 18px; }
  .page-head h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
