/* ==========================================================================
   Accueil : hero 3D, courbe de l'oubli, voyage d'une carte, bento, rangs
   ========================================================================== */

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(2.2rem, 5vw, 4.5rem) 0 clamp(6rem, 11vw, 9.5rem); overflow: clip; }
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); animation: drift 16s ease-in-out infinite alternate; }
.blob--1 { width: 680px; height: 680px; right: -10%; top: -14%; background: radial-gradient(circle, rgba(217, 138, 95, .6), transparent 68%); }
.blob--2 { width: 560px; height: 560px; left: -12%; bottom: -24%; background: radial-gradient(circle, rgba(42, 96, 130, .32), transparent 68%); animation-delay: -5s; }
.blob--3 { width: 380px; height: 380px; left: 36%; top: 26%; background: radial-gradient(circle, rgba(242, 196, 119, .35), transparent 68%); animation-delay: -9s; }
.hero__sparks { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__pill { background: rgba(255, 253, 248, .85); backdrop-filter: blur(8px); box-shadow: var(--shadow-soft); }
.hero__title { font-size: clamp(2.8rem, 7.2vw, 5.8rem); margin: 1.2rem 0 1.4rem; }
.hero__lead { font-size: clamp(1.08rem, 1.6vw, 1.3rem); }
.hero__proof { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; padding: 0; margin: 2rem 0 0; color: var(--ink-2); font-size: .94rem; font-weight: 600; }
.hero__scroll { position: absolute; left: 50%; bottom: 4.6rem; width: 26px; height: 42px; border: 2px solid rgba(31, 41, 51, .3); border-radius: 14px; translate: -50% 0; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--terra); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
  .hero { padding-bottom: 5.5rem; }
}

/* ---------- Scène de cartes 3D ---------- */
.stage { position: relative; width: min(100%, 560px); aspect-ratio: 1 / 1.04; margin-inline: auto; perspective: 1500px; --px: 0; --py: 0; }
.stage__note { position: absolute; z-index: 4; left: 50%; top: 0; translate: -50% 0; margin: 0; padding: .35rem .8rem; border-radius: 999px; background: rgba(255, 253, 248, .94); border: 1px solid var(--border); font-size: .78rem; font-weight: 750; color: var(--ink); white-space: nowrap; }
.stage__controls { margin: .2rem 0 0; text-align: center; }
.stage__flip { font: inherit; font-weight: 750; font-size: .9rem; min-height: 44px; padding: .45rem 1.1rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--paper); color: var(--ink); cursor: pointer; }
.example-note { margin: 1rem 0 0; color: var(--ink-2); font-size: .95rem; max-width: 70ch; }
.stage__glow { position: absolute; inset: 8% 6%; border-radius: 50%; background: radial-gradient(circle, rgba(217, 138, 95, .5), transparent 65%); filter: blur(40px); animation: pulse 5s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .8; } }
.stage__layer { position: absolute; z-index: 3; translate: calc(var(--px) * var(--z, 10) * 1px) calc(var(--py) * var(--z, 10) * 1px); transition: translate .25s linear; }
.deck { position: absolute; z-index: 2; left: 50%; top: 47%; width: min(66%, 340px); aspect-ratio: 4 / 5; translate: -50% -50%; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s var(--ease); }
.fcard { position: absolute; inset: 0; transform-style: preserve-3d; border-radius: 28px; }
.fcard--ghost { background: linear-gradient(160deg, #fffdf8, #f2e8d9); border: 1px solid rgba(31, 41, 51, .1); box-shadow: 0 20px 40px rgba(49, 38, 26, .14); }
.fcard--g1 { transform: translateZ(-30px) rotate(-5deg) translate(-18px, 8px); }
.fcard--g2 { transform: translateZ(-60px) rotate(7deg) translate(22px, 16px); opacity: .75; }
.fcard__inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .85s var(--ease); }
.fcard.is-flipped .fcard__inner { transform: rotateY(180deg); }
.fcard__face {
  position: absolute; inset: 0; display: flex; flex-direction: column; padding: 1.5rem 1.5rem 1.3rem; border-radius: 28px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: linear-gradient(160deg, #fffdf8 0%, #f6ede0 100%); border: 1px solid rgba(31, 41, 51, .12);
  box-shadow: 0 30px 60px rgba(49, 38, 26, .22), inset 0 1px 0 #fff;
}
.fcard__back { transform: rotateY(180deg); background: linear-gradient(170deg, #f3f8fc, #e6eff7); border-color: #b4c9dd; }
.fcard__top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.fcard__top small { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: .7rem; color: var(--muted); }
.fcard__lvl { font-size: .8rem; font-weight: 750; padding: .2em .65em; border-radius: 999px; background: #d9e3ef; color: #23476d; transition: background .4s, color .4s; }
.fcard__lvl[data-n="2"] { background: #d7efe6; color: #1f5b44; }
.fcard__lvl[data-n="3"] { background: #d8ecf7; color: #1e5372; }
.fcard__lvl[data-n="4"] { background: #e6def6; color: #553882; }
.fcard__text { margin: auto 0; font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 2.7vw, 1.8rem); line-height: 1.2; letter-spacing: -.01em; text-align: center; text-wrap: balance; }
.fcard__text .gap { display: inline-block; min-width: 4ch; border-bottom: 3px solid var(--terra-2); text-align: center; color: var(--terra-deep); }
.fcard__hint { text-align: center; font-size: .78rem; color: var(--muted); font-weight: 600; }
.fcard--main.is-entering { animation: cardIn .7s var(--spring) both; }
.fcard--main.is-leaving-ok { animation: cardOutOk .75s var(--ease) forwards; }
.fcard--main.is-leaving-fail { animation: cardShake .6s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) scale(.92) rotate(3deg); } to { opacity: 1; transform: none; } }
@keyframes cardOutOk { to { opacity: 0; transform: translateX(120%) rotate(14deg); } }
@keyframes cardShake { 0%, 100% { transform: none; } 20% { transform: translateX(-14px) rotate(-2deg); } 45% { transform: translateX(12px) rotate(2deg); } 70% { transform: translateX(-7px); } }

.stage__actions { position: absolute; left: 0; right: 0; bottom: -3.6rem; display: flex; justify-content: center; gap: .7rem; transform: translateZ(10px); }
.mini-btn { padding: .6rem 1.1rem; border-radius: 12px; font-weight: 750; font-size: .88rem; color: #fff; transition: transform .25s var(--spring), box-shadow .25s, opacity .3s; opacity: .55; }
.mini-btn--fail { background: linear-gradient(145deg, var(--red), #99373e); }
.mini-btn--ok { background: linear-gradient(145deg, var(--green), #245f46); }
.mini-btn.is-press { transform: scale(1.12); opacity: 1; box-shadow: 0 0 0 6px rgba(255, 255, 255, .55), 0 10px 24px rgba(0, 0, 0, .22); }
.stage.is-flipped .mini-btn { opacity: 1; }

.stage__chip {
  display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem .6rem .7rem; border-radius: 999px; font-weight: 700; font-size: .92rem;
  background: rgba(255, 253, 248, .92); backdrop-filter: blur(10px); border: 1px solid var(--border); box-shadow: 0 12px 30px rgba(49, 38, 26, .18);
  animation: float 6s ease-in-out infinite alternate;
}
.stage__chip b { font-size: 1.1rem; }
.stage__chip--streak { left: -2%; top: 9%; }
.orb { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle, #fff5e5, #efcba9 60%, #d99d72); box-shadow: 0 4px 12px rgba(153, 89, 57, .35); }
.stage__chip--pp { right: 2%; bottom: 17%; animation-delay: -2s; padding: .6rem 1.1rem; }
.pp-plus { color: var(--green); font-size: 1.2rem; font-weight: 800; transition: transform .4s var(--spring); }
.pp-plus.is-pop { transform: scale(1.3); }
.stage__layer--rank { right: -5%; top: -7%; width: 22%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #323c4b, #12161c 72%); box-shadow: 0 18px 44px rgba(18, 22, 28, .4), 0 0 0 5px rgba(255, 253, 248, .8); animation: float 7s ease-in-out infinite alternate-reverse; }
.stage__rank { width: 80%; height: auto; filter: drop-shadow(0 6px 14px rgba(81, 225, 255, .35)); }
.stage__chart { left: -3%; bottom: 8%; width: 32%; padding: .7rem .8rem .5rem; display: flex; align-items: flex-end; gap: 5px; height: 21%; border-radius: 16px; background: rgba(255, 253, 248, .92); backdrop-filter: blur(10px); border: 1px solid var(--border); box-shadow: 0 12px 30px rgba(49, 38, 26, .16); animation: float 8s ease-in-out infinite alternate; }
.stage__chart i { flex: 1; height: var(--h); border-radius: 4px; background: rgba(148, 86, 55, .8); transform-origin: bottom; animation: grow 1.2s var(--ease) both; animation-delay: calc(var(--i) * .08s + .6s); }
.stage__chart i:last-of-type { background: var(--terra); }
.stage__chart small { position: absolute; left: .8rem; top: .4rem; font-size: .62rem; font-weight: 700; color: var(--muted); }
.stage__chart { padding-top: 1.3rem; }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes float { to { transform: translateY(-12px); } }
.stage__toast {
  position: absolute; z-index: 5; left: 50%; bottom: -7.6rem; translate: -50% 0; width: max-content; max-width: 92%;
  padding: .65rem 1rem; border-radius: 14px; font-weight: 700; font-size: .88rem; text-align: center;
  background: #1f2933; color: #fff; box-shadow: 0 14px 34px rgba(0, 0, 0, .3); opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .5s var(--spring);
}
.stage__toast.show { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .stage { width: min(100%, 440px); margin-top: .5rem; margin-bottom: 7.5rem; }
  .stage__toast { bottom: -7.2rem; }
}
@media (max-width: 480px) {
  .stage__chip { font-size: .8rem; padding: .45rem .8rem .45rem .5rem; }
  .stage__chip--streak { left: 0; top: 4%; }
  .stage__layer--rank { width: 22%; right: -2%; top: -6%; }
  .stage__chart { display: none; }
  .deck { width: 70%; }
}

/* ---------- Bande de chiffres ---------- */
.facts { position: relative; z-index: 2; margin-top: -3.8rem; }
.facts__grid { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--paper); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.fact { padding: 1.6rem 1rem; text-align: center; position: relative; }
.fact + .fact::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--border); }
.fact b { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; color: var(--terra); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fact span { display: block; margin-top: .45rem; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
@media (max-width: 760px) {
  .facts { margin-top: -2.4rem; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(odd)::before { display: none; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--border); }
  .fact:last-child { grid-column: 1 / -1; }
  .fact:last-child::before { display: none; }
}

/* ---------- Courbe de l'oubli ---------- */
.curve-card { margin: 0; padding: 1.4rem 1.4rem 1.1rem; border-radius: 26px; background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow); }
.curve-card figcaption { color: var(--muted); font-size: .84rem; margin-top: .7rem; }
.curve-card__legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-bottom: .6rem; font-size: .84rem; font-weight: 700; }
.key { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink-2); }
.key::before { content: ''; width: 22px; height: 4px; border-radius: 3px; background: var(--c); }
.key--forget { --c: var(--red); } .key--keep { --c: var(--green); }
.curve { width: 100%; height: auto; overflow: visible; }
.curve__grid line { stroke: rgba(31, 41, 51, .1); stroke-dasharray: 3 5; }
.curve__axis text { fill: var(--muted); font-size: 11px; font-weight: 600; }
.curve__line { fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.curve__line--forget { stroke: var(--red); }
.curve__line--keep { stroke: var(--green); stroke-width: 3.8; }
.curve__area { opacity: 0; }
.curve__dot circle { fill: var(--paper); stroke: var(--green); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; }
.curve__dot text { fill: var(--green); font-size: 11px; font-weight: 800; opacity: 0; }
.curve-card.in .curve__line--forget { animation: draw 1.8s var(--ease) .2s forwards; }
.curve-card.in .curve__line--keep { animation: draw 3.2s var(--ease) .9s forwards; }
.curve-card.in .curve__area { animation: fadeIn 1.2s ease 3s forwards; }
.curve-card.in .curve__dot circle { animation: dotIn .5s var(--spring) forwards; }
.curve-card.in .curve__dot text { animation: fadeIn .5s ease forwards; }
.curve-card.in .curve__dot:nth-of-type(1) circle, .curve-card.in .curve__dot:nth-of-type(1) text { animation-delay: 1.2s; }
.curve-card.in .curve__dot:nth-of-type(2) circle, .curve-card.in .curve__dot:nth-of-type(2) text { animation-delay: 1.6s; }
.curve-card.in .curve__dot:nth-of-type(3) circle, .curve-card.in .curve__dot:nth-of-type(3) text { animation-delay: 2.0s; }
.curve-card.in .curve__dot:nth-of-type(4) circle, .curve-card.in .curve__dot:nth-of-type(4) text { animation-delay: 2.5s; }
.curve-card.in .curve__dot:nth-of-type(5) circle, .curve-card.in .curve__dot:nth-of-type(5) text { animation-delay: 3.1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes dotIn { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.reduced .curve__line, .reveal-all .curve__line, html:not(.js) .curve__line { stroke-dashoffset: 0; animation: none !important; }
.reduced .curve__area, .reduced .curve__dot circle, .reduced .curve__dot text, .reveal-all .curve__area, .reveal-all .curve__dot circle, .reveal-all .curve__dot text, html:not(.js) .curve__dot circle, html:not(.js) .curve__dot text, html:not(.js) .curve__area { opacity: 1; animation: none !important; }

/* ---------- Voyage d'une carte (scène sticky) ---------- */
.journey { position: relative; color: #f4efe6; background: linear-gradient(180deg, #151a21, #0f1318); --ink: #f4efe6; --ink-2: #c9d0d8; --muted: #9aa6b2; --border: rgba(255, 255, 255, .14); }
.js .journey { height: 440vh; }
.journey__sticky { position: relative; }
.js .journey__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: clip; }
.journey__sticky::before, .journey__sticky::after { content: ''; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.journey__sticky::before { width: 600px; height: 600px; left: -200px; top: -150px; background: rgba(217, 138, 95, .28); }
.journey__sticky::after { width: 520px; height: 520px; right: -160px; bottom: -160px; background: rgba(139, 92, 246, .22); }
.journey__inner { position: relative; z-index: 1; padding-block: 1.4rem; }
.journey .eyebrow { color: var(--terra-3); }
.journey .h2 { font-size: clamp(1.7rem, 3.8vw, 3rem); }
.journey .h2 em { background: linear-gradient(100deg, #f0a982, #f2c477 60%, #fff0c8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.journey .lead { color: var(--ink-2); margin-top: .8rem; }
.journey__head { max-width: 52rem; margin-bottom: clamp(.4rem, 3vh, 2.2rem); }
.journey__stage { display: grid; gap: clamp(.4rem, 2vh, 1.2rem); }

.rail { position: relative; height: 232px; margin: 0 clamp(1.6rem, 4vw, 3.5rem); }
.rail__track { position: absolute; left: 0; right: 0; top: 128px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .14); }
.rail__fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--prog, 0) * 100%); border-radius: 5px; background: linear-gradient(90deg, var(--terra-3), var(--gold)); box-shadow: 0 0 22px rgba(242, 196, 119, .7); }
.rail__stops { list-style: none; margin: 0; padding: 0; }
.rail__stop { position: absolute; left: var(--x); top: 96px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.rail__dot { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; font-size: 1.7rem; background: #1d2430; border: 2px solid rgba(255, 255, 255, .2); transition: transform .5s var(--spring), background .4s, border-color .4s, box-shadow .4s; }
.rail__label { text-align: center; line-height: 1.2; transition: opacity .4s; opacity: .55; }
.rail__label strong { display: block; font-size: .92rem; }
.rail__label small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.rail__stop.is-passed .rail__dot { background: linear-gradient(145deg, #3b2a20, #1d2430); border-color: rgba(242, 196, 119, .6); }
.rail__stop.is-passed .rail__label { opacity: .85; }
.rail__stop.is-active .rail__dot { transform: scale(1.22); border-color: var(--gold); background: radial-gradient(circle at 50% 35%, #5a3a28, #1d2430 75%); box-shadow: 0 0 0 6px rgba(242, 196, 119, .18), 0 0 40px rgba(242, 196, 119, .55); }
.rail__stop.is-active .rail__label { opacity: 1; }
.rail__card { position: absolute; left: var(--cx, 0%); top: 8px; translate: -50% 0; width: 56px; height: 72px; will-change: left; }
.rail__card::after { content: ''; position: absolute; left: 50%; bottom: -14px; width: 2px; height: 14px; background: linear-gradient(var(--gold), transparent); translate: -50% 0; }
.rail__card-face { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 12px; background: linear-gradient(160deg, #fffdf8, #f2e6d4); color: var(--ink-night, #1f2933); box-shadow: 0 12px 28px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .6) inset; transform: rotate(var(--tilt, 0deg)); transition: transform .3s var(--ease); }
.rail__card-face small { font-size: .55rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: #6f7c86; }
.rail__card-face b { font-size: 1.4rem; line-height: 1; }
.rail__scale { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; text-align: center; font-size: .74rem; color: var(--muted); }

.journey__panel { max-width: 46rem; padding: clamp(1rem, 2.4vh, 1.6rem) clamp(1.1rem, 2.4vw, 1.8rem); border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); border: 1px solid var(--border); backdrop-filter: blur(10px); margin-top: 1rem; }
.journey__count { margin: 0 0 .3rem; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; color: var(--terra-3); }
.journey__title { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 3vw, 2.1rem); margin-bottom: .5rem; }
.journey__text { margin: 0 0 .8rem; color: var(--ink-2); font-size: clamp(.95rem, 1.5vw, 1.08rem); }
.journey__text strong { color: #fff; }
.journey__foot { display: inline-block; margin: 0; padding: .3rem .8rem; border-radius: 999px; background: rgba(242, 196, 119, .14); border: 1px solid rgba(242, 196, 119, .4); color: var(--gold); font-weight: 750; font-size: .84rem; }
.journey__panel.swap > * { animation: panelIn .55s var(--ease) both; }
.journey__panel.swap > *:nth-child(2) { animation-delay: .04s; } .journey__panel.swap > *:nth-child(3) { animation-delay: .08s; } .journey__panel.swap > *:nth-child(4) { animation-delay: .12s; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } }
.journey noscript ol { color: var(--ink-2); }

@media (max-width: 760px) {
  .rail { height: 196px; margin: 0 1.9rem; }
  .rail__track { top: 112px; }
  .rail__stop { top: 82px; }
  .rail__dot { width: 50px; height: 50px; font-size: 1.3rem; }
  .rail__label strong { font-size: .72rem; }
  .rail__label small { font-size: .68rem; }
  .rail__card { width: 46px; height: 60px; top: 6px; }
  .journey .lead { display: none; }
  .journey__panel { margin-top: .8rem; }
}
@media (max-height: 700px) { .journey .lead { display: none; } .rail { height: 190px; } }

/* ---------- Bento des fonctionnalités ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.tile {
  grid-column: span 6; display: flex; flex-direction: column; gap: .5rem; padding: clamp(1.4rem, 2.4vw, 2rem); border-radius: 28px; text-decoration: none; color: var(--ink);
  background: linear-gradient(165deg, var(--paper), #faf3e6); border: 1px solid var(--border); box-shadow: var(--shadow-soft);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; min-height: 300px;
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(148, 86, 55, .45); color: var(--ink); }
.tile--4 { grid-column: span 4; } .tile--5 { grid-column: span 5; } .tile--6 { grid-column: span 6; } .tile--7 { grid-column: span 7; }
.tile__kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; color: #8a4f32; }
.tile h3 { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 2.3vw, 1.85rem); letter-spacing: -.015em; line-height: 1.12; }
.tile p { margin: 0; color: var(--ink-2); font-size: .98rem; max-width: 48ch; }
.tile__vis { margin-top: auto; padding-top: 1.1rem; }
.tile__go { margin-top: .9rem; font-weight: 750; font-size: .92rem; color: var(--terra); transition: transform .3s var(--ease); display: inline-block; }
.tile:hover .tile__go { transform: translateX(5px); }
@media (max-width: 1020px) { .tile, .tile--4, .tile--5, .tile--6, .tile--7 { grid-column: span 6; } }
@media (max-width: 680px) { .bento { gap: .8rem; } .tile, .tile--4, .tile--5, .tile--6, .tile--7 { grid-column: 1 / -1; min-height: 0; } }

.tile__vis--cards { display: flex; flex-wrap: wrap; gap: .6rem; }
.tile__vis--cards i { font-style: normal; font-weight: 700; font-size: .85rem; padding: .85rem 1rem; border-radius: 14px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-soft); transition: transform .4s var(--spring); }
.tile__vis--cards i:nth-child(odd) { transform: rotate(-2.5deg); } .tile__vis--cards i:nth-child(even) { transform: rotate(2deg); background: #f3f8fc; border-color: #b4c9dd; }
.tile:hover .tile__vis--cards i { transform: rotate(0) translateY(-4px); }
.tile__vis--levels { position: relative; height: 74px; margin: auto 1.4rem 0; }
.tile__vis--levels::before { content: ''; position: absolute; left: 0; right: 0; top: 22px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #c4c9d4, #98ccad, #5c9fd6, #d6a35c, #c77dff); }
.tile__vis--levels span { position: absolute; left: var(--w); top: 0; translate: -50% 0; display: grid; justify-items: center; gap: .15rem; font-size: 1.25rem; }
.tile__vis--levels span::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; }
.tile__vis--levels em { font-style: normal; font-size: .72rem; font-weight: 800; color: var(--ink-2); margin-top: .9rem; }
.tile__vis--cloze { font-family: var(--display); font-size: 1.15rem; line-height: 1.7; color: var(--ink-2); }
.tile__vis--cloze u { text-decoration: none; padding: .05em .5em; border-radius: 8px; background: var(--terra-soft); color: var(--terra-deep); font-family: var(--font); font-size: .82rem; font-weight: 700; }
.tile__vis--bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.tile__vis--bars i { flex: 1; height: var(--h); border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--terra-2), var(--terra)); opacity: .85; transform-origin: bottom; transition: transform .6s var(--ease); }
.tile:hover .tile__vis--bars i { transform: scaleY(1.08); }
.tile__vis--bars i:nth-child(3n) { background: linear-gradient(180deg, #4d90b8, var(--blue)); }
.tile__vis--ranks { display: flex; gap: .5rem; justify-content: space-between; padding: .6rem .8rem; border-radius: 18px; background: radial-gradient(circle at 50% 0%, #2b3340, #12161c); }
.tile__rank { width: 25%; height: auto; transition: transform .5s var(--spring); }
.tile:hover .tile__rank:nth-child(odd) { transform: translateY(-6px) scale(1.06); } .tile:hover .tile__rank:nth-child(even) { transform: translateY(4px) scale(1.04); }
.tile__vis--streak { display: flex; align-items: center; gap: 1rem; }
.orb-lg { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, #fff5e5, #efcba9 60%, #d99d72); box-shadow: 0 10px 22px rgba(153, 89, 57, .3); font-size: 1.3rem; animation: pulse 3s ease-in-out infinite; }
.orb-lg b { position: absolute; bottom: 8px; font-size: 1.15rem; color: #6f3f28; }
.orb-lg { align-content: start; padding-top: 12px; }
.shield { font-weight: 800; padding: .5rem .9rem; border-radius: 999px; background: #eef5fa; border: 1px solid #c5dceb; color: var(--blue); }
.tile__vis--boss .hp { height: 16px; border-radius: 999px; background: rgba(31, 41, 51, .08); border: 1px solid var(--border); overflow: hidden; }
.tile__vis--boss .hp span { display: block; width: var(--w); height: 100%; background: linear-gradient(90deg, #b1494b, #e0795a, #f2c477); border-radius: inherit; animation: bossPulse 3s ease-in-out infinite alternate; }
@keyframes bossPulse { from { width: 66%; } to { width: 61%; } }
.tile__vis--boss small { color: var(--muted); font-weight: 700; font-size: .8rem; display: block; margin-top: .45rem; }
.tile__vis--tree { display: grid; gap: .4rem; font-weight: 650; font-size: .92rem; }
.tile__vis--tree span { padding: .5rem .8rem; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.tile__vis--tree .in { margin-left: 1.6rem; position: relative; background: var(--paper-2); }
.tile__vis--tree .in::before { content: ''; position: absolute; left: -.9rem; top: 50%; width: .7rem; height: 2px; background: var(--border-strong); }
.tile__vis--sync { display: flex; align-items: center; justify-content: space-between; font-size: 1.8rem; padding: .4rem 1rem; }
.tile__vis--sync i { flex: 1; height: 2px; margin: 0 .6rem; background: repeating-linear-gradient(90deg, var(--terra-2) 0 8px, transparent 8px 16px); animation: dash 1s linear infinite; background-size: 16px 2px; }
@keyframes dash { to { background-position: 16px 0; } }

/* ---------- Carrousel des rangs ---------- */
.ladder { position: relative; }
.ladder__track { display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; margin: 0; padding: 2.2rem max(1.25rem, calc((100vw - var(--container)) / 2)) 3rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; outline-offset: -4px; }
.ladder__track::-webkit-scrollbar { display: none; }
.ladder__item {
  position: relative; flex: 0 0 min(72vw, 270px); scroll-snap-align: center; display: grid; justify-items: center; gap: .3rem; padding: 1.6rem 1.2rem 1.4rem; border-radius: 30px; text-align: center; isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); border: 1px solid var(--border);
  transition: transform .5s var(--spring), border-color .4s, box-shadow .4s; opacity: .7;
}
.ladder__item::before { content: ''; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--a) 38%, transparent), transparent 62%); opacity: .8; }
.ladder__item.is-center { transform: translateY(-10px) scale(1.06); opacity: 1; border-color: color-mix(in srgb, var(--b) 60%, transparent); box-shadow: 0 30px 70px rgba(0, 0, 0, .45), 0 0 60px color-mix(in srgb, var(--a) 35%, transparent); }
.ladder__art { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.ladder__img { width: 78%; height: auto; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .5)); transition: transform .6s var(--spring); }
.ladder__item.is-center .ladder__img { transform: scale(1.1) translateY(-4px); }
.ladder__item strong { font-family: var(--display); font-size: 1.45rem; font-weight: 600; }
.ladder__item span { color: var(--muted); font-weight: 700; font-size: .95rem; }
.ladder__nav { display: flex; justify-content: center; gap: .7rem; margin-top: -.6rem; margin-bottom: 2rem; }
.ladder__btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .06); color: #fff; font-size: 1.2rem; font-weight: 700; transition: background .2s, transform .3s var(--spring); }
.ladder__btn:hover { background: rgba(255, 255, 255, .16); transform: scale(1.08); }

/* ---------- Statistiques (aperçu) ---------- */
.chart-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.chart-wrap { position: relative; height: 270px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }
.chart-fallback { margin: 0; color: var(--ink); font-size: .92rem; line-height: 1.45; }

/* Mobile et mouvement réduit : pas de scène 3D, pas de flous, repli à plat */
html.lite .blob,
html.lite .hero__sparks,
html.lite .stage__glow,
html.reduced .blob,
html.reduced .hero__sparks,
html.reduced .stage__glow { display: none; }
html.lite .stage,
html.reduced .stage,
html.no-canvas .stage { perspective: none; }
html.lite .deck,
html.lite .fcard,
html.lite .fcard__inner,
html.reduced .deck,
html.reduced .fcard,
html.reduced .fcard__inner { transform-style: flat; }
html.lite .deck,
html.reduced .deck { transform: none; }
html.lite .fcard--ghost,
html.reduced .fcard--ghost { display: none; }
html.lite .stage__layer,
html.reduced .stage__layer { translate: none; }
html.lite .fcard.is-flipped .fcard__inner,
html.reduced .fcard.is-flipped .fcard__inner { transform: none; }
html.lite .fcard__back,
html.reduced .fcard__back { transform: none; visibility: hidden; }
html.lite .fcard.is-flipped .fcard__front,
html.reduced .fcard.is-flipped .fcard__front { visibility: hidden; }
html.lite .fcard.is-flipped .fcard__back,
html.reduced .fcard.is-flipped .fcard__back { visibility: visible; }
html.lite .fcard--main.is-entering,
html.lite .fcard--main.is-leaving-ok,
html.lite .fcard--main.is-leaving-fail,
html.reduced .fcard--main.is-entering,
html.reduced .fcard--main.is-leaving-ok,
html.reduced .fcard--main.is-leaving-fail { animation: none; }
html.lite .rail__card { will-change: auto; }
@media (max-width: 760px) {
  .blob, .hero__sparks, .stage__glow, .fcard--ghost { display: none; }
  .stage { perspective: none; }
  .deck, .fcard, .fcard__inner { transform-style: flat; }
  .deck { transform: none; }
}

/* ---------- Démarrer / cas d'usage ---------- */
.startcard { padding: clamp(1.6rem, 3vw, 2.4rem); border-radius: 30px; background: linear-gradient(160deg, #fffdf8, #f6ede0); border: 1px solid rgba(148, 86, 55, .3); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.startcard::after { content: ''; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(217, 138, 95, .35), transparent 70%); pointer-events: none; }
.startcard__links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1.2rem 0 0; font-weight: 700; font-size: .94rem; }
.usecard { display: flex; flex-direction: column; gap: .6rem; padding: 1.8rem; border-radius: 26px; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-soft); transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.usecard:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(148, 86, 55, .45); color: var(--ink); }
.usecard__ico { font-size: 2.2rem; }
.usecard h3 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; }
.usecard p { color: var(--ink-2); margin: 0; flex: 1; }
.usecard:hover .tile__go { transform: translateX(5px); }
