/* TagAnimo — feuille de style du mini-site.
   Une seule lumière : celle d'une fin de jour dans la savane, reprise de
   l'habillage du jeu. Toutes les couleurs sont peintes explicitement. */

:root {
  --ciel-haut: #FBE3C4;
  --ciel: #F0A860;
  --ciel-bas: #C9702A;
  --terre: #2E1A01;
  --terre-fond: #150B00;
  --encre: #2A1405;
  --encre-douce: #6B4522;
  --creme: #F6E7CF;
  --creme-douce: #C9AC85;
  --or-clair: #FFE9A8;
  --or: #F0A02A;
  --or-fonce: #C2680C;
  --trait: #D8B183;
  --vert: #3F6B36;
  --rouge: #A33A2A;

  --titre: "Fraunces", Georgia, "Times New Roman", serif;
  --texte: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  --jeu: "Comic Neue", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ciel-haut);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

.mesure {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.mesure-large { max-width: 66rem; }

/* Sur un écran d'ordinateur, une colonne de texte seule laisse deux marges
   vides. Plutôt que d'étirer les lignes — au-delà de 75 signes elles se
   lisent mal — on met les blocs côte à côte : c'est la mise en page qui
   occupe la largeur, pas la typographie. */
@media (min-width: 60rem) {
  .duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    align-items: start;
  }

  .duo > .carte { margin-top: 0; }
}

/* ------------------------------------------------------------- ouverture */

.ouverture {
  background: linear-gradient(180deg,
    var(--ciel-haut) 0%, #F7C98F 38%, var(--ciel) 70%, var(--ciel-bas) 100%);
  padding: clamp(2.5rem, 8vw, 5rem) 0 0;
  overflow: hidden;
}

.surtitre {
  font-family: var(--jeu);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--or-fonce);
  margin: 0 0 0.9rem;
}

h1 {
  font-family: var(--titre);
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: clamp(2.6rem, 10vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}

.chapeau {
  font-family: var(--titre);
  font-weight: 400;
  font-size: clamp(1.15rem, 3.4vw, 1.5rem);
  line-height: 1.4;
  color: #5A3210;
  margin: 0;
  text-wrap: balance;
}

/* L'horizon reprend la composition du jeu : ciel, ligne de terre, silhouettes. */
.horizon {
  position: relative;
  margin-top: clamp(2.5rem, 8vw, 5rem);
  height: clamp(10rem, 28vw, 17rem);
}

.horizon .sol {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 26%;
  background: linear-gradient(180deg, var(--terre) 0%, var(--terre-fond) 100%);
}

.horizon img { position: absolute; bottom: 26%; display: block; }
.horizon .arbre { left: 3%; width: clamp(6.5rem, 18vw, 11rem); }
.horizon .enfants { right: 3%; width: clamp(12rem, 44vw, 25rem); }

/* -------------------------------------------------------------- sections */

.clair { background: var(--ciel-haut); padding: clamp(2.75rem, 7vw, 4.5rem) 0; }

.sombre {
  /* Le brun profond arrive vite : sur l'orange d'origine, un texte clair
     n'avait pas de contraste suffisant pour se lire confortablement. */
  background: linear-gradient(180deg, #A4571A 0%, #6B3208 22%, var(--terre) 55%,
                              var(--terre-fond) 100%);
  color: var(--creme);
  padding: clamp(2.75rem, 8vw, 4.5rem) 0;
}

.sombre h2 { color: var(--or-clair); }
.sombre p { color: var(--creme); }
.sombre .mention { color: var(--creme-douce); }
.sombre strong { color: #FFF6E6; font-weight: 700; }

section + section { margin-top: clamp(2.5rem, 6vw, 3.5rem); }

h2 {
  font-family: var(--titre);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}

h3 {
  font-family: var(--titre);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
}

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--or-fonce); text-underline-offset: 3px; }
a:hover { color: var(--encre); }
a:focus-visible { outline: 2px solid var(--or-fonce); outline-offset: 3px; }
.sombre a { color: var(--or-clair); }
.sombre a:hover { color: #fff; }
.sombre a:focus-visible { outline-color: var(--or-clair); }

.exergue {
  font-family: var(--titre);
  font-weight: 400;
  font-size: clamp(1.2rem, 3.6vw, 1.45rem);
  line-height: 1.45;
  color: var(--or-fonce);
  border-left: 3px solid var(--or);
  padding-left: 1.25rem;
  margin: 2rem 0;
}

/* --------------------------------------------------------- les lettres */

.lettres {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2.5vw, 1.4rem);
  margin: 0 0 2rem;
}

.lettres img {
  width: clamp(3.2rem, 11vw, 5rem);
  display: block;
  animation: flotte 5s ease-in-out infinite;
}

.lettres img:nth-child(2) { animation-delay: -1s; }
.lettres img:nth-child(3) { animation-delay: -2s; }
.lettres img:nth-child(4) { animation-delay: -3s; }
.lettres img:nth-child(5) { animation-delay: -4s; }

@keyframes flotte {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-0.55rem); }
}

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

.question-jeu {
  font-family: var(--jeu);
  font-weight: 700;
  color: var(--or-clair);
  font-size: clamp(1.3rem, 4.4vw, 1.9rem);
  line-height: 1.3;
  text-align: center;
  margin: 0 0 1.75rem;
}

.animaux {
  font-family: var(--titre);
  font-size: clamp(1.05rem, 3.2vw, 1.25rem);
  line-height: 1.9;
  color: var(--encre-douce);
  margin: 1.5rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--trait);
  border-bottom: 1px solid var(--trait);
}

/* ---------------------------------------------------------- les écrans */

.ecrans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.ecrans figure { margin: 0; }

.ecrans img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(42, 20, 5, 0.18);
  box-shadow: 0 10px 28px rgba(42, 20, 5, 0.16);
  display: block;
}

.ecrans figcaption {
  font-size: 0.92rem;
  color: var(--encre-douce);
  margin-top: 0.7rem;
  text-align: center;
}

/* ------------------------------------------------------- les trois pages */

.pages { display: grid; gap: 1.4rem; margin-top: 1.5rem; }

.pages > div {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0 1rem;
  align-items: start;
}

.pages .compte {
  font-family: var(--jeu);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--or-fonce);
}

.pages p { margin: 0; color: var(--encre-douce); }

/* -------------------------------------------------------- le formulaire */

.carte {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--trait);
  border-radius: 14px;
  padding: clamp(1.25rem, 4vw, 2rem);
  margin-top: 1.75rem;
  color: var(--encre);
}

.sombre .carte h3 { color: var(--encre); }
.sombre .carte p { color: var(--encre-douce); }
.sombre .carte strong { color: var(--encre); font-weight: 600; }
.carte h3 { color: var(--encre); }
.carte p { color: var(--encre-douce); }

.champ { margin-bottom: 1.15rem; }

.champ label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--encre);
}

.champ .aide {
  display: block;
  font-size: 0.86rem;
  color: var(--encre-douce);
  font-weight: 400;
  margin-top: -0.15rem;
  margin-bottom: 0.4rem;
  line-height: 1.45;
}

.champ input {
  width: 100%;
  font-family: var(--texte);
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--trait);
  border-radius: 8px;
  background: #fff;
  color: var(--encre);
}

.champ input:focus {
  outline: 2px solid var(--or);
  outline-offset: 1px;
  border-color: var(--or);
}

/* Piège à robots : invisible pour un humain, rempli par les automates. */
.piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button {
  font-family: var(--titre);
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(180deg, var(--or) 0%, var(--or-fonce) 100%);
  border: 1px solid var(--or-fonce);
  border-radius: 999px;
  padding: 0.7rem 1.9rem;
  cursor: pointer;
}

button:hover { filter: brightness(1.06); }
button:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }

.mention {
  font-size: 0.86rem;
  color: var(--encre-douce);
  margin-top: 1rem;
  line-height: 1.55;
}

.alerte {
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alerte-ok { background: rgba(63, 107, 54, 0.12); border: 1px solid var(--vert); color: #2C4A26; }
.alerte-non { background: rgba(163, 58, 42, 0.1); border: 1px solid var(--rouge); color: #7A2A1E; }

/* ------------------------------------------------------------- clôture */

.signature {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(246, 231, 207, 0.18);
  font-size: 0.92rem;
  color: rgba(201, 172, 133, 0.85);
}

.signature p { color: inherit; margin: 0 0 0.4rem; }

/* ------------------------------------------------------------ tableau */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  margin-top: 1.25rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.8rem 0.6rem 0;
  border-bottom: 1px solid var(--trait);
  vertical-align: top;
}

th {
  font-family: var(--titre);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--encre-douce);
}

.tableau-defile { overflow-x: auto; }
