/* imaginegames.io: the home page (a first screen, then content sections) and the legal pages. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bg: #3450e4;
  --bg-deep: #2a3fb8;
  --paper: #fbf8f3;
  --paper-soft: #e4e9ff;
  --ink: #1f2433;
  --ink-soft: #5b6275;
  --sun: #ffb547;
  --sun-shade: #c9832a;
  --mint: #39c7a5;
  --coral: #ff7a6b;
  --blue: #4c6fff;
  --font: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

/* En-tête et pied de page, communs à toutes les pages */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 28px;
  padding: clamp(16px, 3vw, 30px) var(--gutter) 0;
}
.site-nav ul { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a { font-weight: 650; text-decoration: none; opacity: 0.9; }
.site-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { display: block; height: clamp(44px, 7vw, 60px); width: auto; }

.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 28px;
  padding: 18px var(--gutter) clamp(16px, 3vw, 26px);
  font-size: 0.875rem;
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.site-footer a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.site-footer p { margin: 0; }

/* Page d'accueil : un premier écran (le hero), puis des sections de contenu */
.home {
  background: var(--bg); color: var(--paper);
}
.home .site-footer { color: var(--paper-soft); }
.home .site-footer a { text-decoration-color: rgba(228, 233, 255, 0.45); }
.home .site-footer a:hover { text-decoration-color: currentColor; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center; gap: clamp(28px, 5vw, 88px);
  width: 100%; max-width: 1320px; margin: 0 auto;
  padding: clamp(12px, 3vh, 40px) var(--gutter);
  /* Le hero garde à lui seul le premier écran, en-tête compris */
  min-height: calc(100vh - 96px); min-height: calc(100dvh - 96px);
}
.hero h1 {
  margin: 0 0 0.32em;
  font-size: clamp(2.4rem, min(6.2vw, 10.5vh), 5.9rem);
  font-weight: 800; font-stretch: 86%;
  line-height: 0.94; letter-spacing: -0.02em;
  max-width: 10.5ch; text-wrap: balance;
}
.hero p {
  margin: 0 0 1.9em; max-width: 29ch;
  font-size: clamp(1.05rem, min(1.6vw, 2.6vh), 1.38rem); line-height: 1.42;
  color: var(--paper-soft); text-wrap: pretty;
}
.cta {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95em 1.55em 0.95em 1.3em;
  border-radius: 999px;
  background: var(--sun); color: var(--ink);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 750;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--sun-shade);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.cta svg { width: 0.85em; height: 0.85em; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--sun-shade); }
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--sun-shade); }
.cta:focus-visible { outline-color: var(--paper); }

/* Le plateau : la pièce manquante tombe en place quand on vise le bouton */
.board { display: block; width: 100%; height: auto; max-height: min(64vh, 560px); overflow: visible; }
.board .pc { stroke: var(--bg); stroke-width: 3.5; stroke-linejoin: round; }
.board .paper { fill: var(--paper); }
.board .sun { fill: var(--sun); }
.board .mint { fill: var(--mint); }
.board .coral { fill: var(--coral); }
.board .blue { fill: var(--blue); }
.board .slot { fill: var(--bg-deep); stroke: var(--bg); stroke-width: 3.5; }
.board .cell { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.board .ink { fill: var(--ink); stroke: var(--ink); stroke-width: 1.6; }
.board .grid { stroke: var(--ink); stroke-width: 1.6; }
.board .tile { fill: var(--sun); stroke: var(--ink); stroke-width: 1.6; }
.board text { font-family: var(--font); fill: var(--ink); text-anchor: middle; dominant-baseline: central; font-weight: 750; }
.board .tiny { font-size: 6px; text-anchor: start; dominant-baseline: auto; font-weight: 600; }
.board .digit { font-size: 11px; font-weight: 600; fill: var(--ink-soft); }
.board .digit.big { font-size: 16px; font-weight: 800; fill: var(--ink); }
.board .letter { font-size: 14px; }

.loose {
  transform-box: fill-box; transform-origin: 50% 50%;
  transform: translate(26px, -64px) rotate(9deg);
  filter: drop-shadow(0 9px 0 rgba(20, 28, 90, 0.35));
  transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 300ms ease;
  animation: arrive 900ms cubic-bezier(0.22, 1, 0.36, 1) 150ms both;
}
@keyframes arrive {
  from { transform: translate(60px, -150px) rotate(24deg); opacity: 0; }
  to { transform: translate(26px, -64px) rotate(9deg); opacity: 1; }
}
.home:has(.cta:hover, .cta:focus-visible) .loose {
  animation: none;
  transform: translate(0, 0) rotate(0deg);
  filter: drop-shadow(0 0 0 rgba(20, 28, 90, 0));
}

@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; align-content: center; gap: clamp(16px, 3vh, 28px); }
  .hero .art { order: -1; }
  .board { max-height: 30vh; margin: 0 auto; }
  .hero { min-height: calc(100svh - 120px); }
  .hero h1 { font-size: clamp(2.3rem, min(11vw, 7.2vh), 3.6rem); max-width: 11ch; }
  .hero p { margin-bottom: 1.4em; }
  .site-footer { justify-content: flex-start; }
}
@media (max-width: 780px) and (max-height: 720px) {
  .board { max-height: 24vh; }
  .hero { gap: 14px; padding-top: 8px; padding-bottom: 8px; }
  .hero h1 { font-size: clamp(2.1rem, min(10vw, 6.6vh), 3.2rem); }
  .site-footer { padding-top: 10px; gap: 6px 20px; }
}
@media (max-height: 480px) and (max-width: 780px) { .hero .art { display: none; } }

/* Sections de contenu sous le hero */
.band { background: var(--paper); color: var(--ink); padding: clamp(44px, 8vh, 84px) var(--gutter); }
.band.alt { background: #f1ece3; }
.band .inner { max-width: 1080px; margin: 0 auto; }
.band h2 {
  margin: 0 0 0.45em;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; font-stretch: 86%;
  line-height: 1.02; letter-spacing: -0.02em;
}
.band p, .band li { font-size: 1.08rem; line-height: 1.6; max-width: 46rem; }
.band p { margin: 0 0 1em; }
.band .intro { color: var(--ink-soft); font-size: 1.15rem; }
.band a { color: #2f4fd6; text-underline-offset: 3px; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 28px; }
.game { background: #fff; border: 1px solid #e0d9cc; border-radius: 18px; padding: 24px 24px 18px; }
.game h3 { margin: 0 0 0.4em; font-size: 1.5rem; font-weight: 800; font-stretch: 88%; letter-spacing: -0.01em; }
.game .links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 1.2em; }
.band .pill {
  display: inline-block; padding: 0.55em 1.15em; border-radius: 999px;
  background: var(--bg); color: var(--paper); font-weight: 750; text-decoration: none;
}
.band .pill:hover { background: var(--bg-deep); }
.points { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; gap: 14px; }
.points li { position: relative; padding-left: 30px; }
.points li::before {
  content: ""; position: absolute; left: 0; top: 0.42em;
  width: 14px; height: 14px; border-radius: 4px; background: var(--sun);
}
.home .site-footer { padding-top: 26px; }

@media (prefers-reduced-motion: reduce) {
  .loose { animation: none; transition: none; }
  .cta { transition: none; }
}

/* Pages légales */
.doc { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); }
.doc .site-header { border-bottom: 0; }
.doc main { flex: 1; width: 100%; max-width: 46rem; margin: 0 auto; padding: clamp(28px, 6vh, 64px) var(--gutter) 48px; line-height: 1.62; font-size: 1.04rem; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; font-stretch: 85%; line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 0.3em; }
.doc .updated { color: var(--ink-soft); margin: 0 0 2.2em; }
.doc h2 { font-size: 1.28rem; font-weight: 750; letter-spacing: -0.01em; line-height: 1.25; margin: 2em 0 0.5em; }
.doc p, .doc ul { margin: 0 0 1em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.4em; }
.doc main a { color: #2f4fd6; text-underline-offset: 3px; }
.doc .site-footer { color: var(--ink-soft); }
.doc .back { display: inline-block; margin-top: 2.4em; font-weight: 700; }

@media (prefers-color-scheme: dark) {
  .doc { background: #161a28; color: #eef0f6; }
  .doc .updated, .doc .site-footer { color: #aab1c5; }
  .doc main a { color: #9db0ff; }
}

/* En-tête des pages de contenu : le menu à droite du logo */
.doc .site-nav a { color: inherit; }
.doc .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; opacity: 1; }

/* Guides (how-it-works, how-to-play-jigsaw, how-to-play-ghosts) */
.doc .kicker { margin: 0 0 0.5em; color: #2f4fd6; font-weight: 750; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.doc .lead { font-size: 1.15rem; color: var(--ink-soft); }
.doc .button {
  display: inline-block; padding: 0.7em 1.35em; border-radius: 999px;
  background: var(--bg); color: var(--paper); font-weight: 750; text-decoration: none;
  box-shadow: 0 4px 0 var(--bg-deep);
}
.doc main a.button { color: var(--paper); }
.doc .button:hover { transform: translateY(-1px); }
.doc ol { margin: 0 0 1em; padding-left: 1.4em; }
.doc ol.rules li, .doc ol.techniques li, .doc ul.tips li { margin-bottom: 0.7em; }
.doc .faq h3 { font-size: 1.08rem; font-weight: 750; margin: 1.4em 0 0.3em; }
.doc .next { margin-top: 2.6em; padding: 22px 24px; border-radius: 18px; background: #f1ece3; }
.doc .next p:last-child { margin-bottom: 0; }
.doc .text-link { display: inline-block; margin-left: 14px; font-weight: 650; }

/* Page des jeux : le cadre plein écran, puis le texte et le pied de page */
.games-page { --mg-embed-bg: #f1ece3; margin: 0; background: var(--mg-embed-bg); color: var(--ink); }
.privacy-chip {
  position: fixed; left: 8px; bottom: 8px; z-index: 1;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(31, 36, 51, 0.7); color: #fff;
  font-size: 11px; line-height: 1.6; text-decoration: none;
}
.privacy-chip:hover, .privacy-chip:focus-visible { background: rgba(31, 36, 51, 0.85); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.below-games { max-width: 1080px; margin: 0 auto; padding: 44px var(--gutter) 28px; }
.below-games h2 { margin: 0 0 0.45em; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; font-stretch: 86%; letter-spacing: -0.02em; line-height: 1.05; }
.below-games p { max-width: 46rem; line-height: 1.6; font-size: 1.05rem; }
.below-games a { color: #2f4fd6; text-underline-offset: 3px; }
.games-page .site-footer { color: var(--ink-soft); border-top: 1px solid #e0d9cc; }

@media (prefers-color-scheme: dark) {
  .doc .next { background: #232838; }
  .doc .kicker { color: #9db0ff; }
}
.doc .site-nav ul, .doc .site-footer ul { margin: 0; padding-left: 0; }
.doc .site-nav li, .doc .site-footer li { margin-bottom: 0; }
.band .play-all { margin-top: 26px; }

/* Accueil : premier écran "studio" (titre, note joueurs, distinctions à gauche, téléphone à droite) */
@font-face { font-family: "Lilita One"; src: url("fonts/lilita-one.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Urbanist"; src: url("fonts/urbanist.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
.home .hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.75fr); }
.hero .studio { font-family: "Urbanist", var(--font); color: #fff; }
.hero .studio-title {
  margin: 0 0 0.7em; max-width: 15.5em; text-wrap: wrap; font-family: "Lilita One", var(--font); font-weight: 400; font-stretch: normal;
  font-size: clamp(2.3rem, min(4.1vw, 8vh), 4.6rem); line-height: 1.02; letter-spacing: 0.005em; text-transform: uppercase;
}
.nowrap { white-space: nowrap; }
.studio-title .sparkle { display: inline-block; width: 0.95em; height: auto; vertical-align: top; margin: -0.3em 0 0 -0.02em; animation: sparkle 2.4s ease-in-out infinite; }
@keyframes sparkle { 0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.75; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .studio-title .sparkle { animation: none; } }
.home .site-header { max-width: 1320px; margin: 0 auto; }
.hero .studio .cta { font-size: clamp(0.74rem, 1.05vw, 0.88rem); box-shadow: 0 4px 0 var(--sun-shade); }
.hero .studio .cta:hover { box-shadow: 0 6px 0 var(--sun-shade); }
@media (max-width: 780px) { .br-wide { display: none; } }
.proof { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0 0 clamp(40px, 8vh, 84px); }
.proof-rating { font-family: "Lilita One", var(--font); font-size: clamp(1.12rem, 1.61vw, 1.47rem); color: var(--sun); white-space: nowrap; }
.proof-rating .stars { letter-spacing: 0.04em; margin-left: 0.15em; }
/* Note : le 4.9 surgit, les étoiles tombent une par une avec rebond, puis la citation s écrit */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rating-num { display: inline-block; animation: rate-pop 0.6s cubic-bezier(.34, 1.8, .64, 1) 0.3s both; }
.proof-rating .stars span { display: inline-block; animation: star-pop 0.5s cubic-bezier(.34, 1.9, .64, 1) calc(0.8s + var(--i) * 0.16s) both; }
.typed span { display: inline-block; white-space: pre; animation: type-in 0.12s ease-out calc(1.9s + var(--i) * 0.035s) both; }
@keyframes rate-pop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.35); opacity: 1; } 100% { transform: scale(1); } }
@keyframes star-pop { 0% { transform: scale(0) rotate(-90deg); opacity: 0; } 55% { transform: scale(1.6) rotate(15deg); opacity: 1; filter: drop-shadow(0 0 6px #fff3c4); } 100% { transform: scale(1) rotate(0); filter: none; } }
@keyframes type-in { from { opacity: 0; transform: translateY(0.3em); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rating-num, .proof-rating .stars span, .typed span { animation: none; } }
.hero .proof-quote { margin: 0; max-width: none; color: var(--sun); font-style: italic; font-weight: 700; font-size: clamp(0.9rem, 1.33vw, 1.19rem); }
.awards { list-style: none; margin: 0 0 clamp(28px, 5vh, 48px); padding: 0; display: flex; max-width: 35rem; }
.awards li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 clamp(8px, 1.4vw, 22px); }
.awards li:first-child { padding-left: 0; }
.awards li + li { border-left: 1px solid rgba(255, 255, 255, 0.4); }
.award-mark { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 100%; }
.award-mark .laurel { display: block; width: clamp(32px, 3.1vw, 50px); aspect-ratio: 180 / 140; background: url("images/laurel.png") center / contain no-repeat; }
.awards img { display: block; height: clamp(18px, 2.1vw, 32px); width: auto; max-width: 100%; object-fit: contain; }
.award-label { font-size: clamp(0.8rem, 0.91vw, 0.84rem); font-weight: 500; line-height: 1.25; }
a.award-label { text-decoration: none; }
a.award-label:hover { text-decoration: underline; text-underline-offset: 3px; }
.hero .phone { position: relative; display: flex; justify-content: center; }
.hero .phone::before {
  content: ""; position: absolute; left: 50%; top: 55%; width: 120%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 0;
  background: radial-gradient(closest-side, rgba(210, 250, 255, 0.95), rgba(140, 215, 255, 0.5) 45%, rgba(52, 80, 228, 0) 100%);
}
.hero .phone img { position: relative; z-index: 1; display: block; width: 100%; max-width: 300px; max-height: min(56vh, 460px); height: auto; object-fit: contain; transform: rotate(8deg); }
/* Main qui joue : apparition élastique type jeu casual (avec onde de choc), puis flottement léger en boucle */
.hero .phone img { transform-origin: 50% 85%; animation: hand-in 1s cubic-bezier(.3, 1.6, .5, 1) 0.15s both, hand-idle 3.6s ease-in-out 1.15s infinite; }
.hero .phone::before { animation: glow-in 0.9s ease-out 0.1s both, glow-breathe 3.6s ease-in-out 1.15s infinite; }
.hero .phone::after {
  content: ""; position: absolute; left: 50%; top: 55%; width: 70%; aspect-ratio: 1; z-index: 0; border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.85); transform: translate(-50%, -50%) scale(0.2); opacity: 0;
  animation: shockwave 0.9s ease-out 0.55s both; pointer-events: none;
}
@keyframes hand-in {
  0% { transform: translateY(60px) scale(0.3) rotate(-20deg); }
  45% { transform: translateY(-14px) scale(1.12) rotate(14deg); }
  65% { transform: translateY(4px) scale(0.95, 1.04) rotate(5deg); }
  82% { transform: translateY(-3px) scale(1.02) rotate(9deg); }
  100% { transform: translateY(0) scale(1) rotate(8deg); }
}
@keyframes hand-idle { 0%, 100% { transform: translateY(0) rotate(8deg); } 50% { transform: translateY(-9px) rotate(9.5deg); } }
@keyframes glow-in { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes glow-breathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.85; } }
@keyframes shockwave { 0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.2); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); border-width: 1px; } }
/* Étincelles autour de la main, en boucle décalée après l apparition */
.twinkle { position: absolute; z-index: 2; width: clamp(22px, 2.6vw, 40px); aspect-ratio: 1; background: url("images/sparkle-8.png") center / contain no-repeat; opacity: 0; pointer-events: none; animation: twinkle 2.6s ease-in-out infinite; }
.twinkle.t1 { top: 6%; left: 16%; animation-delay: 1.1s; }
.twinkle.t2 { top: 0; right: 14%; width: clamp(16px, 1.8vw, 28px); animation-delay: 1.75s; }
.twinkle.t3 { top: 46%; right: 2%; animation-delay: 2.4s; }
.twinkle.t4 { bottom: 14%; left: 8%; width: clamp(14px, 1.6vw, 24px); animation-delay: 3.05s; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.2) rotate(0deg); } 18% { opacity: 1; transform: scale(1.1) rotate(45deg); } 32% { opacity: 0.9; transform: scale(0.85) rotate(70deg); } 50% { opacity: 0; transform: scale(0.3) rotate(110deg); } }
@media (prefers-reduced-motion: reduce) { .hero .phone img, .hero .phone::before { animation: none; } .hero .phone::after, .twinkle { display: none; } }
@media (max-width: 780px) {
  .home .hero { grid-template-columns: 1fr; }
  .hero .phone img { max-height: 26vh; width: auto; }
  .hero .phone::before { width: min(78vw, 34vh); }
  .awards li { padding: 0 10px; }
  .award-label { font-size: 0.8rem; }
  .hero .studio-title { font-size: clamp(1.8rem, 9.2vw, 3.2rem); }
}

/* Logo blanc partout : sur les pages à fond clair, l'en-tête devient une bande bleue */
.doc .site-header { background: var(--bg); color: var(--paper); padding-bottom: clamp(14px, 2.4vw, 24px); }
.doc.blog .site-header { padding-bottom: 0; }

/* Accueil, sections 2 à 6 : même identité que le premier écran (titres Lilita, texte Urbanist) */
.home .band { font-family: "Urbanist", var(--font); }
.home .band .big-title {
  font-family: "Lilita One", var(--font); font-weight: 400; font-stretch: normal; letter-spacing: 0.005em;
  text-transform: uppercase; font-size: clamp(1.9rem, 3.6vw, 3.2rem); line-height: 1.04; margin: 0 0 0.5em; max-width: 22em;
}
.home .band h3 { font-family: "Lilita One", var(--font); font-weight: 400; font-size: 1.3rem; letter-spacing: 0.01em; margin: 0 0 0.35em; }
.home .band .intro { font-size: clamp(1.08rem, 1.4vw, 1.25rem); max-width: 44rem; }
.home .band .pill.big { padding: 0.8em 1.5em; font-size: 1.05rem; }
.home .band .text-link { margin-left: 18px; font-weight: 700; }
.home .band ul { list-style: none; padding: 0; }

/* Pop-up contact du bouton "Let s craft your game" */
.contact-popup { width: min(92vw, 420px); padding: 30px 28px 24px; border: 0; border-radius: 24px; background: var(--paper); color: var(--ink); font-family: "Urbanist", var(--font); box-shadow: 0 10px 0 var(--bg-deep), 0 30px 60px rgba(20, 28, 90, 0.35); }
.contact-popup[open] { animation: cp-in 0.45s cubic-bezier(.34, 1.56, .64, 1); }
.contact-popup::backdrop { background: rgba(31, 40, 120, 0.55); backdrop-filter: blur(3px); }
.contact-popup h2 { margin: 0 0 18px; font-family: "Lilita One", var(--font); font-weight: 400; font-size: 1.7rem; text-transform: uppercase; color: var(--bg); }
.contact-popup form { display: grid; gap: 14px; }
.contact-popup [hidden] { display: none; }
.contact-popup label { display: grid; gap: 6px; font-weight: 700; font-size: 0.95rem; }
.contact-popup input { font: inherit; font-size: 16px; font-weight: 500; padding: 12px 14px; border: 2px solid #dcd5c8; border-radius: 12px; background: #fff; color: var(--ink); }
.contact-popup input:focus { outline: none; border-color: var(--bg); box-shadow: 0 0 0 3px var(--paper-soft); }
.cp-send { margin-top: 6px; padding: 14px 18px; border: 0; border-radius: 999px; background: var(--sun); color: var(--ink); font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; box-shadow: 0 5px 0 var(--sun-shade); transition: transform 0.12s, box-shadow 0.12s; }
.cp-send:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--sun-shade); }
.cp-send:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--sun-shade); }
.cp-note { margin: 2px 0 0; font-size: 0.82rem; color: var(--ink-soft); }
.cp-note a { color: inherit; }
.cp-close { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 1.8rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.cp-done p { margin: 0; font-size: 1.1rem; font-weight: 600; }
@keyframes cp-in { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .contact-popup[open] { animation: none; } }

/* 2. Ce qu'on fait pour les marques et médias */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 28px 0 30px; }
.craft .big-title, .craft .intro { text-align: center; margin-left: auto; margin-right: auto; }
.craft .pill.big { display: table; margin: 0 auto; }
.pillars li { background: #fff; border: 2px solid var(--paper-soft); border-radius: 18px; padding: 20px 22px; margin: 0; max-width: none; }
.pillars li::before { content: ""; display: block; width: 34px; height: 8px; border-radius: 99px; background: var(--sun); margin-bottom: 14px; }
.pillars li:nth-child(2)::before { background: var(--mint); }
.pillars li:nth-child(3)::before { background: var(--coral); }
.pillars li:nth-child(4)::before { background: var(--blue); }
.pillars p { margin: 0; font-size: 1rem; color: var(--ink-soft); }
.pillars li { display: flex; flex-direction: column; }
.pillars .mascot { order: -1; display: block; height: clamp(84px, 7vw, 104px); width: auto; max-width: 100%; margin: 0 0 14px; object-fit: contain; object-position: left bottom; transform: rotate(4deg); }
.pillars .mascot.ball { transform: rotate(-8deg); }
.pillars .mascot.chest { transform: rotate(5deg); }
.pillars .mascot.bomb { transform: rotate(-5deg); }
.craft-art .board { max-height: 420px; margin: 0 auto; }
.craft-art .board .slot { fill: var(--paper-soft); stroke: var(--paper); }
.craft-art .board .pc { stroke: var(--paper); }

/* 3. L'équipe */

.team-puzzle { display: block; width: 100%; max-width: 540px; height: auto; margin: 0 auto; overflow: visible; }
.team-puzzle .tp { transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 8px 0 rgba(31, 36, 51, 0.12)); transition: transform 0.25s ease, filter 0.25s ease; }
.team-puzzle .tp-edge { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linejoin: round; }
.team-puzzle .tp-shine { opacity: 0; pointer-events: none; }
/* Arrivée : pièces hors du cadre, puis elles volent et s emboîtent une par une */
.team-puzzle.tp-ready .tp { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(0.5); transition: transform 0.9s cubic-bezier(.34, 1.56, .64, 1) var(--d), opacity 0.35s ease var(--d), filter 0.25s ease; }
.team-puzzle.tp-ready.tp-play .tp { opacity: 1; transform: none; }
.team-puzzle.tp-play .tp-shine { animation: tp-shine 0.9s ease-in-out calc(var(--d) + 1s) both; }
@keyframes tp-shine { 0% { opacity: 1; transform: translateX(0); } 100% { opacity: 1; transform: translateX(230px); } }
/* Une fois en place, la pièce survolée se soulève */
.team-puzzle.tp-done .tp, .team-puzzle:not(.tp-ready) .tp { transition: transform 0.25s ease, filter 0.25s ease; }
.team-puzzle .tp:hover { transform: translateY(-6px) scale(1.04); filter: drop-shadow(0 14px 0 rgba(31, 36, 51, 0.16)); }
.team-puzzle.tp-ready:not(.tp-done) .tp:hover { transform: none; }

/* 3. Équipe : texte et encadré du fondateur à gauche, puzzle photo à droite */
.team-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.home .band#team { overflow-x: clip; }
.founder { margin-top: 26px; padding: 24px 26px 20px; border-radius: 20px; background: #fff; border: 2px solid var(--paper-soft); max-width: 32rem; }
.founder-head { display: flex; align-items: center; gap: 18px; }
.founder-head img { width: 84px; height: 84px; border-radius: 20px; object-fit: cover; transform: rotate(-3deg); }
.home .band .founder-kicker { margin: 0 0 2px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bg); }
.home .band .founder h3 { margin: 0; font-size: 1.6rem; }
.home .band .founder-role { display: inline-block; margin: 6px 0 0; padding: 0.2em 0.7em; border-radius: 99px; background: var(--sun); font-size: 0.85rem; font-weight: 700; }
.home .band .founder-highlight { margin: 18px 0 14px; padding: 14px 16px; border-radius: 14px; background: var(--paper-soft); font-weight: 700; font-size: 1.02rem; line-height: 1.4; max-width: none; }
.home .band .founder ul { margin: 0; padding: 0; }
.home .band .founder li { position: relative; margin: 0 0 6px; padding-left: 22px; font-size: 1rem; max-width: none; }
.home .band .founder li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 9px; height: 9px; border-radius: 3px; background: var(--mint); transform: rotate(45deg); }
.home .band .founder li:nth-child(2)::before { background: var(--coral); }
.home .band .founder li:nth-child(3)::before { background: var(--sun); }
.home .band .founder li:nth-child(4)::before { background: var(--blue); }
@media (max-width: 900px) { .team-split { grid-template-columns: 1fr; } .team-art { order: -1; } }

/* 4. Mission : bande bleue */
.home .band.mission { background: var(--bg); color: #fff; }
.home .band.mission .intro { color: var(--paper-soft); }
.home .band.mission a { color: #fff; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 30px 0 28px; }
.stats li { margin: 0; max-width: none; padding-left: 18px; border-left: 3px solid var(--sun); }
.stats strong { display: block; font-family: "Lilita One", var(--font); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; color: var(--sun); margin-bottom: 6px; }
.stats span { font-size: 1.05rem; }

/* 4. Mission : texte et chiffres à gauche, visuel My Lovely Planet à droite avec deux médaillons d arbres */
.mission-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.mission-art { position: relative; max-width: 380px; margin: 0 auto; padding: 30px 34px; }
.trees-main { display: block; width: 100%; height: auto; border-radius: 28px; border: 4px solid rgba(255, 255, 255, 0.9); box-shadow: 0 10px 0 var(--bg-deep), 0 24px 50px rgba(10, 16, 70, 0.35); transform: rotate(2deg); }
.tree-badge { position: absolute; width: clamp(96px, 10vw, 140px); height: auto; filter: drop-shadow(0 8px 10px rgba(10, 16, 70, 0.35)); }
.tree-badge.b1 { top: 0; left: 0; transform: rotate(-10deg); }
.tree-badge.b2 { bottom: 0; right: 0; transform: rotate(8deg); }
.mission .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.mission .stats strong { font-size: clamp(1.7rem, 2.5vw, 2.4rem); white-space: nowrap; }
.mission .stat-icon { display: block; height: 64px; width: auto; max-width: 100%; margin: 0 0 12px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 6px 8px rgba(10, 16, 70, 0.3)); }
@media (max-width: 900px) { .mission-split { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .mission .stats { grid-template-columns: 1fr; } }

/* Page About : même identité que l accueil (fond bleu en haut, titres Lilita, cartes) */
.about-hero { padding: clamp(40px, 9vh, 96px) var(--gutter) clamp(48px, 9vh, 96px); color: #fff; font-family: "Urbanist", var(--font); }
.about-hero .inner { max-width: 1080px; margin: 0 auto; }
.about-kicker { margin: 0 0 10px; font-family: "Lilita One", var(--font); font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sun); }
.about-hero h1 { margin: 0 0 0.4em; font-family: "Lilita One", var(--font); font-weight: 400; text-transform: uppercase; font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 1.02; }
.about-hero .lead { margin: 0; max-width: 44rem; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.5; color: var(--paper-soft); }
.pillars.about-make { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.about-awards .big-title { text-align: center; margin-left: auto; margin-right: auto; }
.about-awards .awards { justify-content: center; margin: 28px auto 0; max-width: 44rem; }
.about-company { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 72px); }
.about-company .big-title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
@media (max-width: 760px) { .pillars.about-make, .about-company { grid-template-columns: 1fr; } }

/* 6. Nos jeux */
.our-games { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 28px; }
.game-card { background: #fff; border: 2px solid var(--paper-soft); border-radius: 20px; padding: 24px; }
.game-card p { font-size: 1rem; }
.game-card p:last-child { margin-bottom: 0; }
.game-card.mlp { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; align-items: center; background: var(--paper-soft); }
.game-card.mlp img { width: 110px; height: auto; transform: rotate(6deg); }
.game-card .stores a { font-weight: 700; }

@media (max-width: 1000px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .split, .our-games { grid-template-columns: 1fr; }
  .craft-art { display: none; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pillars { grid-template-columns: 1fr; }
  .home .band .text-link { display: block; margin: 16px 0 0; }
}

/* journal:start */
/* Journal (blog), pages About et Contact, bloc "From the Journal" de l'accueil. */
.doc .kicker { margin: 0 0 0.6em; font-weight: 750; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bg); }
.doc .kicker a { color: inherit; text-decoration: none; }
.doc .kicker a:hover { text-decoration: underline; }
.doc .lead { font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 1.6em; }
.doc h3 { font-size: 1.08rem; font-weight: 750; margin: 1.6em 0 0.4em; }
.doc ol { margin: 0 0 1em; padding-left: 1.4em; }
.doc blockquote { margin: 1.4em 0; padding: 0.2em 0 0.2em 1.1em; border-left: 4px solid var(--sun); color: var(--ink-soft); font-style: italic; }
.doc code { font-size: 0.92em; background: var(--paper-soft); padding: 0.1em 0.35em; border-radius: 5px; }
.doc pre { overflow-x: auto; background: var(--paper-soft); padding: 1em; border-radius: 10px; }
.doc pre code { background: none; padding: 0; }
.doc a, .doc li, .doc p { overflow-wrap: anywhere; }

/* Article */
.journal main { max-width: 46rem; }
.journal-index main { max-width: 68rem; }
.j-article > p:first-of-type + h1 + .updated + p { font-size: 1.12rem; }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border-radius: 12px; border: 1px solid #dfe3f0; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.45; }
.table-wrap th { text-align: left; background: var(--paper-soft); font-weight: 750; }
.table-wrap th, .table-wrap td { padding: 0.65em 0.85em; border-bottom: 1px solid #dfe3f0; vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: 0; }
.j-related { margin-top: 3.2em; padding-top: 1.6em; border-top: 2px solid var(--paper-soft); }
.j-related h2 { margin-top: 0; }

/* Cartes */
.j-grid { list-style: none; margin: 1.6em 0 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.j-related .j-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.doc .j-grid li, .band .j-grid li { margin: 0; padding: 0; }
.band .j-grid li::before { content: none; }
.j-card a { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; padding: 22px 22px 20px; border-radius: 18px; background: #fff; color: var(--ink); text-decoration: none; border: 2px solid var(--paper-soft); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.j-card a:hover { transform: translateY(-3px); border-color: var(--bg); box-shadow: 0 8px 0 var(--paper-soft); }
.j-card h3 { margin: 0.5em 0 0.45em; font-size: 1.14rem; font-weight: 800; line-height: 1.22; letter-spacing: -0.01em; }
.j-card p { margin: 0 0 1em; color: var(--ink-soft); font-size: 0.96rem; line-height: 1.5; flex: 1; }
.j-cat { align-self: flex-start; padding: 0.25em 0.7em; border-radius: 999px; background: var(--sun); color: var(--ink); font-size: 0.78rem; font-weight: 750; letter-spacing: 0.02em; }
.j-meta { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.doc main .j-card a { color: var(--ink); }

/* Blog : fond bleu comme l'accueil (logo blanc lisible), article posé sur une carte claire */
.doc.blog { background: var(--bg); color: var(--paper); }
.doc.blog .site-footer { color: var(--paper-soft); }
.doc.blog .site-footer a { text-decoration-color: rgba(228, 233, 255, 0.45); }
.doc.blog .site-footer a:hover { text-decoration-color: currentColor; }
.doc.blog-index main > .kicker { color: var(--sun); }
.doc.blog-index main > .lead { color: var(--paper-soft); }
.doc.blog .j-article { background: var(--paper); color: var(--ink); border-radius: 24px; padding: clamp(22px, 5vw, 48px); }
.doc.blog .j-related { border-top-color: rgba(228, 233, 255, 0.3); }
.doc.blog main a.back { color: var(--paper); }

@media (prefers-color-scheme: dark) {
  .doc.blog { background: var(--bg); color: var(--paper); }
  .doc.blog .site-footer { color: var(--paper-soft); }
  .doc.blog .j-article { background: #161a28; color: #eef0f6; }
  .doc .kicker { color: #9db0ff; }
  .doc .lead, .doc blockquote { color: #aab1c5; }
  .doc code, .doc pre, .table-wrap th { background: #232a40; }
  .table-wrap, .table-wrap th, .table-wrap td { border-color: #2e3550; }
  .j-related { border-top-color: #2e3550; }
  .doc .j-card a { background: #1e2335; border-color: #2e3550; color: #eef0f6; }
  .doc .j-card a:hover { border-color: #9db0ff; box-shadow: 0 8px 0 #232a40; }
  .doc .j-card p, .doc .j-meta { color: #aab1c5; }
  .doc main .j-card a { color: #eef0f6; }
}
/* journal:end */
