/* Hakuna Live · charte mariambenaissa.com : orange, charbon, crème */
:root {
  --orange: #FF5100;
  --orange-deep: #CC3E00;
  --charcoal: #515052;
  --ink: #2E2E30;
  --cream: #FBF7F3;
  --peach: #FDEEE4;
  --warm: #F7EDE6;
  --oak: #D7C2AF;
  --muted: #6E6C6E;
  --green: #2F9E6E;
  --green-bg: #E3F4EC;
  --red: #D64545;
  --red-bg: #FBE6E6;
  --font: Calibri, Carlito, "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--ink); background: var(--cream);
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
.accent { color: var(--orange); }
.hidden { display: none !important; }

/* ================================================================== PARTICIPANT */
.p-wrap { min-height: 100%; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding: 16px 16px 28px; }
.p-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 14px; font-size: 14px; color: var(--muted); }
.p-brand { font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.p-brand b { color: var(--orange); }
.p-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 6px; }
.p-dot.off { background: var(--oak); }
.p-main { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; gap: 16px; padding-top: 4vh; }
.p-main.mid { justify-content: center; padding-top: 0; }
.p-q { font-size: 26px; line-height: 1.2; font-weight: 700; margin: 0 0 4px; }
.p-sub { color: var(--muted); font-size: 16px; margin: 0; }
.p-card { background: #fff; border: 1px solid var(--oak); border-radius: 16px; padding: 18px; }
.p-big { text-align: center; padding: 30px 12px; }
.p-big h2 { font-size: 30px; margin: 10px 0 6px; line-height: 1.15; }
.p-emoji { font-size: 44px; line-height: 1; }
.p-input {
  width: 100%; border: 2px solid var(--oak); background: #fff; border-radius: 12px; padding: 14px 14px;
  font-size: 20px; outline: none; transition: border-color .15s;
}
.p-input:focus { border-color: var(--orange); }
textarea.p-input { min-height: 120px; resize: vertical; }
.p-input.code { text-align: center; font-size: 34px; letter-spacing: 6px; font-weight: 700; }
.p-btn {
  width: 100%; border: 0; border-radius: 14px; padding: 16px; font-size: 20px; font-weight: 700;
  background: var(--orange); color: #fff; cursor: pointer; transition: transform .08s, opacity .15s;
}
.p-btn:active { transform: scale(.98); }
.p-btn[disabled] { opacity: .45; cursor: default; }
.p-btn.ghost { background: transparent; color: var(--charcoal); border: 2px solid var(--oak); }
.p-err { color: var(--red); font-size: 16px; min-height: 22px; }
.p-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff;
  border: 2px solid var(--oak); border-radius: 14px; padding: 14px 14px; font-size: 20px; font-weight: 600;
  cursor: pointer; margin-bottom: 10px; transition: border-color .12s, background .12s, transform .08s;
}
.p-opt:active { transform: scale(.985); }
.p-opt .l {
  flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--warm); color: var(--charcoal);
  display: grid; place-items: center; font-weight: 800; font-size: 17px;
}
.p-opt.sel { border-color: var(--orange); background: var(--peach); }
.p-opt.sel .l { background: var(--orange); color: #fff; }
.p-opt.ok { border-color: var(--green); background: var(--green-bg); }
.p-opt.ok .l { background: var(--green); color: #fff; }
.p-opt.no { border-color: var(--red); background: var(--red-bg); }
.p-opt.no .l { background: var(--red); color: #fff; }
.p-opt[disabled] { cursor: default; }
.p-opt.dim { opacity: .5; }
.p-timer { height: 8px; background: var(--warm); border-radius: 8px; overflow: hidden; }
.p-timer > i { display: block; height: 100%; width: 100%; background: var(--orange); transform-origin: left; }
.p-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.p-chip { background: var(--peach); border: 1px solid var(--oak); color: var(--orange-deep); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 18px; }
.p-count { text-align: right; color: var(--muted); font-size: 14px; margin-top: 4px; }
.p-note { color: var(--muted); font-size: 15px; text-align: center; }
.p-rank { font-size: 64px; font-weight: 800; color: var(--orange); line-height: 1; }
.p-pts { font-size: 22px; font-weight: 700; }
.p-dots span { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--oak); margin: 0 4px; animation: pdot 1.2s infinite ease-in-out; }
.p-dots span:nth-child(2) { animation-delay: .2s; }
.p-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes pdot { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
.p-reco { margin-left: 8px; background: var(--orange); color: #fff; border: 0; border-radius: 999px; width: 26px; height: 26px; font-weight: 800; cursor: pointer; line-height: 24px; padding: 0; }
.p-top { position: relative; }
.p-leave { margin-left: auto; background: #fff; color: var(--charcoal); border: 1.5px solid var(--oak); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.p-leave:active { background: var(--warm); }
.p-res { margin-top: 8px; }
.p-res-h { color: var(--muted); font-size: 14px; margin: 6px 0 10px; font-weight: 700; }
.p-rb { margin-bottom: 10px; animation: ppop .3s ease-out; }
.p-rb-l { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.p-rb-l .l { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--warm); color: var(--charcoal); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.p-rb-t { background: var(--warm); border-radius: 10px; height: 28px; position: relative; overflow: hidden; }
.p-rb-t i { display: block; height: 100%; background: var(--orange); border-radius: 10px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.p-rb-t b { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--ink); font-size: 14px; }
.p-rb.ok .p-rb-t i { background: var(--green); }
.p-rb.ok .p-rb-l .l { background: var(--green); color: #fff; }
.p-rb.dim { opacity: .55; }
.p-cloud { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; padding: 10px 4px; }
.p-cw { font-weight: 800; color: var(--orange-deep); line-height: 1.1; animation: ppop .3s ease-out; }
.p-cw:nth-child(2n) { color: var(--charcoal); }
.p-cw:nth-child(3n) { color: var(--orange); }
.p-wall { display: flex; flex-direction: column; gap: 8px; }
.p-note { background: #fff; border: 1.5px solid var(--oak); border-radius: 10px; padding: 10px 12px; font-size: 15px; font-weight: 600; animation: pin .3s ease-out; }
.p-note.star { border-color: var(--orange); background: var(--peach); }
.p-pop { animation: ppop .35s ease-out; }
@keyframes pin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ppop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ================================================================== PRÉSENTATEUR */
body.stage { overflow: hidden; background: var(--cream); }
.s-login, .s-home { max-width: 760px; margin: 0 auto; padding: 48px 20px; }
.s-login { max-width: 420px; }
.s-card { background: #fff; border: 1px solid var(--oak); border-radius: 16px; padding: 20px; margin-bottom: 14px; }
.s-h1 { font-size: 34px; margin: 0 0 6px; line-height: 1.1; }
.s-btn {
  text-decoration: none; display: inline-block; border: 0; border-radius: 12px; padding: 12px 18px; font-size: 17px; font-weight: 700; cursor: pointer;
  background: var(--orange); color: #fff;
}
.s-btn.ghost { background: #fff; color: var(--charcoal); border: 2px solid var(--oak); }
.s-btn.dark { background: var(--charcoal); }
.s-btn.small { padding: 8px 12px; font-size: 14px; }
.s-btn[disabled] { opacity: .5; cursor: default; }
.s-input, .s-select { width: 100%; border: 2px solid var(--oak); background: #fff; border-radius: 10px; padding: 12px; font-size: 18px; }
.s-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.s-row.between { justify-content: space-between; }
.s-muted { color: var(--muted); }
.s-err { color: var(--red); min-height: 22px; }
.s-sess { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--warm); }
.s-sess:first-of-type { border-top: 0; }
.s-code { font-weight: 800; letter-spacing: 2px; font-size: 20px; }

.st { position: fixed; inset: 0; display: flex; flex-direction: column; padding: 2.2vh 3vw 1.8vh; }
.st-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 2vw; min-height: 11vh; }
.st-meta { font-size: clamp(13px, 1.6vh, 18px); color: var(--muted); display: flex; gap: 14px; align-items: center; padding-top: .4vh; }
.st-meta b { color: var(--ink); }
.st-join { display: flex; align-items: center; gap: 1.2vw; background: #fff; border: 1px solid var(--oak); border-radius: 14px; padding: 1vh 1.2vw; }
.st-join .t { font-size: clamp(13px, 1.9vh, 22px); line-height: 1.25; text-align: right; }
.st-join .t b { display: block; font-size: clamp(18px, 3vh, 34px); color: var(--ink); letter-spacing: 1px; }
.st-join .t .u { color: var(--orange-deep); font-weight: 700; }
.st-join svg { width: clamp(64px, 11vh, 130px); height: clamp(64px, 11vh, 130px); display: block; }
.st-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.st-q { font-size: clamp(28px, 6vh, 64px); line-height: 1.12; font-weight: 800; margin: .6vh 0 2.2vh; max-width: 92%; letter-spacing: -.3px; }
.st-viz { flex: 1; min-height: 0; position: relative; }
.st-foot { display: flex; align-items: center; justify-content: space-between; gap: 2vw; padding-top: 1.2vh; min-height: 7vh; }
.st-count { font-size: clamp(16px, 2.6vh, 28px); font-weight: 700; display: flex; gap: 16px; align-items: baseline; white-space: nowrap; }
.st-count .n { color: var(--orange); font-size: clamp(26px, 4.4vh, 48px); font-weight: 800; }
.st-status { white-space: nowrap; flex: none; font-size: clamp(12px, 1.7vh, 18px); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: .6vh 1vw; border-radius: 999px; background: var(--warm); color: var(--charcoal); }
.st-status.open { background: var(--orange); color: #fff; }
.st-status.closed { background: var(--charcoal); color: #fff; }
.st-bar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; transition: opacity .35s; }
.st-bar.fade { opacity: 0; pointer-events: none; }
.st-progress { position: absolute; left: 0; top: 0; height: 6px; width: 100%; background: transparent; }
.st-progress > i { display: block; height: 100%; background: var(--orange); width: 0; transition: width .2s linear; }
.st-timer { position: absolute; right: 0; top: -9vh; font-size: clamp(36px, 8vh, 90px); font-weight: 800; color: var(--orange); font-variant-numeric: tabular-nums; }

/* barres */
.bars { display: flex; flex-direction: column; justify-content: center; gap: clamp(8px, 1.6vh, 18px); height: 100%; }
.bar-row { display: grid; grid-template-columns: minmax(180px, 28%) 1fr; align-items: center; gap: 1.6vw; }
.bar-label { display: flex; align-items: center; gap: 12px; font-size: clamp(18px, 3.4vh, 38px); font-weight: 700; line-height: 1.1; }
.bar-label .l { flex: none; width: clamp(30px, 5vh, 54px); height: clamp(30px, 5vh, 54px); border-radius: 12px; display: grid; place-items: center; background: var(--charcoal); color: #fff; font-size: clamp(16px, 2.6vh, 28px); }
.bar-track { background: var(--warm); border-radius: 14px; height: clamp(34px, 6.6vh, 72px); position: relative; overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 14px; background: var(--orange); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar-val { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: clamp(16px, 3vh, 32px); color: var(--ink); }
.bar-row.c1 .bar-fill { background: var(--charcoal); }
.bar-row.c2 .bar-fill { background: var(--oak); }
.bar-row.c3 .bar-fill { background: var(--orange-deep); }
.bar-row.c4 .bar-fill { background: var(--muted); }
.bar-row.c5 .bar-fill { background: #F59B6B; }
.bar-row.c6 .bar-fill { background: #8C8A8C; }
.bar-row.good .bar-fill { background: var(--green); }
.bar-row.good .bar-label .l { background: var(--green); }
.bar-row.faded { opacity: .45; }
.bar-hidden .bar-track { background: repeating-linear-gradient(45deg, var(--warm), var(--warm) 10px, var(--cream) 10px, var(--cream) 20px); }
.explain { margin-top: 1.4vh; font-size: clamp(16px, 2.8vh, 30px); background: var(--peach); border-left: 8px solid var(--orange); padding: 1.4vh 1.6vw; border-radius: 10px; font-weight: 600; }

/* nuage */
.cloud { position: absolute; inset: 0; overflow: hidden; }
.cloud .w { position: absolute; transform: translate(-50%, -50%); font-weight: 800; white-space: nowrap; line-height: 1; transition: left .6s, top .6s, font-size .6s, opacity .6s; cursor: default; }
.cloud.mod .w { cursor: pointer; }
.cloud.mod .w:hover { text-decoration: line-through; opacity: .6; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--oak); font-size: clamp(20px, 4vh, 44px); font-weight: 700; text-align: center; }

/* mur */
.wall { columns: 3 320px; column-gap: 1.2vw; height: 100%; overflow: hidden; }
.note {
  break-inside: avoid; background: #fff; border: 2px solid var(--oak); border-radius: 14px; padding: 1.4vh 1.2vw;
  margin-bottom: 1.2vh; font-size: clamp(16px, 2.7vh, 30px); font-weight: 600; line-height: 1.25; position: relative; cursor: pointer;
  animation: pin .4s ease-out; overflow-wrap: anywhere;
}
.note.star { border-color: var(--orange); background: var(--peach); }
.note.star::after { content: "★"; position: absolute; right: 10px; top: 6px; color: var(--orange); font-size: 1.1em; }
.wall.mod .note:hover { opacity: .5; text-decoration: line-through; }
@keyframes pin { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* classement */
.board { display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 14px); justify-content: center; height: 100%; max-width: 1500px; }
.rowb { display: grid; grid-template-columns: clamp(40px, 7vh, 80px) minmax(120px, 26%) 1fr; align-items: center; gap: 1.2vw; }
.rowb .r { font-size: clamp(22px, 4.2vh, 48px); font-weight: 800; color: var(--orange); text-align: center; }
.rowb .n { font-size: clamp(18px, 3.2vh, 36px); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowb .tr { background: var(--warm); border-radius: 12px; height: clamp(28px, 5vh, 54px); position: relative; overflow: hidden; }
.rowb .tr i { display: block; height: 100%; background: var(--orange); width: 0; border-radius: 12px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.rowb:nth-child(1) .tr i { background: var(--orange-deep); }
.rowb .tr i { position: relative; font-style: normal; }
.rowb .s { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: clamp(16px, 2.8vh, 30px); color: #fff; }

/* titre */
.titleslide { height: 100%; display: flex; align-items: center; gap: 5vw; }
.titleslide h1 { font-size: clamp(40px, 9vh, 104px); margin: 0 0 1.4vh; line-height: 1.02; letter-spacing: -1px; }
.titleslide p { font-size: clamp(20px, 3.6vh, 40px); color: var(--charcoal); margin: 0; }
.titleslide .qr { flex: none; background: #fff; border: 1px solid var(--oak); border-radius: 24px; padding: 2.4vh; text-align: center; }
.titleslide .qr svg { width: 38vh; height: 38vh; display: block; }
.titleslide .qr .u { margin-top: 1.4vh; font-size: clamp(18px, 3vh, 34px); font-weight: 800; color: var(--orange-deep); }
.titleslide .qr .c { font-size: clamp(26px, 5.4vh, 64px); font-weight: 800; letter-spacing: 3px; }

/* overlays */
.overlay { position: fixed; inset: 0; background: rgba(46, 46, 48, .55); display: grid; place-items: center; z-index: 20; }
.panel { background: #fff; border-radius: 18px; padding: 22px; width: min(720px, 92vw); max-height: 84vh; overflow: auto; }
.panel h3 { margin: 0 0 10px; font-size: 24px; }
.outline-item { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 17px; }
.outline-item:hover { background: var(--peach); }
.outline-item.cur { background: var(--peach); font-weight: 700; }
.outline-item .no { width: 30px; color: var(--orange); font-weight: 800; }
.outline-item .ty { margin-left: auto; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
kbd { background: var(--warm); border: 1px solid var(--oak); border-radius: 6px; padding: 1px 7px; font-family: inherit; font-weight: 700; font-size: 15px; }
.help-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--warm); }

@media (max-width: 760px) {
  .st { padding: 10px; }
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .st-join .t { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
