/* Album layouts share the illustrations and controls used by the adventure. */
:root {
  --paper: #fffdf6;
  --ink: #243e33;
  --forest: #294c3d;
  --line: #d9cdb2;
}
body {
  background: radial-gradient(ellipse at 12% 5%, #f8edcf 0, transparent 40%),
    linear-gradient(155deg, #edf1e6, #f6efdf 65%, #e3e9db);
  color: var(--ink);
  min-height: 100vh;
}
header { max-width: 1060px; padding-block: 18px; }
main { max-width: 1000px; padding-inline: 24px; }
header .brand { font-size: 34px; letter-spacing: -.055em; }
header > div { background: #fffaf080; border: 1px solid #dbd6c5; padding: 3px; border-radius: 50px; }
header > div button { border-radius: 30px; min-height: 44px; }
header button.alt:hover { background: #dfe9d8; }
.home-welcome {
  padding: 8px 8px 20px !important;
  background: transparent !important;
  border: 0;
  box-shadow: none;
  min-height: 116px;
}
.home-welcome:after { display: none; }
.home-welcome h1 { font-size: clamp(28px, 4vw, 40px); }
.home-welcome p { font-size: 16px; }
.home-welcome .illustrated-mascot { height: 115px; width: 110px; }
.immersive-card { position: relative; min-height: 510px; border: 1px solid #bca77a; border-radius: 28px; }
.immersive-card .painted-cover {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  border-radius: 0 !important;
}
.immersive-card .painted-cover img { object-position: center 40%; }
.immersive-card .painted-cover:after {
  height: 100%;
  background: linear-gradient(0deg, #122e26ed 0, #153a2b9c 34%, transparent 75%);
}
.immersive-card .mission-content {
  position: relative;
  z-index: 1;
  min-height: 510px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 40px !important;
  color: #fffdf3;
}
.immersive-card .mission-content .eyebrow {
  background: none;
  color: #ffe6af;
  border-radius: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  max-width: 36ch;
}
.immersive-card .mission-content h2 {
  font-size: clamp(32px, 5vw, 50px);
  margin: 10px 0;
  max-width: 16ch;
  text-shadow: 0 2px 12px #123326;
}
.immersive-card .book-author { color: #f2ead7; font-size: 15px; margin-bottom: 24px; }
.immersive-card button.full {
  width: auto;
  min-width: 245px;
  background: #f7e4b0;
  color: #263e31;
  box-shadow: 0 4px 0 #c1a66b, 0 8px 24px #0f251b50;
}
.immersive-card button.full:hover { background: #fff1cb; }
.illustrated-journey {
  margin-top: 22px;
  padding: 26px 22px;
  background: #fffcf0ad;
  border: 1px solid #ddd3b8;
  border-radius: 22px;
}
.illustrated-journey .journey-stop { font-size: 13px; line-height: 1.3; }
.illustrated-journey .journey-path { gap: 8px; }
.activity-page {
  position: relative;
  padding: 28px;
  border-radius: 26px;
  border: 1px solid #d3c6a9;
  background: var(--paper);
  overflow: hidden;
}
.activity-page > .eyebrow { display: inline-block; font-size: 13px; color: #6e5835; letter-spacing: .06em; }
.activity-page .step-counter { float: right; margin: 0; font-size: 14px; }
.activity-page > .track { clear: both; margin: 14px 0 22px; gap: 7px; }
.activity-page .track span { height: 6px; }
.activity-page .activity-scene { margin: 0; border-radius: 18px 18px 0 0; }
.activity-page .activity-scene img { height: clamp(155px, 24vw, 235px); }
.activity-page > .mission-guide {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  padding: 12px 16px;
  background: #eaf0df;
  border-radius: 18px;
}
.activity-workspace {
  padding: 24px;
  border: 1px solid #e0d6bf;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #fffef9;
}
.activity-workspace h2 { margin-top: 4px; font-size: clamp(25px, 4vw, 34px); line-height: 1.25; }
.activity-workspace .eyebrow { font-size: 13px; }
.activity-workspace .answers { gap: 14px; margin: 24px 0; }
.activity-workspace .answers button {
  background: #fffefa;
  border: 1px solid #c9cfb6;
  border-left: 5px solid #8ba477;
  box-shadow: 0 3px 0 #e0e4d2;
  border-radius: 13px;
  font-weight: 500;
  padding: 18px 22px;
}
.activity-workspace .answers button:disabled { opacity: 1; color: #53684f; background: #f0f2e9; box-shadow: none; }
.activity-workspace .evidence button { border-left-width: 5px; font-size: 19px; }
.activity-workspace #response { padding: 18px 20px; background: #eef3e5; border-radius: 16px; margin: 20px 0; }
.activity-workspace #response button { min-height: 48px; background: var(--forest); border: 0; min-width: 150px; }
.activity-workspace #value { margin: 8px 0 12px; }
.activity-workspace #skip { display: block; margin: 20px auto 0; border: 0; color: #5f7058; font-size: 14px; }
.activity-workspace .feedback:empty { min-height: 0; margin: 0; }
.activity-page[data-response="success"] .feedback:not(:empty) {
  color: #24472e;
  background: #e4efdc;
  border: 1px solid #a5bf8f;
  box-shadow: inset 4px 0 0 #6c9855;
}
.activity-page[data-response="retry"] .feedback:not(:empty) {
  color: #634c28;
  background: #faf0d8;
  border-color: #d7c197;
}
.reader .activity-workspace { border: 0; padding: 0; background: none; }
.reader .chapter-heading { border-color: #d6c5a1; }
.reader .story { max-width: 60ch; font-size: clamp(20px, 2.4vw, 24px); line-height: 1.85; }
.reader .literary-art { aspect-ratio: 2.25; object-position: center 38%; margin: 24px 0; }
.reader .intro { color: #4e654a; font-size: 17px; }
.reader > .mission-guide { margin-bottom: 8px; }
.reader .activity-workspace > small { display: block; padding: 16px 0; font-size: 14px; }
.completion-page { padding: 0; overflow: hidden; border-radius: 26px; }
.completion-page .painted-cover { margin: 0; aspect-ratio: 2.1; border-radius: 0 !important; }
.completion-content { padding: 28px 32px 32px; }
.completion-content .cover { padding: 20px; background: #edf2e4; border: 1px solid #d3dec6; }
.completion-content .hero { align-items: flex-start; }
.completion-content .hero .illustrated-mascot { width: 120px; height: 140px; margin-top: -65px; background: #fffdf3; border-radius: 50%; border: 5px solid #fffdf3; }
footer { font-size: 13px; padding: 30px 16px; }
@media (min-width: 760px) {
  .activity-page:not(.reader) .mission-guide .guide-avatar { width: 100px; height: 112px; }
  .activity-page:not(.reader) .guide-bubble { font-size: 17px; }
  .activity-workspace { padding: 30px 38px; }
}
@media (max-width: 600px) {
  header { padding: 10px 16px; }
  header .brand { font-size: 30px; }
  main { padding: 0 12px 20px; }
  .home-welcome { min-height: 100px; gap: 6px; padding: 4px 4px 14px !important; }
  .home-welcome h1 { font-size: 28px; }
  .home-welcome p { font-size: 14px; }
  .home-welcome .illustrated-mascot { width: 85px; height: 100px; }
  .immersive-card, .immersive-card .mission-content { min-height: 420px; }
  .immersive-card { border-radius: 22px; }
  .immersive-card .mission-content { padding: 24px !important; }
  .immersive-card .mission-content h2 { font-size: 35px; }
  .immersive-card .mission-content .eyebrow { font-size: 12px; }
  .immersive-card button.full { width: 100%; min-width: 0; }
  .illustrated-journey { padding: 20px 10px; margin-top: 18px; }
  .illustrated-journey .journey-heading { padding: 0 5px; }
  .illustrated-journey .journey-path { gap: 3px; }
  .illustrated-journey .journey-stop { font-size: 11px; }
  .activity-page { padding: 18px 14px; border-radius: 20px; }
  .activity-page > .eyebrow { font-size: 11px; max-width: 65%; }
  .activity-page .step-counter { font-size: 12px; margin-top: 1px; }
  .activity-page > .mission-guide { padding: 8px; margin-bottom: 14px; }
  .activity-page .guide-avatar { width: 65px; min-width: 65px; height: 80px; }
  .activity-page .guide-bubble { margin-top: 5px; padding: 9px 10px; line-height: 1.4; }
  .activity-page .activity-scene img { height: 145px; }
  .activity-workspace { padding: 20px 15px; }
  .activity-workspace .answers button { font-size: 17px; padding: 16px 14px; }
  .activity-workspace .evidence button { font-size: 18px; padding: 14px; }
  .activity-workspace #response { padding: 14px; }
  .activity-workspace #response button { width: 100%; }
  .reader .activity-workspace { padding-inline: 4px; }
  .reader .literary-art { aspect-ratio: 1.7; border-width: 3px; }
  .reader .story { font-size: 21px; line-height: 1.8; }
  .completion-content { padding: 24px 20px; }
  .completion-content .hero .illustrated-mascot { width: 95px; height: 110px; margin-top: -55px; }
}
@media (prefers-reduced-motion: no-preference) {
  .immersive-card .painted-cover img { animation: album-reveal .7s ease-out both; }
  .activity-workspace { animation: workspace-reveal .25s ease-out; }
  @keyframes album-reveal { from { transform: scale(1.035); opacity: .7; } to { transform: scale(1); opacity: 1; } }
  @keyframes workspace-reveal { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: none; } }
}
header button.brand { font-size: 34px; }
body:has(.reader) header > div { visibility: hidden; }
.activity-page .painted-scene img { object-position: center 18%; }
.activity-page .companion-scene { background: linear-gradient(120deg, #f5e5bf, #e1ebd5); }
.activity-page .companion-scene img { object-fit: contain; height: 155px; padding: 12px; }
.activity-page .companion-scene:after { display: none; }
.activity-page .companion-scene figcaption { color: #355343; text-shadow: none; }
@media(max-width:600px) {
  header button.brand { font-size: 30px; }
  .activity-page .companion-scene img { height: 125px; }
}

/* Accueil explicite, disponible à chaque étape du carnet. */
header { flex-wrap: wrap; gap: 8px; }
header > .brand { margin-right: auto; font-size: 30px; }
header button.home-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #bccbb2;
  border-radius: 24px;
  background: #fffdf3;
  color: #294c3d;
  font-size: 15px;
  font-weight: 650;
}
header .home-button > span { font-size: 24px; line-height: 1; }
header button.home-button:hover { background: #e4eddb; }
header button.home-button:focus-visible { outline: 3px solid #a5652e; outline-offset: 3px; }
body:has(.reader) header > div { display: none; }
@media(max-width:600px) {
  header > .brand { font-size: 27px; }
  header button.home-button { padding: 8px 10px; font-size: 14px; }
  header > div { gap: 0; padding: 1px; }
}
@media(max-width:360px) {
  header > div { flex-basis: 100%; justify-content: flex-end; border: 0; background: none; }
}
