/* Really Addictive Games — fond blanc, couleurs vives, logo capsule, quelques petites animations.
   Chaque jeu garde son identité dans sa carte (--g : sa couleur, --g-font : sa police de titre). */
:root {
  --ink: #141428;
  --muted: #646482;
  --line: #ebecf4;
  --blue: #3d5afe; --coral: #ff5d5d; --yellow: #ffc83d; --mint: #2ed3a0; --lilac: #9b7bff;
  --shadow: 0 1px 2px rgba(20, 20, 40, .05), 0 18px 40px -22px rgba(20, 20, 40, .28);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Geist', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --g: #ff8c1a; --g-ink: #1d1a2b;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
/* un voile de couleur très léger en haut de page */
body::before { content: ""; position: absolute; inset: 0 0 auto; height: 620px; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 300px at 12% 0%, rgba(61, 90, 254, .09), transparent 70%), radial-gradient(520px 280px at 88% 10%, rgba(255, 93, 93, .09), transparent 70%), radial-gradient(500px 260px at 55% 30%, rgba(255, 200, 61, .1), transparent 70%); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }
svg.capsule, .shapes svg, .mystery svg { width: auto; height: auto; stroke: none; }
main, .top, .foot { width: min(1120px, 100% - 40px); margin-inline: auto; }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- En-tête ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 18px var(--display); letter-spacing: -.02em; }
.brand .capsule { width: 38px; height: 38px; transition: transform .5s var(--spring); }
.brand:hover .capsule { transform: rotate(-25deg) scale(1.1); }
.backLink { display: inline-flex; align-items: center; gap: 8px; font: 500 15px var(--body); color: var(--muted); padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.backLink:hover { color: var(--ink); background: #f3f4fa; }
.backLink svg { width: 17px; height: 17px; }

/* ---------- Titre ---------- */
.intro { position: relative; padding: 34px 0 6px; }
.intro h1 { position: relative; margin: 0; max-width: 760px; font: 800 clamp(44px, 7vw, 84px)/1 var(--display); letter-spacing: -.045em; }
.intro p { position: relative; margin: 18px 0 0; max-width: 540px; color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); }
/* formes qui flottent doucement à droite du titre */
.shapes svg { position: absolute; animation: bob 6s ease-in-out infinite; }
.shapes .s1 { width: 46px; right: 8%; top: 30px; }
.shapes .s2 { width: 40px; right: 24%; top: 120px; animation-delay: -1.5s; animation-duration: 7s; }
.shapes .s3 { width: 74px; right: 2%; top: 150px; animation-delay: -3s; }
.shapes .s4 { width: 42px; right: 16%; top: -6px; animation-delay: -4.5s; animation-duration: 8s; }
.shapes .s5 { width: 40px; right: 34%; top: 40px; animation-delay: -2.2s; animation-duration: 6.5s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(12deg); } }

/* ---------- Jeux ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; padding: 36px 0 10px; align-items: stretch; }
.card { position: relative; border-radius: 28px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .45s var(--spring), box-shadow .4s, opacity .7s var(--ease) var(--d, 0ms); }
.card.game { display: flex; flex-direction: column; padding: 12px; }
.card.game:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--g) 65%, transparent); }
.cover { position: relative; display: block; overflow: hidden; border-radius: 20px; aspect-ratio: 16 / 7.6; background: #e9f6fb; transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.cover:hover img { transform: scale(1.06); }
.playDot { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .95); color: var(--ink); box-shadow: 0 12px 26px rgba(0, 0, 0, .25); opacity: 0; transform: scale(.8); transition: opacity .3s, transform .35s var(--spring); }
.playDot svg { width: 28px; height: 28px; margin-left: 4px; }
.cover:hover .playDot, .cover:focus-visible .playDot { opacity: 1; transform: scale(1); }
.gInfo { padding: 18px 10px 8px; }
.gHead { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.appIcon { width: 64px; height: 64px; border-radius: 17px; flex-shrink: 0; box-shadow: 0 6px 14px -6px rgba(20, 20, 40, .4); }
.gName { margin: 0; font: 800 28px/1.05 var(--display); color: var(--ink); letter-spacing: -.03em; }
.genre { margin: 3px 0 0; font: 600 12.5px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.desc { margin: 0 0 18px; color: var(--muted); font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 16px; }
.playBtn { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; font: 700 16.5px var(--display); color: #fff; background: var(--g); padding: 13px 22px 13px 18px; border-radius: 999px; box-shadow: 0 10px 22px -10px var(--g), inset 0 -2px 0 rgba(0, 0, 0, .14); transition: transform .3s var(--spring), box-shadow .3s; }
.playBtn svg { width: 19px; height: 19px; }
.playBtn:hover { transform: scale(1.05); }
.playBtn:active { transform: scale(.97); }
.more { display: inline-flex; align-items: center; gap: 6px; font: 600 15px var(--display); color: var(--muted); transition: color .2s; }
.more svg { width: 16px; height: 16px; transition: transform .25s var(--spring); }
.more:hover { color: var(--ink); }
.more:hover svg { transform: translateX(3px); }
.stores { display: flex; flex-wrap: wrap; gap: 8px; }
.store { display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px 8px 11px; border-radius: 14px; background: var(--ink); color: #fff; line-height: 1.1; font: 600 15px var(--display); }
.store svg { width: 21px; height: 21px; }
.store svg.apple { width: 22px; height: 22px; margin-top: -3px; }
a.store { transition: transform .15s ease, box-shadow .15s ease; }
a.store:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(20, 20, 40, .55); }
.store small { display: block; font: 500 10.5px var(--body); opacity: .7; }
.store.soon { background: #f4f5fb; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.store.soon small { color: var(--blue); opacity: 1; font-weight: 600; }

/* ---------- Prochain jeu ---------- */
.card.next { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px 24px; overflow: hidden; background: linear-gradient(160deg, #fff 30%, #f4f0ff); }
.soonTag { margin: 0 0 6px; font: 700 12.5px var(--display); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--lilac); padding: 4px 12px; border-radius: 999px; }
.card.next h3 { margin: 0; font: 800 23px/1.15 var(--display); letter-spacing: -.02em; }
.nextTxt { margin: 6px 0 18px; color: var(--muted); font-size: 15px; max-width: 260px; }
.loading { width: min(220px, 80%); height: 10px; border-radius: 99px; background: #ece8fb; overflow: hidden; }
.loading i { display: block; height: 100%; border-radius: inherit; background: repeating-linear-gradient(-45deg, var(--lilac) 0 8px, #b9a2ff 8px 16px); background-size: 22px 100%; animation: load 4.5s var(--ease) infinite, stripes .6s linear infinite; }
@keyframes load { 0% { width: 8%; } 70%, 100% { width: 78%; } }
@keyframes stripes { to { background-position: 22px 0; } }

/* ---------- Page d'un jeu ---------- */
.dHero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 44px; align-items: center; padding: 26px 0 6px; }
.detail .cover { aspect-ratio: 16 / 9; border-radius: 26px; box-shadow: var(--shadow); }
.detail .playDot { opacity: 1; transform: none; width: 80px; height: 80px; margin: -40px 0 0 -40px; }
.detail .gHead .appIcon { width: 80px; height: 80px; border-radius: 21px; }
.detail .gName { font-size: clamp(36px, 4.2vw, 50px); letter-spacing: -.04em; }
.tagline { margin: 4px 0 8px; font: 700 21px/1.25 var(--display); letter-spacing: -.02em; }
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: min(460px, 82%); gap: 16px; margin: 40px calc(50% - 50vw) 0; padding: 6px max(20px, calc(50vw - 560px)) 16px; scroll-padding-inline: max(20px, calc(50vw - 560px)); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; }
.shots::-webkit-scrollbar { display: none; }
.shots.dragging { cursor: grabbing; scroll-snap-type: none; }
.shots figure { position: relative; margin: 0; scroll-snap-align: start; }
.shots img { border-radius: 18px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; pointer-events: none; box-shadow: var(--shadow); }
.shots figcaption { display: flex; align-items: flex-start; gap: 12px; padding: 14px 4px 0; font: 400 14.5px/1.45 var(--body); color: var(--muted); }
.shots figcaption strong { display: block; margin-bottom: 2px; font: 700 17px/1.2 var(--display); color: var(--ink); letter-spacing: -.01em; }
.shots figcaption b { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 10px; background: var(--blue); color: #fff; font: 700 15px var(--display); }
.shots figure:nth-child(2) figcaption b { background: var(--coral); } .shots figure:nth-child(3) figcaption b { background: var(--yellow); color: var(--ink); } .shots figure:nth-child(4) figcaption b { background: var(--lilac); } .shots figure:nth-child(5) figcaption b { background: var(--mint); }
.legal { display: flex; flex-wrap: wrap; gap: 20px; margin: 22px 0 0; font-size: 14px; color: var(--muted); }
.legal a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }

/* ---------- Pied de page ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 46px; padding: 22px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 880px) {
  .games { grid-template-columns: 1fr; }
  .dHero { grid-template-columns: 1fr; gap: 24px; }
  .shapes .s3, .shapes .s5 { display: none; }
}
@media (max-width: 600px) {
  main, .top, .foot { width: calc(100% - 28px); }
  .top { padding: 14px 0; }
  .brand { font-size: 16px; }
  .intro { padding-top: 18px; }
  .shapes .s1 { top: -14px; right: 0; width: 30px; } .shapes .s2, .shapes .s4 { display: none; }
  .games { padding-top: 26px; gap: 16px; }
  .gName { font-size: 25px; }
  .playBtn { flex: 1; justify-content: center; }
  .stores .store { flex: 1; justify-content: center; }
  .playDot { opacity: 1; transform: none; width: 60px; height: 60px; margin: -30px 0 0 -30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .hl { background-size: 100% 100%; }
}

/* ---------- Titre surligné ---------- */
.hl { color: var(--ink); padding: 0 .14em; margin: 0 -.06em; border-radius: .3em .2em .35em .25em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(100deg, rgba(255, 200, 61, 0) 0, #ffd34d 3%, #ffe07a 50%, #ffcf3f 97%, rgba(255, 200, 61, 0) 100%) no-repeat 0 62% / 0% 78%;
  transition: background-size 1s var(--ease) .45s; }
.in .hl { background-size: 100% 78%; }

/* ---------- Bandeau d'infos qui défile ---------- */
.ticker { position: relative; margin: 30px 0 0; padding: 12px 0; overflow: hidden; border-radius: 999px; background: #f6f7fc; box-shadow: inset 0 0 0 1px var(--line);
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tTrack { display: flex; gap: 34px; width: max-content; animation: ticker 32s linear infinite; }
.ticker:hover .tTrack { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.tick { display: inline-flex; align-items: center; gap: 10px; font: 600 15px var(--display); white-space: nowrap; }
.tick i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 0%, transparent); animation: tickPulse 2.4s ease-in-out infinite; }
.tick:nth-child(odd) i { animation-delay: -1.2s; }
@keyframes tickPulse { 50% { transform: scale(1.35); } }

/* ---------- Prochain jeu : la capsule mystère ---------- */
.mystery { position: relative; width: 170px; height: 170px; margin-bottom: 4px; }
.pill { width: 170px; height: 170px; overflow: visible; animation: float 2.6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.pill .body { transform-box: view-box; }
.pill .half, .pill .rays, .pill .confetti rect { transform-box: fill-box; transform-origin: center; }
.pill .half.a { animation: openA 5s var(--ease) infinite; }
.pill .half.b { animation: openB 5s var(--ease) infinite; }
@keyframes openA { 0%, 42% { transform: none; } 46% { transform: rotate(-6deg); } 50% { transform: rotate(5deg); } 54% { transform: rotate(-3deg); } 58% { transform: none; } 66%, 86% { transform: translateX(-16px) rotate(-14deg); } 94%, 100% { transform: none; } }
@keyframes openB { 0%, 42% { transform: none; } 46% { transform: rotate(-6deg); } 50% { transform: rotate(5deg); } 54% { transform: rotate(-3deg); } 58% { transform: none; } 66%, 86% { transform: translateX(16px) rotate(14deg); } 94%, 100% { transform: none; } }
.pill .rays { fill: #ffd34d; opacity: 0; animation: rays 5s var(--ease) infinite; }
@keyframes rays { 0%, 60% { opacity: 0; transform: scale(.3) rotate(0); } 70% { opacity: .9; transform: scale(1) rotate(20deg); } 86% { opacity: .7; transform: scale(1.05) rotate(55deg); } 96%, 100% { opacity: 0; transform: scale(.4) rotate(70deg); } }
.pill .confetti rect { opacity: 0; animation: pop 5s var(--ease) infinite; }
@keyframes pop { 0%, 62% { opacity: 0; transform: translate(0, 0) scale(.4); } 68% { opacity: 1; } 84% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(160deg) scale(1); } 92%, 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 14px)) rotate(220deg) scale(.8); } }
.bubble { position: absolute; left: 50%; top: -6px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; margin-left: -20px; border-radius: 50% 50% 50% 8px; background: var(--ink); color: #fff; font: 800 22px var(--display); opacity: 0; transform: scale(.4) translateY(14px); animation: bubble 5s var(--spring) infinite; }
@keyframes bubble { 0%, 64% { opacity: 0; transform: scale(.4) translateY(14px); } 72%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: scale(.6); } }
.mystery .shadow { position: absolute; left: 50%; bottom: 10px; width: 90px; height: 12px; margin-left: -45px; border-radius: 50%; background: rgba(20, 20, 40, .1); animation: shadow 2.6s ease-in-out infinite; }
@keyframes shadow { 50% { transform: scaleX(.8); opacity: .6; } }
.spark { position: absolute; width: 16px; height: 16px; background: var(--c); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 2.4s ease-in-out infinite; }
.spark.k1 { --c: var(--yellow); top: 14px; left: 6px; }
.spark.k2 { --c: var(--coral); top: 30px; right: 4px; width: 13px; height: 13px; animation-delay: -.8s; }
.spark.k3 { --c: var(--mint); bottom: 34px; right: 14px; width: 11px; height: 11px; animation-delay: -1.6s; }
.spark.k4 { --c: var(--blue); bottom: 40px; left: 14px; width: 10px; height: 10px; animation-delay: -.4s; }
@keyframes twinkle { 0%, 100% { transform: scale(.4) rotate(0); opacity: .3; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }
@media (max-width: 600px) { .ticker { margin-top: 22px; } .tick { font-size: 14px; } }

