/* ====== Design joyeux & chaleureux ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fdf6ec;
  --bg-soft: #fffdf8;
  --ink: #33261a;
  --ink-dim: #8a7a66;
  --coral: #ff6b5e;
  --sun: #ffb347;
  --teal: #2ec4b6;
  --gold: #e8a33d;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Segoe UI', 'Trebuchet MS', Verdana, sans-serif;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ---------- Intro / générique ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(160deg, #ff9a56 0%, #ff6b5e 45%, #c86bfa 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
/* confettis décoratifs */
.intro::before, .intro::after {
  content: "";
  position: absolute;
  width: 140vmax; height: 140vmax;
  border-radius: 50%;
  opacity: .25;
}
.intro::before {
  background: radial-gradient(circle, #ffd166 0%, transparent 60%);
  top: -60%; left: -40%;
  animation: floaty 14s ease-in-out infinite;
}
.intro::after {
  background: radial-gradient(circle, #2ec4b6 0%, transparent 60%);
  bottom: -70%; right: -40%;
  animation: floaty 18s ease-in-out infinite reverse;
}
@keyframes floaty {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(4%, -4%) scale(1.08); }
}
.intro-bars { position: absolute; left: 0; right: 0; height: 8vh; background: #2b2118; z-index: 2; }
.intro-bars.top { top: 0; }
.intro-bars.bottom { bottom: 0; }
.intro-content { position: relative; z-index: 1; }
.intro-studio {
  letter-spacing: .45em;
  text-transform: uppercase;
  font-size: .8rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
  margin-bottom: 1.4rem;
}
.intro-title {
  font-size: clamp(4rem, 15vw, 10rem);
  font-weight: 900;
  letter-spacing: .05em;
  color: #fff;
  text-shadow: 0 6px 0 rgba(0,0,0,.12), 0 12px 30px rgba(0,0,0,.25);
  transform: rotate(-3deg);
}
.intro-sub {
  margin-top: 1rem;
  font-style: italic;
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.2);
}

.start-btn {
  position: relative;
  z-index: 3;
  margin-top: 3rem;
  background: #fff;
  border: none;
  border-radius: 999px;
  color: var(--coral);
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .08em;
  padding: 1rem 2.4rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .25s, box-shadow .25s;
}
.start-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 32px rgba(0,0,0,.3);
}
.start-btn:active { transform: translateY(-1px); }

/* ---------- Épreuve d'accès ---------- */
.challenge {
  position: fixed;
  inset: 0;
  z-index: 90;
  background:
    radial-gradient(circle at 20% 20%, rgba(46,196,182,.15), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,107,94,.15), transparent 50%),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.challenge-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-soft);
  border-radius: 24px;
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  padding: 2.4rem 2rem;
  text-align: center;
  position: relative;
}
.challenge-kicker {
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .75rem;
  color: var(--coral);
  margin-bottom: 1.4rem;
}
.quiz-title { font-size: 1.35rem; font-weight: 800; margin-bottom: .6rem; }
.quiz-hint { color: var(--ink-dim); font-size: .95rem; line-height: 1.5; margin-bottom: 1.4rem; }
.quiz-hint small { opacity: .75; }
#q1, .quiz-input {
  width: 100%;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  font-family: inherit;
  font-size: 1.15rem;
  letter-spacing: .2em;
  text-align: center;
  padding: .85rem 1rem;
  margin-bottom: 1rem;
}
#q1:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255,107,94,.15); }
.quiz-btn {
  width: 100%;
  background: var(--coral);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: .9rem;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.quiz-btn:hover { background: #ff5142; transform: translateY(-2px); }
.quiz-options { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1rem; }
.quiz-option {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  font-family: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: .85rem;
  cursor: pointer;
  transition: all .2s;
}
.quiz-option:hover {
  background: var(--sun);
  transform: translateX(4px);
}
.quiz-error { color: #d64545; margin-top: .9rem; font-weight: 600; font-size: .9rem; }
.challenge-quit {
  margin-top: 1.4rem;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-family: inherit;
  font-size: .85rem;
  cursor: pointer;
  text-decoration: underline;
}
.challenge-quit:hover { color: var(--ink); }

/* ---------- Barre de progression ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: .6rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(rgba(253,246,236,.95), transparent);
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: #ead9bd;
  border-radius: 999px;
  overflow: hidden;
}
#progressFill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--coral), var(--sun));
  border-radius: 999px;
  transition: width .2s linear;
}
#chapterLabel {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}

/* ---------- Film ---------- */
.film { padding-bottom: 6rem; }

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,179,71,.35), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(46,196,182,.3), transparent 45%),
    linear-gradient(180deg, #fff3dd 0%, var(--bg) 100%);
}
.hero-kicker {
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .8rem;
  font-weight: 700;
  color: var(--coral);
  margin-bottom: 1.4rem;
}
.hero h1 {
  font-size: clamp(4rem, 14vw, 11rem);
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 4px 4px 0 var(--sun);
  transform: rotate(-2deg);
}
.hero-sub { margin-top: 1.4rem; font-style: italic; color: var(--ink-dim); font-size: 1.1rem; }
.hero-dates {
  margin-top: 2.2rem;
  padding: .6rem 1.4rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero-cta {
  margin-top: 2.5rem;
  color: var(--ink-dim);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  animation: bounce 2s ease-in-out infinite;
}
.hero-cta:hover { color: var(--coral); }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* ---------- Sommaire ---------- */
.chapters {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding: .9rem 1.2rem;
  background: rgba(253,246,236,.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(51,38,26,.08);
  scrollbar-width: none;
}
.chapters::-webkit-scrollbar { display: none; }
.chapter-tab {
  flex: 0 0 auto;
  position: relative;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .55rem 1.1rem .55rem .8rem;
  cursor: pointer;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
  box-shadow: 3px 3px 0 rgba(51,38,26,.15);
}
.chapter-tab .tab-num {
  display: inline-block;
  margin-right: .55rem;
  color: var(--coral);
  font-size: .65rem;
}
.chapter-tab:nth-child(3n+1):hover { background: var(--coral); color: #fff; transform: translateY(-3px) rotate(-1deg); box-shadow: 3px 6px 0 rgba(255,107,94,.4); }
.chapter-tab:nth-child(3n+2):hover { background: var(--sun); color: var(--ink); transform: translateY(-3px) rotate(1deg); box-shadow: 3px 6px 0 rgba(255,179,71,.4); }
.chapter-tab:nth-child(3n+0):hover { background: var(--teal); color: #fff; transform: translateY(-3px); box-shadow: 3px 6px 0 rgba(46,196,182,.4); }
.chapter-tab.active {
  background: var(--ink);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 4px 6px 0 var(--gold);
}
.chapter-tab.active .tab-num { color: var(--sun); }

/* ---------- Chapitres ---------- */
.chapter {
  padding: 5rem 1.2rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.chapter-title {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: .02em;
  margin-bottom: .8rem;
  text-align: center;
  color: var(--ink);
}
.chapter-comment {
  font-style: italic;
  color: var(--ink-dim);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
  line-height: 1.65;
  font-size: 1.02rem;
}

.media-list { display: flex; flex-direction: column; gap: 4.5rem; align-items: center; }
.media-item { position: relative; width: 100%; display: flex; justify-content: center; }
.media-item figure {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 18px;
  border: 3px solid #fff;
  box-shadow: 0 16px 40px rgba(51,38,26,.18), 0 0 0 2px var(--ink);
  background: #fff;
  padding: 6px;
}
.media-item img, .media-item video {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  border-radius: 12px;
  filter: sepia(.15) contrast(1.04) saturate(1.05) brightness(1.02);
}

/* grain de pellicule très léger */
.media-item figure::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 12px;
  pointer-events: none;
  z-index: 3;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .5s steps(4) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-4%, 3%); }
  50%  { transform: translate(3%, -4%); }
  75%  { transform: translate(-2%, -2%); }
  100% { transform: translate(4%, 2%); }
}

/* légère vignette chaude */
.media-item figure::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 12px;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(120,70,20,.12) 100%);
}

.media-item figcaption {
  margin-top: 1.1rem;
  text-align: center;
  color: var(--ink-dim);
  font-style: italic;
  font-size: .95rem;
  background: #fff;
  display: inline-block;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  border: 1.5px dashed var(--ink-dim);
}

.fade-in { animation: fadeIn .8s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(24px) rotate(.5deg); }
  to   { opacity: 1; transform: translateY(0) rotate(0); }
}

/* ---------- Fin ---------- */
.end {
  text-align: center;
  padding: 8rem 2rem 10rem;
  background: linear-gradient(180deg, var(--bg) 0%, #ffe9c9 100%);
}
.end-line {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: .05em;
  color: var(--ink);
}
.end-sub {
  margin-top: 1.2rem;
  font-style: italic;
  color: var(--ink-dim);
  font-size: 1.1rem;
}

@media (max-width: 600px) {
  .progress { padding: .5rem .8rem; }
  .chapter { padding: 4rem 1rem 1.5rem; }
  .challenge-card { box-shadow: 5px 5px 0 var(--ink); padding: 1.8rem 1.4rem; }
}

/* ====== Séquence "piratage" ====== */
.hack {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: #020604;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  overflow: hidden;
}
.hack-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 2px,
    rgba(0,255,120,.04) 3px, rgba(0,255,120,.04) 4px
  );
  animation: scanmove 8s linear infinite;
}
@keyframes scanmove {
  from { background-position: 0 0; }
  to   { background-position: 0 100px; }
}
.hack-screen {
  position: relative;
  width: min(680px, 90vw);
  text-align: center;
}
.hack-title-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 2.5rem;
}
.hack-title {
  position: relative;
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: .12em;
  color: #39ff88;
  text-shadow: 0 0 18px rgba(57,255,136,.6);
  animation: glitchtext .3s steps(2) infinite;
}
.hack-glitch {
  position: absolute;
  inset: 0;
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: .12em;
  pointer-events: none;
}
.hack-g1 {
  color: #ff3b6b;
  animation: glitchshift1 .4s steps(3) infinite;
}
.hack-g2 {
  color: #38c8ff;
  animation: glitchshift2 .35s steps(3) infinite;
}
@keyframes glitchtext {
  0%, 90%, 100% { transform: translate(0, 0) skewX(0); }
  91% { transform: translate(-3px, 2px) skewX(-4deg); }
  94% { transform: translate(3px, -1px) skewX(3deg); }
  97% { transform: translate(-2px, 0); }
}
@keyframes glitchshift1 {
  0%, 85%, 100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
  86% { transform: translate(-6px, 2px); clip-path: inset(10% 0 55% 0); }
  90% { transform: translate(5px, -2px); clip-path: inset(60% 0 10% 0); }
  94% { transform: translate(-4px, 1px); clip-path: inset(30% 0 30% 0); }
}
@keyframes glitchshift2 {
  0%, 80%, 100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
  82% { transform: translate(6px, -1px); clip-path: inset(50% 0 20% 0); }
  88% { transform: translate(-5px, 2px); clip-path: inset(5% 0 70% 0); }
  93% { transform: translate(4px, -2px); clip-path: inset(40% 0 40% 0); }
}
.hack-log {
  min-height: 7rem;
  font-size: .95rem;
  color: #39ff88;
  text-shadow: 0 0 8px rgba(57,255,136,.5);
  line-height: 1.9;
}
.hack-line { animation: hacklinein .3s ease both; }
@keyframes hacklinein {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.hack-progress {
  margin-top: 1.2rem;
  height: 8px;
  background: #0a2b18;
  border: 1px solid #39ff88;
  border-radius: 999px;
  overflow: hidden;
}
#hackFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #39ff88, #7CFFB2);
  box-shadow: 0 0 12px #39ff88;
  transition: width .9s ease;
}

/* ====== Glitch d'ouverture du film ====== */
.film-glitch-in {
  animation: filmglitch .9s steps(6) 1;
}
@keyframes filmglitch {
  0%   { transform: translate(0, 0) skewX(0); filter: none; }
  15%  { transform: translate(-14px, 6px) skewX(-3deg); filter: hue-rotate(90deg) saturate(3); }
  30%  { transform: translate(12px, -8px) skewX(2deg); filter: hue-rotate(-60deg) saturate(4); }
  45%  { transform: translate(-8px, 4px) skewX(-1deg); filter: hue-rotate(180deg) saturate(2); }
  60%  { transform: translate(6px, -3px); filter: hue-rotate(40deg) saturate(3); }
  80%  { transform: translate(-3px, 2px); filter: hue-rotate(-20deg); }
  100% { transform: translate(0, 0) skewX(0); filter: none; }
}

/* ====== Enveloppe interactive ====== */
.envelope-wrap {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.envelope-hint {
  font-size: .85rem;
  color: var(--ink-dim);
  letter-spacing: .05em;
  animation: hintpulse 2.5s ease-in-out infinite;
}
@keyframes hintpulse {
  0%, 100% { opacity: .6; }
  50%      { opacity: 1; }
}
.envelope-caption {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0;
  transition: opacity .4s;
}
.envelope-wrap:hover .envelope-caption { opacity: 1; }

.envelope {
  position: relative;
  width: 300px;
  height: 200px;
  overflow: hidden;
  perspective: 900px;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  outline: none;
}
.envelope.open { overflow: visible; cursor: default; }
.envelope:hover {
  transform: translateY(-10px) scale(1.05) rotate(-2deg);
}
.envelope:active { transform: translateY(-6px) scale(1.02); }
.envelope.open:hover { transform: none; }
.envelope:focus-visible { outline: 3px dashed var(--coral); outline-offset: 6px; border-radius: 8px; }

.env-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e8b04b 0%, #d99a33 100%);
  border-radius: 10px;
  border: 3px solid #b97c22;
  box-shadow: 0 14px 30px rgba(51,38,26,.25);
}
.env-body::before,
.env-body::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  background: #d99a33;
}
.env-body::before {
  left: 0;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.env-body::after {
  right: 0;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  background: #c98a2c;
}

.env-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(180deg, #f0c169, #e0a63f);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 10px 10px 0 0;
  transform-origin: top center;
  transition: transform .6s cubic-bezier(.34,1.2,.64,1);
  z-index: 4;
  backface-visibility: hidden;
}

.env-letter {
  position: absolute;
  left: 7%; right: 7%;
  top: 10px;
  height: 600px;
  background: #fffdf5;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  padding: 1.6rem 1.5rem;
  z-index: 3;
  transform: translateY(105%);
  transition: transform .9s cubic-bezier(.34,1.25,.64,1) .2s;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-dim) transparent;
}
.env-letter::-webkit-scrollbar { width: 6px; }
.env-letter::-webkit-scrollbar-thumb { background: var(--ink-dim); border-radius: 3px; }
.letter-text {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: .82rem;
  line-height: 1.6;
  color: #4a3a28;
  text-align: left;
}

.env-seal {
  position: absolute;
  top: 42%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: var(--coral);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 5;
  box-shadow: 0 3px 8px rgba(0,0,0,.25);
  transition: opacity .3s, transform .3s;
}

.envelope.open .env-flap {
  transform: rotateX(180deg);
  z-index: 1;
}
.envelope.open .env-letter {
  transform: translateY(-78%);
  z-index: 6;
}
.envelope.open .env-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.5);
}
.envelope.open .env-body { box-shadow: 0 18px 40px rgba(51,38,26,.3); }

@media (max-width: 600px) {
  .envelope { width: 260px; height: 175px; }
  .letter-text { font-size: .78rem; padding: 1.1rem; }
}

/* ====== Choix de l'appareil ====== */
.device {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: linear-gradient(160deg, #ff9a56 0%, #ff6b5e 45%, #c86bfa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.device-card {
  background: var(--bg-soft);
  border: 2px solid var(--ink);
  border-radius: 24px;
  box-shadow: 10px 10px 0 var(--ink);
  padding: 2.6rem 2.2rem;
  text-align: center;
  max-width: 420px;
}
.device-title { font-size: 1.8rem; font-weight: 900; margin-bottom: .5rem; }
.device-sub { color: var(--ink-dim); font-style: italic; margin-bottom: 1.8rem; }
.device-options { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.device-btn {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  padding: .9rem 1.5rem;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.device-btn:hover {
  background: var(--sun);
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 4px 8px 0 var(--ink);
}
.device-btn:nth-child(2):hover { background: var(--teal); color: #fff; }

/* ====== Adaptation mobile ====== */
body[data-device="mobile"] .hero h1 {
  font-size: clamp(3rem, 16vw, 5rem);
}
body[data-device="mobile"] .chapter { padding: 4rem 1rem 1.5rem; }
body[data-device="mobile"] .media-item img,
body[data-device="mobile"] .media-item video { max-height: 62vh; }
body[data-device="mobile"] .envelope { width: 260px; height: 175px; }
body[data-device="mobile"] .letter-text { font-size: .78rem; padding: 1.1rem; }
body[data-device="mobile"] .end { padding: 6rem 1.5rem 8rem; }
body[data-device="mobile"] .chapter-title { font-size: 1.6rem; }
body[data-device="mobile"] .start-btn { font-size: .85rem; padding: .85rem 2rem; }

/* ====== Bouton musique flottant ====== */
.music-toggle {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 200;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(51,38,26,.2);
  transition: transform .25s, background .25s;
}
.music-toggle:hover { transform: scale(1.12) rotate(-8deg); background: var(--sun); }
.music-toggle.muted { background: #eee; opacity: .75; }
</content>
</invoke></content>
</invoke> </file_sep> </invoke>