/* Les mix de DJ Boujou (1.111) : page /mix/ (platine et bac à vinyles), lecteurs, bandeau d'écoute de la page Le DJ, entrée « Mes mix » du menu de la page.
   Balisage : inc/mixes.php, page-mix.php, template-parts/le-dj/mixes.php ; script : assets/js/mix.js. */

/* ---------- Lecteur : visuel du thème, qui devient le vrai lecteur au clic ---------- */
.mxp-wrap { width: 100%; }
.mxp-frame { display: block; width: 100%; border: 0; border-radius: 12px; background: #14110e; }
.mxp-note { margin: 10px 2px 0; font-size: 12px; line-height: 1.55; color: var(--muted); }
.mxp { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; height: 120px; padding: 0 20px; background: #14110e; border: 1px solid rgba(201, 162, 75, 0.28); border-radius: 12px; color: #F5EFE4; overflow: hidden; text-align: left; }
.mxp__thumb { flex: none; width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }
.mxp__play { flex: none; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: var(--gold); color: var(--night); cursor: pointer; transition: transform 0.25s, box-shadow 0.25s; }
.mxp__play:hover, .mxp__play:focus-visible { transform: scale(1.07); box-shadow: 0 0 0 7px rgba(201, 162, 75, 0.25); }
.mxp__play svg { width: 22px; height: 22px; }
.mxp__play .i-pause { display: none; }
.mxp__info { min-width: 0; flex: 0 1 230px; }
.mxp__info b { display: block; font-size: 15px; line-height: 1.3; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mxp__info span { display: block; margin-top: 3px; font-size: 12px; color: rgba(245, 239, 228, 0.62); }
.mxp__wave { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 2px; height: 48px; }
.mxp__wave i { flex: 1 1 0; min-width: 2px; max-width: 5px; height: var(--h); background: rgba(245, 239, 228, 0.26); border-radius: 3px; }
.mxp__brand { position: absolute; right: 16px; bottom: 9px; font-size: 11px; letter-spacing: 0.04em; color: rgba(245, 239, 228, 0.45); }
.mxp__time { position: absolute; right: 16px; top: 9px; font-size: 11px; color: rgba(245, 239, 228, 0.55); font-variant-numeric: tabular-nums; }

/* Lecteur d'un fichier audio du site : même présentation, mais c'est lui qui lit le son */
.mxp.is-playing .mxp__play .i-play { display: none; }
.mxp.is-playing .mxp__play .i-pause { display: block; }
.mxp--own .mxp__wave { cursor: pointer; }
.mxp--own .mxp__wave:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.mxp__wave i.is-done { background: var(--gold); }
.mxp__clock { font-variant-numeric: tabular-nums; }
.mxp-wrap--own { container-type: inline-size; }
/* Place étroite (colonne de la platine sur tablette, téléphone) : la forme d'onde passe sur sa propre ligne, assez large pour se déplacer dedans */
@container (max-width: 560px) {
	.mxp--own.mxp--compact { height: auto; flex-wrap: wrap; padding: 14px 16px; row-gap: 10px; }
	.mxp--own.mxp--compact .mxp__info { flex: 1 1 0; }
	.mxp--own.mxp--compact .mxp__wave { display: flex; flex: 1 1 100%; order: 3; height: 36px; }
}

/* Grand lecteur : la photo occupe tout le visuel */
.mxp--cover { display: block; height: 400px; padding: 0; background: linear-gradient(160deg, #3a2f1c, #14110e); }
.mxp--cover > * { position: absolute; }
.mxp--cover .mxp__img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mxp--cover::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg, rgba(14, 12, 10, 0.12) 0%, rgba(14, 12, 10, 0.22) 40%, rgba(14, 12, 10, 0.88) 100%); }
.mxp--cover > :not(.mxp__img) { z-index: 2; }
.mxp--cover .mxp__play { left: 50%; top: 44%; width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.mxp--cover .mxp__play svg { width: 30px; height: 30px; }
.mxp--cover .mxp__info { left: 24px; right: 24px; bottom: 66px; flex: none; }
.mxp--cover .mxp__info b { font-family: var(--serif); font-weight: 500; font-size: 22px; white-space: normal; overflow: visible; }
.mxp--cover .mxp__wave { left: 24px; right: 24px; bottom: 22px; height: 30px; }
.mxp--cover .mxp__brand { top: 14px; bottom: auto; left: 24px; right: auto; }
.mxp--cover .mxp__time { top: 14px; right: 24px; }

/* Ondes : elles dansent quand la lecture est lancée (le lecteur est alors celui du service) */
@keyframes mx-bar { from { transform: scaleY(0.4); } to { transform: scaleY(1); } }
@keyframes mx-spin { to { transform: rotate(360deg); } }
@keyframes mx-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------- Chips ---------- */
.mx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mx-chip { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line-strong); font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); background: transparent; }
button.mx-chip { cursor: pointer; font-family: inherit; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
button.mx-chip:hover { border-color: var(--gold); }
button.mx-chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--night); }
.mx-meta { margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Disque vinyle ---------- */
.mx-vinyl { position: relative; flex: none; width: var(--s, 220px); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 24px 44px -22px #000, 0 0 0 2px rgba(201, 162, 75, 0.3); }
.mx-vinyl__disc { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #0c0a08 0 11%, transparent 11.5%), repeating-radial-gradient(circle at 50% 50%, #221e19 0 2px, #342e27 2px 3px); animation: mx-spin 3.4s linear infinite; animation-play-state: paused; }
.mx-vinyl__disc::before { content: ""; position: absolute; inset: 33%; border-radius: 50%; background-color: var(--gold); background-image: var(--label, none); background-position: center; background-size: cover; border: 3px solid #0c0a08; }
.mx-vinyl__disc::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #0c0a08; }
.mx-vinyl::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: conic-gradient(from 25deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.13) 9%, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.13) 59%, rgba(255, 255, 255, 0) 70%); }

/* ---------- Page /mix/ : la platine ---------- */
.mxb { padding: 72px 0 96px; background: var(--night); }
.mxb-admin-note { margin: 0; padding: 12px var(--gutter); background: #fff3cd; color: #5c4400; font-size: 13.5px; text-align: center; }
.mxb-deck { position: relative; display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 64px; align-items: center; margin-bottom: 72px; scroll-margin-top: 140px; }
/* Glisser une pochette sur la platine (1.137) : un cadre en pointillés apparaît pendant le glissement, plein et teinté au-dessus de la platine, avec le texte « Déposez la pochette ici ». */
.mxb-deck::before { content: ""; position: absolute; z-index: 3; inset: -22px -26px; border: 2px dashed rgba(201, 162, 75, 0.55); border-radius: 26px; background: rgba(201, 162, 75, 0); opacity: 0; pointer-events: none; transition: opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease; }
.mxb.is-dragging .mxb-deck::before { opacity: 1; }
.mxb-deck.is-drop::before { border-style: solid; border-color: var(--gold); background: rgba(201, 162, 75, 0.12); }
.mxb-deck[data-drop]::after { content: attr(data-drop); position: absolute; z-index: 4; left: 50%; top: 50%; padding: 12px 22px; border-radius: 99px; background: var(--gold); color: #1D1A17; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; transform: translate(-50%, -50%) scale(0.9); opacity: 0; pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transition: opacity 0.2s ease, transform 0.2s ease; }
.mxb-deck.is-drop[data-drop]::after { opacity: 1; transform: translate(-50%, -50%); }
.mxb-tt { position: relative; aspect-ratio: 1; border-radius: 22px; background: linear-gradient(145deg, #2d2721, #17130f); box-shadow: 0 34px 70px -34px #000, inset 0 0 0 1px rgba(201, 162, 75, 0.28); display: grid; place-items: center; }
.mxb-tt .mx-vinyl { --s: 82%; }
.mxb-arm { position: absolute; right: 7%; top: 6%; width: 12px; height: 56%; transform-origin: 50% 9px; transform: rotate(-22deg); transition: transform 0.9s cubic-bezier(0.3, 0.7, 0.2, 1); pointer-events: none; }
.mxb-arm::before { content: ""; position: absolute; left: 3px; top: 0; width: 6px; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #d9d4ca, #8d877c); }
.mxb-arm::after { content: ""; position: absolute; left: -5px; top: -8px; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e7c981, #7E6226); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); }
.mxb-deck.is-playing .mxb-arm { transform: rotate(6deg); }
.mxb-deck.is-playing .mx-vinyl__disc { animation-play-state: running; }
.mxb-deck.is-swap { animation: mx-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.mxb-deck__text { min-width: 0; }
.mxb-deck__text .h2 { margin: 6px 0 12px; }
.mxb-deck__text .h2 em { font-style: italic; color: var(--accent); }
.mxb-deck__p { margin: 0 0 20px; font-size: 15.5px; line-height: 1.75; color: var(--muted); max-width: 52ch; }
.mxb-deck__text .mx-chips { margin-bottom: 14px; }
.mxb-deck__text .mx-meta { margin-bottom: 4px; }
.mxb-deck__player { margin-top: 20px; max-width: 620px; }
.mxb-deck__link { margin: 16px 0 0; }

/* ---------- Le bac à vinyles ---------- */
.mxb-crate-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mxb-crate-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 24px; color: var(--cream); }
.mxb-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.mxb-crate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 40px; margin: 0; padding: 0; list-style: none; }
.mxb-item.is-off { display: none; }
.mxb-sleeve { position: relative; display: block; width: 100%; color: inherit; text-decoration: none; cursor: pointer; -webkit-user-drag: element; }
.mxb-item.is-drag { opacity: 0.45; }
.mxb-sleeve__art { position: relative; display: block; width: 86%; aspect-ratio: 1; }
.mxb-sleeve__disc { position: absolute; inset: 4% 0; border-radius: 50%; background: repeating-radial-gradient(circle, #1a1713 0 2px, #2c2721 2px 3px); box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.35), 0 12px 24px -12px #000; transition: transform 0.55s cubic-bezier(0.2, 0.75, 0.2, 1); }
.mxb-sleeve__disc::before { content: ""; position: absolute; inset: 34%; border-radius: 50%; background: var(--gold); border: 3px solid #0c0a08; }
.mxb-sleeve__cover { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border-radius: 3px; overflow: hidden; background: linear-gradient(145deg, #7E6226, #2a2116); box-shadow: 0 16px 30px -14px #000; transition: transform 0.4s cubic-bezier(0.2, 0.75, 0.2, 1); }
.mxb-sleeve__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mxb-sleeve__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 40%, rgba(0, 0, 0, 0.35)); }
.mxb-sleeve__cover--none { display: flex; align-items: flex-end; padding: 14px; background: linear-gradient(150deg, #E5C677, #C9A24B 55%, #7E6226); }
.mxb-sleeve__cover--none span { position: relative; z-index: 1; font-family: var(--serif); font-size: 18px; line-height: 1.2; font-weight: 500; color: #1C1916; }
.mxb-sleeve:hover .mxb-sleeve__disc, .mxb-sleeve:focus-visible .mxb-sleeve__disc { transform: translateX(44%) rotate(120deg); }
.mxb-sleeve:hover .mxb-sleeve__cover { transform: translateY(-6px); }
.mxb-sleeve.is-sel .mxb-sleeve__disc { transform: translateX(38%); }
.mxb-sleeve.is-sel .mxb-sleeve__cover { box-shadow: 0 0 0 2px var(--gold), 0 16px 30px -14px #000; }
.mxb-sleeve__t { display: block; margin-top: 14px; width: 86%; font-family: var(--serif); font-size: 17px; line-height: 1.3; color: var(--cream); }
.mxb-sleeve__s { display: block; margin-top: 3px; width: 86%; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.mxb-sleeve__now { position: absolute; z-index: 2; left: 8px; top: 8px; padding: 4px 9px; border-radius: 99px; background: var(--gold); color: var(--night); font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0; transform: translateY(-4px); transition: opacity 0.3s, transform 0.3s; }
.mxb-sleeve.is-sel .mxb-sleeve__now { opacity: 1; transform: none; }
.mxb-empty { margin: 0; padding: 40px 0; text-align: center; font-size: 16px; color: var(--muted); }

/* Arrivée des pochettes : l'une après l'autre quand on défile (visibles d'emblée sans script) */
@media (prefers-reduced-motion: no-preference) {
	.mxb.has-js:not(.mxb--still) .mxb-item { transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--d, 0) * 70ms); }
	.mxb.has-js:not(.mxb--still) .mxb-item:not(.is-in) { opacity: 0; transform: translateY(26px); }
}

/* ---------- Bandeau d'écoute de la page Le DJ ---------- */
.sec:has(.mxband) { position: relative; overflow: hidden; }
.sec .mxband.section { padding-bottom: 124px; } /* place pour l'onde du bas (l'emporte sur l'espacement des rubriques de Le DJ) */
.mxband__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.mxband__text .h2 { margin: 6px 0 14px; }
.mxband__text p { margin: 0 0 24px; font-size: 15.5px; line-height: 1.75; color: var(--muted); max-width: 44ch; }
.mxband__player { min-width: 0; }
.mxband__wave { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding: 0 16px; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.mxband__wave i { flex: 1 1 0; max-width: 9px; height: var(--h); border-radius: 99px; background: linear-gradient(180deg, #E5C677, #C9A24B 55%, #7E6226); transform-origin: 50% 100%; opacity: 0.85; animation: mx-bar 1.6s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -63ms); }

/* ---------- Entrée « Mes mix » du menu de la page ---------- */
.subnav a.subnav__mix { display: flex; align-items: center; gap: 9px; color: #7E6226; }
.subnav__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.subnav__eq b { width: 2px; border-radius: 1px; background: currentColor; transform-origin: 50% 100%; animation: mx-bar 0.8s ease-in-out infinite alternate; }
.subnav__eq b:nth-child(1) { height: 7px; animation-delay: -0.2s; }
.subnav__eq b:nth-child(2) { height: 12px; animation-delay: -0.5s; }
.subnav__eq b:nth-child(3) { height: 9px; animation-delay: -0.1s; }

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 1100px) {
	.mxb-crate { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.mxb-deck, .mxband__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
	.mxb-deck::before { inset: -14px -10px; }
	.mxb-deck[data-drop]::after { top: 30%; }
	.mxb-deck { margin-bottom: 56px; }
	.mxb-tt { max-width: 340px; }
	.mxb-arm { right: 15%; transform: rotate(-12deg); }
	.mxb-crate { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
	.sec .mxband.section { padding-bottom: 112px; }
}
@media (max-width: 640px) {
	.mxb { padding-top: 48px; padding-bottom: 64px; }
	.mxb-sleeve__t { font-size: 15px; }
	.mxb-sleeve__cover--none span { font-size: 15px; }
	.mxp { padding: 0 14px; gap: 12px; }
	.mxp__thumb { width: 64px; height: 64px; }
	.mxp__play { width: 48px; height: 48px; }
	.mxp__info { flex-basis: 120px; }
	.mxp__wave { display: none; }
	.mxp--own.mxp--compact { height: auto; flex-wrap: wrap; padding: 14px; row-gap: 10px; }
	.mxp--own.mxp--compact .mxp__info { flex: 1 1 0; }
	.mxp--own.mxp--compact .mxp__wave { display: flex; flex: 1 1 100%; order: 3; height: 40px; }
	.mxp--cover { height: 340px; }
	.mxp--cover .mxp__wave { display: flex; }
	.mxband__wave { height: 64px; }
	.sec .mxband.section { padding-bottom: 92px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
	.mx-vinyl__disc, .mxband__wave i, .subnav__eq b { animation: none !important; }
	.mxb-deck.is-swap { animation: none; }
	.mxb-sleeve__disc, .mxb-arm, .mxb-sleeve__cover { transition: none; }
}
