/* ══════════════════════════════════════════════════════════
   Page Fun d'un projet : la roue tournante.
   Toutes les classes sont préfixées fun- : aucun risque de collision.
   ══════════════════════════════════════════════════════════ */

.fun-head{ margin-bottom:16px; }
.fun-title{ font-family:var(--font-head); font-size:24px; font-weight:800; margin:0; }
.fun-sub{ font-size:13px; color:var(--text3); margin-top:4px; }

.fun-grid{ display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,380px); gap:18px; align-items:start; }

/* ── la roue ── */
.fun-left{ display:flex; flex-direction:column; align-items:center; gap:14px; }
.fun-wheel-wrap{ position:relative; width:min(420px,100%); aspect-ratio:1; display:flex; align-items:center; justify-content:center; }
.fun-wheel{ width:100%; height:100%; }
.fun-svg{ width:100%; height:100%; transform-origin:50% 50%; filter:drop-shadow(0 10px 26px rgba(0,0,0,.45)); }
/* Le curseur, en haut : c'est lui qui désigne la part gagnante */
.fun-pointer{ position:absolute; top:-6px; left:50%; transform:translateX(-50%); z-index:2;
  font-size:30px; color:var(--amber); text-shadow:0 2px 6px rgba(0,0,0,.6); pointer-events:none; }
.fun-center{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:2;
  width:64px; height:64px; border-radius:50%; background:var(--bg2); border:3px solid var(--border2);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:18px;
  box-shadow:0 4px 14px rgba(0,0,0,.4); pointer-events:none; }
.fun-wheel-vide{ display:flex; align-items:center; justify-content:center; height:100%;
  border:2px dashed var(--border2); border-radius:50%; color:var(--text3); font-size:13.5px; text-align:center; padding:30px; }

.fun-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:center; width:100%; }
.fun-titre{ max-width:320px; }
.fun-spin{ font-size:15px; padding:10px 24px; font-weight:800; }
.fun-result{ min-height:42px; }
.fun-win{ font-size:22px; font-weight:800; font-family:var(--font-head); color:var(--amber); text-align:center; }
.fun-result.pop .fun-win{ animation:fun-pop .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes fun-pop{ 0%{ transform:scale(.4); opacity:0; } 60%{ transform:scale(1.15); } 100%{ transform:scale(1); opacity:1; } }

/* ── panneaux de droite ── */
.fun-pane{ background:var(--bg2); border:1px solid var(--border); border-radius:var(--r); padding:12px 14px; margin-bottom:14px; }
.fun-pane-head{ display:flex; align-items:center; gap:8px; font-size:13.5px; margin-bottom:8px; flex-wrap:wrap; }
.fun-count{ font-size:11.5px; color:var(--text3); }
.fun-members{ max-height:320px; overflow-y:auto; display:flex; flex-direction:column; gap:4px; }
.fun-member{ display:flex; align-items:center; gap:9px; padding:6px 9px; border-radius:var(--r-sm);
  background:var(--bg3); border:1px solid var(--border); cursor:pointer; font-size:13px; }
.fun-member.on{ border-color:var(--accent); }
.fun-member img{ width:26px; height:26px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.fun-av{ width:26px; height:26px; border-radius:50%; background:var(--bg4); display:flex;
  align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
.fun-mname{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.fun-extra{ display:flex; gap:8px; margin-top:10px; }
.fun-extra .form-input{ flex:1; }
.fun-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.fun-tag{ display:inline-flex; align-items:center; gap:6px; background:var(--bg4); border:1px solid var(--border);
  border-radius:14px; padding:3px 6px 3px 10px; font-size:12px; }
.fun-tag button{ background:none; border:none; color:var(--text3); cursor:pointer; font-size:12px; padding:0 2px; }
.fun-tag button:hover{ color:var(--red); }

.fun-hist{ max-height:260px; overflow-y:auto; display:flex; flex-direction:column; gap:6px; }
.fun-hrow{ background:var(--bg3); border:1px solid var(--border); border-radius:var(--r-sm); padding:7px 10px; font-size:13px; }
.fun-hrow span{ display:block; font-size:11.5px; color:var(--text3); margin-top:2px; }

@media (max-width:900px){
  .fun-grid{ grid-template-columns:1fr; }
  .fun-wheel-wrap{ width:min(340px,100%); }
}
@media (prefers-reduced-motion:reduce){
  .fun-svg{ transition:none !important; }
  .fun-result.pop .fun-win{ animation:none; }
}
