/* ==========================================================
                          VARS
   ========================================================== */
:root {
  --creme: #fff7e8;        /* fond de la page */
  --blanc: #fffdf8;        /* fond de la grande carte */
  --jaune: #ffb84d;        /* jaune d'œuf */
  --jaune-clair: #ffe0a8;  /* version douce du jaune */
  --brun: #6b3a1d;         /* contours et texte */
  --brun-doux: #8a5c3d;    /* textes secondaires */
}

* { box-sizing: border-box; }

@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--creme) url("assets/fond.svg");
  background-size: 300px;
  color: var(--brun);
  font-family: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  line-height: 1.7;
}

.page {
  width: 100%;
  max-width: 36rem;
  text-align: center;
}

/* ----- Title ----- */
.titre {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.titre h1 {
  margin: 0;
  font-size: clamp(1.15rem, 4.5vw, 1.6rem);
  font-weight: 800;
  line-height: 1.2;
}

.deco {
  width: clamp(2.8rem, 12vw, 4.2rem);
  height: auto;
  flex-shrink: 0;
}

/* ----- Card ----- */
.mot {
  padding: 1.5rem 1.4rem 1.6rem;
  background: var(--creme);
  border: 3px solid var(--brun);
  border-radius: 26px;
  box-shadow: 0 5px 0 var(--jaune-clair);
  transform: rotate(-0.6deg); /* un tout petit air de travers, fait main */
}

.date {
  display: inline-block;
  margin: 0;
  padding: 0.1rem 0.9rem;
  background: var(--jaune-clair);
  border: 2px solid var(--brun);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brun);
}

h2 {
  margin: 0.75rem 0 0.75rem;
  font-size: 1.6rem;
  line-height: 1.3;
}

.texte {
  font-size: 1.1rem;
  text-align: center;
}

/* ----- Buttons ----- */
nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.bouton {
  padding: 0.6rem 1.4rem;
  background: var(--jaune);
  border: 3px solid var(--brun);
  border-radius: 999px;
  color: var(--brun);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--brun);
  transition: transform 0.15s, box-shadow 0.15s;
}

.bouton:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--brun);
}

.bouton:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--brun);
}

.precedent { margin-left: auto; }

.bouton.inactif {
  background: #f1e8d6;
  border-color: #c9b9a3;
  color: #c9b9a3;
  box-shadow: 0 4px 0 #c9b9a3;
}

.sous-titre {
  margin: 0 0 1.75rem;
  text-align: center;
  font-size: 1.05rem;
  color: var(--brun-doux);
}

footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--brun-doux);
}

footer p { margin: 0; }

footer p::after {
  content: " ♥";
  color: var(--jaune);
}

/* Animation */



@keyframes apparition {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}

.mot {
  animation: apparition 0.6s ease-out;
}

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

/* L'œuf penche à gauche, le pain à droite, et ils se balancent doucement */
.deco:first-child { transform: rotate(-8deg); animation: balance-gauche 4s ease-in-out infinite; }
.deco:last-child  { transform: rotate(8deg);  animation: balance-droite 4s ease-in-out infinite; }

@keyframes balance-gauche {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(-3deg) translateY(-3px); }
}
@keyframes balance-droite {
  0%, 100% { transform: rotate(8deg); }
  50%      { transform: rotate(3deg) translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .deco { animation: none !important; }
}