@import url("/assets/font/Nunito.css");

:root {
  --cream: #fff8e9;
  --peach: #ffb36b;
  --orange: #f47d42;
  --coral: #ec6854;
  --brown: #704b3c;
  --green: #a8c878;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  display: grid;
  place-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 3rem 1.5rem;
  overflow: hidden;
  color: var(--brown);
  background:
    radial-gradient(circle at 12% 18%, #ffe1a7 0 5px, transparent 6px),
    radial-gradient(circle at 88% 76%, #ffd5bd 0 6px, transparent 7px),
    var(--cream);
  background-size: 90px 90px, 110px 110px, auto;
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  text-align: center;
}

/* Petites oreilles décoratives dans les coins */
body::before,
body::after {
  position: fixed;
  z-index: -1;
  font-size: clamp(3rem, 8vw, 6rem);
  opacity: 0.9;
  animation: bob 3s ease-in-out infinite;
}

body::before {
  content: "🐑";
  top: 8%;
  left: 8%;
  transform: rotate(-12deg);
}

body::after {
  content: "🐥";
  right: 9%;
  bottom: 9%;
  animation-delay: 0.8s;
}

h1 {
  margin: 0 0 1rem;
  color: var(--orange);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow:
    0 4px 0 #ffd09a,
    0 7px 0 #e9985c;
  animation: pop-in 700ms ease-out both;
}

body > br + text,
body {
  line-height: 1.7;
}

body > h1 + * {
  font-size: 1.2rem;
}

/* Le texte d’accroche */
h1 + br {
  display: none;
}

h1 + br + * {
  font-size: 1.2rem;
}

/* Carte centrale */
h1,
ul {
  position: relative;
}

ul {
  width: min(100%, 340px);
  margin: 2rem auto 0;
  padding: 1.25rem;
  list-style: none;
  background: #fffdf8;
  border: 4px solid #ffd39b;
  border-radius: 28px;
  box-shadow: 0 9px 0 #e9a56d, 0 16px 30px #8d57301c;
}

ul::before {
  content: "🐷   🐦";
  display: block;
  margin: 0 0 1rem;
  font-size: 2rem;
}

li + li {
  margin-top: 0.8rem;
}

a {
  display: block;
  padding: 0.85rem 1.2rem;
  color: white;
  background: var(--orange);
  border: 3px solid #e66d3c;
  border-radius: 18px;
  box-shadow: 0 5px 0 #bd5733;
  font-size: 1.2rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

a[href*="map"]::before {
  content: "🗺️ ";
}

a[href*="tuto"]::before {
  content: "📖 ";
}

a:hover {
  background: var(--coral);
  box-shadow: 0 2px 0 #bd5733;
  transform: translateY(3px) scale(1.02);
}

a:focus-visible {
  outline: 4px solid var(--green);
  outline-offset: 4px;
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
