/* Page « Animations et jeux de soirée » : 3 blocs par événement, cartes des jeux (vidéo au clic ou en aperçu, filtres animés), bas de page « Réserver ».
   Gabarit : page-animations-jeux-soiree.php ; script : assets/js/pilier.js ; données : inc/pilier.php. Couleurs du thème (--gold, --night, --alt, --panel, --cream, --accent…). */

.pil-events__grid, .pil-cards__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pil-events .section-head { margin-bottom: 40px; }

/* Blocs par événement */
.pil-event { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 26px 24px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); }
.pil-event__title { font: 500 24px/1.25 var(--serif); text-wrap: balance; overflow-wrap: anywhere; }
.pil-event__games { display: grid; gap: 8px; padding-left: 20px; list-style: disc; font-size: 15px; line-height: 1.5; color: var(--soft); }
.pil-event__games li::marker { color: var(--accent); }
.pil-event__link { margin-top: auto; padding-top: 6px; }

/* Cartes des jeux */
.pil-cards { background: var(--alt); }
.pil-cards .section-head { margin-bottom: 28px; }
.pil-cards__text { margin-top: 14px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.pil-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 28px; }
.pil-filters[hidden] { display: none; }
.pil-filter { min-height: 44px; padding: 10px 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--cream); font: 700 13px/1 var(--sans); letter-spacing: 0.04em; cursor: pointer; }
.pil-filter:hover { background: var(--hover-tint); }
.pil-filter[aria-pressed="true"] { background: var(--night); color: var(--ivory); border-color: var(--night); }
.pil-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); }
.pil-card[hidden] { display: none; }
.pil-card__media { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(circle at 50% 40%, #4a3820, #14110E 75%); }
.pil-card__img, .pil-card__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pil-card__img[hidden], .pil-card__video[hidden] { display: none; }
.pil-card__video.is-wait { opacity: 0; } /* aperçu qui démarre : l'affiche reste visible jusqu'à la première image (assets/js/pilier.js) */
.pil-card__ph { position: absolute; inset: 0; display: grid; place-items: center; font: 500 48px/1 var(--serif); color: var(--gold); }
.pil-card__play { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: var(--gold); color: var(--night); font-size: 18px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.pil-card__play[hidden] { display: none; }
.pil-card__play:hover { filter: brightness(1.08); }
.pil-card__play[aria-pressed="true"] span { font-size: 0; }
.pil-card__play[aria-pressed="true"] span::before { content: '■'; font-size: 16px; }
.pil-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 20px; }
.pil-card__name { font: 500 20px/1.25 var(--serif); overflow-wrap: anywhere; }
.pil-card__phrase { font-size: 14px; line-height: 1.55; color: var(--muted); }
.pil-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pil-card__tags li { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; line-height: 1.3; }

/* Bas de page */
.pil-book { padding: 80px 0; text-align: center; }
.pil-book__title { max-width: 720px; margin: 0 auto 28px; font: italic 500 clamp(24px, 3.4vw, 34px)/1.25 var(--serif); text-wrap: balance; }
.pil-book__zone { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* Mur d'affiches derrière le titre de l'en-tête : 3 rangées qui défilent en sens alternés, sous un voile sombre (réglages « Effets de la page »).
   Gabarit : template-parts/page-hero.php ; pause hors écran : assets/js/pilier.js. Variables : --speed (durée d'un tour), --tilt (inclinaison), --veil (opacité du voile). */
.pil-wall { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.pil-wall__tilt { position: absolute; inset: -30% -20%; display: flex; flex-direction: column; justify-content: center; gap: 18px; transform: rotate(var(--tilt, -8deg)); }
.pil-wall__row { display: flex; gap: 18px; width: max-content; animation: pil-wall-slide var(--speed, 70s) linear infinite; }
.pil-wall__row--2 { animation-direction: reverse; animation-duration: calc(var(--speed, 70s) * 1.25); animation-delay: calc(var(--speed, 70s) * -0.37); }
.pil-wall__row--3 { animation-duration: calc(var(--speed, 70s) * 0.9); animation-delay: calc(var(--speed, 70s) * -0.61); }
.pil-wall__row img { display: block; flex: none; width: clamp(180px, 19vw, 280px); height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); filter: saturate(0.9); }
.pil-wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 50% 52%, rgba(22, 19, 16, calc(var(--veil, 0.72) + 0.2)) 0%, rgba(22, 19, 16, var(--veil, 0.72)) 55%, rgba(22, 19, 16, calc(var(--veil, 0.72) - 0.15)) 100%), linear-gradient(180deg, rgba(22, 19, 16, 0.85), transparent 22%, transparent 78%, rgba(22, 19, 16, 0.95)); }
.pil-wall.is-paused .pil-wall__row { animation-play-state: paused; }
.page-hero--wall .page-hero__title, .page-hero--wall .page-hero__text { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }
@keyframes pil-wall-slide { to { transform: translateX(-50%); } }
@media (max-width: 600px) {
	.pil-wall__tilt, .pil-wall__row { gap: 12px; }
	.pil-wall__row img { width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
	.pil-wall__row { animation: none; }
}

/* Comment ça marche : bande brun nuit (.tone-dark) entre les blocs par événement et les cartes. 3 étapes à gauche, grand écran + téléphone à droite qui montrent
   les captures de l'étape active ; assets/js/pilier.js pose data-step (1 à 3) sur .pil-how__scene et la classe .is-on sur l'étape. Sans script : étape 1. */
.pil-how { position: relative; overflow: hidden; background: linear-gradient(160deg, #26211C, #161310); }
.pil-how::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 60% at 70% 40%, rgba(201, 162, 75, 0.14), transparent 70%); pointer-events: none; }
.pil-how .wrap { position: relative; }
.pil-how .section-head { margin-bottom: 44px; }
.pil-how__lead { margin-top: 14px; font-size: 17px; line-height: 1.6; color: var(--soft); }
.pil-how__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: center; max-width: 1160px; margin: 0 auto; }
.pil-how__steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pil-how__step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; width: 100%; padding: 18px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 14px; background: transparent; color: var(--cream); font: inherit; text-align: left; cursor: pointer; transition: background 0.4s, border-color 0.4s; }
.pil-how__step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pil-how__step.is-on { background: rgba(201, 162, 75, 0.1); border-color: rgba(201, 162, 75, 0.45); }
.pil-how__num { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(201, 162, 75, 0.5); border-radius: 50%; color: var(--accent); font: 500 20px/1 var(--serif); transition: background 0.4s, color 0.4s; }
.pil-how__step.is-on .pil-how__num { background: var(--accent); color: var(--black); }
.pil-how__copy { display: grid; gap: 4px; min-width: 0; }
.pil-how__step-title { margin-top: 2px; font: 500 20px/1.25 var(--serif); overflow-wrap: anywhere; }
.pil-how__step-text { font-size: 15px; line-height: 1.55; color: var(--muted); }
.pil-how__bar { position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--accent); }
.pil-how.is-running .pil-how__step.is-on .pil-how__bar { animation: pil-how-fill var(--dur, 4s) linear forwards; }
@keyframes pil-how-fill { to { width: 100%; } }

.pil-how__scene { position: relative; padding: 0 0 40px; }
.pil-how__tv { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 8px solid #2F2923; border-radius: 14px; background: #0D0B09; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55); }
.pil-how__tv::after { content: ""; position: absolute; left: 50%; bottom: -30px; width: 30%; height: 22px; transform: translateX(-50%); background: #2F2923; border-radius: 0 0 8px 8px; }
.pil-how__phone { position: absolute; right: -2%; bottom: 0; width: 27%; aspect-ratio: 780 / 1688; overflow: hidden; border: 5px solid #3B342D; border-radius: 22px; background: #111; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6); transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pil-how__scene[data-step="1"] .pil-how__phone { transform: translate(-8%, -3%) rotate(-5deg); }
.pil-how__shot { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity 0.6s; }
.pil-how__shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pil-how__scene[data-step="1"] .pil-how__shot--1,
.pil-how__scene[data-step="2"] .pil-how__shot--2,
.pil-how__scene[data-step="3"] .pil-how__shot--3 { opacity: 1; }
.pil-how__nophone { max-width: 1160px; margin: 36px auto 0; font-size: 15px; line-height: 1.6; text-align: center; color: var(--muted); }
.pil-how__nophone-link { margin-left: 4px; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pil-how__nophone-link:hover { filter: brightness(1.15); }

@media (max-width: 860px) {
	.pil-how__body { grid-template-columns: minmax(0, 1fr); }
	.pil-how__scene { max-width: 560px; width: 100%; margin: 0 auto; }
}
@media (max-width: 600px) {
	.pil-how__step { padding: 14px; gap: 12px; }
	.pil-how__phone { width: 36%; right: 0; border-width: 4px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.pil-how__shot, .pil-how__phone, .pil-how__step, .pil-how__num { transition: none; }
	.pil-how__bar { display: none; }
}

@media (max-width: 900px) {
	.pil-events__grid, .pil-cards__grid { grid-template-columns: 1fr; }
	.pil-book { padding: 56px 0; }
}
