:root {
  --bg: #0f0a17;
  --card: #18111f;
  --card-2: #221830;
  --line: rgba(196, 150, 255, .09);
  --text: #f8f3ff;
  --muted: #ab9fc0;
  --violet: #7b3cff;
  --purple: #b04dff;
  --pink: #ff4fb3;
  --slime: linear-gradient(90deg, var(--violet), var(--purple) 50%, var(--pink));
  --slime-diag: linear-gradient(135deg, var(--violet), var(--purple) 50%, var(--pink));
  --radius: 24px;
  --band: 84px;
  --font-title: "Bricolage Grotesque", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  position: relative;
  background: var(--bg);
  background-image:
    radial-gradient(700px 420px at 88% 18%, rgba(255, 79, 179, .10), transparent 70%),
    radial-gradient(800px 520px at 8% 35%, rgba(123, 60, 255, .13), transparent 70%);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
ul { list-style: none; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); font-size: 14px; }
.defs { position: absolute; }

/* ---------- Icônes (simple-icons via mask) ---------- */
.si {
  display: inline-block; width: 20px; height: 20px; flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}
.si-lg { width: 34px; height: 34px; }

/* ---------- Slime ---------- */
.slime { filter: url(#goo); }
.slime-band {
  height: var(--band);
  background: var(--slime);
  box-shadow: inset 0 10px 14px -6px rgba(255, 255, 255, .28), inset 0 -12px 16px -10px rgba(40, 0, 80, .35);
}
.slime-top { position: absolute; top: 0; left: 0; right: 0; height: 240px; z-index: 3; pointer-events: none; }
.drips { position: absolute; left: 0; right: 0; top: calc(var(--band) - 14px); }
.drip {
  position: absolute; top: 0; width: var(--w); height: var(--h);
  background: var(--c); border-radius: 0 0 999px 999px;
  animation: drip var(--d) ease-in-out var(--delay) infinite alternate;
}
.drip::after {
  content: ""; position: absolute; left: 50%; bottom: -4px;
  width: calc(var(--w) * 1.3); height: calc(var(--w) * 1.3);
  border-radius: 50%; background: inherit; transform: translateX(-50%);
}
.drip::before {
  content: ""; position: absolute; z-index: 1; left: 24%; bottom: 2px;
  width: 3px; height: 38%; border-radius: 3px; background: rgba(255, 255, 255, .4);
}
@keyframes drip { from { height: calc(var(--h) * .55); } to { height: var(--h); } }
.drop {
  position: absolute; top: calc(var(--h) - 6px); width: calc(var(--w) * .8); height: calc(var(--w) * .95);
  margin-left: calc(var(--w) * .1); border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  background: var(--c); opacity: 0;
  animation: fall 5s ease-in var(--delay) infinite;
}
@keyframes fall {
  0%, 30% { transform: translateY(-14px) scale(.4); opacity: 0; }
  40% { opacity: 1; }
  85% { opacity: .9; }
  100% { transform: translateY(var(--fall)) scale(1); opacity: 0; }
}

/* ---------- Nav (posée sur la bande de slime) ---------- */
.nav { position: relative; z-index: 4; display: flex; align-items: center; gap: 28px; height: var(--band); color: #fff; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 26px/1 var(--font-title); letter-spacing: .02em; }
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px;
  background: #fff; color: var(--violet); font-size: 21px; transform: rotate(-8deg);
  box-shadow: 0 4px 0 rgba(60, 0, 120, .35);
}
.nav-links { display: flex; gap: 22px; font-weight: 600; font-size: 14px; }
.nav-links a { opacity: .9; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.nav-socials { margin-left: auto; display: flex; gap: 6px; }
.nav-socials a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; transition: .2s; }
.nav-socials a:hover { background: rgba(255, 255, 255, .2); }
.nav-socials .si { width: 18px; height: 18px; }

/* ---------- Bento ---------- */
.bento {
  position: relative; z-index: 1;
  margin-top: 48px;
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "socials socials socials discord"
    "shop    shop    shop    contact"
    "games   games   games   team";
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(176, 77, 255, .35); }
.card-title { font: 800 22px/1.1 var(--font-title); text-transform: uppercase; letter-spacing: .01em; }
.card-title.big { font-size: 40px; line-height: .95; }
.card-title.big span, .grad {
  background: var(--slime); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 14px;
  background: var(--card-2); border: 1px solid var(--line); transition: .2s; white-space: nowrap;
}
.btn:hover { background: #2c2040; transform: translateY(-1px); }
.btn-slime {
  background: var(--slime); border: 0; color: #fff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 5px 0 #5a1fc4;
}
.btn-slime:hover { background: var(--slime); filter: brightness(1.08); }
.btn-slime:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 1px 0 #5a1fc4; }
.btn-full { width: 100%; padding: 14px; font-size: 15px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px;
  background: rgba(176, 77, 255, .16); color: #d9b8ff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.pill-hot { background: var(--slime); color: #fff; }

/* ---------- Contact pro ---------- */
.contact {
  display: flex; flex-direction: column; gap: 10px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 79, 179, .18), transparent 60%),
    radial-gradient(circle at 0 100%, rgba(123, 60, 255, .22), transparent 60%),
    var(--card);
}
.contact-mail { font: 800 17px/1.2 var(--font-title); overflow-wrap: anywhere; }
.contact-mail:hover { color: #ff8fd0; }
.contact .btn { margin-top: auto; }

/* ---------- Réseaux ---------- */
.socials { display: flex; flex-direction: column; gap: 14px; }
.social-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; flex: 1; }
.social {
  --c: #fff;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  background: var(--card-2); border: 1px solid var(--line); transition: .2s;
}
.social .ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); flex: none; }
.social b { display: block; font-size: 14px; }
.social small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social > span:nth-child(2) { min-width: 0; }
.social:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.social.featured {
  grid-column: 1 / -1; padding: 14px 16px;
  background: linear-gradient(110deg, rgba(123, 60, 255, .28), rgba(255, 79, 179, .14) 70%);
  border-color: rgba(176, 77, 255, .35);
}
.social.featured .ic { width: 48px; height: 48px; background: var(--c); color: #fff; }
.social.featured .ic .si { width: 24px; height: 24px; }
.social.featured b { font: 800 18px/1.1 var(--font-title); text-transform: uppercase; }
.social .sub {
  margin-left: auto; font-style: normal; font-weight: 800; font-size: 13px; white-space: nowrap;
  background: var(--c); color: #fff; padding: 8px 14px; border-radius: 10px; box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 60%, #000);
}

/* ---------- Discord ---------- */
.discord {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--slime-diag); border: 0; color: #fff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25);
}
.discord:hover { transform: translateY(-3px); }
.discord-top { display: flex; align-items: center; gap: 12px; }
.discord-top strong { font: 800 20px/1.1 var(--font-title); }
.discord-text { font-weight: 600; font-size: 14px; }
.perks { display: flex; flex-direction: column; gap: 6px; }
.perks li { background: rgba(255, 255, 255, .16); border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.discord-go {
  margin-top: auto; align-self: flex-start; background: #fff; color: var(--violet);
  font-weight: 800; font-size: 14px; padding: 9px 16px; border-radius: 12px; box-shadow: 0 4px 0 rgba(60, 0, 120, .35);
}

/* ---------- Boutique ---------- */
.shop { display: flex; flex-direction: column; gap: 16px; }
.shop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.shop-badge { margin-bottom: 10px; animation: pulse-badge 1.8s ease-in-out infinite; }
@keyframes pulse-badge { 50% { transform: scale(1.06) rotate(-2deg); } }
.products {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 210px); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
  scrollbar-width: thin; scrollbar-color: var(--purple) transparent;
}
.product {
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; scroll-snap-align: start;
  background: var(--card-2); border: 1px solid var(--line); transition: .25s;
}
.product:hover { transform: translateY(-4px); border-color: rgba(255, 79, 179, .5); }
.product-img { aspect-ratio: 1; position: relative; background: #f3ecfb; display: grid; place-items: center; font-size: 54px; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product:hover .product-img img { transform: scale(1.05); }
.product.sold-out img { filter: grayscale(.5) opacity(.75); }
.product-tag { position: absolute; z-index: 1; top: 8px; left: 8px; font-size: 10px; font-weight: 800; font-style: normal; text-transform: uppercase; background: #1a1222; color: #fff; padding: 4px 8px; border-radius: 8px; }
.product-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.product-info b { font-size: 13px; line-height: 1.3; }
.product-info span { font-weight: 800; font-size: 13px; color: #ff8fd0; }

/* ---------- Jeux Roblox ---------- */
.games { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: center; }
.games-head { display: flex; flex-direction: column; gap: 12px; }
.game-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.game {
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: var(--card-2); border: 1px solid var(--line); transition: .25s;
}
.game:hover { transform: translateY(-4px); border-color: rgba(176, 77, 255, .55); }
.game-cover { aspect-ratio: 1; position: relative; display: grid; place-items: center; font-size: 52px; background: var(--slime-diag); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.game:hover .game-cover img { transform: scale(1.05); }
.game-genre { position: absolute; z-index: 1; top: 10px; right: 10px; font-size: 11px; font-weight: 800; font-style: normal; background: rgba(15, 10, 23, .7); padding: 4px 9px; border-radius: 8px; backdrop-filter: blur(4px); }
.game-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-body b { font: 800 16px/1.15 var(--font-title); }
.game-body p { color: var(--muted); font-size: 13px; }
.game-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.game-foot small { color: var(--muted); font-size: 12px; font-weight: 600; }
.play { background: var(--slime); color: #fff; font-weight: 800; font-size: 12px; padding: 6px 12px; border-radius: 10px; white-space: nowrap; }
.play.soon { background: #3a2f4a; color: var(--muted); }

/* ---------- Équipe ---------- */
.team { padding: 0; display: flex; flex-direction: column; }
.team-head { position: relative; z-index: 2; height: 74px; }
.team-head .slime-band { height: 74px; display: grid; place-items: center; }
.team-head h2 { font: 800 20px/1 var(--font-title); text-transform: uppercase; color: #fff; }
.team-head .drips { top: 62px; }
.team-list { padding: 40px 20px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.member { display: flex; align-items: center; gap: 14px; }
.member:nth-child(even) { flex-direction: row-reverse; text-align: right; }
.member-av {
  width: 60px; height: 60px; border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; font: 800 21px/1 var(--font-title); color: #fff;
  background: var(--c); box-shadow: 0 0 0 3px var(--card), 0 0 0 5px color-mix(in srgb, var(--c) 60%, transparent);
  transition: transform .3s;
}
.member-av img { width: 100%; height: 100%; object-fit: cover; }
.member:hover .member-av { transform: scale(1.08) rotate(-6deg); }
.member b { display: block; font: 800 15px/1.1 var(--font-title); text-transform: uppercase; }
.member small { color: var(--muted); font-size: 12px; }
.team .btn { margin: 0 20px 26px; }

/* ---------- Footer ---------- */
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 48px 0 32px; color: var(--muted); font-size: 13px; }
.footer a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Modale recrutement ---------- */
.modal {
  margin: auto; border: 1px solid var(--line); border-radius: 26px; background: var(--card); color: var(--text);
  width: min(580px, 100% - 32px); max-height: calc(100vh - 32px); padding: 0;
}
.modal::backdrop { background: rgba(10, 4, 20, .72); backdrop-filter: blur(5px); }
.modal[open] { animation: pop .25s ease; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.apply { padding: 28px; position: relative; }
.apply::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--slime); }
.apply section, .apply form { display: flex; flex-direction: column; gap: 14px; }
.apply [hidden] { display: none; }
.apply h2 { font: 800 26px/1.1 var(--font-title); padding-right: 36px; }
.apply section .pill { align-self: flex-start; }
.apply label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; flex: 1; }
.apply .row { display: flex; gap: 12px; }
.apply input, .apply select, .apply textarea {
  font: inherit; color: var(--text); background: var(--card-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 13px; outline: none; transition: border-color .2s; width: 100%;
}
.apply input:focus, .apply select:focus, .apply textarea:focus { border-color: var(--purple); }
.apply textarea { resize: vertical; }
.apply .check { flex-direction: row; align-items: center; font-weight: 500; color: var(--muted); }
.apply .check input { width: 18px; height: 18px; accent-color: var(--purple); flex: none; }
.back { align-self: flex-start; color: var(--muted); font-size: 13px; font-weight: 600; }
.back:hover { color: var(--text); }
.modal-close { position: absolute; z-index: 1; top: 20px; right: 20px; width: 34px; height: 34px; border-radius: 10px; background: var(--card-2); }
.modal-close:hover { background: #2f2340; }
.job-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.job-free { grid-column: 1 / -1; }
.job {
  display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 13px 14px; border-radius: 14px;
  background: var(--card-2); border: 1px solid var(--line); transition: .2s; width: 100%; height: 100%;
}
.job:hover:not(:disabled) { border-color: var(--pink); transform: translateY(-2px); }
.job b { font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.job b em { font-style: normal; color: #ff8fd0; font-size: 12px; white-space: nowrap; }
.job small { color: var(--muted); font-size: 12px; }
.job:disabled { opacity: .45; cursor: not-allowed; }
.form-msg { font-size: 14px; text-align: center; min-height: 1em; }
.form-msg.ok { color: #3ee08f; }
.form-msg.err { color: #ff6b81; }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; width: 100%; height: 100%; }

/* ---------- Apparition ---------- */
.bento > .card { animation: rise .6s ease both; }
.bento > .card:nth-child(2) { animation-delay: .05s; }
.bento > .card:nth-child(3) { animation-delay: .1s; }
.bento > .card:nth-child(4) { animation-delay: .15s; }
.bento > .card:nth-child(5) { animation-delay: .2s; }
.bento > .card:nth-child(6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .drop { display: none; }
}

/* Easter egg : code Konami */
body.party .card { animation: party 1.2s linear infinite; }
@keyframes party { to { filter: hue-rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "socials socials"
      "discord contact"
      "shop    shop"
      "games   games"
      "team    team";
  }
  .games { grid-template-columns: 1fr; }
  .team-list { display: grid; grid-template-columns: 1fr 1fr; }
  .member:nth-child(even) { flex-direction: row; text-align: left; }
  .nav-links { display: none; }
}
@media (max-width: 680px) {
  :root { --band: 72px; }
  .bento {
    margin-top: 40px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "socials" "discord" "shop" "games" "team" "contact";
  }
  .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .products { grid-auto-columns: 46%; }
  .game-list { grid-template-columns: 1fr; }
  .game { flex-direction: row; }
  .game-cover { width: 104px; flex: none; }
  .card-title.big { font-size: 34px; }
  .logo { font-size: 22px; }
  .nav { gap: 12px; }
  .nav-socials { gap: 0; }
  .social:not(.featured) { flex-direction: column; align-items: flex-start; gap: 8px; }
  .social > span:nth-child(2) { width: 100%; }
  .social .sub { padding: 7px 10px; font-size: 12px; }
  .team-list { grid-template-columns: 1fr; }
  .apply { padding: 24px 20px; }
  .apply .row { flex-direction: column; }
  .job-list { grid-template-columns: 1fr; }
  .shop-head { flex-direction: column; }
}
