:root {
  --cream: #fff8ef;
  --cream-2: #fff2e0;
  --orange: #ff7a18;
  --orange-deep: #f25c00;
  --yellow: #ffc83d;
  --ink: #3a2a1a;
  --ink-soft: #7a6450;
  --white: #ffffff;
  --shadow-soft: 0 24px 60px -18px rgba(255, 122, 24, .35);
  --shadow-card: 0 18px 40px -22px rgba(58, 42, 26, .28);
  --radius: 32px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand, .btn { font-family: 'Baloo 2', cursive; }

:focus-visible { outline: 3px solid var(--orange-deep); outline-offset: 2px; border-radius: 6px; }

/* Decorative blobs */
.blob { position: fixed; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: 0; pointer-events: none; }
.blob-1 { width: 520px; height: 520px; background: var(--yellow); top: -160px; right: -120px; }
.blob-2 { width: 460px; height: 460px; background: #ffb27a; bottom: -180px; left: -140px; opacity: .4; }
.blob-3 { width: 360px; height: 360px; background: #ffd98a; top: 40%; left: 50%; opacity: .3; }

.wrap { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 248, 239, .72);
  border-bottom: 1px solid rgba(255, 200, 61, .35);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; max-width: 1160px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; color: var(--ink); text-decoration: none; }
.brand .dot {
  width: 34px; height: 34px; border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  display: grid; place-items: center; font-size: 18px;
  box-shadow: 0 8px 18px -6px rgba(255, 122, 24, .6);
}
.brand-logo { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(242, 92, 0, .25)); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a.text-link { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a.text-link:hover { color: var(--orange-deep); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; cursor: pointer; text-decoration: none;
  font-weight: 700; font-size: 16px;
  padding: 13px 24px; border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-discord {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff; box-shadow: 0 12px 24px -10px rgba(242, 92, 0, .7);
}
.btn-discord:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -10px rgba(242, 92, 0, .8); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 60px 0 40px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid rgba(255, 200, 61, .6);
  color: var(--orange-deep); font-weight: 700; font-size: 14px;
  padding: 8px 16px; border-radius: 999px; margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}
.badge .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255, 122, 24, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 122, 24, .55); } 70% { box-shadow: 0 0 0 12px rgba(255, 122, 24, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 122, 24, 0); } }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; font-weight: 800; letter-spacing: -.5px; }
.hero h1 .hl {
  background: linear-gradient(120deg, var(--orange), var(--orange-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { font-size: 19px; color: var(--ink-soft); margin: 22px 0 30px; max-width: 520px; }

.form {
  display: flex; gap: 10px; background: var(--white);
  padding: 9px; border-radius: 999px; max-width: 520px;
  box-shadow: var(--shadow-card); border: 1px solid rgba(255, 200, 61, .4);
}
.form input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: 'Inter', sans-serif; font-size: 16px; color: var(--ink); padding: 10px 18px;
}
.form input::placeholder { color: #bba892; }
.form .btn {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff; white-space: nowrap; box-shadow: 0 10px 22px -8px rgba(242, 92, 0, .7);
}
.form .btn:hover:not(:disabled) { transform: translateY(-2px); }
.form .btn:disabled { opacity: .6; cursor: not-allowed; }
.micro { margin-top: 14px; font-size: 13.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; min-height: 1.2em; }
.micro.success { color: #197f37; font-weight: 700; }
.micro.error { color: #c62f2f; font-weight: 700; }

/* Jauge d'objectif communautaire */
.gauge { margin-top: 26px; max-width: 520px; }
.gauge-top { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.stack { display: flex; }
.stack span {
  width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--cream);
  margin-left: -12px; display: grid; place-items: center; font-size: 15px;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
}
.stack span:first-child { margin-left: 0; }
.stack span.peng { background: var(--cream-2) url('assets/glitch-emote.png') center / cover no-repeat; }
.gauge-count { font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 1.05rem; color: var(--orange-deep); }
.gauge-slash { color: var(--ink-soft); margin: 0 3px; }
.gauge-count #goal { color: var(--ink-soft); }
.gauge-track { height: 14px; background: #f3e3cd; border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(58, 42, 26, .12); }
.gauge-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--yellow)); transition: width 1.1s cubic-bezier(.22, 1, .36, 1); }
.gauge-goaltext { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }

/* Hub de partage (succès) */
.share-hub { margin-top: 24px; max-width: 520px; padding: 24px; background: var(--white); border: 1px solid rgba(255, 200, 61, .5); border-radius: 24px; box-shadow: var(--shadow-card); }
.share-pos { font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 1.2rem; }
.share-pos strong { color: var(--orange-deep); }
.share-sub { color: var(--ink-soft); font-size: 15px; margin-top: 6px; }
.share-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.share-main { background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff; box-shadow: 0 10px 22px -8px rgba(242, 92, 0, .6); }
.share-main:hover { transform: translateY(-2px); }
.share-discord { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 13px 22px; border-radius: 999px; font-weight: 700; color: var(--orange-deep); background: var(--cream-2); transition: transform .18s ease; }
.share-discord:hover { transform: translateY(-2px); }
.share-copied { margin-top: 12px; color: #197f37; font-weight: 600; font-size: 14px; }

/* Hero image */
.hero-visual { position: relative; display: grid; place-items: center; }
.halo {
  position: absolute; width: 115%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--yellow) 0%, rgba(255, 200, 61, .5) 38%, transparent 70%);
  filter: blur(8px); z-index: 0; animation: float 7s ease-in-out infinite;
}
.hero-visual img {
  position: relative; z-index: 2; width: 100%; max-width: 460px; height: auto;
  filter: drop-shadow(0 40px 50px rgba(242, 92, 0, .35));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.sticker {
  position: absolute; z-index: 3; background: var(--white);
  padding: 10px 16px; border-radius: 18px; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-card); display: flex; align-items: center; gap: 7px;
  font-family: 'Baloo 2', cursive;
}
.sticker-1 { top: 6%; left: -2%; color: var(--orange-deep); animation: float 5s ease-in-out infinite; }
.sticker-2 { bottom: 10%; right: -4%; color: var(--ink); animation: float 6.5s ease-in-out infinite .4s; }

/* About section */
section.about { padding: 50px 0 30px; text-align: center; }
.eyebrow { color: var(--orange-deep); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; font-family: 'Inter', sans-serif; }
section.about h2 { font-size: clamp(32px, 4.5vw, 46px); margin: 12px 0 14px; font-weight: 800; }
section.about > .wrap > p.lead { max-width: 640px; margin: 0 auto 44px; color: var(--ink-soft); font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: left; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 30px 26px;
  box-shadow: var(--shadow-card); border: 1px solid rgba(255, 200, 61, .3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.card .ico {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  font-size: 28px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--cream-2), #ffe6c2);
}
.card h3 { font-size: 21px; margin-bottom: 8px; font-weight: 700; }
.card p { color: var(--ink-soft); font-size: 15px; }

/* CTA strip */
.cta-strip { margin: 60px 0 20px; }
.cta-card {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  border-radius: 40px; padding: 54px 40px; text-align: center; color: #fff;
  box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
}
.cta-card::before, .cta-card::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.cta-card::before { width: 240px; height: 240px; top: -90px; right: -60px; }
.cta-card::after { width: 180px; height: 180px; bottom: -80px; left: -40px; }
.cta-card h2 { font-size: clamp(28px, 4vw, 40px); position: relative; z-index: 1; font-weight: 800; }
.cta-card p { position: relative; z-index: 1; opacity: .95; margin: 12px auto 28px; max-width: 480px; font-size: 17px; }
.cta-card .form { margin: 0 auto; background: rgba(255, 255, 255, .95); position: relative; z-index: 1; }
.cta-card .form .btn { background: var(--ink); box-shadow: none; }
.cta-note { justify-content: center; color: #fff; opacity: .95; position: relative; z-index: 1; }
.cta-note.success { color: #fff; opacity: 1; }
.cta-note.error { color: #fff3d6; }

/* Footer */
footer { padding: 46px 0 36px; text-align: center; color: var(--ink-soft); }
.foot-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 22px; color: var(--ink); margin-bottom: 10px; }
.foot-peng { object-fit: contain; vertical-align: middle; }
.foot-links { display: flex; gap: 20px; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.foot-links a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 15px; }
.foot-links a:hover { color: var(--orange-deep); }
footer small { font-size: 13px; opacity: .8; }

/* Histoire / timeline */
.story { padding: 30px 0 20px; }
.story .wrap { max-width: 840px; }
.story-head { text-align: center; margin-bottom: 40px; }
.story-head .lead { color: var(--ink-soft); font-size: 17px; margin-top: 6px; }
.timeline { position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 26px; top: 12px; bottom: 12px; width: 3px;
  background: linear-gradient(var(--orange), var(--yellow)); border-radius: 99px;
}
.tl-item { position: relative; padding-left: 80px; margin-bottom: 26px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-node {
  position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center; font-size: 26px; z-index: 1;
  background: linear-gradient(135deg, var(--cream-2), #ffe6c2);
  box-shadow: var(--shadow-card); border: 1px solid rgba(255, 200, 61, .45);
}
.tl-node--peng { background: #fff url('assets/glitch-emote.png') center / cover no-repeat; }
.tl-card {
  background: var(--white); border-radius: 22px; padding: 22px 26px;
  box-shadow: var(--shadow-card); border: 1px solid rgba(255, 200, 61, .3);
}
.tl-step { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--orange-deep); }
.tl-card h3 { font-size: 20px; margin: 4px 0 8px; font-weight: 700; }
.tl-card p { color: var(--ink-soft); font-size: 15.5px; }
@media (max-width: 560px) {
  .tl-item { padding-left: 64px; }
  .tl-node { width: 48px; height: 48px; font-size: 22px; }
  .timeline::before { left: 22px; }
}

/* Préchargeur "glitch" (warm) */
.preloader {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #fff6e8 0%, #ffe6c6 78%);
  transition: opacity .55s ease, visibility .55s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { display: grid; justify-items: center; gap: 18px; text-align: center; }
.preloader-peng {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px rgba(255, 122, 24, .22), 0 16px 44px -8px rgba(242, 92, 0, .5);
  animation: pre-bob 1.5s ease-in-out infinite;
}
@keyframes pre-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.preloader-logo {
  position: relative; font-family: 'Baloo 2', cursive; font-weight: 800;
  font-size: clamp(2.4rem, 9vw, 3.6rem); letter-spacing: 4px; line-height: 1;
  background: linear-gradient(120deg, var(--orange), var(--orange-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.preloader-logo::before, .preloader-logo::after {
  content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  -webkit-background-clip: initial; background: none;
}
.preloader-logo::before { color: rgba(255, 200, 61, .7); z-index: -2; animation: glitch-shift-1 2.6s infinite linear; }
.preloader-logo::after { color: rgba(242, 92, 0, .5); z-index: -1; animation: glitch-shift-2 3.2s infinite linear; }
@keyframes glitch-shift-1 { 0%,6%,14%,100% { transform: translate(0, 0); } 7% { transform: translate(-3px, 1px); } 10% { transform: translate(2px, -2px); } }
@keyframes glitch-shift-2 { 0%,7%,15%,100% { transform: translate(0, 0); } 8% { transform: translate(3px, -1px); } 11% { transform: translate(-2px, 2px); } }
.preloader-bar { width: 190px; height: 6px; border-radius: 99px; background: rgba(242, 92, 0, .15); overflow: hidden; }
.preloader-bar span {
  display: block; height: 100%; width: 42%; border-radius: 99px;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  animation: pre-load 1.15s ease-in-out infinite;
}
@keyframes pre-load { 0% { margin-left: -45%; } 100% { margin-left: 100%; } }
.preloader-sub { color: var(--ink-soft); font-size: .78rem; letter-spacing: 3px; text-transform: uppercase; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 36px 0 20px; }
  .hero p.sub { margin-left: auto; margin-right: auto; }
  .form, .gauge, .share-hub { margin-left: auto; margin-right: auto; }
  .micro, .gauge-top, .share-actions { justify-content: center; }
  .hero-visual { order: -1; margin-bottom: 18px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nav-links a.text-link { display: none; }
  .cards { grid-template-columns: 1fr; }
  .form { flex-direction: column; border-radius: 24px; }
  .form .btn { justify-content: center; }
  .cta-card { padding: 40px 22px; }
}

/* Réduction des animations (accessibilité) */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .halo, .hero-visual img, .badge .pulse, .sticker, .preloader-peng, .preloader-bar span { animation: none; }
  .preloader-logo::before, .preloader-logo::after { display: none; }
  .gauge-fill { transition: none; }
}
