@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url(/fonts/nunito-sans.woff2) format("woff2"); font-weight: 200 1000; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #FAF6EF; --cream: #F3EBDD; --line: #E4DACA; --ink: #2B2724; --ink-soft: #6E6459;
  --crayon: #E0A400; --crayon-deep: #B98700;
  --image: #F7B500; --video: #E5484D; --threed: #2D6AE3; --audio: #2FA866; --edit: #F2762E; --community: #8A63D2;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  font-family: "Nunito Sans", system-ui, sans-serif; color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(110, 100, 89, .16) 1.2px, transparent 1.5px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.drawing { touch-action: none; }

.strip { display: flex; height: 8px; position: relative; z-index: 2; }
.strip i { flex: 1; }
.strip i:nth-child(1) { background: var(--image); } .strip i:nth-child(2) { background: var(--video); }
.strip i:nth-child(3) { background: var(--threed); } .strip i:nth-child(4) { background: var(--audio); }
.strip i:nth-child(5) { background: var(--edit); } .strip i:nth-child(6) { background: var(--community); }
.strip i:nth-child(7) { background: var(--ink); }

#doodle { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; touch-action: auto; }
body.drawing #doodle { touch-action: none; }

main, footer { position: relative; z-index: 1; pointer-events: none; }
main a, main button, footer a, footer button, .pencil { pointer-events: auto; }

main {
  flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: clamp(22px, 4.5vh, 56px) 20px 10px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}

.brand { margin: 0; display: flex; align-items: center; gap: clamp(10px, 2vw, 18px); font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(56px, 11vw, 104px); letter-spacing: -.03em; line-height: 1; }
.brand img { width: clamp(52px, 8.5vw, 84px); height: auto; transform: rotate(-8deg); animation: bob 5s ease-in-out infinite; }
.tagline { margin: 14px 0 0; font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 500; font-size: clamp(22px, 3.3vw, 32px); }
.lede { margin: 12px 0 0; max-width: 32em; color: var(--ink-soft); font-size: clamp(16px, 1.9vw, 19px); line-height: 1.5; font-weight: 600; }

.tin { position: relative; width: min(600px, 100%); margin: clamp(20px, 3.5vh, 36px) 0 0; }
.tin svg { display: block; width: 100%; height: auto; overflow: visible; }
.lid { transition: transform 1.15s cubic-bezier(.68, -0.45, .27, 1.35), opacity .5s ease .75s; transform-box: view-box; }
.tin.open .lid { transform: translate(620px, -40px) rotate(9deg); opacity: 0; }
.lid-back { opacity: 0; transition: opacity .5s ease .9s; }
.tin.open .lid-back { opacity: 1; }
.lid-word { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 64px; letter-spacing: -1.5px; fill: #8A8175; }
.lid-word-hi { fill: #fff; opacity: .8; }
.lid-small { font-family: "Nunito Sans", sans-serif; font-weight: 800; font-size: 14px; letter-spacing: 3px; fill: #9A9184; text-transform: uppercase; }

.pencil { cursor: pointer; outline: none; transition: transform .5s var(--spring), filter .3s; transform-box: fill-box; }
.pencil:hover, .pencil:focus-visible { transform: translateX(16px); }
.pencil.on { transform: translateX(34px) rotate(-1.5deg); filter: drop-shadow(0 6px 6px rgba(43, 39, 36, .25)); }
.pencil:focus-visible .body { stroke: var(--ink); stroke-width: 2; }
.pencil-label { font-family: "Nunito Sans", sans-serif; font-weight: 900; font-size: 11px; letter-spacing: 2.5px; pointer-events: none; }
.pencil-brand { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 600; font-size: 12.5px; pointer-events: none; }
.tin.open .pencil-slot { animation: wiggle .7s var(--spring) both; }

.pop { position: absolute; right: -58px; top: -18px; width: 96px; height: 96px; pointer-events: none; transform: scale(0) rotate(-25deg); opacity: 0; transition: transform .55s var(--spring), opacity .2s; z-index: 2; }
.pop.show { transform: scale(1) rotate(6deg); opacity: 1; }
.pop img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(43, 39, 36, .22)); }

.hint { margin-top: 10px; font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: 19px; color: var(--ink-soft); }
.hint::before { content: "↑ "; font-style: normal; }

.soon { margin: clamp(16px, 3vh, 30px) 0 0; display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 14px; border: 2px dashed var(--ink); border-radius: 999px; font-weight: 900; font-size: clamp(16px, 2vw, 19px); transform: rotate(-2deg); background: rgba(255, 253, 248, .85); }
.soon img { width: 40px; height: 40px; animation: turn 3.2s ease-in-out infinite; }
.contact { margin: 14px 0 0; color: var(--ink-soft); font-weight: 600; font-size: 16px; }
.contact a, footer a { color: var(--ink); font-weight: 800; text-decoration: underline; text-decoration-style: wavy; text-decoration-color: var(--crayon); text-underline-offset: 4px; }
.contact a:hover, footer a:hover { text-decoration-color: var(--video); }

footer { padding: 14px 20px 18px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; font-size: 14px; color: var(--ink-soft); font-weight: 600; text-align: center; }
footer button { font: inherit; font-weight: 800; color: var(--ink); background: var(--cream); border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: transform .35s var(--spring); }
footer button:hover { transform: scale(1.08) rotate(-3deg); }
footer button:focus-visible, .contact a:focus-visible, footer a:focus-visible { outline: 3px solid var(--crayon); outline-offset: 3px; }
#erase.shake { animation: shake .45s; }

/* mentions légales */
.legal { max-width: 720px; text-align: left; align-items: stretch; }
.legal h1 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(36px, 6vw, 56px); letter-spacing: -.02em; margin: 0 0 8px; }
.legal h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 22px; margin: 30px 0 6px; }
.legal p { margin: 0; line-height: 1.6; font-size: 16.5px; color: var(--ink); background: rgba(250, 246, 239, .9); }
.legal .todo { background: #FCE7A6; border-radius: 4px; padding: 0 4px; font-weight: 800; }
.legal .back { margin-top: 36px; }
main.legal { pointer-events: auto; }
.legal a { color: var(--ink); font-weight: 800; text-decoration: underline; text-decoration-style: wavy; text-decoration-color: var(--crayon); text-underline-offset: 4px; }

@keyframes bob { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-6px); } }
@keyframes turn { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-14deg); } 90% { transform: rotate(10deg); } }
@keyframes wiggle { 0% { transform: translateX(0); } 40% { transform: translateX(12px); } 100% { transform: translateX(0); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-5deg); } }

@media (max-width: 560px) {
  .pop { width: 64px; height: 64px; top: -40px; right: 4px; }
  .hint { font-size: 17px; }
  footer { font-size: 13px; }
}

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