/* Page Projets (direction « copie 4 », 11 novembre 2026). Source de contenu : site-content/ape/projets/v4/. */
.ape-projects-v4 { --pv4-icon: 132px; --pv4-offset: calc(var(--pv4-icon) * .5455); }
.ape-projects-v4 .pv4-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête : sobre, une seule phrase d'introduction. */
.pv4-header { max-width: 760px; margin: var(--ape-space-8) 0 var(--ape-space-16); }
.pv4-header h1 { margin: 0; color: var(--ape-ink); font-size: clamp(2.4rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -.055em; }
.pv4-intro { margin: var(--ape-space-5) 0 0; color: var(--ape-muted); font-size: var(--ape-type-xl); line-height: 1.65; }

/* Le chemin : vague pointillée qui relie quatre étapes décalées. */
.pv4-path { margin: 0 0 var(--ape-space-16); }
.pv4-path h2, .pv4-section-heading h2 { margin: 0; color: var(--ape-ink); font-size: clamp(1.5rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -.035em; }
.pv4-path h2 { margin-bottom: var(--ape-space-8); }
.pv4-trail-wrap { position: relative; }
.pv4-trail { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; overflow: visible; }
.pv4-trail path { fill: none; stroke: var(--ape-peach); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: .1 11; vector-effect: non-scaling-stroke; }
.pv4-trail--wide { height: calc(var(--pv4-offset) + var(--pv4-icon)); }
.pv4-trail--narrow { display: none; height: 100%; }
.pv4-steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; }
.pv4-step { display: flex; flex-direction: column; align-items: center; padding: 0 var(--ape-space-3); text-align: center; }
.pv4-step:nth-child(even) { padding-top: var(--pv4-offset); }
.pv4-icon { position: relative; display: grid; place-items: center; width: var(--pv4-icon); height: var(--pv4-icon); flex: none; border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; background: var(--ape-sky); box-shadow: 0 0 0 8px var(--ape-cream); }
.pv4-step:nth-child(2) .pv4-icon { border-radius: 45% 55% 42% 58% / 55% 45% 55% 45%; }
.pv4-step:nth-child(3) .pv4-icon { border-radius: 52% 48% 60% 40% / 42% 58% 42% 58%; }
.pv4-step:nth-child(4) .pv4-icon { border-radius: 40% 60% 47% 53% / 57% 43% 57% 43%; }
.pv4-step--peach .pv4-icon { background: var(--ape-peach-soft); }
.pv4-step--lilac .pv4-icon { background: var(--ape-lilac); }
.pv4-step--sky .pv4-icon { background: var(--ape-date-surface); }
.pv4-icon-art { width: 78%; height: 78%; overflow: visible; }
.pv4-step-copy { max-width: 240px; margin-top: var(--ape-space-5); }
.pv4-step h3 { margin: 0 0 var(--ape-space-2); color: var(--ape-ink); font-size: var(--ape-type-xl); line-height: 1.3; letter-spacing: -.02em; }
.pv4-step p { margin: 0; color: var(--ape-muted); font-size: var(--ape-type-md); line-height: 1.55; }
.pv4-wiggle, .pv4-drop { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pv4-step:hover .pv4-wiggle { transform: rotate(-5deg); }
  .pv4-step:hover .pv4-drop { transform: translateY(14px); }
}

/* Projets : cartes compactes, image à gauche. */
.pv4-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--ape-space-4); margin-bottom: var(--ape-space-6); }
.pv4-section-heading p { margin: var(--ape-space-1) 0 0; color: var(--ape-muted); font-size: var(--ape-type-md); }
.pv4-year { padding: 4px 12px; border: 1px solid var(--ape-line-strong); border-radius: var(--ape-radius-pill); color: var(--ape-muted); font-size: var(--ape-type-sm); font-weight: 650; }
.pv4-grid { display: grid; grid-template-columns: 1fr; gap: var(--ape-space-4); }
.pv4-card { display: grid; grid-template-columns: 196px 1fr; gap: var(--ape-space-5); padding: var(--ape-space-3); border: 1px solid var(--ape-line); border-radius: var(--ape-radius-card); background: var(--ape-surface); transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.pv4-card:hover { border-color: var(--ape-line-strong); box-shadow: var(--ape-shadow); transform: translateY(-2px); }
.pv4-card[hidden] { display: none; }
.pv4-thumb { overflow: hidden; min-height: 176px; border-radius: var(--ape-radius-medium); background: var(--ape-sky); align-self: stretch; }
.pv4-card--lilac .pv4-thumb { background: var(--ape-lilac); }
.pv4-card--peach .pv4-thumb { background: var(--ape-peach-soft); }
.pv4-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.pv4-card:hover .pv4-thumb img { transform: scale(1.045); }
.pv4-card-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: var(--ape-space-1) var(--ape-space-2) var(--ape-space-1) 0; }
.pv4-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--ape-radius-pill); background: var(--ape-sky); color: var(--ape-text-accent); font-size: var(--ape-type-xs); font-weight: 750; }
.pv4-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pv4-status--planned { background: var(--ape-lilac); color: var(--ape-ink); }
.pv4-card h3 { margin: var(--ape-space-2) 0 var(--ape-space-1); color: var(--ape-ink); font-size: var(--ape-type-2xl); line-height: 1.25; letter-spacing: -.025em; }
.pv4-card-body > p { margin: 0; color: var(--ape-muted); font-size: var(--ape-type-md); line-height: 1.5; }
.pv4-details { display: flex; flex-direction: column; gap: 2px; margin: var(--ape-space-3) 0 0; padding: var(--ape-space-2) var(--ape-space-3); border-radius: var(--ape-radius-small); background: var(--ape-cream); list-style: none; color: var(--ape-ink); font-size: var(--ape-type-sm); font-weight: 600; align-self: stretch; }
.pv4-details li { position: relative; padding-left: 14px; }
.pv4-details li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--ape-peach); }
.pv4-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ape-space-2) var(--ape-space-4); margin-top: auto; padding-top: var(--ape-space-4); }
.ape-projects-v4 .pv4-button { min-height: var(--ape-action-min-size); padding: 10px var(--ape-space-5); border-radius: var(--ape-radius-pill); font-size: var(--ape-type-md); font-weight: 750; line-height: 1.3; justify-content: center; }
.pv4-link { color: var(--ape-text-accent); font-size: var(--ape-type-sm); font-weight: 700; text-underline-offset: 3px; padding-block: 3px; margin-block: -3px; }
.pv4-history { margin-top: var(--ape-space-12); }
.pv4-history h2 { margin: 0 0 var(--ape-space-4); font-size: var(--ape-type-2xl); }
.pv4-archive summary { cursor: pointer; padding: var(--ape-space-3) 0; font-weight: 700; }

/* Une idée ? Proposition ouverte, pas d'appel aux bénévoles. */
.pv4-idea { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--ape-space-6); margin: var(--ape-space-16) 0 var(--ape-space-12); padding: var(--ape-space-6) var(--ape-space-8) var(--ape-space-6) var(--ape-space-6); border-radius: var(--ape-radius-card); background: var(--ape-sky); }
.pv4-idea-art { display: block; width: 104px; }
.pv4-plume { display: block; width: 100%; height: auto; }
.pv4-idea h2 { margin: 0 0 var(--ape-space-1); color: var(--ape-ink); font-size: var(--ape-type-2xl); letter-spacing: -.025em; }
.pv4-idea p { margin: 0; max-width: 560px; color: var(--ape-muted); font-size: var(--ape-type-md); line-height: 1.55; }

@media (min-width: 1051px) {
  .pv4-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1050px) {
  .ape-projects-v4 { --pv4-icon: 112px; }
}
@media (max-width: 720px) {
  .ape-projects-v4 { --pv4-icon: 84px; }
  .pv4-header { margin: var(--ape-space-6) 0 var(--ape-space-12); }
  .pv4-intro { font-size: var(--ape-type-lg); }
  .pv4-path h2 { margin-bottom: var(--ape-space-4); }
  .pv4-trail--wide { display: none; }
  .pv4-trail--narrow { display: block; }
  .pv4-steps { grid-template-columns: 1fr; grid-auto-rows: 1fr; }
  .pv4-step, .pv4-step:nth-child(even) { display: grid; grid-template-columns: 32% 1fr; align-items: center; gap: var(--ape-space-2); padding: var(--ape-space-4) 0; text-align: left; }
  .pv4-step .pv4-icon { justify-self: center; box-shadow: 0 0 0 6px var(--ape-cream); }
  .pv4-step:nth-child(even) { grid-template-columns: 1fr 32%; }
  .pv4-step:nth-child(even) .pv4-icon { grid-column: 2; grid-row: 1; }
  .pv4-step:nth-child(even) .pv4-step-copy { grid-column: 1; grid-row: 1; padding-left: var(--ape-space-2); }
  .pv4-step-copy { position: relative; margin: 0; padding: var(--ape-space-2) 0; border-radius: var(--ape-radius-small); background: var(--ape-cream); }
  .pv4-step h3 { font-size: var(--ape-type-lg); }
  .pv4-step p { font-size: var(--ape-type-sm); }
  .pv4-card { grid-template-columns: 112px 1fr; gap: var(--ape-space-4); }
  .pv4-thumb { min-height: 0; aspect-ratio: 1; align-self: start; }
  .pv4-card h3 { font-size: var(--ape-type-xl); }
  .pv4-idea { grid-template-columns: 72px 1fr; gap: var(--ape-space-4); padding: var(--ape-space-5); }
  .pv4-idea-art { width: 72px; align-self: start; }
  .pv4-idea .pv4-button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 480px) {
  .pv4-card { grid-template-columns: 84px 1fr; gap: var(--ape-space-3); }
}
@media (prefers-reduced-motion: reduce) {
  .pv4-wiggle, .pv4-drop, .pv4-card, .pv4-thumb img { transition: none; }
  .pv4-card:hover { transform: none; }
  .pv4-card:hover .pv4-thumb img { transform: none; }
}

/* Entrées : uniquement quand projects-v4.js a pris la main (donc ni sans JS, ni en mouvement réduit). */
@keyframes pv4-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pv4-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pv4-pop { 0% { opacity: 0; transform: scale(.55) rotate(-8deg); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes pv4-art { 0% { opacity: 0; transform: translateY(10px) scale(.85); } 100% { opacity: 1; transform: none; } }
@keyframes pv4-trail-x { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pv4-trail-y { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pv4-coin { 0% { opacity: 0; transform: translateY(-16px); } 55% { opacity: 1; transform: translateY(14px); } 75% { transform: translateY(9px); } 100% { opacity: 1; transform: none; } }
@keyframes pv4-peek { 0% { opacity: 0; transform: translateY(26px) rotate(-10deg); } 65% { opacity: 1; transform: translateY(-4px) rotate(4deg); } 100% { opacity: 1; transform: none; } }
@keyframes pv4-zoom { from { transform: scale(1.12); } to { transform: none; } }

.pv4-js .pv4-header > * { animation: pv4-up .7s cubic-bezier(.2, .7, .2, 1) both; }
.pv4-js .pv4-header > :nth-child(2) { animation-delay: .08s; }
.pv4-js .pv4-header > :nth-child(3) { animation-delay: .18s; }

.pv4-js [data-pv4-reveal]:not(.is-in) h2,
.pv4-js [data-pv4-reveal]:not(.is-in) .pv4-section-heading,
.pv4-js .pv4-path:not(.is-in) .pv4-trail,
.pv4-js .pv4-path:not(.is-in) .pv4-icon,
.pv4-js .pv4-path:not(.is-in) .pv4-step-copy,
.pv4-js .pv4-current:not(.is-in) .pv4-card,
.pv4-js .pv4-idea:not(.is-in) { opacity: 0; }

.pv4-js .pv4-path.is-in h2 { animation: pv4-up .6s cubic-bezier(.2, .7, .2, 1) both; }
.pv4-js .pv4-path.is-in .pv4-trail--wide { animation: pv4-trail-x 1.5s cubic-bezier(.45, 0, .25, 1) .15s both; }
.pv4-js .pv4-path.is-in .pv4-trail--narrow { animation: pv4-trail-y 1.6s cubic-bezier(.45, 0, .25, 1) .15s both; }
.pv4-js .pv4-path.is-in .pv4-icon { animation: pv4-pop .75s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(.2s + var(--i) * .32s); }
.pv4-js .pv4-path.is-in .pv4-icon-art { animation: pv4-art .6s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(.35s + var(--i) * .32s); }
.pv4-js .pv4-path.is-in .pv4-step-copy { animation: pv4-up .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.4s + var(--i) * .32s); }
.pv4-js .pv4-path.is-in .pv4-drop { animation: pv4-coin .9s cubic-bezier(.3, .8, .4, 1) 1.35s backwards; }

.pv4-js .pv4-current.is-in .pv4-section-heading { animation: pv4-up .6s cubic-bezier(.2, .7, .2, 1) both; }
.pv4-js .pv4-current.is-in .pv4-card { animation: pv4-up .65s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.12s + var(--i) * .12s); }
.pv4-js .pv4-current.is-in .pv4-thumb img { animation: pv4-zoom 1.1s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(.12s + var(--i) * .12s); }

.pv4-js .pv4-idea.is-in { animation: pv4-up .65s cubic-bezier(.2, .7, .2, 1) both; }
.pv4-js .pv4-idea.is-in .pv4-plume { animation: pv4-peek .9s cubic-bezier(.34, 1.4, .64, 1) .3s both; transform-origin: 50% 100%; }
