/* Audyo — page d'accueil et sélecteur de langue
   © 2026 TontonStudio99 */

/* ---------- langues : polices de secours (Baloo 2 = latin seulement) ---------- */
:root[data-lang="ru"] { --font-title: 'Comfortaa', 'Nunito', system-ui, sans-serif; }
:root[data-lang="zh"] { --font-ui: 'Noto Sans SC', 'Microsoft YaHei', 'Nunito', system-ui, sans-serif; --font-title: 'Noto Sans SC', 'Microsoft YaHei', 'Nunito', sans-serif; }

/* ---------- sélecteur de langue (repris d'Ajedrez99 / Tetrys 2026) ---------- */
.lang-menu { position: relative; z-index: 40; }
.lang-trigger {
  display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 11px;
  font: 700 13px var(--font-ui); color: var(--text); cursor: pointer;
  background: rgba(10, 16, 52, .62); border: 1.5px solid rgba(140, 165, 255, .28); border-radius: 11px;
  backdrop-filter: blur(8px); transition: border-color .2s, background .2s;
}
.lang-trigger:hover { border-color: rgba(34, 211, 238, .7); background: rgba(20, 30, 80, .8); }
.lang-trigger:focus-visible { outline: 2px solid var(--yellow, #facc15); outline-offset: 2px; }
.lang-trigger .flag, .lang-opt .flag { display: inline-flex; width: 24px; height: 16px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); flex: 0 0 auto; }
.lang-trigger .flag img, .lang-opt .flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lang-chev { font-size: 11px; opacity: .8; transition: transform .2s; }
.lang-menu.open .lang-chev { transform: rotate(180deg); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; min-width: 196px;
  background: rgba(12, 18, 58, .97); border: 1.5px solid rgba(140, 165, 255, .3); border-radius: 13px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 0 24px rgba(168, 85, 247, .22);
  opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s;
}
.lang-menu.open .lang-list { opacity: 1; transform: none; }
.lang-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 9px; cursor: pointer; color: var(--text); }
.lang-opt:hover, .lang-opt:focus-visible { background: rgba(34, 211, 238, .15); outline: none; }
.lang-opt:focus-visible { box-shadow: inset 0 0 0 2px var(--yellow, #facc15); }
.lang-opt.selected { background: rgba(236, 72, 153, .16); }
.lang-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; text-align: left; }
.lang-text b { font: 800 14px 'Nunito', 'Noto Sans SC', system-ui, sans-serif; }
.lang-text small { font: 11px system-ui, 'Segoe UI', sans-serif; color: var(--muted, #9aa6d6); }
.lang-text small:empty { display: none; }
.lang-check { margin-left: auto; color: var(--cyan, #22d3ee); opacity: 0; font-weight: 800; }
.lang-opt.selected .lang-check { opacity: 1; }
.top-lang .lang-trigger { min-height: 40px; }
@media (max-width: 1600px) { .top-lang .lang-name { display: none; } .top-lang .lang-trigger { padding: 6px 9px; } }

/* ---------- page d'accueil ---------- */
body.home-open { overflow: hidden; }
.home {
  --px: 0; --py: 0;
  position: fixed; inset: 0; z-index: 70; overflow: hidden auto; color: #fff;
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); background: #060a24;
  opacity: 0; transition: opacity .45s ease;
}
.home.in { opacity: 1; }
.home[hidden] { display: none; }
.home-bg {
  position: fixed; inset: -2%; width: 104%; height: 104%; object-fit: cover; z-index: 0;
  transform: translate(calc(var(--px) * -14px), calc(var(--py) * -10px)) scale(1.02);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.home-veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 55% at 50% 42%, rgba(6, 10, 36, .62), rgba(6, 10, 36, .2) 70%, transparent),
    linear-gradient(180deg, rgba(6, 10, 36, .55) 0%, transparent 22%, transparent 62%, rgba(6, 10, 36, .82) 100%);
}
.home > *:not(.home-bg):not(.home-veil):not(.home-notes) { position: relative; z-index: 2; }

/* notes qui montent */
.home-notes { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.home-notes i {
  position: absolute; bottom: -60px; font-style: normal; font-size: 30px; opacity: 0;
  color: hsl(calc(var(--h) * 1deg) 95% 70%); text-shadow: 0 0 16px currentColor;
  animation: noteRise var(--d) linear infinite; animation-delay: var(--dl);
}
.home-notes i:nth-child(1) { left: 6%; --h: 190; --d: 11s; --dl: 0s; }
.home-notes i:nth-child(2) { left: 18%; --h: 320; --d: 14s; --dl: -4s; font-size: 22px; }
.home-notes i:nth-child(3) { left: 31%; --h: 45; --d: 12s; --dl: -8s; }
.home-notes i:nth-child(4) { left: 44%; --h: 270; --d: 16s; --dl: -2s; font-size: 24px; }
.home-notes i:nth-child(5) { left: 58%; --h: 140; --d: 13s; --dl: -10s; }
.home-notes i:nth-child(6) { left: 70%; --h: 20; --d: 15s; --dl: -6s; font-size: 26px; }
.home-notes i:nth-child(7) { left: 82%; --h: 200; --d: 12s; --dl: -3s; }
.home-notes i:nth-child(8) { left: 93%; --h: 300; --d: 17s; --dl: -12s; font-size: 22px; }
@keyframes noteRise {
  0% { transform: translateY(0) rotate(-10deg); opacity: 0; }
  10% { opacity: .85; }
  80% { opacity: .5; }
  100% { transform: translateY(-110vh) rotate(18deg); opacity: 0; }
}

#home > .home-top { z-index: 5; }   /* au-dessus de la zone centrale : sinon la liste des langues ne reçoit pas les clics */
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px clamp(16px, 4vw, 40px) 0; }
.home-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px;
  font: 700 13px var(--font-ui); color: #dfe6ff; background: rgba(10, 16, 52, .55); border: 1px solid rgba(140, 165, 255, .25); backdrop-filter: blur(8px);
}

.home-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(22px, 4vh, 44px); padding: 12px clamp(16px, 4vw, 40px) 18px; }

.home-hero { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 40px); flex-wrap: wrap; text-align: left; }
.home-logo-wrap { position: relative; width: clamp(140px, 17vw, 210px); aspect-ratio: 1; display: grid; place-items: center; flex: none; }
.home-logo {
  width: 100%; height: auto; border-radius: 50%; position: relative; z-index: 1;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .5)) drop-shadow(0 0 28px rgba(236, 72, 153, .45));
  animation: logoFloat 5s ease-in-out infinite;
}
@keyframes logoFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.home-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid; opacity: 0; animation: ring 3.6s ease-out infinite; }
.home-ring.r1 { border-color: #22d3ee; }
.home-ring.r2 { border-color: #ec4899; animation-delay: 1.2s; }
.home-ring.r3 { border-color: #facc15; animation-delay: 2.4s; }
@keyframes ring { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }

.home-title { margin: 0; font: 800 clamp(64px, 10vw, 132px)/.9 'Baloo 2', var(--font-title); letter-spacing: 1px; display: flex; }
.home-title span {
  display: inline-block; background: linear-gradient(180deg, #fff 0%, var(--c) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)) drop-shadow(0 0 22px color-mix(in srgb, var(--c) 60%, transparent));
  animation: letterBounce 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * .14s);
}
.home-title span:nth-child(1) { --c: #ff8a1f; --i: 0; }
.home-title span:nth-child(2) { --c: #ff4757; --i: 1; }
.home-title span:nth-child(3) { --c: #ec4899; --i: 2; }
.home-title span:nth-child(4) { --c: #a855f7; --i: 3; }
.home-title span:nth-child(5) { --c: #22d3ee; --i: 4; }
@keyframes letterBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-12px); } }
.home-tagline { margin: 10px 0 0; max-width: 30ch; font: 700 clamp(17px, 1.7vw, 22px)/1.35 var(--font-ui); color: #e8ecff; text-shadow: 0 2px 12px rgba(0, 0, 0, .7); text-wrap: balance; }
.home-eq { display: flex; align-items: flex-end; gap: 4px; height: 30px; margin-top: 14px; }
.home-eq i { width: 6px; border-radius: 3px; background: linear-gradient(0deg, #22d3ee, #a855f7, #ec4899); height: 30%; animation: eq 1s ease-in-out infinite alternate; }
.home-eq i:nth-child(3n) { animation-duration: .7s; }
.home-eq i:nth-child(3n+1) { animation-duration: 1.3s; animation-delay: -.4s; }
.home-eq i:nth-child(4n) { animation-duration: .9s; animation-delay: -.2s; }
.home-eq i:nth-child(5n) { animation-duration: 1.1s; animation-delay: -.7s; }
@keyframes eq { 0% { height: 18%; } 100% { height: 100%; } }

/* cartes des programmes */
.home-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); width: min(1240px, 100%); }
.home-card {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto; justify-items: start; gap: 8px;
  min-height: 200px; padding: 20px 18px 16px; text-align: left; cursor: pointer; color: #fff; overflow: hidden;
  border-radius: 20px; border: 1.5px solid color-mix(in srgb, var(--c1) 45%, transparent);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--c1) 26%, transparent), color-mix(in srgb, var(--c2) 12%, transparent) 60%, rgba(8, 12, 40, .5)),
    rgba(8, 12, 40, .55);
  backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .14);
  opacity: 0; transform: translateY(26px) scale(.97);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1.2), box-shadow .3s, border-color .3s;
}
.home.in .home-card { animation: cardIn .7s cubic-bezier(.2, .8, .2, 1) forwards; }
.home.in .home-card:nth-child(1) { animation-delay: .15s; }
.home.in .home-card:nth-child(2) { animation-delay: .25s; }
.home.in .home-card:nth-child(3) { animation-delay: .35s; }
.home.in .home-card:nth-child(4) { animation-delay: .45s; }
.home.in .home-card:nth-child(5) { animation-delay: .55s; }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.home-card::before {             /* reflet qui balaie la carte au survol */
  content: ''; position: absolute; inset: -40% -60%; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%);
  transform: translateX(-60%); transition: transform .8s ease; pointer-events: none;
}
.home-card::after {              /* halo coloré */
  content: ''; position: absolute; width: 180px; height: 180px; right: -60px; bottom: -70px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c1) 55%, transparent), transparent 70%); opacity: .55; transition: opacity .3s, transform .4s; pointer-events: none;
}
.home-card:hover, .home-card:focus-visible {
  transform: translateY(-8px) scale(1.02) !important; border-color: var(--c1);
  box-shadow: 0 22px 44px rgba(0, 0, 0, .5), 0 0 34px color-mix(in srgb, var(--c1) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.home-card:hover::before, .home-card:focus-visible::before { transform: translateX(60%); }
.home-card:hover::after, .home-card:focus-visible::after { opacity: .9; transform: scale(1.2); }
.home-card:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.home-card:active { transform: translateY(-3px) scale(.99) !important; }
.hc-ico {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 17px; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 22px color-mix(in srgb, var(--c1) 50%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1.4);
}
.hc-ico .ico { width: 30px; height: 30px; }
.home-card:hover .hc-ico, .home-card:focus-visible .hc-ico { transform: rotate(-8deg) scale(1.12); }
.home-card[data-go="dj"] .hc-ico .ico { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hc-name { font: 800 clamp(20px, 1.8vw, 25px)/1.05 var(--font-title); text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.hc-desc { font: 600 14px/1.4 var(--font-ui); color: #dbe2ff; }
.hc-go { justify-self: end; font: 800 20px var(--font-ui); color: var(--c1); transition: transform .3s; }
.home-card:hover .hc-go { transform: translateX(6px); }
.hc-key {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  font: 700 12px var(--font-mono); color: rgba(255, 255, 255, .8); background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .2);
}
.home-hint { margin: 0; font: 600 13px var(--font-ui); color: #c3cbef; text-align: center; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.home-foot { padding: 0 16px 16px; text-align: center; font: 600 12.5px var(--font-ui); color: #aab4e0; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }

@media (max-width: 1100px) {
  .home-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .home-hero { flex-direction: column; text-align: center; }
  .home-heading { display: flex; flex-direction: column; align-items: center; }
  .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-card { min-height: 0; padding: 16px 14px 12px; }
  .home-card:last-child { grid-column: 1 / -1; }
  .hc-key, .home-hint { display: none; }
  .home-chip { font-size: 12px; }
}
@media (max-width: 420px) {
  .home-cards { grid-template-columns: minmax(0, 1fr); }
  .home-chip { display: none; }
  .home-top { justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .home-logo, .home-ring, .home-title span, .home-eq i, .home-notes i, .home-card[data-go="dj"] .hc-ico .ico { animation: none; }
  .home-ring, .home-notes { display: none; }
  .home-card { opacity: 1; transform: none; }
  .home.in .home-card { animation: none; }
  .home-bg { transform: none; transition: none; }
}

.party-btn { white-space: nowrap; }
/* éditeur : la bascule Onde / Spectre passe en icônes quand la barre manque de place */
@media (max-width: 1560px) { #btnViewWave > span:not(.ico), #btnViewSpec > span:not(.ico) { display: none; } }

/* appui long sur le logo pour revenir à l'accueil (anneau qui se remplit, comme dans Ajedrez99) */
@property --hold { syntax: '<number>'; inherits: false; initial-value: 0; }
.brand { position: relative; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; --logo: 88px; }
.brand::after {
  content: ''; position: absolute; left: calc(var(--logo) * .09); top: 50%; width: calc(var(--logo) * .82); height: calc(var(--logo) * .82); transform: translateY(-50%);
  border-radius: 50%; padding: 4px; pointer-events: none; opacity: 0;
  background: conic-gradient(#7aa0ff calc(var(--hold) * 360deg), rgba(255, 255, 255, .15) 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: opacity .15s;
}
.brand.holding::after { opacity: 1; animation: hold-fill var(--hold-ms, 1.2s) linear forwards; }
.brand.holding img { filter: brightness(.65) drop-shadow(0 0 12px rgba(122, 160, 255, .6)); transform: scale(.94); transition: filter var(--hold-ms, 1.2s), transform .2s; }
@keyframes hold-fill { from { --hold: 0; } to { --hold: 1; } }
@media (max-width: 860px) { .brand { --logo: 60px; } }
