:root {
  --papier: #f2e8d2; --papier-2: #e9dcbf; --encre: #2f281d; --encre-douce: #6b5d47;
  --vert-pin: #2f5a3c; --vert-pin-clair: #4f7d5a; --rouge-tampon: #a3261f;
  --serif: "Lora", Georgia, serif; --titre: "Playfair Display", Georgia, serif;
  --main: "Caveat", "Segoe Print", cursive; --machine: "Special Elite", "Courier New", monospace;
  --grain: 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--encre); font: 17px/1.7 var(--serif);
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(255, 196, 120, .16), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 2px, transparent 2px 140px),
    linear-gradient(180deg, #2a2017, #17110b 60%, #0e0a07);
  background-attachment: fixed; min-height: 100vh;
}
a { color: inherit; }
:focus-visible { outline: 2px dashed #e0b96a; outline-offset: 3px; }

/* Barre hors RP, discrète */
.hrp { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 40; display: flex; justify-content: space-between; pointer-events: none; }
.hrp a { pointer-events: auto; font: 600 13px/1 system-ui, sans-serif; color: #e8dcc4; text-decoration: none; padding: 9px 13px; border-radius: 8px; background: rgba(14, 10, 7, .7); border: 1px solid rgba(232, 220, 196, .15); backdrop-filter: blur(6px); opacity: .75; transition: opacity .2s; }
.hrp a:hover { opacity: 1; }

.table { max-width: 820px; margin: 0 auto; padding: 84px 18px 120px; }

/* Feuilles de papier */
.feuille {
  position: relative; background: var(--grain), linear-gradient(180deg, var(--papier), var(--papier-2));
  padding: clamp(28px, 6vw, 64px); margin: 0 0 42px; border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 18px 40px rgba(0,0,0,.45), 0 3px 8px rgba(0,0,0,.3);
  transform: rotate(var(--r, 0deg));
}
.feuille:nth-of-type(odd) { --r: -.35deg; }
.feuille:nth-of-type(even) { --r: .3deg; }
.feuille::after { /* bord jauni */ content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(120, 85, 30, .18); border-radius: 3px; }
.pli { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, rgba(80,60,30,.18), transparent); }

h1, h2, h3 { font-family: var(--titre); line-height: 1.15; margin: 0; }
h2 { font-size: clamp(26px, 4vw, 34px); color: var(--vert-pin); margin-bottom: 18px; }
h2::after { content: ""; display: block; width: 46px; height: 2px; margin-top: 12px; background: var(--vert-pin); opacity: .5; }
p { margin: 0 0 14px; }
.lettrine::first-letter { float: left; font: 800 62px/0.8 var(--titre); color: var(--vert-pin); padding: 8px 10px 0 0; }
.italique { font-style: italic; color: var(--encre-douce); }
blockquote { margin: 18px 0; padding: 0 0 0 18px; border-left: 2px solid rgba(47, 90, 60, .45); font-style: italic; color: var(--encre-douce); }

/* Couverture */
.couverture { text-align: center; padding-top: clamp(44px, 8vw, 80px); padding-bottom: clamp(44px, 8vw, 80px); background: var(--grain), radial-gradient(ellipse at 50% 35%, #3d6b4a, #23432e 75%); color: #f2e8d2; }
.couverture::after { box-shadow: inset 0 0 90px rgba(0,0,0,.35); }
.couverture .bord { position: absolute; inset: 14px; border: 1.5px solid rgba(242, 232, 210, .45); border-radius: 2px; pointer-events: none; }
.couverture .petit { font: 600 13px/1 var(--serif); letter-spacing: .35em; text-transform: uppercase; opacity: .85; }
.couverture h1 { font-size: clamp(40px, 8vw, 72px); font-weight: 800; margin: 18px 0 6px; letter-spacing: .01em; }
.couverture h1 em { display: block; font: italic 600 .45em/1.3 var(--titre); letter-spacing: .02em; opacity: .9; }
.couverture .sous { font-style: italic; opacity: .9; margin: 0; }
.couverture svg { width: min(320px, 80%); height: auto; margin: 26px auto 22px; display: block; }
.couverture .saison { display: inline-block; margin-top: 8px; padding: 8px 18px; border: 1px solid rgba(242,232,210,.5); font: 600 12px/1 var(--serif); letter-spacing: .25em; text-transform: uppercase; }

/* Encadré infos pratiques */
.infos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin-top: 26px; padding: 20px 22px; border: 1.5px dashed rgba(47, 90, 60, .45); border-radius: 4px; background: rgba(255,255,255,.25); }
.infos h3 { grid-column: 1 / -1; font-size: 18px; color: var(--vert-pin); }
.infos div { font-size: 15px; }
.infos b { display: block; font-family: var(--titre); color: var(--encre); }

/* Frise */
.frise { list-style: none; padding: 0; margin: 10px 0 0; position: relative; }
.frise::before { content: ""; position: absolute; left: 104px; top: 6px; bottom: 6px; width: 2px; background: repeating-linear-gradient(180deg, rgba(47,90,60,.5) 0 6px, transparent 6px 11px); }
.frise li { display: grid; grid-template-columns: 92px 1fr; gap: 26px; padding: 8px 0; position: relative; }
.frise li::before { content: ""; position: absolute; left: 99px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--papier); border: 2px solid var(--vert-pin); }
.frise .an { font: 800 17px/1.6 var(--titre); color: var(--vert-pin); text-align: right; padding-right: 10px; }
.frise .an.flou { font-size: 13px; line-height: 1.9; }
.carte { margin: 30px -8px 0; }
.carte svg { width: 100%; height: auto; display: block; }
.legende { text-align: center; font: italic 14px/1.4 var(--serif); color: var(--encre-douce); margin-top: 8px; }

/* Rapport interne : feuille dactylographiée glissée dans le livret */
.rapport {
  font: 15.5px/1.75 var(--machine); background: var(--grain), #f7f4ec; color: #222;
  --r: 1.6deg !important; margin-left: 4%; margin-right: -2%;
}
.rapport .trombone { position: absolute; top: -18px; left: 38px; width: 26px; height: 70px; border: 3px solid #8d949a; border-radius: 13px; border-bottom-color: transparent; transform: rotate(-6deg); }
.rapport .trombone::after { content: ""; position: absolute; left: 4px; top: 8px; width: 12px; height: 44px; border: 3px solid #8d949a; border-radius: 8px; border-top-color: transparent; }
.rapport h2 { font: 400 22px/1.3 var(--machine); color: #222; text-transform: uppercase; letter-spacing: .06em; }
.rapport h2::after { background: #222; width: 100%; height: 1px; opacity: .6; }
.rapport .ligne b { font-weight: 400; text-transform: uppercase; letter-spacing: .04em; }
.noirci { background: #141414; color: transparent; border-radius: 1px; padding: 0 4px; user-select: none; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.tampon {
  position: absolute; top: 34px; right: 26px; transform: rotate(-11deg);
  font: 700 15px/1.2 var(--machine); letter-spacing: .12em; text-transform: uppercase; text-align: center;
  color: var(--rouge-tampon); border: 3px double var(--rouge-tampon); padding: 8px 12px; opacity: .78; mix-blend-mode: multiply;
}
.barre { text-decoration: line-through; text-decoration-thickness: 2px; }
.ajout-main { font: 600 22px/1.2 var(--main); color: #1f3d8a; display: inline-block; transform: rotate(-2deg); }

/* Paroles du feu : bouts de papier */
.paroles { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
.parole { padding: 18px 18px 14px; background: #fbf6e9; box-shadow: 0 6px 14px rgba(60,40,10,.18); transform: rotate(var(--p, -1deg)); }
.parole:nth-child(2n) { --p: 1.2deg; } .parole:nth-child(3n) { --p: -.4deg; }
.parole q { display: block; font: 600 23px/1.25 var(--main); color: #2b2b2b; quotes: "« " " »"; }
.parole span { display: block; margin-top: 10px; font-size: 13.5px; font-style: italic; color: var(--encre-douce); }
.parole.large { grid-column: 1 / -1; }

/* Panneau du sentier */
.panneau-zone { display: flex; justify-content: center; margin: 26px 0 8px; }
.panneau { position: relative; width: min(360px, 100%); padding: 22px 20px 20px; text-align: center; background: #d7c39a; border: 4px solid #6e5534; border-radius: 4px; box-shadow: 0 10px 24px rgba(0,0,0,.25); font-family: var(--titre); transform: rotate(-1.5deg);
  background-image: repeating-linear-gradient(0deg, rgba(110,85,52,.12) 0 2px, transparent 2px 18px); }
.panneau::before, .panneau::after { content: ""; position: absolute; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: #4a3a24; }
.panneau::before { left: 8px; } .panneau::after { right: 8px; }
.panneau b { display: block; font-size: 26px; font-weight: 800; color: #8c1f17; letter-spacing: .04em; }
.panneau span { display: block; font: 600 14px/1.4 var(--serif); margin-top: 6px; text-transform: uppercase; letter-spacing: .08em; }
.panneau small { display: block; margin-top: 10px; font: italic 13px var(--serif); }
.griffes { position: absolute; right: 18px; bottom: -6px; width: 64px; opacity: .55; }

/* Mot du directeur */
.signature { font: 600 38px/1 var(--main); color: #213f73; margin: 22px 0 4px; transform: rotate(-3deg); display: inline-block; }
.fonction { font-size: 14px; color: var(--encre-douce); font-style: italic; }

/* Objet trouvé : le carnet */
.trouve { text-align: center; padding: 30px 10px 0; color: #e9dcc0; }
.trouve .etiquette { display: inline-block; font: 600 12px/1 system-ui, sans-serif; letter-spacing: .3em; text-transform: uppercase; opacity: .65; }
.trouve h2 { color: #f0e3c6; margin: 12px 0 10px; } .trouve h2::after { margin: 12px auto 0; background: #e0b96a; }
.trouve p { max-width: 520px; margin: 0 auto 26px; color: #cdbf9f; font-style: italic; }
.carnet-ferme {
  position: relative; width: 230px; height: 310px; margin: 0 auto; border: 0; cursor: pointer; border-radius: 6px 14px 14px 6px;
  background: var(--grain), radial-gradient(ellipse at 40% 30%, #6b4a2c, #3b2615 80%);
  box-shadow: inset 10px 0 0 rgba(0,0,0,.25), inset -2px 0 0 rgba(255,255,255,.06), 0 24px 40px rgba(0,0,0,.55);
  transform: rotate(-4deg); transition: transform .3s;
}
.carnet-ferme:hover { transform: rotate(-2deg) translateY(-6px) scale(1.02); }
.carnet-ferme .elastique { position: absolute; top: 0; bottom: 0; right: 30px; width: 7px; background: #20140b; }
.carnet-ferme .etiq { position: absolute; top: 60px; left: 34px; right: 52px; padding: 12px 8px; background: #efe3c7; transform: rotate(1.5deg); font: 600 24px/1.1 var(--main); color: #2c2c2c; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.carnet-ferme .etiq small { display: block; font-size: 18px; color: #555; }
.carnet-ferme .tache { position: absolute; bottom: 40px; left: 50px; width: 70px; height: 70px; border-radius: 50%; border: 6px solid rgba(20, 10, 4, .25); filter: blur(1px); }
.ouvrir { display: inline-block; margin-top: 26px; font: 600 14px/1 system-ui, sans-serif; color: #e0b96a; letter-spacing: .05em; }

/* Lecteur du carnet */
.lecteur { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 5, 3, .86); backdrop-filter: blur(3px); }
.lecteur.ouvert { display: flex; }
.livre { position: relative; display: flex; width: min(980px, 100%); aspect-ratio: 1.45; max-height: calc(100vh - 110px); perspective: 2000px; }
.page {
  position: relative; flex: 1; padding: clamp(22px, 4vw, 44px) clamp(20px, 3.5vw, 40px); overflow: hidden;
  background: var(--grain), repeating-linear-gradient(180deg, transparent 0 33px, rgba(70, 110, 160, .22) 33px 34px), #efe6cf;
  background-position: 0 0, 0 22px, 0 0;
  font: 400 clamp(19px, 2.2vw, 24px)/34px var(--main); color: #26231d;
  box-shadow: inset 0 0 40px rgba(120, 85, 30, .2);
}
.page.gauche { border-radius: 6px 0 0 6px; box-shadow: inset -24px 0 30px -18px rgba(0,0,0,.35), inset 0 0 40px rgba(120,85,30,.2); }
.page.droite { border-radius: 0 6px 6px 0; box-shadow: inset 24px 0 30px -18px rgba(0,0,0,.35), inset 0 0 40px rgba(120,85,30,.2); }
.page .date { display: block; font-weight: 600; color: #4a3b26; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.page p { margin: 0 0 34px; }
.page .tremble { display: inline-block; transform: rotate(-1.5deg); font-weight: 600; }
.page .rature { text-decoration: line-through; text-decoration-color: #26231d; text-decoration-thickness: 2px; }
.page .num { position: absolute; bottom: 14px; font: 15px var(--main); color: #8a7a60; }
.page.gauche .num { left: 24px; } .page.droite .num { right: 24px; }
.page .tache-cafe { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 9px solid rgba(110, 70, 30, .16); filter: blur(1.2px); pointer-events: none; }
.page.garde { display: flex; flex-direction: column; justify-content: center; text-align: center; background: var(--grain), #efe6cf; }
.page.garde .nom { font-size: 1.6em; font-weight: 600; line-height: 1.3; }
.page.arrachee { background: var(--grain), #efe6cf; }
.page.arrachee::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30px; background: #efe6cf;
  clip-path: polygon(0 0, 100% 0, 60% 3%, 100% 6%, 50% 9%, 90% 12%, 40% 16%, 85% 19%, 55% 23%, 100% 27%, 45% 31%, 80% 35%, 50% 40%, 95% 44%, 40% 48%, 85% 53%, 55% 57%, 100% 61%, 45% 66%, 80% 70%, 50% 75%, 95% 79%, 40% 84%, 85% 88%, 55% 93%, 100% 97%, 0 100%); }
.page.arrachee .vide-texte { position: absolute; inset: 0; display: grid; place-items: center; padding: 40px; text-align: center; font: italic 15px/1.5 var(--serif); color: #8a7a60; }
.tourner { position: absolute; inset: 0; transform-origin: left center; transition: transform .6s cubic-bezier(.4,.1,.2,1); backface-visibility: hidden; }
.commandes { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; }
.commandes button, .fermer { font: 600 14px/1 system-ui, sans-serif; color: #f0e3c6; background: rgba(40, 28, 18, .9); border: 1px solid rgba(240,227,198,.25); border-radius: 8px; padding: 11px 16px; cursor: pointer; }
.commandes button:disabled { opacity: .35; cursor: default; }
.commandes .pos { align-self: center; color: #cdbf9f; font: 14px system-ui, sans-serif; min-width: 70px; text-align: center; }
.fermer { position: absolute; top: 16px; right: 16px; }
.anim-g { animation: tourne-g .45s ease; } .anim-d { animation: tourne-d .45s ease; }
@keyframes tourne-d { from { opacity: .2; transform: rotateY(-35deg); transform-origin: left; } to { opacity: 1; transform: none; } }
@keyframes tourne-g { from { opacity: .2; transform: rotateY(35deg); transform-origin: right; } to { opacity: 1; transform: none; } }

.fin-livret { text-align: center; color: #9c8c6c; font-style: italic; font-size: 14px; margin-top: 60px; }

@media (max-width: 720px) {
  .infos, .paroles { grid-template-columns: 1fr; }
  .rapport { margin-left: 0; margin-right: 0; }
  .tampon { position: static; display: inline-block; margin-bottom: 16px; }
  .livre { aspect-ratio: auto; height: calc(100vh - 120px); }
  .page.droite { display: none; }
  .page.gauche { border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.tache-a { right: -30px; bottom: 30px; }
.tache-b { left: -40px; top: 60px; }
.visa { margin-top: 22px; }

/* ---------- Protection anti-copie ---------- */
html { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
img, svg { -webkit-user-drag: none; user-drag: none; }
@media print { body { display: none !important; } html::after { content: "L'impression de ce site est désactivée."; display: block; padding: 40px; font: 16px sans-serif; } }
