/* ====================================================================
   Cocotte — Style global & Design system
   ==================================================================== */

/* Import de polices */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:ital,wght@0,600;0,700;0,800;0,900;1,600&display=swap');

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: initial; /* Géré de façon fluide par Lenis */
}

/* Variables de thèmes (Design Tokens) */
:root {
  --font-title: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

/* Thème Classique / Par Défaut */
html.theme-default,
body.theme-default {
  --bg-color: #FFFBF5;
  --text-color: #2D1B0E;
  --body-text: #5C4A38;
  --primary-color: #E8401C;
  --secondary-color: #F5A623;
  --green-color: #4CAF50;
  --yellow-color: #FFC107;
  --grey-color: #9E9E9E;
  --surface-color: #FFFFFF;
  --surface-alt: #FFF8F5;
  --border-color: #F0E6D3;
  --tile-empty-bg: #D4C4A8;
  --key-bg: #EDE0CC;
  --shadow-color: rgba(45, 27, 14, 0.15);
  --accent-glow: rgba(232, 64, 28, 0.15);
  --navbar-bg: rgba(255, 251, 245, 0.85);
  --card-bg: #FFFFFF;
  
  /* Background visual states */
  --star-opacity: 0;
  --jungle-opacity: 0;
  --espion-opacity: 0;
  --classic-opacity: 1;
}

/* Thème Astronaute */
html.theme-astronaute,
body.theme-astronaute {
  --bg-color: #080E29;
  --text-color: #ECF1FF;
  --body-text: #BAC6EC;
  --primary-color: #6C8DFF;
  --secondary-color: #FFCB5E;
  --green-color: #46D6A0;
  --yellow-color: #FFD15C;
  --grey-color: #5A6699;
  --surface-color: #141C44;
  --surface-alt: #1B2456;
  --border-color: #2A3568;
  --tile-empty-bg: #3A4680;
  --key-bg: #202A5C;
  --shadow-color: rgba(0, 0, 0, 0.4);
  --accent-glow: rgba(108, 141, 255, 0.3);
  --navbar-bg: rgba(8, 14, 41, 0.85);
  --card-bg: #141C44;
  
  --star-opacity: 1;
  --jungle-opacity: 0;
  --espion-opacity: 0;
  --classic-opacity: 0;
}

/* Thème T-Rex */
html.theme-trex,
body.theme-trex {
  --bg-color: #0A1C12;
  --text-color: #EAF6EC;
  --body-text: #BBD8C2;
  --primary-color: #FF7A3D;
  --secondary-color: #E8C24A;
  --green-color: #5BD46E;
  --yellow-color: #F2C14E;
  --grey-color: #5E7A66;
  --surface-color: #13301F;
  --surface-alt: #1A3C28;
  --border-color: #274A33;
  --tile-empty-bg: #35583F;
  --key-bg: #1B3A27;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --accent-glow: rgba(255, 122, 61, 0.35);
  --navbar-bg: rgba(10, 28, 18, 0.85);
  --card-bg: #13301F;
  
  --star-opacity: 0;
  --jungle-opacity: 1;
  --espion-opacity: 0;
  --classic-opacity: 0;
}

/* Thème Espion */
html.theme-espion,
body.theme-espion {
  --bg-color: #0A0A0C;
  --text-color: #F1F3F6;
  --body-text: #C4C9D1;
  --primary-color: #566A8C;
  --secondary-color: #C9B27A;
  --green-color: #46B97A;
  --yellow-color: #D9B65A;
  --grey-color: #5A5E66;
  --surface-color: #15161A;
  --surface-alt: #1D1F24;
  --border-color: #2B2E35;
  --tile-empty-bg: #3A3E47;
  --key-bg: #1E2026;
  --shadow-color: rgba(0, 0, 0, 0.6);
  --accent-glow: rgba(201, 178, 122, 0.25);
  --navbar-bg: rgba(10, 10, 12, 0.85);
  --card-bg: #15161A;
  
  --star-opacity: 0;
  --jungle-opacity: 0;
  --espion-opacity: 1;
  --classic-opacity: 0;
}

/* Styles Généraux */
body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: background-color 0.8s cubic-bezier(0.25, 1, 0.5, 1), color 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .app-title-font {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.2;
}

p {
  color: var(--body-text);
  line-height: 1.6;
  font-size: 1.1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center {
  text-align: center;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  margin-bottom: 60px;
}

.section-tagline {
  font-family: var(--font-title);
  color: var(--primary-color);
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 2px;
  display: inline-block;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-subtitle {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.2rem;
}

/* Badges & Buttons */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-green { background-color: var(--green-color); color: white; }
.badge-yellow { background-color: var(--yellow-color); color: #2D1B0E; }
.badge-grey { background-color: var(--grey-color); color: white; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--accent-glow);
  opacity: 0.95;
}

.btn-secondary {
  background-color: var(--surface-color);
  color: var(--text-color);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  background-color: var(--surface-alt);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--text-color);
}

.btn-outline:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.95rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.15rem;
}

/* Background canvas and decoration overlays */
.background-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.decor-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: var(--star-opacity);
  transition: opacity 0.8s ease;
}

.decor-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

/* T-rex leaf overlay */
#jungle-leaves {
  background-image: radial-gradient(circle at 10% 20%, rgba(27, 58, 39, 0.15) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(27, 58, 39, 0.15) 0%, transparent 40%);
  opacity: var(--jungle-opacity);
}

/* Espion laser lines */
#espion-laser {
  background-image: linear-gradient(rgba(199, 178, 122, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(199, 178, 122, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: var(--espion-opacity);
}

/* Classic warm background spots */
#classic-dots {
  background-image: radial-gradient(circle at 80% 20%, rgba(245, 166, 35, 0.04) 0%, transparent 50%),
                    radial-gradient(circle at 20% 80%, rgba(232, 64, 28, 0.04) 0%, transparent 50%);
  opacity: var(--classic-opacity);
}

/* Custom Cursor (Designeux Look) */
.custom-cursor {
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s ease, height 0.3s ease;
}

.custom-cursor-follower {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--primary-color);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  opacity: 0.5;
}

body.hovering-link .custom-cursor {
  width: 14px;
  height: 14px;
  background-color: var(--secondary-color);
}

body.hovering-link .custom-cursor-follower {
  width: 45px;
  height: 45px;
  border-color: var(--secondary-color);
  opacity: 0.8;
}

@media (max-width: 1024px) {
  .custom-cursor, .custom-cursor-follower {
    display: none;
  }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--navbar-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.8s ease, border-color 0.8s ease;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.logo-text-svg {
  height: 42px;
  width: auto;
  /* Filter logo text elements according to theme (invert in dark themes) */
  transition: filter 0.8s ease;
}

html.theme-astronaute .logo-text-svg,
html.theme-trex .logo-text-svg,
html.theme-espion .logo-text-svg {
  filter: invert(1) brightness(2);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text-color);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-menu li a:hover {
  color: var(--primary-color);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background-color: var(--text-color);
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: flex-start;
  flex-direction: column;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background-color: var(--surface-alt);
  border: 1.5px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 30px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary-color);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.streak-emoji {
  margin-right: 6px;
  animation: flameBounce 1.5s infinite alternate ease-in-out;
}

.hero-title {
  font-size: 3.8rem;
  line-height: 1.15;
}

.gradient-text {
  color: var(--primary-color);
  position: relative;
}

.gradient-text::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 5px;
  width: 100%;
  height: 10px;
  background-color: var(--secondary-color);
  z-index: -1;
  opacity: 0.35;
  border-radius: 5px;
}

.hero-description {
  font-size: 1.25rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.hero-store-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--body-text);
}

.rating-stars {
  color: var(--secondary-color);
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.hero-mascot-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mascot-glow {
  position: absolute;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(20px);
  animation: glowPulse 4s infinite alternate ease-in-out;
}

.hero-mascot-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
}

.hero-mascot {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px var(--shadow-color));
  animation: floatMascot 4s infinite ease-in-out;
}

/* Background floating tiles */
.floating-tiles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-tile {
  position: absolute;
  width: 65px;
  height: 65px;
  border-radius: 12px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 2rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: rotate(var(--rotate));
  opacity: 0.7;
  animation: floatBackgroundTile calc(10s * var(--speed)) infinite alternate ease-in-out;
}

.tile-green { background-color: var(--green-color); }
.tile-yellow { background-color: var(--yellow-color); color: #2D1B0E; }
.tile-grey { background-color: var(--grey-color); }

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  opacity: 0.8;
}

.mouse-icon {
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-color);
  border-radius: 15px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--text-color);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheelAnim 1.8s infinite ease-in-out;
}

.scroll-text {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--body-text);
}

/* Section: Concept / simulator */
.concept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
  margin-top: 40px;
}

.board-simulator-container {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.board-simulator {
  background-color: var(--card-bg);
  border: 4px solid var(--border-color);
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0 20px 50px var(--shadow-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 2;
  transition: background-color 0.8s ease, border-color 0.8s ease;
}

.board-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.tile {
  aspect-ratio: 1;
  background-color: var(--surface-color);
  border: 3px solid var(--border-color);
  border-radius: 12px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  position: relative;
  transform-style: preserve-3d;
  transition: background-color 0.8s ease, border-color 0.8s ease, color 0.8s ease;
}

/* Flip state for animations */
.tile.flip {
  color: white;
  border-color: transparent;
}

.tile.flip-green {
  background-color: var(--green-color) !important;
  color: white !important;
  border-color: transparent !important;
}

.tile.flip-yellow {
  background-color: var(--yellow-color) !important;
  color: #2D1B0E !important;
  border-color: transparent !important;
}

.tile.flip-grey {
  background-color: var(--grey-color) !important;
  color: white !important;
  border-color: transparent !important;
}

.board-shadow {
  position: absolute;
  bottom: 0px;
  width: 80%;
  height: 20px;
  background: radial-gradient(ellipse at center, var(--shadow-color) 0%, transparent 70%);
  z-index: 1;
}

.explanations-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.explanation-card {
  display: flex;
  gap: 24px;
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  overflow: hidden;
}

.explanation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background-color: var(--border-color);
  transition: background-color 0.5s ease;
}

.explanation-card.active {
  transform: translateX(15px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 40px var(--accent-glow);
}

.explanation-card.active::before {
  background-color: var(--primary-color);
}

.step-num {
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: var(--border-color);
  line-height: 1;
  transition: color 0.5s ease;
}

.explanation-card.active .step-num {
  color: var(--primary-color);
}

.step-content h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

/* Section: Skins Gallery */
.skins-section {
  background-color: var(--surface-alt);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.8s ease, border-color 0.8s ease;
}

.skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-top: 20px;
}

.skin-card {
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 15px 35px var(--shadow-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  overflow: hidden;
}

.skin-visual {
  width: 180px;
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skin-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  filter: drop-shadow(0 10px 20px var(--shadow-color));
}

.skin-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skin-name {
  font-size: 1.4rem;
}

.skin-tag {
  align-self: center;
  background-color: var(--border-color);
  color: var(--text-color);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-family: var(--font-title);
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.tag-premium {
  background-color: var(--secondary-color);
  color: #2D1B0E;
}

.skin-desc {
  font-size: 0.95rem;
}

/* Card states */
.skin-card:hover {
  transform: translateY(-10px);
}

.skin-card:hover .skin-img {
  transform: scale(1.15) rotate(5deg);
}

/* Premium Card specific glows on hover */
.skin-card-astronaute:hover {
  border-color: #6C8DFF;
  box-shadow: 0 20px 40px rgba(108, 141, 255, 0.25);
  background: radial-gradient(circle at center, rgba(108, 141, 255, 0.05) 0%, var(--card-bg) 70%);
}

.skin-card-trex:hover {
  border-color: #FF7A3D;
  box-shadow: 0 20px 40px rgba(255, 122, 61, 0.25);
  background: radial-gradient(circle at center, rgba(255, 122, 61, 0.05) 0%, var(--card-bg) 70%);
}

.skin-card-espion:hover {
  border-color: #C9B27A;
  box-shadow: 0 20px 40px rgba(201, 178, 122, 0.25);
  background: radial-gradient(circle at center, rgba(201, 178, 122, 0.05) 0%, var(--card-bg) 70%);
}

/* Section: Theme Explorer */
.theme-explorer-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.theme-explorer-container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 64px;
}

.theme-explorer-visual {
  display: flex;
  justify-content: center;
}

.theme-bg-preview {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  border-radius: 32px;
  background-color: var(--surface-alt);
  border: 4px solid var(--border-color);
  box-shadow: 0 20px 50px var(--shadow-color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.8s ease;
}

.explorer-mascot-img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 15px 30px var(--shadow-color));
  transition: transform 0.6s ease;
}

.theme-bg-preview:hover .explorer-mascot-img {
  transform: scale(1.08) rotate(-3deg);
}

/* Theme active visual decorations */
.theme-particle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  transition: all 0.8s ease;
}

/* Theme switch custom looks */
.theme-visual-default {
  background-color: #FFFBF5;
  border-color: #F0E6D3;
}
.theme-visual-astronaute {
  background-color: #080E29;
  border-color: #2A3568;
  background-image: radial-gradient(circle at top right, #1B2456 0%, transparent 60%);
}
.theme-visual-trex {
  background-color: #0A1C12;
  border-color: #274A33;
  background-image: radial-gradient(circle at bottom left, #1A3C28 0%, transparent 60%);
}
.theme-visual-espion {
  background-color: #0A0A0C;
  border-color: #2B2E35;
  background-image: linear-gradient(135deg, #15161A 0%, #0A0A0C 100%);
}

.theme-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.theme-btn {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 12px 24px;
  border-radius: 30px;
  border: 2px solid var(--border-color);
  background-color: var(--surface-color);
  color: var(--text-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.theme-btn:hover {
  transform: translateY(-2px);
  background-color: var(--surface-alt);
}

.theme-btn.active {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 6px 15px var(--accent-glow);
}

.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.color-classic { background-color: #E8401C; }
.color-astro { background-color: #6C8DFF; }
.color-trex { background-color: #FF7A3D; }
.color-espion { background-color: #C9B27A; }

.theme-btn.active .theme-dot {
  background-color: white;
}

.theme-description-box {
  background-color: var(--surface-alt);
  border: 1.5px solid var(--border-color);
  padding: 24px;
  border-radius: 20px;
  margin-top: 24px;
  transition: all 0.8s ease;
}

.theme-title-display {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.theme-desc-display {
  font-size: 1rem;
}

/* Section: Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.feature-card {
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 15px 35px var(--shadow-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  top: 0;
}

.feature-card:hover {
  top: -8px;
  border-color: var(--primary-color);
  box-shadow: 0 20px 45px var(--accent-glow);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background-color: var(--surface-alt);
  border: 1px solid var(--border-color);
  transition: background-color 0.8s ease, border-color 0.8s ease;
}

.feature-icon-text {
  /* Emitting light animation */
}

.feature-card h3 {
  font-size: 1.4rem;
}

.feature-card p {
  font-size: 1rem;
}

/* Section: Download */
.download-section {
  background-color: var(--surface-alt);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: background-color 0.8s ease, border-color 0.8s ease;
}

.download-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.download-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.download-actions {
  margin-top: 10px;
}

.store-badges {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  background-color: #000000;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 14px;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  min-width: 155px;
  height: 48px;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-store:hover {
  background-color: #111111;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-store-icon {
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-store-icon svg {
  display: block;
}

.btn-store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.btn-store-text .store-subtitle {
  font-size: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.7);
}

.btn-store-text .store-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-top: 1px;
}

.download-compatibility-info {
  font-size: 0.95rem;
  color: var(--body-text);
  margin-top: 8px;
}

/* Mockup Container and Phone simulation */
.mockup-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.smartphone-frame {
  width: 320px;
  height: 640px;
  background-color: #2D1B0E;
  border: 12px solid #3A2018;
  border-radius: 44px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3), 0 0 0 4px #4A2D22;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.smartphone-speaker {
  width: 60px;
  height: 6px;
  background-color: #1A0D08;
  border-radius: 3px;
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.smartphone-button {
  width: 40px;
  height: 40px;
  border: 2.5px solid #3A2018;
  border-radius: 50%;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  cursor: pointer;
}

.smartphone-screen {
  flex: 1;
  background-color: #FFFBF5;
  margin: 36px 12px 64px 12px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.15);
}

/* App Simulation Content */
.app-simulation {
  display: flex;
  flex-direction: column;
  height: 100%;
  font-family: var(--font-body);
  background-color: #FFFBF5;
}

.app-header {
  background-color: #FFFBF5;
  border-bottom: 1.5px solid #F0E6D3;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.app-streak {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: #E8401C;
}

.app-title-font {
  font-size: 1.15rem;
  color: #E8401C;
}

.app-lives {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: #4CAF50;
}

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
}

.app-mascot-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-mascot-bubble {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.app-bubble {
  background-color: white;
  border: 2px solid #F0E6D3;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  color: #2D1B0E;
  position: relative;
}

.app-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background-color: white;
  border-left: 2px solid #F0E6D3;
  border-bottom: 2px solid #F0E6D3;
}

.app-mock-board {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: center;
  width: 100%;
  max-width: 180px;
}

.mock-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.m-tile {
  aspect-ratio: 1;
  background-color: white;
  border: 1.5px solid #F0E6D3;
  border-radius: 6px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2D1B0E;
}

.m-green { background-color: var(--green-color); border-color: transparent; color: white; }
.m-yellow { background-color: var(--yellow-color); border-color: transparent; color: #2D1B0E; }
.m-grey { background-color: var(--grey-color); border-color: transparent; color: white; }

.app-mock-keyboard {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.kbd-row {
  display: flex;
  justify-content: center;
  gap: 3px;
}

.kbd-row span {
  background-color: #EDE0CC;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 5px 4px;
  border-radius: 3px;
  color: #2D1B0E;
  flex: 1;
  text-align: center;
}

.kbd-row .kbd-btn {
  flex: 1.8;
  font-size: 0.5rem;
  background-color: #EDE0CC;
}

/* Footer */
.footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px 0;
  transition: background-color 0.8s ease, border-color 0.8s ease;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 60px;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  height: 36px;
  width: auto;
  align-self: flex-start;
  transition: filter 0.8s ease;
}

html.theme-astronaute .footer-logo,
html.theme-trex .footer-logo,
html.theme-espion .footer-logo {
  filter: invert(1) brightness(2);
}

.footer-links h4 {
  font-size: 1.15rem;
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links ul a:hover {
  color: var(--primary-color);
}

.footer-credits {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--body-text);
  font-size: 0.95rem;
}

/* Keyframes Animations */
@keyframes flameBounce {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.15) translateY(-2px); }
}

@keyframes glowPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.1); opacity: 1; }
}

@keyframes floatMascot {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes floatBackgroundTile {
  0% { transform: translateY(0px) rotate(var(--rotate)); }
  100% { transform: translateY(-25px) rotate(calc(var(--rotate) + 5deg)); }
}

@keyframes scrollWheelAnim {
  0% { top: 8px; opacity: 1; }
  50% { top: 20px; opacity: 0.2; }
  100% { top: 8px; opacity: 0; }
}

/* Responsiveness Media Queries */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-badge {
    align-self: center;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-description {
    margin: 0 auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-store-info {
    justify-content: center;
  }
  
  .hero-mascot-wrapper {
    order: -1;
  }
  
  .concept-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .board-simulator-container {
    order: -1;
  }
  
  .theme-explorer-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .theme-controls {
    justify-content: center;
  }
  
  .download-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .mockup-container {
    order: -1;
  }
  
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  
  .footer-credits {
    text-align: left;
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 80px;
    flex-direction: column;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(15px);
    width: 100%;
    text-align: center;
    padding: 40px 0;
    transition: 0.4s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  .navbar-container {
    padding: 0 16px;
  }
  
  .nav-cta {
    display: none;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
  }
  
  .footer-credits {
    grid-column: span 1;
  }
  
  .store-badges {
    justify-content: center;
  }
  
  .store-badge {
    height: 40px;
  }
  
  .store-badge.lg {
    height: 48px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 48px 0;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-description {
    font-size: 1.05rem;
  }
  
  .hero-mascot-container {
    max-width: 240px;
  }
  
  .board-simulator {
    padding: 16px;
    gap: 8px;
    border-radius: 16px;
    border-width: 3px;
  }
  
  .board-row {
    gap: 8px;
  }
  
  .tile {
    font-size: 1.6rem;
    border-radius: 8px;
    border-width: 2px;
  }
  
  .explanation-card {
    padding: 18px;
    gap: 16px;
  }
  
  .step-num {
    font-size: 1.8rem;
  }
  
  .step-content h3 {
    font-size: 1.15rem;
  }
  
  .step-content p {
    font-size: 0.95rem;
  }
  
  .skin-card {
    padding: 24px 16px;
    border-radius: 20px;
  }
  
  .skin-visual {
    width: 140px;
    height: 140px;
  }
  
  .theme-bg-preview {
    border-radius: 24px;
    border-width: 3px;
  }
  
  .theme-btn {
    padding: 10px 18px;
    font-size: 0.95rem;
  }
  
  .feature-card {
    padding: 24px;
    border-radius: 20px;
  }
  
  .smartphone-frame {
    width: 270px;
    height: 540px;
    border-width: 8px;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  }
  
  .smartphone-screen {
    margin: 24px 8px 48px 8px;
    border-radius: 16px;
  }
  
  .app-header {
    height: 42px;
    padding: 0 10px;
  }
  
  .app-mascot-bubble {
    width: 48px;
    height: 48px;
  }
  
  .app-bubble {
    font-size: 0.65rem;
    padding: 6px 10px;
  }
  
  .app-mock-board {
    max-width: 150px;
    gap: 4px;
  }
  
  .mock-row {
    gap: 4px;
  }
  
  .m-tile {
    font-size: 0.85rem;
    border-radius: 4px;
    border-width: 1px;
  }
  
  .kbd-row span {
    font-size: 0.45rem;
    padding: 4px 2px;
  }
  
  .kbd-row .kbd-btn {
    font-size: 0.4rem;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .skins-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ====================================================================
   Styles pour les Pages Légales (Conditions & Confidentialité)
   ==================================================================== */
.legal-section {
  padding: 120px 0 80px 0;
  min-height: 80vh;
}

.legal-header {
  margin-bottom: 48px;
  text-align: left;
  position: relative;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 24px;
  font-size: 1.05rem;
  transition: transform 0.3s ease;
}

.legal-back-link:hover {
  transform: translateX(-5px);
  color: var(--secondary-color);
}

.legal-content {
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 15px 40px var(--shadow-color);
  transition: background-color 0.8s ease, border-color 0.8s ease, box-shadow 0.8s ease;
}

.legal-content h2 {
  font-size: 1.8rem;
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--text-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.3rem;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-color);
}

.legal-content p {
  font-size: 1.05rem;
  margin-bottom: 16px;
  color: var(--body-text);
  text-align: justify;
}

.legal-content ul, .legal-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
  color: var(--body-text);
}

.legal-content li {
  font-size: 1.05rem;
  margin-bottom: 8px;
  line-height: 1.6;
}

.legal-content strong {
  color: var(--text-color);
}

@media (max-width: 768px) {
  .legal-content {
    padding: 32px 24px;
    border-radius: 16px;
  }
  .legal-content h2 {
    font-size: 1.5rem;
  }
}

/* ====================================================================
   Styles pour la Page de Contact
   ==================================================================== */
.contact-form {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-color);
  background-color: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  transition: border-color 0.3s ease;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.contact-form .btn {
  align-self: flex-start;
  border: none;
  cursor: pointer;
}
