/* La page d'attente de youpiho.com : les couleurs, les polices et le titre de l'appli (apps/web). */

/* Polices servies par le site lui-même (licence SIL Open Font License), comme dans l'appli. */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/baloo-2-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/baloo-2-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/lilita-one-latin.woff2) format('woff2');
}

:root {
  --bg: #fff8e7;
  --ink: #2b2b2b;
  --soft: #5a5148;
  --green: #4cb944;
  --green-dark: #2f7d32;
  --green-deep: #1f5a22;
  --orange: #ffa62b;
  --card: #ffffff;
  --line: #f0e4c4;
  --cielf: #deeeff;
  --rose: #ffe4f1;
  --jaune: #fff3b8;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Baloo 2', 'Comic Sans MS', system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  word-spacing: 0.1em;
}
img { max-width: 100%; height: auto; }
a { color: var(--green-dark); text-underline-offset: 0.15em; }
a:focus-visible, .bouton:focus-visible { outline: 3px solid #1d6fd1; outline-offset: 3px; }
h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }

.skip { position: absolute; left: 16px; top: -100px; background: var(--card); padding: 8px 16px; border-radius: 12px; z-index: 1; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* En haut : Youpiho qui parle, le titre et le bouton. */
.hero {
  padding: 28px 0 40px;
  background:
    radial-gradient(circle at 12% 18%, var(--jaune) 0 90px, transparent 91px),
    radial-gradient(circle at 92% 8%, var(--rose) 0 70px, transparent 71px),
    radial-gradient(circle at 90% 78%, var(--cielf) 0 100px, transparent 101px);
}
.hero-grid { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.hero-mascotte { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-mascotte img { width: min(56vw, 230px); filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.06)); }
.bulle {
  position: relative; order: -1; max-width: 22rem; background: var(--card); border-radius: 24px; padding: 12px 20px;
  font-size: 1.15rem; font-weight: 700; line-height: 1.35; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
}
/* La pointe de la bulle, vers Youpiho dessous. */
.bulle::after {
  content: ''; position: absolute; left: 50%; bottom: -12px; margin-left: -12px;
  border: 12px solid transparent; border-bottom: 0; border-top-color: var(--card);
}
.hero-texte { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.accroche { font-size: clamp(1.35rem, 4.6vw, 1.9rem); font-weight: 800; line-height: 1.25; max-width: 24ch; }
.pastille {
  display: inline-block; background: var(--orange); color: #3d2600; font-weight: 800; font-size: 1rem;
  padding: 4px 16px; border-radius: 999px; box-shadow: 0 3px 0 #d9771a;
}
.aide { color: var(--soft); font-size: 1rem; max-width: 30rem; }

/* Le gros bouton vert de l'appli, plus foncé pour que le blanc se lise bien. */
.bouton {
  display: inline-block; background: var(--green-dark); color: #fff; text-decoration: none; font-weight: 800;
  font-size: clamp(1.15rem, 4.4vw, 1.4rem); line-height: 1.2; padding: 16px 28px; border-radius: 999px;
  box-shadow: 0 6px 0 var(--green-deep); min-height: 56px; transition: transform 0.1s, box-shadow 0.1s;
}
.bouton:hover { background: #2a7230; }
.bouton:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--green-deep); }

/* Le nom en lettres de dessin animé, comme sur l'écran d'accueil de l'appli (apps/web/src/titre.css). */
.titre {
  display: flex; align-items: flex-end; justify-content: center; margin: 0; padding: 0.05em 0.2em 0.25em;
  font-family: 'Lilita One', 'Baloo 2', sans-serif; font-weight: 400; font-size: clamp(64px, 17vw, 120px); line-height: 1;
}
.titre span {
  display: inline-block; color: var(--c); transform: rotate(var(--r)); transform-origin: 50% 90%;
  text-shadow:
    0.045em 0 0 #fff, -0.045em 0 0 #fff, 0 0.045em 0 #fff, 0 -0.045em 0 #fff,
    0.032em 0.032em 0 #fff, -0.032em 0.032em 0 #fff, 0.032em -0.032em 0 #fff, -0.032em -0.032em 0 #fff,
    0 0.08em 0 var(--d), 0.02em 0.08em 0 var(--d), -0.02em 0.08em 0 var(--d), 0 0.1em 0 var(--d),
    0 0.12em 0 #fff, 0 0.17em 0.12em rgba(80, 50, 0, 0.28);
  animation: hop 4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.11s);
}
.titre span:nth-child(1) { --c: #ff6b4a; --d: #c23a1f; --r: -6deg; --i: 0; }
.titre span:nth-child(2) { --c: #ffb627; --d: #c77a00; --r: 4deg; --i: 1; margin-left: -0.1em; }
.titre span:nth-child(3) { --c: #4cb944; --d: #2a7a24; --r: -3deg; --i: 2; margin-left: -0.03em; }
.titre span:nth-child(4) { --c: #2fb5e8; --d: #147aa3; --r: 5deg; --i: 3; margin-left: -0.07em; }
.titre span:nth-child(5) { --c: #a66cff; --d: #6b37c4; --r: -4deg; --i: 4; margin-left: -0.03em; }
.titre span:nth-child(6) { --c: #ff5fa2; --d: #c22a6a; --r: 3deg; --i: 5; margin-left: -0.02em; }
.titre span:nth-child(7) { --c: #ffb627; --d: #c77a00; --r: -5deg; --i: 6; margin-left: -0.03em; }
@keyframes hop {
  0%, 62%, 100% { transform: translateY(0) rotate(var(--r)) scale(1, 1); }
  68% { transform: translateY(0) rotate(var(--r)) scale(1.1, 0.88); }
  76% { transform: translateY(-0.2em) rotate(calc(var(--r) * -1)) scale(0.94, 1.08); }
  84% { transform: translateY(0) rotate(var(--r)) scale(1.06, 0.94); }
  90% { transform: translateY(0) rotate(var(--r)) scale(0.98, 1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .titre span { animation: none; }
  .bouton { transition: none; }
}

/* Les sections. */
main > .wrap { padding-top: 36px; padding-bottom: 36px; }
main h2 { font-size: clamp(1.6rem, 5.5vw, 2.2rem); font-weight: 800; color: var(--green-deep); margin-bottom: 14px; }
.intro p { max-width: 42rem; }
.intro p + p { margin-top: 12px; }

.classes { display: grid; gap: 16px; }
.classe { border-radius: 28px; padding: 20px 22px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.07); }
.classe-gs { background: var(--jaune); }
.classe-cp { background: var(--cielf); }
.classe-nom { font-family: 'Lilita One', 'Baloo 2', sans-serif; font-size: 1.7rem; line-height: 1.1; margin-bottom: 6px; }
.classe-gs .classe-nom { color: #8a4b00; }
.classe-cp .classe-nom { color: #0f5f80; }

.atouts { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.atout { background: var(--card); border-radius: 24px; padding: 20px 22px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.06); }
.atout-icone { display: block; font-size: 2.4rem; line-height: 1; margin-bottom: 10px; }
.atout h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }

.invitation { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.invitation h2 { margin-bottom: 0; }
.invitation > p { max-width: 36rem; }
main > .wrap.invitation { padding-bottom: 56px; }

/* Le pied de page. Le contact et les mentions légales viendront avec l'ouverture au public. */
.pied { background: #f6ecd2; border-top: 2px solid var(--line); padding: 28px 0 40px; font-size: 1rem; }
.pied-titre { font-size: 1.15rem; font-weight: 800; margin-bottom: 10px; }
.mentions { margin: 0; display: grid; gap: 8px; }
.mentions div { display: grid; gap: 0; }
.mentions dt { font-weight: 800; }
.mentions dd { margin: 0; color: var(--soft); }

/* Tablette et ordinateur : Youpiho à gauche, le texte à droite ; les cartes en colonnes. */
@media (min-width: 720px) {
  body { font-size: 1.2rem; }
  .hero { padding: 48px 0 56px; }
  .bulle { font-size: 1.25rem; }
  .hero-grid { flex-direction: row; justify-content: center; gap: 40px; text-align: left; }
  .hero-texte { align-items: flex-start; }
  .titre { justify-content: flex-start; }
  .hero-mascotte img { width: 280px; }
  .classes { grid-template-columns: 1fr 1fr; }
  .atouts { grid-template-columns: repeat(2, 1fr); }
  .mentions div { grid-template-columns: 15rem 1fr; gap: 16px; }
}
@media (min-width: 1000px) {
  .atouts { grid-template-columns: repeat(3, 1fr); }
}
