@font-face { font-family: 'Jakarta'; src: url('fonts/PlusJakartaSans-latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('fonts/PlusJakartaSans-latin-ext.woff2') format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0100-024F, U+2000-206F, U+20AC; }
@font-face { font-family: 'Main'; src: url('fonts/Caveat-latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --vert: #12915A; --foret: #0B6B43; --nuit: #0E2A1F;
  --ocre: #E9A422; --soleil: #F6C343; --terre: #C4532D; --indigo: #233B6E;
  --papier: #FBF3E4; --papier2: #F3E6CC; --encre: #1E1A16; --gris: #6A5F52;
  --wax: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Crect width='64' height='64' fill='%230B6B43'/%3E%3Ccircle cx='32' cy='32' r='20' fill='%23E9A422'/%3E%3Ccircle cx='32' cy='32' r='14' fill='%23C4532D'/%3E%3Ccircle cx='32' cy='32' r='8' fill='%23FBF3E4'/%3E%3Ccircle cx='32' cy='32' r='3.5' fill='%23233B6E'/%3E%3Cpath d='M0 0h12L0 12zM64 0v12L52 0zM0 64V52l12 12zM64 64H52l12-12z' fill='%23F6C343'/%3E%3Cpath d='M32 0l5 7h-10zM32 64l-5-7h10zM0 32l7-5v10zM64 32l-7 5V27z' fill='%23FBF3E4'/%3E%3C/svg%3E");
  --kente: repeating-linear-gradient(90deg, var(--foret) 0 18px, var(--ocre) 18px 28px, var(--terre) 28px 44px, var(--soleil) 44px 52px, var(--indigo) 52px 68px, var(--vert) 68px 78px);
  --ombre: 0 10px 30px rgba(30, 26, 22, .16);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Jakarta', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 17px; line-height: 1.55; color: var(--encre); background: var(--papier); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
b { font-weight: 800; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.main { font-family: 'Main', cursive; }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 3px; }

.wax-strip { height: 14px; background: var(--wax) 0 0 / 14px 14px; }
.kente-band { height: 10px; background: var(--kente); }

/* Étiquette de prix */
.etiq { display: inline-flex; align-items: center; gap: 8px; background: var(--soleil); color: var(--encre); font-weight: 800; font-size: 15px; padding: 7px 16px 7px 24px; border-radius: 5px 22px 22px 5px; position: relative; text-decoration: none; box-shadow: 0 4px 0 rgba(0,0,0,.16); white-space: nowrap; }
.etiq::before { content: ''; position: absolute; left: 8px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--papier); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.25); }

/* Boutons */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 18px; color: #fff; background: var(--vert); padding: 17px 22px; border-radius: 14px; text-decoration: none; box-shadow: 0 5px 0 var(--foret); transition: transform .12s, box-shadow .12s, background .2s; }
.btn:hover { background: #10a064; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--foret); }
.btn[disabled] { opacity: .7; cursor: wait; }
.btn.light { background: var(--soleil); color: var(--encre); box-shadow: 0 5px 0 #b98a17; width: auto; display: inline-flex; }

/* En-tête */
.top { background: #fff; border-bottom: 1px solid var(--papier2); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; }
.brand img { height: 58px; width: auto; }
.top-cta { font-size: 14px; transform: rotate(3deg); }
.top-act { display: flex; align-items: center; gap: 14px; }
.lang { font-weight: 800; font-size: 13px; letter-spacing: .04em; text-decoration: none; color: var(--foret); border: 2px solid var(--papier2); border-radius: 8px; padding: 4px 8px; transition: border-color .15s, background .15s; }
.lang:hover { border-color: var(--vert); background: var(--papier); }
.auteur a { text-decoration-color: var(--soleil); text-underline-offset: 3px; }

/* Héros */
.hero { position: relative; overflow: hidden; padding: 30px 0 46px; }
.hero-photo { position: absolute; inset: 0 0 auto; height: 430px; background: url('img/hero.webp') center 28% / cover; }
.hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,42,31,.55), rgba(14,42,31,.82) 70%, var(--papier) 100%); }
.hero-grid { position: relative; display: grid; gap: 28px; }
.hero-txt { color: #fff; }
.kicker { font-size: 26px; color: var(--soleil); line-height: 1.1; }
.kicker.dark { color: var(--terre); }
h1 { font-size: clamp(34px, 8.6vw, 58px); line-height: 1.03; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hl { white-space: nowrap; background: linear-gradient(180deg, transparent 60%, var(--terre) 60% 92%, transparent 92%); padding: 0 4px; }
.lead { font-size: 18.5px; margin-top: 14px; max-width: 560px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.checks { list-style: none; margin-top: 18px; display: grid; gap: 9px; color: var(--encre); }
.checks li { background: rgba(255,255,255,.94); border-radius: 12px; padding: 10px 14px 10px 46px; position: relative; font-size: 16px; box-shadow: 0 3px 10px rgba(0,0,0,.08); max-width: 470px; }
.checks li::before { content: '✓'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; background: var(--vert); color: #fff; font-weight: 800; font-size: 14px; display: grid; place-items: center; }

/* Pile de pages du guide */
.stack { position: relative; height: 330px; margin: 30px auto 0; max-width: 420px; }
.stack .p { position: absolute; width: 205px; top: 0; left: 50%; border-radius: 6px; box-shadow: var(--ombre); }
.stack .p1 { transform: translateX(-50%) rotate(-2deg); z-index: 3; }
.stack .p2 { transform: translateX(-108%) rotate(-9deg) translateY(18px); z-index: 2; }
.stack .p3 { transform: translateX(8%) rotate(8deg) translateY(22px); z-index: 1; }
.sticker { position: absolute; z-index: 4; right: 4%; bottom: 24px; transform: rotate(-7deg); font-size: 17px; }

/* Carte formulaire */
.card { background: #fff; border-radius: 20px; box-shadow: 0 18px 50px rgba(14,42,31,.22); overflow: hidden; }
.kente { height: 12px; background: var(--kente); }
.card-body { padding: 24px 20px 22px; }
.card-kick { font-size: 26px; color: var(--terre); transform: rotate(-3deg); display: inline-block; line-height: 1; }
.card h2 { font-size: 30px; line-height: 1.1; font-weight: 800; margin-top: 2px; }
.card-sub { color: var(--gris); font-size: 15.5px; margin: 6px 0 14px; }
label { display: block; font-weight: 800; font-size: 15px; margin: 14px 0 6px; }
label small { font-weight: 500; color: var(--gris); }
input, select { width: 100%; font: inherit; font-size: 17px; color: var(--encre); background: var(--papier); border: 2px solid var(--papier2); border-radius: 12px; padding: 13px 14px; transition: border-color .15s, background .15s; }
input:focus, select:focus { outline: none; border-color: var(--vert); background: #fff; }
input[aria-invalid='true'], select[aria-invalid='true'] { border-color: var(--terre); background: #fff6f3; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236A5F52' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.tel { display: flex; }
.tel span { display: grid; place-items: center; padding: 0 12px; background: var(--papier2); border-radius: 12px 0 0 12px; font-weight: 800; font-size: 16px; }
.tel input { border-radius: 0 12px 12px 0; }
.two { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; color: var(--gris); margin: 18px 0 4px; cursor: pointer; }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--vert); padding: 0; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { background: #fde9e3; color: #8f2f12; border-radius: 10px; padding: 10px 12px; font-size: 15px; font-weight: 700; margin-top: 14px; }
.card .btn { margin-top: 18px; }
.priv { text-align: center; font-size: 13.5px; color: var(--gris); margin-top: 12px; }

/* Ticket de caisse */
.ticket { background: #fff; font-family: 'Courier New', ui-monospace, monospace; font-size: 15px; line-height: 1.45; padding: 22px 20px 30px; position: relative; box-shadow: var(--ombre);
  -webkit-mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) 0 0 / 18px 100%; mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) 0 0 / 18px 100%; }
.ticket .tt { text-align: center; font-weight: 700; letter-spacing: .06em; border-bottom: 2px dashed #bbb; padding-bottom: 8px; margin-bottom: 10px; }
.ticket .ln { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.ticket .ln.sub { color: #777; font-size: 14px; padding: 0 0 0 10px; }
.ticket .tot { display: flex; justify-content: space-between; border-top: 2px dashed #bbb; margin-top: 10px; padding-top: 10px; font-weight: 700; font-size: 20px; color: var(--terre); }
.ticket .ps { text-align: center; color: #666; font-size: 13.5px; margin-top: 10px; }
.ticket .btn { font-family: 'Jakarta', sans-serif; margin-top: 18px; }

/* Remerciement */
.merci { outline: none; }
.merci .ticket { transform: rotate(-1deg); }
.merci-t { font-size: 36px; text-align: center; color: var(--foret); line-height: 1.1; margin-bottom: 8px; font-family: 'Main', cursive; }
.btn.dl { margin-top: 12px; font-size: 16.5px; }
.btn.dl.alt { background: var(--foret); box-shadow: 0 5px 0 var(--nuit); }
.essai { display: flex; gap: 14px; align-items: center; margin-top: 22px; background: var(--foret); color: #fff; border-radius: 16px; padding: 14px 16px; text-decoration: none; font-size: 15.5px; box-shadow: var(--ombre); }
.essai img { width: 52px; height: 52px; border-radius: 12px; background: #fff; padding: 3px; flex: none; }
.essai b { color: var(--soleil); display: block; }

/* Sections */
section { position: relative; }
.h2 { font-size: clamp(28px, 6vw, 42px); line-height: 1.08; font-weight: 800; letter-spacing: -.015em; margin: 4px 0 24px; }
.fuites { padding: 52px 0; }
.f-grid { display: grid; gap: 18px; }
.f { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 4px 16px rgba(30,26,22,.08); }
.f-img { height: 170px; background-size: cover; background-position: center; position: relative; }
.f-img .etiq { position: absolute; left: 14px; bottom: 12px; transform: rotate(-3deg); }
.f h3 { font-size: 20px; line-height: 1.2; font-weight: 800; padding: 16px 18px 4px; }
.f p { padding: 0 18px 18px; color: var(--gris); font-size: 16px; }
.f-cta { background: var(--foret); color: #fff; text-decoration: none; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 28px 22px; min-height: 180px; position: relative; }
.f-cta::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 22px; background: var(--wax) 0 0 / 22px 22px; }
.f-cta .main { font-size: 26px; color: var(--soleil); line-height: 1; }
.f-cta b { font-size: 22px; line-height: 1.2; padding-right: 22px; }
.f-cta .etiq { align-self: flex-start; margin-top: 6px; }

.dedans { padding: 52px 0 60px; background: var(--papier2); }
.dedans::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: var(--kente); }
.dedans-grid { display: grid; gap: 34px; align-items: center; }
.txt { font-size: 17.5px; max-width: 520px; }
.pages { display: flex; justify-content: center; margin-top: 26px; }
.pages img { width: 34%; border-radius: 6px; box-shadow: var(--ombre); }
.pages img:nth-child(1) { transform: rotate(-6deg) translateY(10px); margin-right: -6%; }
.pages img:nth-child(2) { transform: rotate(1deg); z-index: 1; position: relative; }
.pages img:nth-child(3) { transform: rotate(7deg) translateY(12px); margin-left: -6%; }
.ticket.big { transform: rotate(1.2deg); max-width: 460px; width: 100%; margin-inline: auto; }

.auteur { padding: 56px 0; }
.auteur-in { display: grid; gap: 22px; align-items: center; justify-items: center; text-align: center; }
.auteur img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 5px solid var(--soleil); box-shadow: var(--ombre); }
.auteur .kicker { color: var(--terre); }
.quote { font-family: 'Main', cursive; font-size: 30px; line-height: 1.15; color: var(--foret); margin: 6px 0 12px; }
.auteur-in > div { max-width: 640px; }

.final { background: var(--foret); color: #fff; padding: 56px 0 60px; overflow: hidden; }
.final::before, .final::after { content: ''; position: absolute; top: 0; bottom: 0; width: 26px; background: var(--wax) 0 0 / 26px 26px; }
.final::before { left: 0; } .final::after { right: 0; }
.final-in { text-align: center; display: grid; gap: 24px; justify-items: center; }
.final h2 { font-size: clamp(30px, 6.5vw, 46px); line-height: 1.08; font-weight: 800; max-width: 760px; padding-inline: 18px; }
.hl2 { color: var(--soleil); font-family: 'Main', cursive; font-size: 1.25em; }

.pied { background: var(--nuit); color: #CFE3D8; }
.pied-in { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 30px 0 34px; font-size: 14.5px; }
.pied img { height: 54px; width: auto; background: #fff; border-radius: 10px; padding: 4px 10px; }
.pied a { color: var(--soleil); }
.pied .small { font-size: 13px; color: #9DB8AA; max-width: 620px; }

/* Tablette et ordinateur */
@media (min-width: 560px) {
  .two { grid-template-columns: 1fr 1fr; }
  .card-body { padding: 28px 30px 26px; }
  .f-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  body { font-size: 18px; }
  .brand img { height: 74px; }
  .top-cta { font-size: 16px; }
  .hero { padding: 54px 0 70px; }
  .hero-photo { height: 100%; }
  .hero-photo::after { background: linear-gradient(90deg, rgba(14,42,31,.94) 0%, rgba(14,42,31,.8) 45%, rgba(14,42,31,.35) 100%); }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
  .card-wrap { position: sticky; top: 110px; }
  .stack { margin: 34px 0 0; height: 360px; max-width: 470px; }
  .stack .p { width: 225px; }
  .f-grid { grid-template-columns: repeat(3, 1fr); }
  .dedans-grid { grid-template-columns: 1.1fr .9fr; }
  .auteur-in { grid-template-columns: 200px 1fr; text-align: left; justify-items: start; }
  .auteur img { width: 200px; height: 200px; }
}
/* Animations : légères, et coupées si l'utilisateur réduit les animations */
@keyframes monte { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes surligne { to { background-size: 100% 100%; } }
@keyframes flotte { 50% { translate: 0 -9px; } }
@keyframes secoue { 0%, 86%, 100% { rotate: 0deg; } 89% { rotate: -6deg; } 92% { rotate: 5deg; } 95% { rotate: -3deg; } }
@keyframes defile { to { background-position: 312px 0; } }
@keyframes reflet { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes imprime { from { clip-path: inset(0 0 100% 0); translate: 0 -14px; } to { clip-path: inset(0 0 -20px 0); translate: 0 0; } }

.hero-txt > * { animation: monte .7s cubic-bezier(.2,.7,.3,1) both; }
.hero-txt > :nth-child(2) { animation-delay: .1s; }
.hero-txt > :nth-child(3) { animation-delay: .2s; }
.hero-txt > :nth-child(4) { animation-delay: .3s; }
.hero-txt > :nth-child(5) { animation-delay: .42s; }
.card-wrap { animation: monte .8s .25s cubic-bezier(.2,.7,.3,1) both; }
.hl { background-repeat: no-repeat; background-size: 0% 100%; animation: surligne .7s .75s cubic-bezier(.6,0,.3,1) forwards; }
.stack .p1 { animation: flotte 5s ease-in-out 1.2s infinite; }
.stack .p2, .stack .p3 { transition: translate .45s cubic-bezier(.2,.7,.3,1); }
.stack:hover .p2 { translate: -18px -6px; }
.stack:hover .p3 { translate: 18px -6px; }
.sticker, .top-cta { animation: secoue 5s ease-in-out 2s infinite; }
.kente, .kente-band, .dedans::before { background-size: 312px 100%; animation: defile 18s linear infinite; }
.card .btn, .final .btn { position: relative; overflow: hidden; }
.card .btn::after, .final .btn::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); animation: reflet 4.5s ease-in-out 1.5s infinite; pointer-events: none; }
.f { transition: transform .25s, box-shadow .25s; }
.f:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(30,26,22,.16); }
.essai { transition: transform .2s; }
.essai:hover { transform: translateY(-3px); }
.merci.imprime .ticket { animation: imprime .9s cubic-bezier(.3,.7,.3,1) both; }
.merci.imprime .essai { animation: monte .6s .8s both; }

/* Apparition au défilement (seulement si JavaScript tourne : sinon tout reste visible) */
.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .7s cubic-bezier(.2,.7,.3,1), translate .7s cubic-bezier(.2,.7,.3,1); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.vu { opacity: 1; translate: 0 0; }
.js .ticket.big.reveal { translate: 0 0; transition: opacity .3s; }
.js .ticket.big.reveal.vu { animation: imprime 1.1s cubic-bezier(.3,.7,.3,1) .1s both; }
.js .pages.reveal img { transition: transform .8s cubic-bezier(.2,.7,.3,1) .2s; }
.js .pages.reveal:not(.vu) img { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  *, *::before, *::after { animation: none !important; }
  .hl { background-size: 100% 100%; }
  .js .reveal { opacity: 1; translate: none; clip-path: none; transition: none; }
}
#inscription, #merci { scroll-margin-top: 96px; }
