/* Look festif : indigo nuit + crème, accents jaune (dîner) / rose (soirée dansante) */
:root { --bg: #15102E; --card: #221A47; --chip: #2D2358; --line: #3A2F6B; --muted: #B3A9D9; --text: #FFF6E5; --ink: #15102E; --mint: #38E1B0; --violet: #7A5CFF; }
body {
  --phase-accent: #FFD23F; --accent2: #FF4F7B; --accent: var(--theme-accent, var(--phase-accent));
  margin: 0; font: 16px/1.4 'Figtree', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh;
}
body.party { --phase-accent: #FF4F7B; --accent2: #FFD23F; }
* { box-sizing: border-box; }
h1, h2, .display { font-family: 'Bricolage Grotesque', system-ui, sans-serif; }
h1 { margin: 12px 0 0; font-weight: 800; font-size: 46px; line-height: .95; letter-spacing: -.02em; }
h2 { margin: 0 0 10px; font-weight: 800; font-size: 22px; }
.muted { color: var(--muted); font-size: 14px; }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px; position: relative; z-index: 1; }

/* Boutons : pastilles, texte sombre sur couleur vive, ombre dure */
button { font: 700 15px 'Figtree', system-ui, sans-serif; cursor: pointer; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
button:disabled { opacity: .55; cursor: default; box-shadow: none; }
button.ghost { background: var(--chip); color: var(--text); border: 2px solid var(--line); box-shadow: none; }
button.mini { min-width: 44px; padding: 0 10px; border-radius: 12px; background: var(--chip); color: var(--text); box-shadow: none; }
button.done { background: var(--mint); }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }

input[type=text], input[type=password], select, input[type=time] { width: 100%; height: 52px; padding: 0 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--ink); color: var(--text); font: 600 17px 'Figtree', system-ui, sans-serif; }
input[type=text]:focus, input[type=password]:focus { border-color: var(--accent); outline: none; }
input[type=color] { height: 44px; width: 56px; border-radius: 12px; border: 2px solid var(--line); background: var(--ink); padding: 2px; }
input::placeholder { color: var(--muted); }
input[type=checkbox] { accent-color: var(--accent); width: 20px; height: 20px; }
label.sw { display: flex; gap: 10px; align-items: center; font-weight: 600; }

.card { background: var(--card); border: 2px solid var(--line); border-radius: 24px; padding: 16px; margin-bottom: 16px; }
.card > h2 { color: var(--text); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.row + .row { border-top: 2px solid var(--line); }
.row img, .row .ph { width: 52px; height: 52px; border-radius: 12px; background: var(--chip); flex: none; object-fit: cover; }
.row .t { flex: 1; min-width: 0; }
.row .t b, .row .t span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t b { font-weight: 700; font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--chip); border: 2px solid var(--line); font-weight: 700; padding: 10px 18px; border-radius: 999px; z-index: 9; animation: pop .25s; }

.tag { flex: none; font-size: 12px; font-weight: 700; color: var(--accent); border: 2px solid var(--accent); border-radius: 999px; padding: 2px 10px; }
.num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--line); font: 800 16px 'Bricolage Grotesque', sans-serif; display: flex; align-items: center; justify-content: center; }
.num.first { background: var(--accent); color: var(--ink); }
/* Sticker de période + confettis statiques de l'en-tête */
.phase-badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 700; font-size: 14px; transform: rotate(-3deg); }
.hero { position: relative; padding: 12px 0 8px; }
.hero .deco { position: absolute; pointer-events: none; }
.deco.d1 { top: 6px; right: 14px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); }
.deco.d2 { top: 44px; right: 76px; width: 10px; height: 24px; background: var(--accent2); transform: rotate(28deg); border-radius: 3px; }
.deco.d3 { top: 14px; right: 112px; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }
.deco.d4 { top: 84px; right: 20px; width: 26px; height: 26px; border-radius: 50%; border: 4px solid var(--accent2); }
body.party .hero::after { content: "SOIRÉE DANSANTE ★ SOIRÉE DANSANTE ★ SOIRÉE DANSANTE ★ SOIRÉE DANSANTE"; display: block; margin-top: 14px; padding: 7px 0; white-space: nowrap; overflow: hidden; background: var(--accent); color: var(--ink); font: 800 13px 'Bricolage Grotesque', sans-serif; letter-spacing: .14em; transform: rotate(-1.5deg); }

/* ---------- Animations génériques (CSS pur) ---------- */
.bg-anim { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-anim::before, .bg-anim::after { content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(90px); opacity: .2; background: var(--violet); animation: drift 18s ease-in-out infinite alternate; }
.bg-anim::before { top: -30vmax; left: -20vmax; }
.bg-anim::after { bottom: -35vmax; right: -25vmax; background: var(--accent2); animation-duration: 24s; animation-direction: alternate-reverse; }
@keyframes drift { to { transform: translate(18vmax, 12vmax) scale(1.25); } }
.np { display: flex; gap: 16px; align-items: center; }
.np .cover { width: 96px; height: 96px; border-radius: 18px; flex: none; background: var(--accent) center/cover; position: relative; }
.np .cover:empty::after { content: ""; position: absolute; inset: 0; border-radius: 18px; background: radial-gradient(circle at center, var(--ink) 0 9%, transparent 10%), repeating-radial-gradient(circle at center, rgba(21,16,46,.28) 0 2px, transparent 2px 7px); }
.np b { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 22px; line-height: 1.1; }
.playing .cover { animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 22px transparent; } }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 4px; height: 100%; background: var(--accent); border-radius: 2px; transform-origin: bottom; transform: scaleY(.2); }
.playing .eq i { animation: bar .9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s !important; } .eq i:nth-child(3) { animation-delay: -.6s !important; } .eq i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes bar { 0% { transform: scaleY(.2); } 100% { transform: scaleY(1); } }
.slide-in { animation: slide .35s ease-out; }
@keyframes slide { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 10px); } }
.confetti { position: fixed; top: -10px; width: 8px; height: 14px; z-index: 10; pointer-events: none; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .2; } }
/* Intensité selon la période : calm (dîner) / party (soirée dansante) */
body.calm .bg-anim::before, body.calm .bg-anim::after { opacity: .14; animation-duration: 40s; }
body.calm .playing .eq i { animation-duration: 1.8s; }
body.party .bg-anim::before, body.party .bg-anim::after { opacity: .36; animation-duration: 7s; }
body.party .playing .eq i { animation-duration: .45s; }
body.party .playing .cover { animation-duration: .8s; }
html.burst .bg-anim::before, html.burst .bg-anim::after { opacity: .45; animation-duration: 5s; }
html.burst .playing .eq i { animation-duration: .35s; }
html.burst .playing .cover { animation-duration: .6s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
