@font-face { font-family: "Luckiest"; src: url(gribouille_title.ttf); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(gribouille_bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(gribouille_medium.ttf); font-weight: 500; font-display: swap; }

/* Palette = GribouilleLib.Colors (gribouille_lib/sh_config.lua) */
:root {
  --ink: #1B1B1F; --cream: #FFF6E5; --white: #fff; --yellow: #FFD23F; --pink: #FF5D8F;
  --blue: #4CC9F0; --green: #7BE495; --orange: #FF9F43; --money: #2F9E55; --muted: #4A4A55;
  --empty: #E6DCC8; --hover: #FFF1B8;
  /* couleurs qui changent avec le thème */
  --bg: #FFF6E5; --card: #fff; --soft: #FFF6E5; --text: #1B1B1F; --line: #1B1B1F; --deep: #1B1B1F; --kbg: #1B1B1F; --kfg: #FFD23F;
  --b: 3px solid var(--line); --sh: 6px 6px 0 var(--line); --r: 18px;
}
:root.dark { color-scheme: dark; --bg: #1C1C22; --card: #2A2A33; --soft: #23232A; --text: #FFF6E5; --muted: #B5AE9F; --line: #0B0B0E;
  --deep: #111115; --empty: #3A3A44; --hover: #34302A; --money: #7BE495; --kbg: #FFD23F; --kfg: #1B1B1F; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font: 500 17px/1.55 "Fredoka", system-ui, sans-serif; color: var(--text); background: var(--bg);
  background-image: radial-gradient(rgba(127,127,127,.14) 1.2px, transparent 1.3px); background-size: 22px 22px;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { width: min(1150px, 92vw); margin: 0 auto; }
:focus-visible { outline: 3px dashed var(--pink); outline-offset: 4px; }

/* Titres façon L.TextStroke : contour encre + ombre */
.title { font-family: "Luckiest", "Fredoka", sans-serif; font-weight: 400; letter-spacing: .5px; line-height: 1.05; }
.stroke { color: #fff; -webkit-text-stroke: 2px #1B1B1F; paint-order: stroke fill; text-shadow: 4px 4px 0 var(--line); }
h2.title { font-size: clamp(34px, 5vw, 54px); margin-bottom: 10px; }
.kicker { display: inline-block; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px;
  background: var(--kbg); color: var(--kfg); padding: 4px 12px; border-radius: 999px; transform: rotate(-2deg); margin-bottom: 14px; }
.lead { color: var(--muted); max-width: 640px; font-size: 18px; }
.scribble { position: relative; white-space: nowrap; }
.scribble svg { position: absolute; left: -4%; bottom: -14px; width: 108%; height: 22px; overflow: visible; }

/* Carte cartoon = L.BoxF (fond, contour encre, ombre décalée, légère inclinaison) */
.card { background: var(--card); color: var(--text); border: var(--b); border-radius: var(--r); box-shadow: var(--sh); padding: 24px;
  transition: transform .15s, box-shadow .15s; }
.tilt-l { transform: rotate(-1.2deg); } .tilt-r { transform: rotate(1.2deg); }
.card.hov:hover { transform: translate(-3px,-3px) rotate(0); box-shadow: 9px 9px 0 var(--line); }

.btn { display: inline-flex; align-items: center; gap: 10px; font: 700 18px "Fredoka", sans-serif; color: #1B1B1F;
  text-decoration: none; background: var(--yellow); border: var(--b); border-radius: 14px; padding: 12px 22px;
  box-shadow: 4px 4px 0 var(--line); cursor: pointer; transition: transform .1s, box-shadow .1s, background .1s; }
.btn.pink { background: var(--pink); } .btn.blue { background: var(--blue); } .btn.white { background: var(--card); color: var(--text); }
.btn:hover, .btn.pink:hover, .btn.blue:hover, .btn.white:hover { background: #FFF1B8; color: #1B1B1F; transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--line); }
.btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--line); }
header .btn.theme-btn { padding: 8px 12px; font-size: 18px; }
.btn svg { width: 22px; height: 22px; flex: none; }

/* Nav */
header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: var(--b); }
header .wrap { display: flex; align-items: center; gap: 22px; height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 26px; }
.brand img { width: 46px; height: 46px; transform: rotate(-6deg); transition: transform .3s; }
.brand:hover img { transform: rotate(8deg) scale(1.08); }
header nav { display: flex; gap: 6px; margin-left: auto; }
header nav a { text-decoration: none; font-weight: 700; padding: 6px 12px; border-radius: 10px; border: 3px solid transparent; }
header nav a:hover { background: var(--hover); border-color: var(--line); }
header .btn { padding: 8px 16px; font-size: 16px; }
.menu-btn { display: none; }

/* Hero */
.hero { padding: 70px 0 90px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr .9fr; gap: 50px; align-items: center; }
.hero h1 { font-size: clamp(46px, 7.5vw, 92px); }
.hero h1 .y { color: var(--yellow); }
.hero p.lead { margin: 22px 0 28px; font-size: 20px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.doodle { position: absolute; pointer-events: none; opacity: .9; }

.server { position: relative; }
.server .tag { position: absolute; top: -18px; right: 20px; background: var(--pink); border: var(--b); border-radius: 10px;
  padding: 2px 12px; font-family: "Luckiest"; font-size: 18px; transform: rotate(4deg); color: #fff;
  -webkit-text-stroke: 1px #1B1B1F; paint-order: stroke fill; }
.status { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(123,228,149,.35); } }
.server h3 { font-family: "Luckiest"; font-size: 30px; font-weight: 400; margin: 10px 0 4px; }
.server .muted { color: var(--muted); }
.ip { display: flex; margin-top: 18px; border: var(--b); border-radius: 12px; overflow: hidden; background: var(--soft); }
.ip code { flex: 1; padding: 10px 14px; font: 700 16px ui-monospace, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip button { font: 700 15px "Fredoka"; border: 0; border-left: var(--b); background: var(--yellow); color: #1B1B1F; padding: 0 16px; cursor: pointer; }
.ip button:hover { background: #FFF1B8; }
.bar { height: 22px; border: var(--b); border-radius: 999px; background: var(--empty); overflow: hidden; margin: 14px 0 6px; }
.bar i { display: block; height: 100%; background: var(--green); border-right: var(--b); }

/* Sections */
section { padding: 80px 0; }
section.ink { background: var(--deep); color: #FFF6E5; }
section.ink .lead { color: #cfc8b8; }
section.yellow { background: var(--yellow); color: #1B1B1F; border-block: var(--b); }
section.yellow .kicker { background: #1B1B1F; color: var(--yellow); }
.head { margin-bottom: 40px; }
.head.center { text-align: center; } .head.center .lead { margin: 0 auto; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { text-align: center; }
.stat b { display: block; font-family: "Luckiest"; font-weight: 400; font-size: 52px; line-height: 1; }
.stat span { font-weight: 700; color: var(--muted); }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feat .ico { width: 62px; height: 62px; border: var(--b); border-radius: 16px; display: grid; place-items: center;
  box-shadow: 3px 3px 0 var(--line); margin-bottom: 16px; transform: rotate(-5deg); }
.feat .ico svg { width: 32px; height: 32px; }
.feat h3 { font-family: "Luckiest"; font-weight: 400; font-size: 24px; margin-bottom: 6px; }
.feat p { color: var(--muted); }

/* Métiers */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.tabs button { font: 700 16px "Fredoka"; border: var(--b); border-radius: 999px; padding: 6px 16px; cursor: pointer;
  background: var(--card); color: var(--text); box-shadow: 3px 3px 0 #000; }
.tabs button[aria-pressed="true"] { background: var(--yellow); color: #1B1B1F; }
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.job { padding: 18px; }
.job .cat { display: inline-block; font-size: 13px; font-weight: 700; color: #1B1B1F; border: 2px solid var(--line); border-radius: 999px; padding: 1px 10px; margin-bottom: 10px; }
.job h4 { font-family: "Luckiest"; font-weight: 400; font-size: 22px; }
.job .sal { color: var(--money); font-weight: 700; }
.job[hidden] { display: none; }

/* Étapes */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: s; }
.step { position: relative; padding-top: 40px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -26px; left: 22px; width: 56px; height: 56px;
  display: grid; place-items: center; font-family: "Luckiest"; font-size: 30px; background: var(--pink); color: #fff;
  border: var(--b); border-radius: 50%; box-shadow: 3px 3px 0 var(--line); -webkit-text-stroke: 1px #1B1B1F; paint-order: stroke fill; }
.step h3 { font-family: "Luckiest"; font-weight: 400; font-size: 24px; margin-bottom: 6px; }
.step p { color: var(--muted); }

/* Règles */
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; counter-reset: r; }
.rule { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; }
.rule::before { counter-increment: r; content: counter(r); font-family: "Luckiest"; font-size: 28px; line-height: 1; color: var(--orange);
  -webkit-text-stroke: 1.5px #1B1B1F; paint-order: stroke fill; min-width: 30px; }
.rule b { display: block; }
.rule span { color: var(--muted); font-size: 15px; white-space: pre-line; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 16px; }
.faq details { background: var(--card); border: var(--b); border-radius: 16px; box-shadow: 4px 4px 0 var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: "Luckiest"; font-size: 26px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--muted); }

/* Discord */
.discord { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.dcard { background: #2B2D31; color: #DBDEE1; padding: 0; overflow: hidden; }
.dcard .top { background: var(--blue); border-bottom: var(--b); padding: 20px; display: flex; gap: 14px; align-items: center; color: var(--ink); }
.dcard .top img { width: 56px; height: 56px; }
.dcard .top b { font-family: "Luckiest"; font-weight: 400; font-size: 24px; display: block; }
.dcard iframe { display: block; width: 100%; height: 500px; border: 0; }
.dcard { justify-self: center; width: min(100%, 420px); }

/* CTA final */
.final { text-align: center; }
.final h2 { font-size: clamp(44px, 8vw, 96px); }
.final .ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

footer { background: var(--deep); color: #cfc8b8; padding: 50px 0 30px; border-top: var(--b); }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
footer h4 { color: var(--yellow); font-family: "Luckiest"; font-weight: 400; font-size: 20px; margin-bottom: 10px; }
footer ul { list-style: none; display: grid; gap: 6px; }
footer a { text-decoration: none; } footer a:hover { color: var(--yellow); }
footer small { display: block; border-top: 1px dashed #4A4A55; padding-top: 20px; font-size: 13px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 140%); background: var(--green); border: var(--b);
  border-radius: 14px; box-shadow: var(--sh); padding: 12px 20px; font-weight: 700; color: #1B1B1F; transition: transform .25s; z-index: 20; }
.toast.show { transform: translate(-50%, 0); }

.reveal { opacity: 0; translate: 0 24px; transition: opacity .5s, translate .5s; }
.reveal.in { opacity: 1; translate: 0 0; }

@media (max-width: 900px) {
  .hero .wrap, .discord { grid-template-columns: 1fr; }
  .grid3, .steps { grid-template-columns: 1fr; gap: 40px; }
  .stats, .rules { grid-template-columns: 1fr 1fr; }
  footer .cols { grid-template-columns: 1fr; }
  header nav { display: none; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: var(--b); padding: 12px; }
  header nav.open { display: flex; }
  .menu-btn { display: inline-flex; margin-left: auto; padding: 8px 12px; }
  header .btn.play { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } .reveal { opacity: 1; translate: none; } }

/* Events */
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.event { padding: 0; overflow: hidden; }
.event .when { padding: 12px 18px; border-bottom: var(--b); color: #1B1B1F; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; }
.event .when b { font-family: "Luckiest"; font-weight: 400; font-size: 22px; }
.event .in { padding: 16px 18px 20px; }
.event h3 { font-family: "Luckiest"; font-weight: 400; font-size: 22px; margin-bottom: 4px; }
.event p { color: var(--muted); white-space: pre-line; font-size: 15px; }
.event .place { font-weight: 700; font-size: 14px; margin-top: 8px; }
.empty-box { text-align: center; color: var(--muted); padding: 30px; }
/* Pages wiki / recrutement */
.page { padding: 60px 0 80px; min-height: 70vh; }
.md h2, .md h3, .md h4 { font-family: "Luckiest"; font-weight: 400; margin: 18px 0 8px; }
.md p, .md ul, .md blockquote { margin: 10px 0; } .md ul { padding-left: 24px; }
.md code { background: var(--soft); border: 2px solid var(--line); border-radius: 6px; padding: 0 5px; font-size: 15px; }
.md blockquote { border-left: 6px solid var(--yellow); padding: 6px 14px; background: var(--soft); border-radius: 0 12px 12px 0; }
.md a { color: var(--blue); font-weight: 700; }
.wiki-grid { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }
.wiki-nav a { display: block; padding: 9px 14px; border-radius: 12px; text-decoration: none; font-weight: 700; border: 3px solid transparent; }
.wiki-nav a:hover { background: var(--hover); }
.wiki-nav a.on { background: var(--yellow); color: #1B1B1F; border-color: var(--line); }
@media (max-width: 900px) { .wiki-grid { grid-template-columns: 1fr; } }
