/* Récré — portail de jeux (inspiration jeu.fr) */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Lilita+One&display=swap');

:root {
  --blue: #0b63c4;
  --blue-d: #084b96;
  --blue-l: #e7f0fc;
  --orange: #ff7a1a;
  --orange-d: #d85a00;
  --yellow: #ffc21a;
  --green: #2eb82e;
  --ink: #1d2433;
  --ink-2: #4a5570;
  --ink-3: #7b86a0;
  --line: #d5e1f2;
  --panel: #ffffff;
  --page: #eaf1fb;
  --radius: 16px;
  --shadow: 0 2px 0 rgba(11, 60, 130, .06), 0 8px 24px rgba(11, 60, 130, .08);
  --font: 'Baloo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --title: 'Lilita One', 'Baloo 2', system-ui, sans-serif;
  --maxw: 1400px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--page);
  background-image: radial-gradient(rgba(11, 99, 196, .07) 1.5px, transparent 1.5px);
  background-size: 22px 22px; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ en-tête */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #0f6fd6 0%, var(--blue) 55%, var(--blue-d) 100%);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .08), 0 6px 18px rgba(8, 40, 90, .25);
}
.hdr {
  max-width: var(--maxw); margin: 0 auto; height: 60px; padding: 0 16px;
  display: flex; align-items: center; gap: 14px;
}
.logo {
  font-family: var(--title); font-size: 34px; line-height: 1; letter-spacing: 1px; color: var(--yellow);
  text-shadow: 0 2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 -2px 0 #fff, 2px 2px 0 #fff, -2px 2px 0 #fff, 2px -2px 0 #fff, -2px -2px 0 #fff, 0 5px 0 var(--orange-d), 0 8px 12px rgba(0, 0, 0, .3);
  transform: rotate(-3deg); display: flex; align-items: center; gap: 6px; flex: none; transition: transform .2s;
}
.logo:hover { transform: rotate(-1deg) scale(1.05); }
.logo small { font-size: 16px; color: #fff; text-shadow: 0 2px 0 var(--blue-d); transform: translateY(8px) rotate(3deg); }
.nav { display: flex; gap: 2px; flex: 1; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: #fff; font-weight: 800; font-size: 16px; padding: 6px 10px; border-radius: 10px; white-space: nowrap;
  display: flex; align-items: center; gap: 5px; transition: background .15s;
}
.nav a span { font-size: 15px; }
.nav a:hover, .nav a.on { background: rgba(255, 255, 255, .16); }
.nav a.on { box-shadow: inset 0 -3px 0 var(--yellow); }
.search { position: relative; flex: none; }
.search input {
  width: 210px; height: 36px; border-radius: 10px; border: 0; padding: 0 38px 0 12px; font: 600 15px var(--font); color: var(--ink);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .15);
}
.search input:focus { outline: 3px solid var(--yellow); }
.search button { position: absolute; right: 2px; top: 2px; width: 32px; height: 32px; border: 0; background: none; cursor: pointer; font-size: 17px; }
.suggest {
  position: absolute; top: 42px; right: 0; width: 300px; background: #fff; border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  padding: 6px; display: none; z-index: 60;
}
.suggest.show { display: block; }
.suggest a { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; font-weight: 700; }
.suggest a:hover, .suggest a.sel { background: var(--blue-l); }
.suggest img { width: 64px; height: 42px; object-fit: cover; border-radius: 8px; }
.suggest small { display: block; color: var(--ink-3); font-weight: 600; font-size: 12px; }
.hdr-btn {
  flex: none; width: 38px; height: 38px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .7); cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; display: grid; place-items: center; transition: .15s;
}
.hdr-btn:hover { background: rgba(255, 255, 255, .28); }
.hdr-btn.on { background: var(--yellow); border-color: #fff; }

/* ------------------------------------------------------------ mise en page */
.page { max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 22px 16px 40px; flex: 1; }
.row { display: grid; gap: 22px; margin-bottom: 26px; }
.row-3 { grid-template-columns: 1fr 1.25fr 1fr; }
.row-2 { grid-template-columns: 2fr 1fr; }

.panel {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 36px 14px 14px; position: relative; margin-top: 16px;
}
.panel > .ptitle {
  position: absolute; top: -19px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--panel); border: 2px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0;
  padding: 2px 22px 0; font-weight: 800; font-size: 23px; color: var(--blue); text-transform: uppercase; letter-spacing: .5px;
  display: flex; align-items: center; gap: 8px;
}
.panel > .ptitle::after { content: ''; position: absolute; left: -2px; right: -2px; bottom: -6px; height: 8px; background: var(--panel); }
.panel > .ptitle a { color: inherit; }
.panel > .ptitle .more { font-size: 13px; color: var(--ink-3); text-transform: none; font-weight: 700; }

/* ------------------------------------------------------------ vignettes */
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tiles.cols-2 { grid-template-columns: repeat(2, 1fr); }
.tiles.cols-3 { grid-template-columns: repeat(3, 1fr); }
.tiles.cols-4 { grid-template-columns: repeat(4, 1fr); }
.tiles.cols-5 { grid-template-columns: repeat(5, 1fr); }
.tiles.big { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile {
  display: block; background: #fff; border: 2px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .18s, border-color .18s; position: relative;
}
.tile:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 12px 24px rgba(11, 60, 130, .22); border-color: var(--blue); z-index: 2; }
.tile-img { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--blue-l); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile:hover .tile-img img { transform: scale(1.08); }
.tile-play {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s;
  background: linear-gradient(0deg, rgba(8, 40, 90, .45), rgba(8, 40, 90, 0) 60%);
}
.tile-play i {
  width: 52px; height: 52px; border-radius: 50%; background: var(--green); border: 3px solid #fff; display: grid; place-items: center;
  box-shadow: 0 4px 0 #17791b, 0 8px 16px rgba(0, 0, 0, .3); transform: scale(.6); transition: transform .25s cubic-bezier(.3, 1.8, .5, 1);
}
.tile-play i::after { content: ''; border-left: 17px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
.tile:hover .tile-play { opacity: 1; }
.tile:hover .tile-play i { transform: scale(1); }
.tile-name { padding: 6px 8px 7px; text-align: center; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.big .tile-name { font-size: 19px; padding: 8px 10px 4px; }
.tile .tile-tag { display: block; text-align: center; font-size: 13px; color: var(--ink-3); font-weight: 600; padding: 0 10px 10px; margin-top: -4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge {
  position: absolute; bottom: 7px; left: 7px; z-index: 1; font-weight: 800; font-size: 12px; color: #fff; padding: 2px 9px; border-radius: 8px;
  background: var(--orange); box-shadow: 0 2px 0 var(--orange-d); letter-spacing: .3px;
}
.badge.b-top { background: #e53935; box-shadow: 0 2px 0 #a31d1a; }
.badge.b-coeur { background: #ff4f9a; box-shadow: 0 2px 0 #c2185b; }
.badge.b-classique { background: #2e9d4f; box-shadow: 0 2px 0 #1b6b33; }
.badge.b-populaire { background: #7c4dff; box-shadow: 0 2px 0 #5028c4; }
.fav-dot { position: absolute; top: 8px; right: 8px; z-index: 1; font-size: 18px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }

/* sélection de l'éditeur */
.editor { display: block; border-radius: 14px; overflow: hidden; position: relative; border: 2px solid var(--line); height: 100%; min-height: 300px; background: #000; }
.editor img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.editor:hover img { transform: scale(1.05); }
.editor .ed-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 16px; color: #fff; background: linear-gradient(0deg, rgba(10, 20, 45, .92), rgba(10, 20, 45, 0)); }
.editor h3 { margin: 0; font-family: var(--title); font-weight: 400; font-size: 32px; letter-spacing: .5px; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.editor p { margin: 2px 0 10px; font-weight: 600; font-size: 16px; opacity: .92; }

/* boutons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--title); font-size: 20px; letter-spacing: .5px; color: #fff; cursor: pointer;
  padding: 9px 22px; border-radius: 14px; border: 3px solid #fff; background: linear-gradient(180deg, #56d65a, #26a42a);
  box-shadow: 0 5px 0 #17791b, 0 8px 16px rgba(0, 0, 0, .25); transition: transform .08s, filter .15s; text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #17791b; }
.btn.orange { background: linear-gradient(180deg, #ffa53d, #ff7417); box-shadow: 0 5px 0 var(--orange-d), 0 8px 16px rgba(0, 0, 0, .25); }
.btn.blue { background: linear-gradient(180deg, #4fa3ff, #1c6fd6); box-shadow: 0 5px 0 #0d4c9e, 0 8px 16px rgba(0, 0, 0, .25); }
.btn.small { font-size: 16px; padding: 6px 14px; border-width: 2px; }

/* ------------------------------------------------------------ carrousel « À la une » */
.hero { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 5.2; min-height: 260px; background: #0a2a55; box-shadow: 0 12px 30px rgba(11, 60, 130, .25); border: 3px solid #fff; margin-bottom: 30px; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; pointer-events: none; }
.slide.on { opacity: 1; pointer-events: auto; }
.slide img { position: absolute; top: 0; right: 0; height: 100%; width: 74%; object-fit: cover; transform: scale(1.06); transition: transform 7s linear; }
.slide.on img { transform: scale(1); }
.slide .shade { position: absolute; inset: 0; background: linear-gradient(90deg, var(--c1) 0%, var(--c1) 30%, color-mix(in srgb, var(--c1) 80%, transparent) 40%, transparent 62%); }
.slide .copy { position: absolute; left: 4%; top: 50%; transform: translateY(-50%); width: min(44%, 520px); color: #fff; }
.slide .kicker { display: inline-block; font-weight: 800; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; background: rgba(255, 255, 255, .18); border: 2px solid rgba(255, 255, 255, .5); padding: 1px 12px; border-radius: 999px; }
.slide h2 { font-family: var(--title); font-weight: 400; font-size: clamp(34px, 4.4vw, 62px); line-height: 1; margin: 10px 0 8px; letter-spacing: 1px; text-shadow: 0 4px 0 rgba(0, 0, 0, .25), 0 10px 20px rgba(0, 0, 0, .25); }
.slide p { font-size: clamp(15px, 1.4vw, 19px); font-weight: 600; margin: 0 0 18px; opacity: .95; }
.slide.on .copy > * { animation: rise .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.slide.on .copy > *:nth-child(2) { animation-delay: .08s; }
.slide.on .copy > *:nth-child(3) { animation-delay: .16s; }
.slide.on .copy > *:nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.dots { position: absolute; left: 4%; bottom: 16px; display: flex; gap: 8px; z-index: 3; }
.dots button { width: 12px; height: 12px; border-radius: 999px; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0; transition: .25s; }
.dots button.on { width: 34px; background: #fff; }
.hero .arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; background: rgba(0, 0, 0, .25); color: #fff; font-size: 22px; cursor: pointer; }
.hero .arrow.prev { left: 12px; display: none; }
.hero .arrow.next { right: 12px; }

/* bandeau catégories */
.cats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cat-chip {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 10px; border-radius: 999px; font-weight: 800; font-size: 17px; color: #fff;
  background: var(--c); box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 70%, #000), 0 6px 14px rgba(0, 0, 0, .12); transition: transform .15s;
}
.cat-chip:hover { transform: translateY(-3px) rotate(-1deg); }
.cat-chip span { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 18px; }

/* ------------------------------------------------------------ page de jeu */
.game-top { display: grid; grid-template-columns: 56px minmax(0, 1fr) 190px; gap: 14px; align-items: start; }
.toolbar { display: flex; flex-direction: column; gap: 8px; background: #26303f; padding: 8px; border-radius: 14px; position: sticky; top: 76px; }
.tool {
  width: 40px; height: 40px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .06); color: #fff; font-size: 19px; cursor: pointer;
  display: grid; place-items: center; transition: .15s; position: relative;
}
.tool:hover { background: rgba(255, 255, 255, .18); }
.tool.on { background: var(--yellow); color: #3a2a00; }
.tool[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: 50px; top: 50%; transform: translateY(-50%); white-space: nowrap; z-index: 5;
  background: #26303f; color: #fff; font-size: 14px; font-weight: 700; padding: 4px 10px; border-radius: 8px; pointer-events: none;
}
.tool-sep { height: 1px; background: rgba(255, 255, 255, .12); margin: 2px 4px; }
.frame-col { min-width: 0; }
.frame {
  position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #0d1b33;
  box-shadow: 0 14px 34px rgba(8, 30, 70, .3); border: 3px solid #fff; max-height: calc(100vh - 110px); margin: 0 auto;
}
.frame .frame-bg { position: absolute; inset: -30px; background-position: center; background-size: cover; filter: blur(22px) brightness(.7); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.frame-splash { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 2; color: #fff; text-align: center; padding: 20px; }
.frame-splash img { width: min(380px, 70%); border-radius: 16px; border: 3px solid #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.frame-splash h1 { font-family: var(--title); font-weight: 400; margin: 0; font-size: 34px; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
body.theater .game-top { grid-template-columns: 56px minmax(0, 1fr); }
body.theater .side-games { display: none; }
.side-games { display: flex; flex-direction: column; gap: 10px; }
.side-games .tile-name { font-size: 14px; }
.side-title { font-weight: 800; color: var(--blue); text-transform: uppercase; font-size: 15px; text-align: center; letter-spacing: .5px; }
.under-row { margin-top: 18px; }
.under-row .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 26px 0 0; align-items: center; }
.crumbs a, .crumbs span {
  background: #fff; border: 2px solid var(--line); padding: 4px 14px; border-radius: 10px; font-weight: 700; font-size: 15px; color: var(--ink-2);
}
.crumbs a:hover { border-color: var(--blue); color: var(--blue); }
.crumbs .here { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 3px 0 var(--orange-d); }

.info { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; }
.info h1 { font-family: var(--title); font-weight: 400; font-size: 40px; margin: 0; color: var(--ink); letter-spacing: .5px; }
.info .tagline { font-size: 19px; font-weight: 700; color: var(--blue); margin: 2px 0 12px; }
.info p { font-size: 17px; line-height: 1.55; color: var(--ink-2); margin: 0 0 12px; }
.info h2 { font-size: 20px; margin: 18px 0 8px; color: var(--ink); }
.controls { display: grid; gap: 6px; }
.controls div { display: flex; gap: 12px; align-items: center; font-weight: 600; color: var(--ink-2); }
.key { display: inline-block; min-width: 42px; text-align: center; background: #f4f7fc; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 8px; padding: 1px 8px; font-weight: 800; color: var(--ink); font-size: 14px; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { background: var(--blue-l); color: var(--blue); font-weight: 700; font-size: 14px; padding: 2px 12px; border-radius: 999px; }
.card-side { background: linear-gradient(180deg, #f4f8ff, #fff); border: 2px solid var(--line); border-radius: 14px; padding: 16px; align-self: start; }
.card-side img { border-radius: 12px; margin-bottom: 12px; border: 2px solid var(--line); }
.stat { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-weight: 700; color: var(--ink-2); }
.stat b { color: var(--ink); }
.vote { display: flex; gap: 8px; margin-top: 12px; }
.vote button { flex: 1; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px; font-size: 20px; cursor: pointer; font-weight: 800; transition: .15s; }
.vote button:hover { border-color: var(--blue); }
.vote button.on { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ------------------------------------------------------------ page catégorie */
.cat-head { display: flex; gap: 18px; align-items: center; background: var(--c); color: #fff; border-radius: 20px; padding: 22px 26px; margin-bottom: 26px; box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 70%, #000), 0 14px 30px rgba(0, 0, 0, .15); position: relative; overflow: hidden; }
.cat-head::after { content: attr(data-icon); position: absolute; right: 20px; top: -20px; font-size: 160px; opacity: .18; transform: rotate(12deg); }
.cat-head .ico { width: 74px; height: 74px; border-radius: 22px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 42px; flex: none; }
.cat-head h1 { margin: 0; font-family: var(--title); font-weight: 400; font-size: 42px; letter-spacing: .5px; }
.cat-head p { margin: 0; font-size: 18px; font-weight: 600; opacity: .95; }
.sortbar { display: flex; gap: 8px; justify-content: flex-end; margin: -6px 0 12px; }
.sortbar button { border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 4px 12px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.sortbar button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.empty { text-align: center; padding: 30px; color: var(--ink-3); font-weight: 700; font-size: 18px; }

/* ------------------------------------------------------------ pied de page */
.site-footer { background: #1b2433; color: #b9c3d6; margin-top: 30px; }
.ftr { max-width: var(--maxw); margin: 0 auto; padding: 26px 16px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.ftr .logo { font-size: 30px; display: inline-flex; transform: rotate(-3deg); margin-bottom: 10px; }
.ftr h4 { color: #fff; margin: 4px 0 8px; font-size: 16px; text-transform: uppercase; letter-spacing: .5px; }
.ftr a { display: block; color: #b9c3d6; font-weight: 600; padding: 2px 0; }
.ftr a:hover { color: #fff; }
.ftr p { margin: 0 0 8px; font-weight: 600; line-height: 1.5; }
.ftr-bottom { border-top: 1px solid rgba(255, 255, 255, .08); text-align: center; padding: 12px; font-size: 14px; font-weight: 600; }

/* ------------------------------------------------------------ mascotte Pop */
#pop { position: fixed; right: 18px; bottom: 14px; z-index: 80; display: flex; align-items: flex-end; gap: 6px; pointer-events: none; }
#pop .pop-img {
  width: 104px; height: 104px; cursor: pointer; pointer-events: auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .25));
  animation: bob 2.6s ease-in-out infinite; transition: transform .2s; background: none; border: 0; padding: 0;
}
#pop .pop-img img { width: 100%; height: 100%; object-fit: contain; }
#pop .pop-img:hover { transform: scale(1.08) rotate(-4deg); }
#pop.talk .pop-img { animation: talk .28s ease-in-out infinite alternate; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes talk { from { transform: scale(1) rotate(-2deg); } to { transform: scale(1.06, .96) rotate(2deg); } }
.bubble {
  pointer-events: auto; max-width: 250px; background: #fff; border: 3px solid var(--blue); border-radius: 18px 18px 4px 18px; padding: 10px 14px;
  font-weight: 700; font-size: 15px; color: var(--ink); box-shadow: 0 10px 24px rgba(0, 0, 0, .18); margin-bottom: 70px;
  transform-origin: bottom right; animation: bub .35s cubic-bezier(.2, 1.6, .4, 1) both; position: relative;
}
.bubble[hidden] { display: none; }
.bubble .x { position: absolute; top: -10px; left: -10px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: var(--ink-3); color: #fff; font-size: 13px; cursor: pointer; line-height: 1; }
.bubble .bub-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
@keyframes bub { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* radio */
.radio-pill { position: fixed; left: 18px; bottom: 18px; z-index: 70; background: #1b2433; color: #fff; border-radius: 999px; padding: 6px 14px 6px 8px; display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.radio-pill[hidden] { display: none; }
.radio-pill .eq { display: flex; gap: 2px; align-items: flex-end; height: 16px; }
.radio-pill .eq i { width: 3px; background: var(--yellow); animation: eq .8s ease-in-out infinite alternate; }
.radio-pill .eq i:nth-child(2) { animation-delay: -.3s; }
.radio-pill .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { from { height: 3px; } to { height: 16px; } }
.radio-pill button { border: 0; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 999px; width: 26px; height: 26px; cursor: pointer; }

/* toast du portail */
.p-toast { position: fixed; left: 50%; top: 76px; transform: translateX(-50%); background: #1b2433; color: #fff; font-weight: 700; padding: 8px 18px; border-radius: 12px; z-index: 90; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); animation: bub .3s both; }

/* modale contrôles */
.p-modal { position: fixed; inset: 0; z-index: 95; background: rgba(8, 20, 45, .55); display: grid; place-items: center; padding: 16px; animation: fade .2s both; }
.p-modal > div { background: #fff; border-radius: 20px; padding: 22px; width: min(460px, 100%); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); animation: bub .35s both; }
.p-modal h3 { margin: 0 0 12px; font-family: var(--title); font-weight: 400; font-size: 28px; color: var(--blue); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .row-3 { grid-template-columns: 1fr 1fr; }
  .row-3 > :nth-child(2) { grid-column: 1 / -1; order: -1; }
  .game-top { grid-template-columns: 56px minmax(0, 1fr); }
  .side-games { display: none; }
}
@media (max-width: 1180px) and (min-width: 761px) {
  .tiles.cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .search input { width: 150px; }
  .nav a { font-size: 15px; padding: 6px 8px; }
  .row-2, .info { grid-template-columns: 1fr; }
  .ftr { grid-template-columns: 1fr 1fr; }
  .hero { aspect-ratio: auto; height: 340px; }
  .slide img { width: 100%; }
  .slide .shade { background: linear-gradient(0deg, var(--c1) 0%, color-mix(in srgb, var(--c1) 85%, transparent) 38%, transparent 75%); }
  .slide .copy { top: auto; bottom: 44px; transform: none; width: auto; right: 4%; }
}
@media (max-width: 760px) {
  .hdr { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px 10px; }
  .logo { font-size: 28px; }
  .nav { order: 3; flex-basis: 100%; justify-content: flex-start; margin: 0 -12px; padding: 0 8px 2px; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .row-3 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles.cols-3, .tiles.cols-4, .tiles.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .cats { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat-chip { font-size: 15px; padding: 5px 12px 5px 6px; flex: none; }
  .cat-chip span { width: 26px; height: 26px; font-size: 15px; }
  .hero .arrow { display: none; }
  .game-top { grid-template-columns: 1fr; }
  .toolbar { flex-direction: row; position: static; order: 2; overflow-x: auto; }
  .tool[data-tip]:hover::after { display: none; }
  .tool-sep { width: 1px; height: auto; margin: 4px 2px; }
  .frame { aspect-ratio: 4 / 3; }
  .info h1 { font-size: 32px; }
  .cat-head { padding: 16px; }
  .cat-head h1 { font-size: 32px; }
  .ftr { grid-template-columns: 1fr; }
  #pop .pop-img { width: 78px; height: 78px; }
  .bubble { margin-bottom: 50px; max-width: 200px; font-size: 14px; }
  .page { padding-top: 16px; }
  .hero { height: 300px; border-radius: 18px; }
  .radio-pill { left: 10px; bottom: 10px; }
}

.row-3.eq { grid-template-columns: 1fr 1fr 1fr; }
.panel .cats { margin-top: 10px; }
@media (max-width: 1180px) { .row-3.eq { grid-template-columns: 1fr 1fr; } .row-3.eq > :nth-child(2) { grid-column: auto; order: 0; } }
@media (max-width: 760px) { .row-3.eq { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ comptes joueurs */
.acct { flex: none; position: relative; }
.acct-btn {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 4px; border-radius: 12px; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .14); color: #fff; font: 800 15px var(--font); transition: .15s;
}
.acct-btn:hover { background: rgba(255, 255, 255, .28); }
.acct-btn.acct-login { background: var(--yellow); color: #3a2a00; border-color: #fff; box-shadow: 0 3px 0 #c28f00; }
.acct-ava { width: 30px; height: 30px; border-radius: 9px; background: #fff; display: grid; place-items: center; font-size: 19px; line-height: 1; }
.acct-login .acct-ava { background: rgba(255, 255, 255, .5); }
.acct-ava.big { width: 48px; height: 48px; font-size: 30px; border-radius: 14px; flex: none; }
.acct-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu {
  position: absolute; right: 0; top: 46px; background: #fff; border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .25);
  padding: 6px; min-width: 200px; z-index: 70; animation: bub .25s both; transform-origin: top right;
}
.acct-menu[hidden] { display: none; }
.acct-menu a, .acct-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; font: 700 16px var(--font); color: var(--ink); background: none; border: 0; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--blue-l); }

.auth-box { position: relative; width: min(430px, 100%) !important; }
.auth-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #eef2f9; cursor: pointer; font-size: 15px; }
.auth-tabs { display: flex; gap: 6px; background: #eef2f9; padding: 5px; border-radius: 14px; margin: 4px 36px 14px 0; }
.auth-tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 10px; font: 800 15px var(--font); color: var(--ink-2); cursor: pointer; }
.auth-tabs button.on { background: #fff; color: var(--blue); box-shadow: 0 2px 6px rgba(0, 0, 0, .1); }
.auth-intro { margin: 0 0 10px; font-weight: 600; color: var(--ink-2); }
.field { display: block; margin-bottom: 10px; }
.field span, .field-lbl { display: block; font-weight: 800; font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.field input { width: 100%; height: 44px; border-radius: 12px; border: 2px solid var(--line); padding: 0 12px; font: 700 17px var(--font); color: var(--ink); }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 99, 196, .15); }
.auth-modal:not(.signup) .only-signup { display: none; }
.avatars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 10px; }
.avatars button { aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--line); background: #fff; font-size: 22px; cursor: pointer; padding: 0; transition: .12s; }
.avatars button:hover { transform: scale(1.1); }
.avatars button.on { border-color: var(--orange); background: #fff4e8; box-shadow: 0 0 0 3px rgba(255, 122, 26, .25); }
.auth-err { color: #d32f2f; font-weight: 700; min-height: 22px; font-size: 15px; }
.auth-go { width: 100%; justify-content: center; margin-top: 4px; }
.auth-go:disabled { filter: grayscale(.6); cursor: wait; }
.auth-note { font-size: 13px; color: var(--ink-3); font-weight: 600; margin: 12px 0 0; line-height: 1.4; }
.btn.danger { background: linear-gradient(180deg, #ff6b6b, #e53935); box-shadow: 0 5px 0 #a31d1a, 0 8px 16px rgba(0, 0, 0, .2); }

/* classement (page de jeu) */
.lb-panel { margin-top: 26px; }
.lb-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: -4px 0 12px; }
.lb-tabs button { border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 3px 12px; font: 700 14px var(--font); color: var(--ink-2); cursor: pointer; }
.lb-tabs button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.lb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lb-cols h3 { margin: 0 0 6px; font-size: 16px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); text-align: center; }
.lb-list, .pc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lb-list li, .pc-list li { display: grid; grid-template-columns: 34px 30px 1fr auto; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 10px; background: #f6f9fe; font-weight: 700; }
.lb-list li:nth-child(1), .pc-list li:nth-child(1) { background: linear-gradient(90deg, #fff4cc, #f6f9fe); }
.lb-list li.me { background: #e3f0ff; box-shadow: inset 0 0 0 2px var(--blue); }
.lb-list li.sep { margin-top: 6px; }
.lb-rank { font-size: 20px; text-align: center; }
.lb-n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 8px; background: #dfe7f3; color: var(--ink-2); font-size: 14px; font-weight: 800; }
.lb-ava { font-size: 20px; text-align: center; }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.lb-name:hover { color: var(--blue); text-decoration: underline; }
.lb-score { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.lb-empty { display: block !important; text-align: center; color: var(--ink-3); font-weight: 700; padding: 14px 6px; background: none !important; }
.lb-empty a { color: var(--blue); }
.lb-cta { text-align: center; margin-top: 12px; font-weight: 700; color: var(--ink-2); }

/* page Classements */
.me-strip { margin-bottom: 18px; }
.me-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 10px 16px; font-weight: 700; font-size: 17px; color: var(--ink-2); box-shadow: var(--shadow); }
.me-card .btn { margin-left: auto; }
.me-card .acct-ava { background: var(--blue-l); }
.podiums { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.podium-card { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.pc-head { display: flex; gap: 12px; align-items: center; }
.pc-head img { width: 96px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.pc-head h3 { margin: 0; font-family: var(--title); font-weight: 400; font-size: 22px; color: var(--ink); }
.pc-head span { font-weight: 700; color: var(--ink-3); font-size: 14px; }
.pc-more { margin-top: auto; text-align: right; font-weight: 800; color: var(--blue); font-size: 14px; }

/* page profil */
.profile-head { display: flex; gap: 22px; align-items: center; background: linear-gradient(135deg, #0f6fd6, #6a3de8); color: #fff; border-radius: 22px; padding: 24px; box-shadow: 0 10px 30px rgba(11, 60, 130, .25); margin-bottom: 10px; }
.ph-ava { width: 110px; height: 110px; border-radius: 30px; background: #fff; display: grid; place-items: center; font-size: 70px; box-shadow: 0 8px 0 rgba(0, 0, 0, .15); flex: none; }
.ph-info h1 { margin: 0; font-family: var(--title); font-weight: 400; font-size: 44px; letter-spacing: .5px; }
.ph-info p { margin: 0 0 10px; font-weight: 600; opacity: .9; }
.ph-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.ph-stats div { background: rgba(255, 255, 255, .16); border-radius: 14px; padding: 6px 14px; text-align: center; }
.ph-stats b { display: block; font-size: 24px; line-height: 1.1; }
.ph-stats span { font-size: 13px; font-weight: 700; opacity: .9; }
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.record { display: flex; gap: 12px; background: #f6f9fe; border: 2px solid var(--line); border-radius: 14px; padding: 10px; transition: .15s; }
.record:hover { border-color: var(--blue); transform: translateY(-2px); }
.record img { width: 110px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; flex: none; }
.rec-body { flex: 1; min-width: 0; }
.rec-body h3 { margin: 0 0 4px; font-size: 18px; }
.rec-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 1px 0; }
.rec-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rec-row em { font-style: normal; color: var(--ink-3); min-width: 54px; text-align: right; }
.rec-row em.top { color: #b8860b; }
.rec-more { font-size: 13px; color: var(--ink-3); font-weight: 700; }
.acct-settings .avatars { max-width: 480px; }
.acct-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

@media (max-width: 760px) {
  .acct-name { display: none; }
  .acct-btn { padding: 0 3px; }
  .lb-cols { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; text-align: center; }
  .ph-stats { justify-content: center; }
  .ph-info h1 { font-size: 34px; }
  .records { grid-template-columns: 1fr; }
  .me-card { flex-wrap: wrap; }
}

/* en-tête : on allège quand la place manque */
@media (max-width: 1440px) { .nav a span { display: none; } .search input { width: 180px; } }
@media (max-width: 1100px) and (min-width: 761px) { .acct-name { display: none; } .acct-btn { padding: 0 3px; } }
