/* ==========================================================================
   Krabel Games — page « Bientôt en ligne »
   Port des styles du site Krabel Games (src/styles/krabel.css) réduits à cette page.
   Aucun style en ligne : la CSP interdit 'unsafe-inline', d'où les classes de position des formes.
   ========================================================================== */

@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/unbounded-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 900; font-display: swap; src: url('/fonts/unbounded-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
  /* Palette Krabel */
  --ink: #111111;
  --paper: #FFFFFF;
  --soleil: #FFC93C;
  --indigo: #4B4BE8;
  --lagon: #2EC4A0;
  --corail: #FF6B4A;
  --grey-text: #4A4A4A;
  --grey-muted: #555555;
  --grey-soft: #BDBDBD;
  --pill-bg: #F0EEE8;

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --r-panel: 40px;
  --r-pill: 999px;
  --shadow-soft: 0 20px 40px rgba(17, 17, 17, .12);

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-bounce: cubic-bezier(.2, .8, .2, 1.2);

  --container: 1360px;
  --gutter: 32px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:hover { color: var(--indigo); }

/* Clavier : contour visible partout */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible, .lang__item:focus-visible { border-radius: var(--r-pill); }
.site-footer :focus-visible { outline-color: var(--soleil); }
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--r-pill);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.skip-link:hover, .skip-link:focus { color: var(--paper); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.display { font-family: var(--font-display); font-weight: 900; letter-spacing: -.03em; line-height: 1.04; margin: 0; }
.kicker {
  font-family: var(--font-display); font-weight: 800; font-size: 14px;
  display: inline-flex; padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--soleil); color: var(--ink);
}

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: var(--r-pill); border: 0;
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform .2s var(--ease-out), background .2s;
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { color: var(--paper); }
.btn--lg { min-height: 58px; padding: 0 30px; font-size: 17px; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* --------------------------------------------------------------------------
   En-tête : logo et langue
   -------------------------------------------------------------------------- */
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h); padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__emblem { width: 44px; height: auto; }
.brand__wordmark { height: 22px; width: auto; }

.lang {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-pill);
  background: var(--pill-bg); font-family: var(--font-display); font-weight: 800; font-size: 13px;
}
.lang__item {
  min-width: 40px; min-height: 36px; padding: 0 10px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--grey-muted); transition: background .2s, color .2s;
}
.lang__item:hover { color: var(--ink); }
.lang__item[aria-current="true"] { background: var(--ink); color: var(--paper); }

/* --------------------------------------------------------------------------
   Accroche : formes flottantes (parallaxe souris), titre qui monte ligne à ligne
   -------------------------------------------------------------------------- */
.page-main { flex: 1; display: flex; flex-direction: column; }
.hero {
  --mx: 0; --my: 0;
  flex: 1; position: relative; text-align: center;
  padding-top: 72px; padding-bottom: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
}
.hero .kicker { animation: rise .9s var(--ease-out) both; }
.hero__title { font-size: clamp(46px, 8.4vw, 132px); letter-spacing: -.04em; max-width: 1140px; position: relative; }
.hero__line { display: block; }
.hero__line > span { display: block; animation: rise .9s .1s var(--ease-out) both; }
.hero__line:nth-child(2) > span { animation-delay: .25s; }
.hero__text { margin: 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; max-width: 560px; text-wrap: balance; color: var(--grey-text); animation: rise .9s .4s var(--ease-out) both; }
.hero .btn { animation: rise .9s .5s var(--ease-out) both; margin-top: 8px; }
.hero__dot { display: inline-block; transform-origin: 70% 80%; animation: wave 2.4s ease-in-out infinite; }

/* --mx / --my posés par soon.js, --k règle l'intensité */
.follow { transform: translate(calc(var(--mx) * var(--k, 0) * 1px), calc(var(--my) * var(--k, 0) * 1px)); transition: transform .5s var(--ease-out); }
.hero__line--1 { --k: 8; }
.hero__line--2 { --k: 16; }

.floaty { position: absolute; pointer-events: none; }
.floaty__pop { animation: pop .8s var(--ease-bounce) both; }
.floaty__shape { animation: bob 5s ease-in-out infinite; box-shadow: var(--shadow-soft); }
.floaty__emblem { width: 124px; animation: bob 5s ease-in-out infinite; filter: drop-shadow(0 18px 18px rgba(17, 17, 17, .18)); }

.floaty--a { --k: -40; left: 6%; top: 90px; }
.floaty--a .floaty__pop { animation-delay: .5s; }
.floaty--a .floaty__shape { --r: -8deg; width: 110px; height: 110px; border-radius: 28px; background: var(--soleil); }

.floaty--b { --k: 30; right: 8%; top: 60px; }
.floaty--b .floaty__pop { animation-delay: .65s; }
.floaty--b .floaty__shape { --r: 10deg; animation-delay: -1.5s; width: 90px; height: 90px; border-radius: 24px; background: var(--indigo); }

.floaty--c { --k: -24; left: 12%; bottom: 110px; }
.floaty--c .floaty__pop { animation-delay: .8s; }
.floaty--c .floaty__shape { --r: 6deg; animation-delay: -3s; width: 80px; height: 80px; border-radius: 22px; background: var(--lagon); }

.floaty--d { --k: 48; right: 12%; bottom: 90px; }
.floaty--d .floaty__pop { animation-delay: .95s; }
.floaty--d .floaty__emblem { --r: -6deg; animation-delay: -2s; }

.floaty--e { --k: 30; left: 30%; top: 30px; }
.floaty--e .floaty__pop { animation-delay: 1.1s; }
.floaty--e .floaty__shape { --r: 12deg; animation-delay: -4s; width: 36px; height: 36px; border-radius: 10px; background: var(--corail); }

.floaty--f { --k: -24; right: 30%; bottom: 40px; }
.floaty--f .floaty__pop { animation-delay: 1.2s; }
.floaty--f .floaty__shape { --r: -12deg; animation-delay: -1s; width: 30px; height: 30px; border-radius: 50%; background: var(--corail); }

/* Écrans moyens : formes plus petites et plus au bord, pour ne pas toucher le titre */
@media (max-width: 1100px) {
  .floaty--a { left: 3%; top: 40px; }
  .floaty--a .floaty__shape { width: 80px; height: 80px; border-radius: 22px; }
  .floaty--b { right: 4%; top: 30px; }
  .floaty--b .floaty__shape { width: 64px; height: 64px; border-radius: 18px; }
  .floaty--c { left: 5%; bottom: 60px; }
  .floaty--c .floaty__shape { width: 60px; height: 60px; border-radius: 16px; }
  .floaty--d { right: 5%; bottom: 50px; }
  .floaty__emblem { width: 92px; }
  .floaty--e, .floaty--f { display: none; }
}

/* --------------------------------------------------------------------------
   Pied de page compact
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--paper); border-radius: var(--r-panel) var(--r-panel) 0 0; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--soleil); }
.site-footer__inner {
  padding-top: 56px; padding-bottom: 36px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px;
  font-size: 15px; color: var(--grey-soft);
}
.site-footer__wordmark { width: auto; height: 30px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 4px; }
.site-footer__links a { padding: 12px; }

/* --------------------------------------------------------------------------
   Page 404
   -------------------------------------------------------------------------- */
.lost { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 22px; padding-top: 60px; padding-bottom: 100px; overflow: hidden; }
.lost__code { font-size: clamp(90px, 18vw, 220px); letter-spacing: -.05em; line-height: .9; }
.lost__crab { width: 110px; animation: sidestep 3.2s ease-in-out infinite; }
.lost p { margin: 0; font-size: 20px; line-height: 1.45; color: var(--grey-text); max-width: 520px; text-wrap: balance; }
.lost__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* --------------------------------------------------------------------------
   Clin d'œil : la parade des crabes (code Konami ou 5 clics sur le logo)
   -------------------------------------------------------------------------- */
.crab-parade { position: fixed; inset: auto 0 0 0; height: 0; z-index: 200; pointer-events: none; }
.crab-parade__crab { position: absolute; bottom: 16px; left: -120px; width: var(--size, 64px); animation: parade var(--dur, 5s) linear var(--delay, 0s) forwards; }
.crab-parade__crab img { width: 100%; animation: scuttle .35s ease-in-out infinite alternate; }
/* Zone annoncée aux lecteurs d'écran ; vide et sans hauteur tant qu'il n'y a pas de parade */
.crab-status { margin: 0; }
.crab-toast {
  position: fixed; left: 50%; bottom: 110px; z-index: 201; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font-family: var(--font-display); font-weight: 800; font-size: 15px;
  padding: 12px 20px; border-radius: var(--r-pill); white-space: nowrap;
  animation: toast 4s var(--ease-out) forwards; pointer-events: none;
}

/* --------------------------------------------------------------------------
   Écran de chargement : le logo se dessine (repris de Krabel-Games).
   Couleurs : --k-accent / --k-on-accent, tirées par accent.js.
   -------------------------------------------------------------------------- */
.k-loader-screen { display: none; }
.k-loader-screen.is-active {
  position: fixed; inset: 0; z-index: 99998; display: grid; place-items: center;
  background: var(--k-screen-bg, var(--paper)); transition: opacity .45s ease, visibility .45s;
}
.k-loader-screen.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.k-loader-screen .kls-logo { height: var(--k-loader-size, clamp(80px, 14vmin, 120px)); line-height: 0; }
.k-loader-screen svg { display: block; height: 100%; width: auto; overflow: visible; }
.k-loader-screen .k-a { fill: var(--k-accent, #111); }
.k-loader-screen .k-o { fill: var(--k-on-accent, #fff); }
.k-loader-screen .kls-line {
  fill: none; stroke: var(--k-accent, #111); stroke-width: 14; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: kls-line 2.8s ease-in-out infinite;
}
.k-loader-screen .kls-fill { opacity: 0; animation: kls-fill 2.8s ease-in-out infinite; }
@keyframes kls-line { 0% { stroke-dashoffset: 1; opacity: 1; } 45% { stroke-dashoffset: 0; opacity: 1; } 60%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes kls-fill { 0%, 45% { opacity: 0; } 58%, 88% { opacity: 1; } 100% { opacity: 0; } }

/* L'entrée du hero attend derrière l'écran de chargement, puis se joue en entier. */
body:has(> .k-loader-screen.is-active:not(.is-done)) :is(.hero .kicker, .hero__line > span, .hero__text, .hero .btn, .floaty__pop) {
  animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   Curseur « pince » dans l'accent de la page (souris uniquement, voir cursor.js)
   -------------------------------------------------------------------------- */
@media (pointer: fine) {
  html.has-claw { cursor: var(--k-cursor), auto; }
  html.has-claw :is(a, button, [role='button'], label, summary, select) { cursor: var(--k-cursor), pointer !important; }
  html.has-claw.is-pinching, html.has-claw.is-pinching * { cursor: var(--k-cursor-pinch), auto !important; }
  html.has-claw :is(input:not([type='button'], [type='submit'], [type='reset'], [type='checkbox'], [type='radio']), textarea, [contenteditable='true']) {
    cursor: text !important;
  }
}
/* Éclat au clic : un anneau et sept traits, retirés après 500 ms. */
.claw-snap { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 99999; }
.claw-snap::before {
  content: ''; position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%;
  border: 2.5px solid var(--k-accent, #111111); animation: claw-ring .45s cubic-bezier(.2, .7, .3, 1) forwards;
}
.claw-snap i {
  position: absolute; left: -1.5px; top: -5px; width: 3px; height: 10px; border-radius: 3px;
  background: var(--k-accent, #111111); transform: rotate(var(--a)) translateY(-10px) scaleY(.4);
  animation: claw-ray .4s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes claw-ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes claw-ray { to { transform: rotate(var(--a)) translateY(-26px) scaleY(1); opacity: 0; } }

/* --------------------------------------------------------------------------
   Téléphone
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  :root { --gutter: 16px; --header-h: 68px; --r-panel: 30px; }
  .brand__emblem { width: 40px; }
  .brand__wordmark { height: 18px; }
  .hero { padding-top: 48px; padding-bottom: 72px; gap: 24px; }
  .hero__title { font-size: clamp(38px, 12vw, 64px); }
  .floaty { display: none; }
  .site-footer__inner { padding-top: 40px; padding-bottom: 28px; gap: 16px; }
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.3) rotate(-20deg); } 70% { transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-22px) rotate(calc(var(--r, 0deg) * -1)); } }
@keyframes wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-8deg); } 60% { transform: rotate(10deg); } }
@keyframes sidestep { 0%, 100% { transform: translateX(-60px) rotate(-4deg); } 50% { transform: translateX(60px) rotate(4deg); } }
@keyframes parade { to { transform: translateX(calc(100vw + 240px)); } }
@keyframes scuttle { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-8px) rotate(6deg); } }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 20px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .follow { transform: none; }
  /* Logo plein et fixe, sans éclat au clic. */
  .k-loader-screen .kls-line { display: none; }
  .k-loader-screen .kls-fill { opacity: 1; }
  .claw-snap { display: none; }
}
