/* Toisé — sections : structure, bandeau, problème, produit */

/* ── Structure : filet de 1 px + 96 px d’air entre les sections ── */
.sec { padding-bottom: var(--sec); }
.rule { height: 1px; margin-bottom: var(--sec); background: var(--frost); transform-origin: 0 50%; }
.sec__head { display: grid; gap: 20px; max-width: 780px; margin-bottom: 64px; }
.sec__head .lead { max-width: 620px; }
.marquee + .sec { padding-top: var(--sec); }
.marquee + .sec > .container > .rule { display: none; }

/* ── Bandeau des métiers : défile plus vite quand on scrolle ── */
.marquee { position: relative; overflow: hidden; border-block: 1px solid var(--frost); background: #fff; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__list { display: flex; align-items: center; flex: none; }
.marquee__list li { padding: 26px 26px; white-space: nowrap; font-size: clamp(36px, 5.4vw, 72px); line-height: 1; letter-spacing: -.03em; color: var(--smoke); transition: color .3s; }
.marquee__list li:not(.marquee__sep):hover { color: var(--ink); }
.marquee__list li.marquee__sep { display: flex; padding-inline: 4px; }
.marquee__mark { width: clamp(30px, 3.4vw, 46px); height: auto; aspect-ratio: 1; }

/* ── 01 · Problème ── */
.manifesto { max-width: 1000px; margin-bottom: 96px; font-size: clamp(24px, 2.8vw, 38px); line-height: 1.2; letter-spacing: -.02em; color: var(--ink); text-wrap: pretty; }
.sw { color: var(--smoke); transition: color .5s var(--ease-out); }
.sw.on { color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 96px; border-block: 1px solid var(--frost); }
.stat { padding: 40px 32px 40px 0; border-right: 1px solid var(--frost); }
.stat + .stat { padding-left: 32px; }
.stat:last-child { border-right: 0; }
.stat__n { font-size: clamp(38px, 4.4vw, 68px); line-height: 1; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; }
.stat__l { margin-top: 16px; max-width: 26ch; font: 400 16px/1.35 var(--font); color: var(--slate); }

/* compteur à rouleaux : chaque chiffre est une colonne 0-9 */
.od { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; }
.od__col { display: block; transition: transform 1.6s var(--ease-out) calc(var(--k, 0) * 110ms); }
.od__col::before { content: '0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9'; display: block; white-space: pre; line-height: 1; }
.od__s { white-space: pre; }
.od__s::before { content: attr(data-ch); }
[data-odometer].is-in .od__col { transform: translateY(calc(var(--d, 0) * -1em)); }
.od-reset .od__col { transition: none !important; }

/* grille à filets : chaque cellule porte ses propres bordures, rien ne transparaît pendant la révélation */
.pains, .bento { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--frost); border-left: 1px solid var(--frost); }
.pain, .fcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 32px; overflow: hidden; background: #fff; border-right: 1px solid var(--frost); border-bottom: 1px solid var(--frost); transition: background-color .45s; }
.pain > *, .fcard > * { position: relative; }
/* projecteur qui suit le curseur : un simple lavis, pas d’ombre */
.pain::before, .fcard::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--wash), transparent 70%);
}
/* filet indigo qui se trace au survol */
.pain::after, .fcard::after {
  content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: var(--indigo);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--ease-out);
}
.pain:hover::before, .fcard:hover::before { opacity: 1; }
.pain:hover::after, .fcard:hover::after { transform: scaleX(1); }
.pain:hover, .fcard:hover { background: var(--mist); }

.pain > .ico { width: 24px; height: 24px; margin-bottom: 28px; color: var(--indigo); transition: transform .7s var(--ease-out); }
.pain:hover > .ico { transform: translateY(-4px) rotate(-8deg) scale(1.1); }
.pain__k, .fcard__k { font: 400 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.pain .h3, .fcard .h3 { transition: transform .6s var(--ease-out); }
.pain:hover .h3, .fcard:hover .h3 { transform: translateX(4px); }
.pain p:last-child, .fcard p:last-child { font: 400 16px/1.45 var(--font); color: var(--steel); }

/* ── 02 · Produit : visuels animés au survol ── */
.fcard .vis { display: flex; align-items: center; height: 132px; margin-bottom: 20px; }

.vis-voice { justify-content: space-between; gap: 3px; }
.vis-voice i { flex: none; width: 3px; height: var(--h, 24%); border-radius: 2px; background: var(--lilac); transition: background-color .4s; }
.fcard:hover .vis-voice i { background: var(--indigo); animation: voice .9s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -70ms); }
@keyframes voice { from { height: 10%; } to { height: var(--h2, 90%); } }

.vis-photo__frame { position: relative; width: 196px; height: 132px; border: 1px solid var(--frost); background: var(--mist); overflow: hidden; }
.vis-photo__frame::before {
  content: ''; position: absolute; inset: 0; background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 90' fill='none' stroke='%23839bc8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='38' y='16' width='44' height='60' rx='8'/%3E%3Cpath d='M38 26h44M50 16V8M70 16V8'/%3E%3Ccircle cx='60' cy='52' r='6'/%3E%3Cpath d='M30 80h60'/%3E%3C/svg%3E");
}
.vis-photo__frame i { position: absolute; z-index: 2; width: 14px; height: 14px; border: 1.5px solid var(--indigo); transition: transform .6s var(--ease-out); }
.vis-photo__frame .tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.vis-photo__frame .tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.vis-photo__frame .bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.vis-photo__frame .br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.fcard:hover .vis-photo__frame .tl { transform: translate(8px, 8px); }
.fcard:hover .vis-photo__frame .tr { transform: translate(-8px, 8px); }
.fcard:hover .vis-photo__frame .bl { transform: translate(8px, -8px); }
.fcard:hover .vis-photo__frame .br { transform: translate(-8px, -8px); }
.vis-photo__scan { position: absolute; z-index: 1; left: 0; right: 0; top: -28px; height: 28px; opacity: 0; border-bottom: 1px solid var(--indigo); background: linear-gradient(rgba(83, 58, 253, 0), rgba(83, 58, 253, .16)); }
.fcard:hover .vis-photo__scan { opacity: 1; animation: scan 2s var(--ease-io) infinite; }
@keyframes scan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(160px); } }
.vis-photo__box { position: absolute; z-index: 1; left: 33%; top: 17%; width: 34%; height: 67%; border: 1.5px solid var(--indigo); background: rgba(83, 58, 253, .06); opacity: 0; transform: scale(1.14); transition: opacity .4s .2s, transform .6s .2s var(--ease-out); }
.vis-photo__box em { position: absolute; left: -1.5px; top: -1.5px; padding: 3px 6px; background: var(--indigo); color: #fff; font: 400 10px/1 var(--font); font-style: normal; white-space: nowrap; }
.fcard:hover .vis-photo__box { opacity: 1; transform: none; }

.fcard .vis-lib { align-items: flex-start; overflow: hidden; }
.vis-lib ul { width: 100%; transition: transform .9s var(--ease-out); }
.vis-lib li { display: flex; justify-content: space-between; gap: 12px; height: 33px; padding: 0 10px; align-items: center; border-bottom: 1px solid var(--frost); font: 400 12.5px/1.2 var(--font); color: var(--steel); }
.vis-lib li b { font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.vis-lib li:nth-child(1) { --n: 0; } .vis-lib li:nth-child(2) { --n: 1; } .vis-lib li:nth-child(3) { --n: 2; } .vis-lib li:nth-child(4) { --n: 3; } .vis-lib li:nth-child(5) { --n: 4; }
.fcard:hover .vis-lib ul { transform: translateY(-33px); }
.fcard:hover .vis-lib li { animation: libhl 3.6s linear infinite; animation-delay: calc(var(--n) * .7s); }
@keyframes libhl { 0%, 16% { background: var(--wash); color: var(--indigo); } 20%, 100% { background: transparent; } }

.fcard .vis-quote { flex-direction: column; align-items: stretch; justify-content: center; gap: 12px; }
.vis-quote i { display: block; height: 8px; width: var(--w, 100%); border-radius: 2px; background: var(--frost); transition: width .9s var(--ease-out) calc(var(--n, 0) * 100ms), background-color .5s calc(var(--n, 0) * 100ms); }
.vis-quote i:nth-child(1) { --w: 58%; --n: 0; } .vis-quote i:nth-child(2) { --w: 76%; --n: 1; } .vis-quote i:nth-child(3) { --w: 44%; --n: 2; }
.vis-quote .tot { --n: 3; --w: 34%; height: 12px; margin: 8px 0 0 auto; background: var(--lilac); }
.fcard:hover .vis-quote i:nth-child(-n + 3) { width: 100%; background: var(--lilac); }
.fcard:hover .vis-quote .tot { width: 52%; background: var(--indigo); }

.vis-time { gap: 22px; }
.vis-time svg { width: 108px; height: 108px; transform: rotate(-90deg); }
.vis-time circle { fill: none; stroke-width: 2; }
.vis-time .trk { stroke: var(--frost); }
.vis-time .arc { stroke: var(--indigo); stroke-linecap: round; stroke-dasharray: 213.6; stroke-dashoffset: 153; transition: stroke-dashoffset 1.8s var(--ease-out); }
.fcard:hover .vis-time .arc { stroke-dashoffset: 0; }
.vis-time span { font-size: 36px; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; }

.vis-units { flex-wrap: wrap; align-content: center; gap: 8px; }
.vis-units span { padding: 10px 14px; border: 1px solid var(--lilac); border-radius: var(--r); background: #fff; font: 400 14px/1 var(--font); color: var(--indigo); transition: transform .6s var(--ease-out), background-color .4s, border-color .4s; }
.vis-units span:nth-child(2) { transition-delay: 50ms; } .vis-units span:nth-child(3) { transition-delay: 100ms; } .vis-units span:nth-child(4) { transition-delay: 150ms; } .vis-units span:nth-child(5) { transition-delay: 200ms; }
.fcard:hover .vis-units span { transform: translateY(-8px); background: var(--wash); border-color: var(--lavender); }

@media (max-width: 1023px) {
  .pains, .bento { grid-template-columns: repeat(2, 1fr); }
  .pains .pain:last-child { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  :root { --sec: 72px; }
  .sec__head { margin-bottom: 48px; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 32px 0; border-right: 0; border-bottom: 1px solid var(--frost); }
  .stat:last-child { border-bottom: 0; }
  .manifesto { margin-bottom: 64px; }
  .stats { margin-bottom: 64px; }
}
@media (max-width: 640px) {
  .pains, .bento { grid-template-columns: 1fr; }
  .pain, .fcard { padding: 24px; }
}
