/* Site public d'Ahoj! (ahoj.world) : mêmes couleurs que l'app (rouge broderie, bois de Čičmany, ciel des Tatras). */
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url(/polices/baloo-800.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 700; font-display: swap; src: url(/polices/baloo-700.woff2) format("woff2"); }
@font-face { font-family: "Andika"; font-weight: 700; font-display: swap; src: url(/polices/andika-700.woff2) format("woff2"); }

:root {
  --fond: #EAF4FF; --carte: #fff; --encre: #1B2636; --doux: #5A6779; --ligne: #D5DEE8;
  --rouge: #C8233A; --rouge-ombre: #8E1828; --bois: #4A3222; --ciel: #2470C2; --prairie: #2E8B4E; --soleil: #F5C542;
  --titre: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --mot: Andika, "Baloo 2", system-ui, sans-serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 17px/1.6 var(--texte); }
img, svg { max-width: 100%; }
a { color: var(--ciel); }
:focus-visible { outline: 3px solid var(--ciel); outline-offset: 2px; }
.page { max-width: 1060px; margin: 0 auto; padding-inline: max(18px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-right)); }
h1, h2, h3 { font-family: var(--titre); line-height: 1.1; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.4vw, 42px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0; }
.sk { font-family: var(--mot); font-weight: 700; }
.etiquette { font: 700 13px/1 var(--texte); letter-spacing: .12em; text-transform: uppercase; color: var(--rouge); }

/* En-tête */
.entete { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--rouge); font: 800 30px/1 var(--titre); }
.marque b { color: var(--encre); }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 18px;
  font: 800 18px/1 var(--titre); text-decoration: none; color: #fff; background: var(--prairie); box-shadow: 0 5px 0 #1F6B39; }
.bouton:hover { filter: brightness(1.05); }
.bouton.secondaire { background: #fff; color: var(--encre); box-shadow: 0 5px 0 var(--ligne); }
.bouton.petit { min-height: 44px; padding: 0 16px; font-size: 16px; }

/* Héros */
.heros { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-block: 28px 44px; }
.heros h1 { font-size: clamp(42px, 7vw, 76px); font-weight: 800; }
.heros h1 em { font-style: normal; color: var(--rouge); }
.heros .accroche { font-size: 20px; color: var(--doux); margin-top: 16px; max-width: 34ch; }
.heros .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.heros .note { font-size: 14px; color: var(--doux); margin-top: 14px; }
.scene { position: relative; background: #fff; border-radius: 32px; padding: 26px; box-shadow: 0 6px 0 rgba(27,38,54,.06); }
.scene .mot { font: 700 54px/1 var(--mot); text-align: center; margin-top: 6px; }
.scene .syll { text-align: center; color: var(--doux); font: 400 20px var(--mot); letter-spacing: .06em; }
.scene .syll b { color: var(--rouge); }
.scene .fr { text-align: center; color: var(--doux); font-size: 15px; }
.scene .hoji { position: absolute; left: -22px; bottom: -22px; width: 104px; }
.scene .bulle { position: absolute; right: -12px; top: -16px; background: var(--soleil); color: var(--bois); border-radius: 16px; padding: 8px 14px; font: 800 17px var(--titre); transform: rotate(4deg); }

/* Frise de Čičmany */
.frise { height: 40px; background-color: var(--bois);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23F7F1E8' stroke-width='2.2'%3E%3Cpath d='M0 20 L10 10 L20 20 L30 10 L40 20'/%3E%3Cpath d='M0 30 L10 20 L20 30 L30 20 L40 30' opacity='.55'/%3E%3C/g%3E%3Crect x='17' y='2' width='6' height='6' transform='rotate(45 20 5)' fill='%23F7F1E8'/%3E%3C/svg%3E"); }

/* Sections */
section { padding-block: 56px; }
section > .page { display: flex; flex-direction: column; gap: 26px; }
.intro { display: flex; flex-direction: column; gap: 10px; max-width: 62ch; }
.intro p { color: var(--doux); font-size: 18px; }
.grille { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.carte { background: var(--carte); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 4px 0 rgba(27,38,54,.05); }
.carte p { color: var(--doux); font-size: 16px; }
.carte .icone { font-size: 34px; line-height: 1; }
.etapes { counter-reset: e; }
.etapes .carte h3::before { counter-increment: e; content: counter(e) " · "; color: var(--rouge); }

/* Régions */
.regions { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.region { border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 4px 0 rgba(27,38,54,.05); }
.region .bande { padding: 14px 18px; color: #fff; font: 700 22px var(--mot); }
.region ul { margin: 0; padding: 14px 18px 18px 34px; color: var(--doux); font-size: 15.5px; display: flex; flex-direction: column; gap: 3px; }

/* Parents */
.parents { background: #fff; }
.parents .grille .carte { background: var(--fond); box-shadow: none; }

/* Questions */
details { background: #fff; border-radius: 18px; padding: 16px 20px; box-shadow: 0 3px 0 rgba(27,38,54,.05); }
details + details { margin-top: 10px; }
summary { cursor: pointer; font: 700 19px var(--titre); }
details p { color: var(--doux); margin-top: 8px; }

/* Appel final et pied */
.final { text-align: center; }
.final .page { align-items: center; }
footer { display: block; border-top: 1px solid var(--ligne); padding-block: 26px 40px; color: var(--doux); font-size: 14px; }
footer .page { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Pages de texte (confidentialité, mentions) */
.texte { max-width: 72ch; padding-block: 24px 56px; display: flex; flex-direction: column; gap: 14px; }
.texte h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; }
.texte h2 { font-size: 26px; margin-top: 18px; }
.texte p, .texte li { color: #33404f; }
.texte ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.texte table { border-collapse: collapse; width: 100%; font-size: 15px; background: #fff; border-radius: 12px; overflow: hidden; }
.texte th, .texte td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.a-completer { background: #FFF3D1; border-radius: 8px; padding: 2px 6px; }

@media (max-width: 780px) {
  .heros { grid-template-columns: 1fr; }
  .scene { margin: 10px 14px 18px; }
  .entete .bouton { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .scene .hoji { animation: saute 2.2s ease-in-out infinite; }
  @keyframes saute { 50% { transform: translateY(-8px); } }
}
