/* ============ Polices auto-hébergées ============ */

/* Patrick Hand — 400 */
@font-face {
  font-family: 'Patrick Hand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/patrick-hand-400-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Patrick Hand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/patrick-hand-400-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Patrick Hand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/patrick-hand-400-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;
}

/* Shantell Sans — variable, 400 à 800 */
@font-face {
  font-family: 'Shantell Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/shantell-sans-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Shantell Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/shantell-sans-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Shantell Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/shantell-sans-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Shantell Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/shantell-sans-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Shantell Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/shantell-sans-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;
}

/* ============ Base ============ */

html, body { margin: 0; padding: 0; background: #FBF3E2; }

/* ============ Animations ============ */

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes wave { 0%,100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(5deg) scaleX(.97); } }
@keyframes tilt { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes swaySign { 0%,100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes twinkle { 0%,100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes coinE { 0% { transform: translate(0,0); opacity: 0; } 12% { opacity: 1; } 50% { transform: translate(105px,-34px); } 88% { opacity: 1; } 100% { transform: translate(210px,0); opacity: 0; } }
@keyframes coinW { 0% { transform: translate(0,0); opacity: 0; } 12% { opacity: 1; } 50% { transform: translate(-105px,-34px); } 88% { opacity: 1; } 100% { transform: translate(-210px,0); opacity: 0; } }
@keyframes flyAway { 0% { transform: translate(0,0) rotate(0deg); opacity: 1; } 100% { transform: translate(110px,-95px) rotate(18deg); opacity: 0; } }
@keyframes priceA { 0%,42% { opacity: 1; } 52%,100% { opacity: 0; } }
@keyframes priceB { 0%,42% { opacity: 0; } 52%,100% { opacity: 1; } }
@keyframes pulseArrow { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes bounceDown { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

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

/* ============ Quiz ============ */

.quiz-card {
  background: #FFF9EC;
  border: 3px solid #3B2314;
  border-radius: 14px 8px 16px 6px;
  box-shadow: 6px 6px 0 rgba(59,35,20,.14);
  padding: 20px;
}
.quiz-question {
  font-weight: 700;
  font-size: 21px;
  line-height: 1.3;
}
.quiz-options {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}
.quiz-btn {
  display: block;
  width: 100%;
  text-align: left;
  font-family: 'Patrick Hand', cursive;
  font-size: 19px;
  line-height: 1.3;
  padding: 10px 14px;
  border: 2.5px solid #3B2314;
  border-radius: 14px 6px 12px 6px;
  background: #FFFDF5;
  color: #3B2314;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(59,35,20,.12);
}
.quiz-btn:disabled { cursor: default; }
.quiz-btn.is-correct { background: #DDEBD2; border-color: #2F6B3A; }
.quiz-btn.is-wrong { background: #F6D7C8; border-color: #C8501E; }
.quiz-btn.is-dim { opacity: .55; }
.quiz-exp {
  margin-top: 12px;
  padding: 10px 14px;
  font-family: 'Patrick Hand', cursive;
  font-size: 18px;
  line-height: 1.4;
  border-radius: 10px;
  color: #3B2314;
}
.quiz-exp.is-ok { border: 2.5px dashed #2F6B3A; background: rgba(47,107,58,.08); }
.quiz-exp.is-ko { border: 2.5px dashed #C8501E; background: rgba(200,80,30,.08); }
.quiz-score-card {
  margin-top: 26px;
  background: #E8B93B;
  border: 3px solid #3B2314;
  border-radius: 14px 6px 14px 6px;
  box-shadow: 6px 6px 0 rgba(59,35,20,.18);
  padding: 20px;
  text-align: center;
}
.quiz-score-title { font-weight: 800; font-size: 30px; }
.quiz-score-msg {
  font-family: 'Patrick Hand', cursive;
  font-size: 21px;
  margin-top: 4px;
}
.quiz-reset {
  margin-top: 14px;
  font-family: 'Patrick Hand', cursive;
  font-size: 19px;
  background: #FBF3E2;
  color: #3B2314;
  border: 3px solid #3B2314;
  border-radius: 999px;
  padding: 8px 22px;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(59,35,20,.2);
}

/* ============ Étoiles (chapitre 8) ============ */

.star {
  position: absolute;
  border-radius: 50%;
  background: #E8B93B;
}
