/* Section 03-human — fichier propre à la section (base commune : ../styles.css).
   « Votre son, votre signature » : la scène (votre musique) au centre d'un système orbital ;
   paroles, images et sorties gravitent autour. Le spectre et les orbites sont dessinés par
   js/03-human.js ; sans script ou avec « réduire les animations », tout reste en place, figé. */

.human {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60% 50% at 72% 46%, rgb(255 136 79 / 9%), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgb(167 139 250 / 8%), transparent 70%),
    linear-gradient(180deg, var(--canvas) 0%, #0A0C10 45%, var(--canvas-deep) 100%);
}
/* Fondus vers les sections voisines (écriture au-dessus, mur en dessous). */
.human::before, .human::after { content: ""; position: absolute; left: 0; right: 0; height: 120px; z-index: 6; pointer-events: none; }
.human::before { top: 0; background: linear-gradient(var(--canvas), transparent); }
.human::after { bottom: 0; background: radial-gradient(40% 90% at 15% 100%, rgb(167 139 250 / 7%), transparent 70%), linear-gradient(transparent, var(--canvas-deep)); }
.human-stars { opacity: .45; z-index: 0; }
.human-stars::before, .human-stars::after { animation: none; opacity: .8; } /* fixes : la scène bouge déjà assez, et le scintillement plein cadre coûte cher */

.human-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; align-items: center;
  gap: 8px; padding-block: 72px 88px; }
@media (min-width: 1024px) {
  .human-grid { grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 0; min-height: min(820px, 100vh); padding-block: 90px 110px; }
}

/* ------------------------------------------------------------------ texte */
.human-copy { position: relative; z-index: 7; }
.human-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-bright); }
.human-onair { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.human-onair i { width: 3px; height: 40%; border-radius: 2px; background: linear-gradient(to top, var(--warm), var(--brand-bright));
  animation: human-eq .9s ease-in-out infinite alternate; }
.human-onair i:nth-child(2) { animation-duration: .6s; animation-delay: -.3s; }
.human-onair i:nth-child(3) { animation-duration: 1.2s; animation-delay: -.7s; }
.human-onair i:nth-child(4) { animation-duration: .75s; animation-delay: -.2s; }
@keyframes human-eq { from { height: 25%; } to { height: 100%; } }

.human-title { max-width: 13ch; font-size: clamp(38px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance;
  text-shadow: 0 2px 30px rgb(6 8 10 / 80%); }
.human-key { display: inline-block; padding-right: .06em; background: linear-gradient(100deg, var(--brand-bright) 0%, var(--fg) 38%, #FFD2B8 62%, var(--warm) 100%);
  background-size: 220% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: human-key 9s ease-in-out infinite alternate; text-shadow: none; filter: drop-shadow(0 0 22px rgb(255 136 79 / 28%)); }
@keyframes human-key { to { background-position: 0 0; } }

/* Paraphe : une onde sonore qui se referme en signature, tracée à l'apparition. */
.human-sign { display: block; width: min(100%, 440px); height: auto; margin-top: 14px; overflow: visible; }
.human-sign path { fill: none; stroke: url(#human-sign-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgb(26 255 234 / 45%)); stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .human-sign.reveal path { stroke-dashoffset: 1; }
.js .human-sign.reveal.is-visible path { transition: stroke-dashoffset 2.6s cubic-bezier(.45,.05,.25,1) .5s; stroke-dashoffset: 0; }

.human-lead { max-width: 42ch; margin-top: 18px; font-size: clamp(17px, 1.5vw, 19px); color: #C3CAD4; text-shadow: 0 1px 18px rgb(6 8 10 / 90%); }

/* ------------------------------------------------------------------ système orbital */
.human-orbit { position: relative; width: 100%; aspect-ratio: 1; isolation: isolate; pointer-events: none; }
@media (min-width: 1024px) {
  .human-orbit { width: min(128%, 860px); justify-self: end;
    /* Le système déborde jusqu'au bord de la fenêtre, à droite. */
    margin: -14% calc(16px - var(--gutter) - (100vw - min(100vw, var(--max))) / 2) -16% 0; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .human-orbit { --spread: .86; width: 112%; }
}

/* La salle de concert, centrée sur la lumière de la scène, fondue dans la nuit. */
.human-photo { position: absolute; z-index: 0; width: 250%; aspect-ratio: 4 / 3; left: -75%; top: -32.5%;
  background: url("../assets/media/stage-audience.jpg") center / 100% 100% no-repeat; opacity: .72; filter: brightness(.6) saturate(1.15) contrast(1.25);
  -webkit-mask-image: radial-gradient(38% 44% at 50% 46%, #000 25%, rgb(0 0 0 / 55%) 58%, transparent 100%);
  mask-image: radial-gradient(38% 44% at 50% 46%, #000 25%, rgb(0 0 0 / 55%) 58%, transparent 100%); }

/* Faisceaux de scène qui balaient la salle. */
.human-beams { position: absolute; z-index: 0; inset: 0; } /* pas de mix-blend-mode : trop coûteux une fois animé */
.human-beams span { position: absolute; left: 50%; top: 50%; width: 140%; height: 140%; transform-origin: 0 0;
  background: conic-gradient(from 0deg at 0 0, transparent 122deg, rgb(255 214 170 / 26%) 135deg, transparent 148deg);
  -webkit-mask-image: radial-gradient(circle at 0 0, #000 0, rgb(0 0 0 / 55%) 35%, transparent 70%);
  mask-image: radial-gradient(circle at 0 0, #000 0, rgb(0 0 0 / 55%) 35%, transparent 70%);
  animation: human-beam 11s ease-in-out infinite alternate; will-change: transform; }
.human-beams span:nth-child(1) { --a: 168deg; }
.human-beams span:nth-child(2) { --a: 228deg; animation-duration: 14s; animation-delay: -5s;
  background: conic-gradient(from 0deg at 0 0, transparent 127deg, rgb(26 255 234 / 22%) 135deg, transparent 143deg); }
.human-beams span:nth-child(3) { --a: 284deg; animation-duration: 12s; animation-delay: -8s;
  background: conic-gradient(from 0deg at 0 0, transparent 125deg, rgb(167 139 250 / 24%) 135deg, transparent 145deg); }
.human-beams span { transform: rotate(var(--a)); }
@keyframes human-beam { from { transform: rotate(calc(var(--a) - 14deg)); } to { transform: rotate(calc(var(--a) + 14deg)); } }

.human-orbit canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.human-canvas-back { z-index: 1; }
.human-canvas-front { z-index: 4; }
.human-sats { position: absolute; inset: 0; } /* sans contexte d'empilement : chaque satellite passe devant ou derrière le cœur */

/* Le cœur : la lumière de la scène, qui bat au rythme du morceau (échelle et opacité posées par le script). */
.human-core { position: absolute; z-index: 3; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%) scale(.975); will-change: transform, opacity;
  background: radial-gradient(circle, #FFFFFF 0%, #FFF4E6 14%, rgb(255 196 150 / 85%) 26%, rgb(255 136 79 / 42%) 42%, rgb(0 194 180 / 14%) 58%, transparent 70%);
  opacity: .88; }
.human-core::after { content: ""; position: absolute; inset: -60%; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 190 140 / 22%), rgb(26 255 234 / 6%) 40%, transparent 65%); }
.human-core-ring { position: absolute; inset: 22%; border-radius: 50%; border: 1px solid rgb(255 255 255 / 40%);
  box-shadow: 0 0 24px rgb(255 214 170 / 60%), inset 0 0 18px rgb(255 214 170 / 45%); }

/* ------------------------------------------------------------------ satellites */
.sat { position: absolute; left: var(--fx, 50%); top: var(--fy, 50%); z-index: 5; border-radius: 12px;
  transform: translate(-50%, -50%); will-change: transform, opacity;
  box-shadow: 0 18px 40px rgb(0 0 0 / 55%); }
.sat.is-far { z-index: 2; filter: blur(.8px) brightness(.72); }
.sat { transition: filter .6s; }
/* Animé par le script : positions calculées depuis le centre (transform seulement). */
.human-orbit.is-live .sat { left: 50%; top: 50%; }

/* Paroles : une fiche de vers, rimes allumées. */
.sat-lyrics { --fx: 80%; --fy: 58%; display: grid; gap: 7px; width: clamp(92px, 10vw, 138px); padding: 13px 14px;
  background: linear-gradient(160deg, rgb(31 36 46 / 92%), rgb(21 25 32 / 88%)); border: 1px solid rgb(26 255 234 / 35%);
  box-shadow: 0 18px 40px rgb(0 0 0 / 55%), 0 0 26px rgb(0 194 180 / 22%); }
.sat-line { display: flex; justify-content: flex-end; height: 5px; border-radius: 3px; background: rgb(168 176 189 / 40%); }
.sat-line.short { width: 64%; }
.sat-line b { width: 26%; height: 100%; border-radius: 3px; background: var(--brand-bright); box-shadow: 0 0 10px var(--brand-bright); }

/* Images : vignettes de plans. */
.sat-img { --fx: 14%; --fy: 64%; width: clamp(104px, 12vw, 170px); aspect-ratio: 16 / 9; background: var(--surface) center / cover;
  border: 1px solid rgb(26 255 234 / 45%); box-shadow: 0 18px 40px rgb(0 0 0 / 60%), 0 0 30px rgb(26 255 234 / 20%); }
.sat-img-violet { --fx: 84%; --fy: 34%; border-color: rgb(167 139 250 / 55%); box-shadow: 0 18px 40px rgb(0 0 0 / 60%), 0 0 30px rgb(167 139 250 / 25%); }

/* Sorties : un clip vertical pour les réseaux… */
.sat-clip { --fx: 22%; --fy: 30%; width: clamp(60px, 6.4vw, 92px); aspect-ratio: 9 / 16; background: var(--surface) 30% center / cover;
  border: 1px solid rgb(255 136 79 / 55%); box-shadow: 0 18px 40px rgb(0 0 0 / 60%), 0 0 30px rgb(255 136 79 / 25%); overflow: hidden; }
.sat-play { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: rgb(6 8 10 / 55%); border: 1px solid rgb(255 255 255 / 55%); }
.sat-play::after { content: ""; position: absolute; left: 40%; top: 30%; border-style: solid; border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #fff; }
.sat-progress { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 3px; border-radius: 2px; background: rgb(255 255 255 / 30%); overflow: hidden; }
.sat-progress b { display: block; width: 40%; height: 100%; background: var(--warm); animation: human-progress 7s linear infinite; }
@keyframes human-progress { from { width: 0; } to { width: 100%; } }

/* … et un disque : la sortie elle-même. */
.sat-disc { --fx: 66%; --fy: 82%; width: clamp(80px, 8.4vw, 120px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 31%, rgb(255 255 255 / 6%) 32%, transparent 33%, transparent 45%, rgb(255 255 255 / 5%) 46%, transparent 47%, transparent 60%, rgb(255 255 255 / 5%) 61%, transparent 62%),
    conic-gradient(from 30deg, #0B0D11, #2A313D 12%, #0B0D11 25%, #1F242E 50%, #0B0D11 62%, #384252 75%, #0B0D11);
  border: 1px solid rgb(167 139 250 / 45%); box-shadow: 0 18px 40px rgb(0 0 0 / 60%), 0 0 30px rgb(167 139 250 / 28%); }
.sat-disc span { position: absolute; inset: 30%; border-radius: 50%; background: var(--violet) center / cover; animation: human-spin 6s linear infinite;
  box-shadow: 0 0 0 2px #0B0D11; }
.sat-disc span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: var(--canvas-deep); }
@keyframes human-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ mobile */
@media (max-width: 1023px) {
  .human-grid { padding-block: 40px 120px; }
  .human-orbit { order: -1; width: min(100% + 2 * var(--gutter), 720px); margin-inline: calc(-1 * var(--gutter)); justify-self: center; margin-bottom: -6%; }
  .human-copy { max-width: 640px; }
}
@media (max-width: 1023px) and (min-width: 720px) { .human-orbit { margin-inline: auto; } }
@media (max-width: 560px) {
  .human-orbit { --spread: .8; width: 118vw; margin-inline: calc(50% - 59vw); margin-block: -16% -14%; }
  .sat-lyrics { width: 64px; padding: 8px 9px; gap: 4px; border-radius: 9px; }
  .sat-line { height: 3px; }
  .sat-img { width: 80px; border-radius: 8px; }
  .sat-clip { width: 44px; border-radius: 7px; }
  .sat-disc { width: 56px; }
  .sat-play { width: 34%; }
  .sat-play::after { border-width: 4px 0 4px 6px; }
}

/* ------------------------------------------------------------------ réduire les animations */
@media (prefers-reduced-motion: reduce) {
  .human-onair i, .human-key, .human-beams span, .sat-progress b, .sat-disc span { animation: none !important; }
  .human-onair i:nth-child(1) { height: 55%; } .human-onair i:nth-child(2) { height: 100%; } .human-onair i:nth-child(3) { height: 40%; } .human-onair i:nth-child(4) { height: 75%; }
  .human-key { background-position: 50% 0; }
  .sat-progress b { width: 62%; }
  .js .human-sign.reveal path { stroke-dashoffset: 0; transition: none; }
}
