* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #d8d3c8;
  font-family: 'Nunito', sans-serif;
}

.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #d8d3c8;
  isolation: isolate;
}

.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
}

.layer {
  position: absolute;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.layer img {
  display: block;
  width: 100%;
  height: auto;
}

/* SOL */
.sol {
  animation: solFloat 6s ease-in-out infinite;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.sol img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 30vh;
  object-fit: contain;
}

@keyframes solFloat {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

/* ÉLÉMENTS ANIMÉS */
.tree-left {
  left: 1.5%;
  top: 24%;
  width: 27%;
  z-index: 6;
  transform-origin: 50% 100%;
  animation: swayTreeLeft 7s ease-in-out infinite;
}

.tree-center {
  left: 68%;
  top: 10%;
  width: 18.5%;
  z-index: 6;
  transform-origin: 50% 100%;
  animation: swayTreeCenter 8s ease-in-out infinite;
}

.branch-left {
  left: -1.5%;
  top: 40%;
  width: 13.5%;
  z-index: 8;
  transform-origin: 100% 50%;
  animation: swayBranchLeft 5.8s ease-in-out infinite;
}

.branch-right-1 {
  right: 40%;
  top: 52%;
  width: 13.5%;
  z-index: 8;
  transform-origin: 0% 50%;
  animation: swayBranchRight1 5.5s ease-in-out infinite;
}

.branch-right-2 {
  right: -1%;
  top: 50%;
  width: 13.5%;
  z-index: 9;
  transform-origin: 0% 50%;
  animation: swayBranchRight2 6.2s ease-in-out infinite;
}

.sun {
  left: 62%;
  top: 13%;
  width: 7.3%;
  z-index: 7;
  transform-origin: 50% 50%;
  animation: spinSun 18s linear infinite, floatSun 6s ease-in-out infinite;
}

.jaguar {
  left: 53.3%;
  top: 33.8%;
  width: 24.8%;
  z-index: 10;
  transform-origin: 58% 38%;
  animation: rockJaguar 4.8s ease-in-out infinite;
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background:
    radial-gradient(circle at 68% 12%, rgba(255, 213, 77, 0.10), transparent 16%),
    linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(0,0,0,0.03));
}

/* ZONE TEXTE / LOGO */
.content {
  position: absolute;
  left: clamp(16px, 21%, 24%);
  top: 57%;
  transform: translateY(-50%);
  width: min(490px, 85%);
  text-align: center;
  z-index: 30;
}

.logo-wrap {
  position: relative;
}

.logo {
  width: clamp(160px, 16vw, 240px);
  height: auto;
  opacity: 0;
  transform: translateY(24px);
  transition: all 1.2s ease;
}

.logo.show {
  opacity: 1;
  transform: translateY(0);
}

.text-stage {
  position: relative;
  margin-top: 18px;
  min-height: 110px;
}

.text-line {
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: clamp(20px, 1.6vw, 28px);
  line-height: 1.4;
  color: #2a2a2a;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.9s ease;
  letter-spacing: -0.01em;
}

.text-line.show {
  opacity: 1;
  transform: translateY(0);
}

.text-line.hide {
  opacity: 0;
  transform: translateY(-10px);
}

/* ANIMATIONS */
@keyframes swayTreeLeft {
  0%   { transform: rotate(-1.2deg) translateY(0); }
  25%  { transform: rotate(1.3deg) translateY(-0.2%); }
  50%  { transform: rotate(-0.7deg) translateY(0.15%); }
  75%  { transform: rotate(1deg) translateY(-0.15%); }
  100% { transform: rotate(-1.2deg) translateY(0); }
}

@keyframes swayTreeCenter {
  0%   { transform: rotate(0.8deg) translateY(0); }
  25%  { transform: rotate(-1deg) translateY(-0.15%); }
  50%  { transform: rotate(0.5deg) translateY(0.1%); }
  75%  { transform: rotate(-0.8deg) translateY(-0.1%); }
  100% { transform: rotate(0.8deg) translateY(0); }
}

@keyframes swayBranchLeft {
  0%   { transform: rotate(-4deg) translateX(0); }
  25%  { transform: rotate(2deg) translateX(0.3%); }
  50%  { transform: rotate(-1deg) translateX(-0.2%); }
  75%  { transform: rotate(3deg) translateX(0.2%); }
  100% { transform: rotate(-4deg) translateX(0); }
}

@keyframes swayBranchRight1 {
  0%   { transform: rotate(3.5deg) translateX(0); }
  25%  { transform: rotate(-2deg) translateX(-0.25%); }
  50%  { transform: rotate(1.5deg) translateX(0.1%); }
  75%  { transform: rotate(-2.5deg) translateX(-0.15%); }
  100% { transform: rotate(3.5deg) translateX(0); }
}

@keyframes swayBranchRight2 {
  0%   { transform: rotate(4deg) translateX(0); }
  25%  { transform: rotate(-1.5deg) translateX(-0.2%); }
  50%  { transform: rotate(1deg) translateX(0.1%); }
  75%  { transform: rotate(-3deg) translateX(-0.15%); }
  100% { transform: rotate(4deg) translateX(0); }
}

@keyframes spinSun {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes floatSun {
  0%   { margin-top: 0; }
  50%  { margin-top: 0.4vh; }
  100% { margin-top: 0; }
}

@keyframes rockJaguar {
  0%   { transform: rotate(-2deg) translateY(0); }
  20%  { transform: rotate(0.8deg) translateY(0.3%); }
  50%  { transform: rotate(2.2deg) translateY(0.8%); }
  80%  { transform: rotate(-0.6deg) translateY(0.25%); }
  100% { transform: rotate(-2deg) translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .tree-left   { width: 30%; left: -1%; }
  .tree-center { width: 21%; left: 43.8%; }
  .jaguar      { width: 28%; left: 51.7%; top: 35%; }
  .sun         { width: 8.2%; left: 63%; }
  .content     { left: 21%; width: min(42vw, 540px); }
}

/* TABLETTE + MOBILE : même mise en page */
@media (max-width: 900px) {
  .scene {
    height: 100dvh;
    background: #dbd3c4;
  }

  .bg { display: none; }

  .content {
    left: 50%;
    top: 40%;
    width: min(86vw, 420px);
    transform: translate(-50%, -50%);
    text-align: center;
  }

  .logo-wrap { height: 62px; }

  .logo { width: clamp(120px, 36vw, 220px); }

  .text-stage {
    margin-top: 10px;
    min-height: 112px;
  }

  .text-line {
    font-size: 18px;
    line-height: 1.3;
  }

  .tree-left {
    top: 50%;
    width: 57%;
    left: -7%;
    z-index: -5;
  }

  .tree-center {
    top: 52%;
    width: 34%;
    left: 54%;
  }

  .branch-left {
    width: 24%;
    left: 13%;
    top: 78%;
  }

  .branch-right-1 {
    top: 75%;
    width: 24%;
    right: 6%;
  }

  .branch-right-2 {
    top: 80%;
    width: 24%;
    right: -5%;
  }

  .sun {
    top: 3%;
    width: 25%;
    left: 6%;
  }

  .jaguar {
    top: 74%;
    width: 52%;
    left: 20%;
    z-index: -1;
  }

  .sol { bottom: 0; width: 100%; z-index: 50; }
  .sol img { width: 100%; height: auto; display: block; }
}
