:root {
  font-family:ui-rounded,'Segoe UI',system-ui,sans-serif;
  color:#112d59;
  background:#f0f6ff;
  font-synthesis:none;
  --blue:#173b70;
  --orange:#ffae45;
  --line:#cbd9ee;
  --teal:#008574;
  --yellow:#ffe169;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
}

button,input,textarea,select {
  font:inherit;
}

button,a,input,textarea,select {
  -webkit-tap-highlight-color:transparent;
}

button,a {
  touch-action:manipulation;
}

button {
  cursor:pointer;
}

button:disabled {
  cursor:wait;
  opacity:.55;
}

a {
  color:inherit;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #007eaf;
  outline-offset:4px;
}

[hidden] {
  display:none!important;
}

h1,h2,h3,p {
  overflow-wrap:anywhere;
}

h1 {
  font-size:clamp(1.8rem,3.2vw,2.8rem);
  line-height:1.14;
  margin:12px 0 22px;
  letter-spacing:-.035em;
}

h2 {
  font-size:1.45rem;
  margin:8px 0 20px;
}

h3 {
  font-size:1.3rem;
  margin:10px 0;
}

p {
  line-height:1.55;
}

main {
  max-width:1300px;
  margin:0 auto;
  padding:36px 32px 64px;
}

.site-header {
  background:white;
  border-bottom:1px solid var(--line);
}

.header-inner {
  max-width:1364px;
  margin:auto;
  padding:18px 32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
}

.header-identity {
  display:flex;
  align-items:center;
  gap:26px;
}

.header-role {
  font-weight:650;
  color:#58657f;
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  white-space:nowrap;
}

.brand-word {
  font-size:2rem;
  font-weight:900;
  letter-spacing:-2px;
}

.brand-word>span {
  color:#c3630a;
}

.brand-mark {
  width:54px;
  height:44px;
  position:relative;
}

.brand-mark>span {
  position:absolute;
  background:var(--orange);
  color:var(--blue);
  width:37px;
  height:29px;
  border-radius:12px;
  display:grid;
  place-items:center;
  font-size:18px;
  font-weight:900;
  line-height:1;
}

.brand-mark>span:after {
  content:'';
  position:absolute;
  bottom:-5px;
  left:8px;
  border-top:8px solid var(--orange);
  border-right:8px solid transparent;
}

.brand-mark>span+span {
  right:0;
  bottom:0;
  background:var(--blue);
  color:white;
}

.brand-mark>span+span:after {
  border-top-color:var(--blue);
}

.panel {
  background:white;
  border:1px solid var(--line);
  border-radius:22px;
  padding:28px;
  box-shadow:0 5px 20px #16294a04;
}

.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:50px;
  padding:13px 21px;
  border:1px solid transparent;
  border-radius:13px;
  font-weight:750;
  text-decoration:none;
  line-height:1.25;
  text-align:center;
  gap:8px;
}

.button--primary {
  background:var(--blue);
  color:white;
}

.button--primary:hover {
  background:#244982;
}

.button--secondary {
  background:#fff;
  color:var(--blue);
  border-color:#aab8d1;
}

.button--secondary:hover {
  background:#eef2fa;
}

.button--quiet {
  background:transparent;
  color:var(--blue);
  padding:12px;
}

.button--quiet:hover {
  background:#e9eef7;
}

.actions {
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

.page-head {
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:center;
  margin-bottom:24px;
}

.page-head h1 {
  margin-bottom:8px;
}

.muted {
  color:#64718a;
}

.mode-chip {
  display:inline-block;
  border-radius:30px;
  padding:5px 11px;
  font-size:.85rem;
  font-weight:750;
  background:#e8edfa;
  color:#234476;
}

.mode-chip--fraternite {
  background:#fff0da;
  color:#855007;
}

.empty {
  text-align:center;
  padding:55px;
}

.login {
  max-width:900px;
  display:grid;
  grid-template-columns:1fr 1fr;
  padding:0;
  overflow:hidden;
  margin:6vh auto;
}

.login-art {
  background:var(--blue);
  color:white;
  padding:50px 35px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.login-art>span {
  background:var(--orange);
  color:var(--blue);
  border-radius:30px;
  font-size:4rem;
  font-weight:900;
  width:95px;
  height:95px;
  text-align:center;
}

.login-art p {
  font-size:2rem;
  line-height:1.2;
  font-weight:750;
}

.login-form {
  padding:42px 32px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:20px;
}

label {
  display:flex;
  flex-direction:column;
  gap:9px;
  font-weight:650;
  min-width:0;
}

input,textarea,select {
  width:100%;
  min-height:50px;
  padding:12px;
  border:1px solid #aab8ce;
  border-radius:10px;
  background:white;
  color:#14264c;
}

textarea {
  resize:vertical;
}

input[readonly] {
  background:#eef2f7;
}

.editor-meta {
  display:grid;
  grid-template-columns:2fr 1.3fr 1fr;
  gap:20px;
  margin-bottom:28px;
}

.editor-question {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:18px;
  margin:24px 0;
}

.editor-question legend {
  font-weight:800;
  font-size:1.2rem;
  padding:0 10px;
}

.question-tools {
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.choice-fields {
  display:grid;
  gap:10px;
}

.choice-field {
  display:flex;
  align-items:center;
  gap:8px;
}

.choice-field label {
  display:flex;
  flex-direction:row;
  align-items:center;
  flex:1;
}

.choice-letter {
  display:inline-grid;
  place-items:center;
  flex-shrink:0;
  border-radius:10px;
  background:#e9eef8;
  width:40px;
  height:40px;
  font-weight:850;
  color:#284370;
}

.editor-save {
  position:sticky;
  bottom:0;
  padding:18px 0;
  background:#f3f5af00;
  background:#f3f5faed;
  backdrop-filter:blur(8px);
}

.prepare {
  max-width:620px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:18px;
}

.prepare label {
  width:100%;
}

.host-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 310px;
  gap:24px;
}

.host-stage h2 {
  font-size:clamp(1.6rem,2.8vw,2.2rem);
  line-height:1.3;
  margin:26px 0;
}

.controls {
  display:flex;
  flex-direction:column;
  align-self:start;
  gap:16px;
}

.controls h2 {
  margin-bottom:0;
}

.count {
  font-size:1.15rem;
  margin:0;
}

.game-progress {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  color:#4d5e79;
  font-weight:700;
}

.timer {
  background:#fff0da;
  color:#835000;
  border-radius:12px;
  padding:7px 13px;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

.answer-list {
  display:grid;
  gap:14px;
}

.answer {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:flex;
  align-items:center;
  gap:16px;
  min-height:76px;
  padding:17px 20px;
  border-radius:16px;
  border:2px solid #dce3f0;
  background:#f8faff;
  text-align:left;
  color:var(--blue);
  font-weight:650;
}

.answer:before {
  content:'';
  position:absolute;
  inset:0 auto 0 0;
  width:var(--share,0%);
  background:#dce6fa;
  z-index:-1;
}

.answer--correct {
  border-color:#23714a;
}

.answer--correct:before {
  background:#d8efdf;
}

.answer--button {
  width:100%;
  font-size:1.2rem;
  min-height:86px;
}

.answer--button:hover {
  border-color:var(--blue);
  background:#eaf0fc;
}

.answer-text {
  flex:1;
  overflow-wrap:anywhere;
}

.correct-mark {
  font-size:.85em;
  color:#205737;
}

.answer-count {
  white-space:nowrap;
  font-weight:850;
}

.explanation {
  padding:20px;
  border-left:4px solid var(--orange);
  background:#fff7ec;
  border-radius:0 12px 12px 0;
}

.join-qr {
  margin:0;
  background:white;
  color:var(--blue);
  padding:22px;
  border-radius:22px;
  text-align:center;
}

.join-qr img {
  display:block;
  width:100%;
  height:auto;
  max-width:380px;
  margin:auto;
  image-rendering:pixelated;
}

.join-qr figcaption {
  max-width:340px;
  margin:14px auto 0;
  font-weight:700;
  line-height:1.4;
}

.join-qr--small {
  padding:12px;
}

.join-qr--small img {
  max-width:220px;
}

.participant-sheet {
  max-width:660px;
  margin:0 auto;
}

.participant-sheet h1 {
  font-size:clamp(1.65rem,4vw,2.4rem);
  margin-top:24px;
}

.player-name {
  font-size:.95rem;
  font-weight:700;
  color:#5b6b85;
  margin:0 0 22px;
}

.name-options {
  display:grid;
  gap:14px;
  margin:25px 0 10px;
}

.name-options .button {
  min-height:65px;
  font-size:1.1rem;
}

.waiting {
  padding:24px;
  background:#edf2fc;
  border-radius:15px;
  font-size:1.2rem;
}

.vote-confirmed {
  padding:25px;
  background:#e5f4e9;
  border:1px solid #b8dac3;
  border-radius:16px;
  color:#215c3a;
}

.vote-confirmed strong {
  font-size:1.4rem;
}

.vote-confirmed p {
  margin-bottom:0;
}

.final-score {
  font-size:3rem;
  font-weight:850;
  color:#985b0d;
}

.rankings {
  list-style:none;
  padding:0;
  margin:20px 0;
  display:grid;
  gap:10px;
}

.rankings li {
  display:flex;
  align-items:center;
  gap:18px;
  padding:15px;
  background:#edf2fa;
  border-radius:14px;
}

.rankings li>span:nth-child(2) {
  flex:1;
}

.rankings li:first-child {
  background:#fff0d8;
}

.rank {
  font-weight:850;
  font-size:1.4em;
}

.rankings strong {
  white-space:nowrap;
}

.connection {
  position:sticky;
  top:0;
  z-index:20;
  background:#fff0cd;
  border-bottom:1px solid #c89122;
  padding:14px 24px;
  font-weight:750;
  text-align:center;
}

.notice {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%);
  z-index:100;
  background:#14264c;
  color:white;
  padding:17px 24px;
  border-radius:14px;
  box-shadow:0 8px 30px #0003;
  width:max-content;
  max-width:calc(100% - 32px);
}

.loading {
  text-align:center;
  padding:80px 0;
}

.projection-lobby {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,35%);
  align-items:center;
  gap:6vw;
  min-height:65vh;
}

.projection-lobby h1 {
  font-size:clamp(2.8rem,5vw,5.5rem);
}

.projection-count {
  font-size:2rem;
  font-weight:750;
}

.projection-live {
  display:grid;
  grid-template-columns:minmax(0,1fr) 210px;
  gap:30px;
}

.projection-join {
  align-self:start;
  position:sticky;
  top:24px;
}

.projection-body h1 {
  font-size:clamp(2rem,3.6vw,3.7rem);
  line-height:1.2;
}

.projection-body .answer {
  font-size:clamp(1.25rem,2vw,2rem);
  min-height:84px;
}

.projection-body .game-progress {
  font-size:1.25rem;
}

.projection-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:25px;
  font-size:1.2rem;
  font-weight:700;
}

.projection-end {
  max-width:1000px;
  margin:auto;
}

.projection-end .rankings {
  font-size:1.6rem;
}

.qr-overlay {
  position:fixed;
  z-index:50;
  inset:0;
  background:#11254ef0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:20px;
  padding:24px;
}

.qr-overlay .join-qr {
  width:min(80vw,480px);
}

[data-pipin]:empty {
  display:none;
}

[data-pipin] img {
  max-width:160px;
  height:auto;
}

body[data-role=projection] main {
  max-width:1600px;
}

body[data-role=projection] {
  background:#f6f8fc;
}

@media(min-width:1700px) {
  .projection-live {
    grid-template-columns:minmax(0,1fr) 260px;
    gap:50px;
  }
  .projection-body .answer {
    min-height:110px;
  }
}

@media(max-width:900px) {
  .host-layout {
    grid-template-columns:1fr;
  }
  .controls {
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .controls .join-qr {
    display:none;
  }
  .editor-meta {
    grid-template-columns:1fr;
  }
  .projection-live {
    grid-template-columns:minmax(0,1fr) 165px;
    gap:16px;
  }
  .projection-body .answer {
    flex-wrap:wrap;
  }
  .correct-mark {
    order:3;
  }
  .header-role {
    font-size:.85rem;
  }
  .page-head {
    align-items:flex-start;
    flex-direction:column;
  }
  .projection-lobby {
    gap:20px;
  }
}

@media(max-width:600px) {
  main {
    padding:24px 16px 45px;
  }
  .header-inner {
    padding:14px 16px;
  }
  .header-identity {
    gap:12px;
  }
  .header-role {
    display:none;
  }
  .brand-word {
    font-size:1.8rem;
  }
  .panel {
    padding:20px;
    border-radius:18px;
  }
  .login {
    display:block;
    margin:0 auto;
  }
  .login-art {
    padding:24px;
    flex-direction:row;
    align-items:center;
    gap:20px;
  }
  .login-art>span {
    font-size:2rem;
    width:60px;
    height:60px;
    flex-shrink:0;
    display:grid;
    place-items:center;
  }
  .login-art p {
    font-size:1.25rem;
    margin:0;
  }
  .login-form {
    padding:26px 20px;
  }
  .answer {
    gap:10px;
    padding:14px 12px;
    flex-wrap:wrap;
  }
  .answer .choice-letter {
    width:34px;
    height:34px;
  }
  .answer-text {
    min-width:130px;
  }
  .answer-count {
    margin-left:auto;
  }
  .correct-mark {
    order:3;
    width:100%;
  }
  .controls {
    display:flex;
  }
  .question-tools {
    justify-content:flex-start;
    gap:0;
  }
  .question-tools .button {
    font-size:.85rem;
    padding:10px;
  }
  .choice-field {
    gap:0;
  }
  .choice-field .button {
    font-size:.8rem;
    padding:10px;
  }
  .editor-save .button {
    flex:1;
  }
  .participant-sheet .answer--button {
    font-size:1.15rem;
  }
  .projection-lobby {
    grid-template-columns:1fr;
    text-align:center;
  }
  .projection-lobby .join-qr {
    max-width:330px;
    margin:auto;
  }
  .projection-lobby h1 {
    font-size:2.4rem;
  }
  .projection-live {
    display:flex;
    flex-direction:column;
  }
  .projection-join {
    position:static;
    align-self:center;
    width:180px;
  }
  .projection-body h1 {
    font-size:1.9rem;
  }
  .projection-footer {
    font-size:1rem;
    flex-wrap:wrap;
  }
  .projection-body .game-progress {
    font-size:1rem;
  }
  .projection-end .rankings {
    font-size:1rem;
  }
  .rankings li {
    gap:10px;
  }
  .page-head .actions {
    width:100%;
  }
  .page-head .actions .button {
    flex:1;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
  [data-pipin] video {
    display:none;
  }
}


.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.response-feedback {
  max-width: 1600px;
  margin: 22px auto 0;
  padding: 0 32px;
}

.response-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding: 5px;
  list-style: none;
  scrollbar-width: thin;
}

.response-bubble {
  flex: 0 1 auto;
  border: 1px solid #d5dfef;
  border-radius: 18px 18px 18px 5px;
  padding: 12px 18px;
  background: #fff;
  color: #17345d;
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  box-shadow: 0 3px 10px #17345d0a;
  animation: response-arrival 240ms ease-out;
}

@keyframes response-arrival {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal-suspense {
  min-height: 410px;
  padding: 44px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  border-radius: 26px;
  color: #fff;
  background: #17345d;
  text-align: center;
}

.reveal-suspense p {
  margin: 0;
  font-weight: 750;
  font-size: clamp(1.4rem, 3.2vw, 3.2rem);
}

.reveal-countdown {
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 1;
  color: #ffb64e;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
  body[data-role="participant"] .header-inner {
    flex-wrap: wrap;
  }
  body[data-role="participant"] .header-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .header-actions .button {
    padding: 10px 12px;
    font-size: .9rem;
  }
  .response-feedback {
    padding: 0 16px;
  }
  .response-bubbles {
    max-height: 150px;
    gap: 7px;
  }
  .response-bubble {
    padding: 10px 12px;
    font-size: .9rem;
  }
  .reveal-suspense {
    padding: 32px 18px;
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .response-bubble {
    animation: none;
    transform: none;
  }
}

/* Game-show visual system: pale blue canvas, navy structure, orange action. */
body { min-width:320px; }
.site-header { border-bottom:2px solid #d9e5f6; }
.header-inner { padding-block:16px; }
.brand-word { font-size:2.2rem; letter-spacing:-1.8px; }
.brand-word>span { color:#b24e00; }
.brand-mark { transform:rotate(-6deg); }
h1,h2,h3 { font-weight:850; }
.panel { border:1px solid var(--line); box-shadow:0 6px 0 #dce7f5; }
.button { border-width:2px; border-radius:14px; transition:background 140ms,transform 140ms,box-shadow 140ms; }
.button--primary { background:var(--orange); color:#112d59; border-color:#e89b36; box-shadow:0 3px 0 #be7b25; }
.button--primary:hover { background:#ffbc62; box-shadow:0 4px 0 #be7b25; transform:translateY(-1px); }
.button--primary:active { transform:translateY(2px); box-shadow:0 1px 0 #be7b25; }
.button--secondary { border-color:#9baccc; }
.button--quiet { border-color:transparent; }
input,textarea,select { border:2px solid #a9bbd7; border-radius:12px; }
.mode-chip { background:#dceaff; color:#173b70; }
.mode-chip--fraternite { background:#fff0b1; color:#634600; }
.login { border:2px solid #b8cbe7; }
.login-art { background:#173b70; padding:34px; }
.login-art .pipin-moment { margin:0; justify-content:flex-start; }
.login-art .pipin-moment img { width:190px; max-width:100%; }
.login-art p { margin:16px 0; }
.prepare { border-top:6px solid var(--orange); }
.editor-save { background:#f0f6fff5; }
.field-help { color:#536984; font-size:.9rem; font-weight:450; margin:0; }
.join-intro { font-size:1.25rem; font-weight:750; margin:0 0 24px; }
.join-form { display:grid; gap:10px; }
.join-form input { min-height:60px; font-size:1.2rem; }
.join-form .button { margin-top:12px; min-height:58px; font-size:1.15rem; }
.participant-sheet { padding:32px; border:2px solid #c7d8f0; border-top:7px solid var(--orange); }
.participant-sheet h1 { line-height:1.2; }
.player-name { display:inline-flex; align-items:center; min-height:34px; max-width:100%; padding:5px 12px; border:1px solid #bdd2ec; border-radius:10px; background:#edf5ff; color:var(--blue); font-weight:750; margin-bottom:22px; }
.game-progress { color:#244975; line-height:1.4; }
.timer { display:flex; flex-direction:column; align-items:center; justify-content:center; flex-shrink:0; gap:2px; min-width:108px; padding:12px 18px; background:var(--orange); color:#112d59; border:2px solid #cf8223; border-radius:18px; box-shadow:0 4px 0 #eed3ab; text-align:center; }
.timer-label { font-size:.66rem; font-weight:850; letter-spacing:.065em; text-transform:uppercase; }
.timer strong { font-size:2.7rem; font-weight:900; letter-spacing:-.045em; line-height:1; }
.timer[data-urgent=true] { background:#ffe2d6; border-color:#b73c17; color:#9d3010; box-shadow:0 4px 0 #eec4b5; }
.timer[data-expired=true] { background:#e9edf4; color:#4f607a; border-color:#99abc5; }
.answer-list { gap:14px; }
.answer { border:2px solid #b1c4e0; background:white; border-radius:18px; padding:15px 18px; box-shadow:0 4px 0 #dce7f5; transition:border-color 140ms,transform 140ms,box-shadow 140ms; }
.answer .choice-letter { background:#b3f1e8; color:#075b50; border-radius:12px; width:48px; height:48px; font-size:1.3rem; }
.answer:nth-child(2) .choice-letter { background:#ffe169; color:#5b4600; }
.answer:nth-child(3) .choice-letter { background:#c4dcff; color:#173b70; }
.answer:nth-child(4) .choice-letter { background:#ffd29a; color:#713900; }
.answer--button { font-size:1.15rem; font-weight:750; min-height:88px; }
.answer--button:hover { border-color:#173b70; background:#f8fbff; transform:translateY(-2px); box-shadow:0 6px 0 #c4d6ee; }
.answer--button:active { transform:translateY(2px); box-shadow:none; }
.answer:before { background:#dceaff; }
.answer--correct { border-color:#008574; background:#f1fffa; box-shadow:0 4px 0 #bbdfd3; }
.answer--correct:before { background:#d0f0e4; }
.correct-mark { font-weight:800; color:#086047; }
.your-answer { display:block; font-size:.75em; font-weight:650; color:#49617d; margin-top:4px; }
.answer-count { font-size:.9em; }
.vote-confirmed { display:flex; align-items:center; gap:16px; background:#d9f5ed; border:2px solid #79c4ad; color:#0a5b46; padding:25px; box-shadow:0 4px 0 #c4e5dc; }
.vote-confirmed strong { font-size:1.35rem; line-height:1.25; }
.vote-confirmed p { margin:8px 0 0; font-weight:650; }
.confirmation-check { display:grid; place-items:center; flex-shrink:0; width:44px; height:44px; border-radius:50%; background:#fff; color:#008574; font-size:1.7rem; font-weight:900; }
.waiting { background:#e8f3ff; color:#234975; text-align:center; border:1px solid #c9ddf4; }
.waiting strong { font-size:1.35rem; }
.waiting p { margin-bottom:4px; }
.pipin-moment { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; margin:24px auto 0; text-align:center; }
.pipin-moment picture { display:block; flex-shrink:0; }
.pipin-moment img { display:block; object-fit:contain; width:150px; height:auto; max-width:100%; }
.pipin-moment p { font-size:.95rem; color:#44617f; font-weight:650; margin:4px 0 0; }
.participant-sheet[data-phase=open] .pipin-moment img { width:112px; }
.host-lobby { min-height:370px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.host-lobby h2 { margin:18px 0 8px; }
.host-lobby p { max-width:470px; color:#4e6582; margin-top:0; }
.host-lobby .pipin-moment { margin-top:0; }
.host-lobby .pipin-moment img { width:200px; }
.controls { border-top:6px solid #4ab8ad; }
.controls .count { background:#edf5ff; padding:12px; border-radius:12px; font-weight:750; }
.qr-title { font-weight:900; font-size:1.65rem; line-height:1.2; margin:0 0 15px; letter-spacing:-.025em; }
.join-qr { padding:25px; border:2px solid #abc2e2; box-shadow:0 5px 0 #d7e3f4; }
.join-qr figcaption { font-size:1.1rem; }
.join-qr figcaption span { display:block; font-size:.85em; font-weight:500; margin-top:7px; }
.join-qr--small { padding:18px; }
.join-qr--small .qr-title { font-size:1.2rem; }
.join-qr--small img { max-width:256px; }
.controls .join-qr { border:0; box-shadow:none; }
.controls .qr-title { display:none; }
body[data-role=projection] { background:#f0f6ff; }
body[data-role=projection] main { max-width:1600px; padding-top:32px; }
.projection-live { grid-template-columns:minmax(0,1fr) clamp(230px,23vw,320px); gap:36px; }
.projection-body h1 { margin:22px 0 30px; font-size:clamp(2rem,3.65vw,3.8rem); letter-spacing:-.035em; }
.projection-body .answer { min-height:88px; padding:17px 20px; font-size:clamp(1.15rem,1.65vw,1.7rem); border-color:#7c9bc4; }
.projection-body .choice-letter { width:52px; height:52px; font-size:1.5rem; }
.projection-body .game-progress { font-size:1.15rem; min-height:28px; }
.phase-label { color:#9b4a00; }
.projection-join { top:24px; display:flex; flex-direction:column; gap:24px; }
.projection-join .timer { width:100%; min-height:156px; padding:20px; border-radius:22px; border-color:#b87528; }
.projection-join .timer-label { font-size:.9rem; }
.projection-join .timer strong { font-size:clamp(3.5rem,6vw,6rem); }
.projection-join .pipin-moment { margin:0; }
.projection-join .pipin-moment img { width:130px; }
.projection-footer { margin-top:28px; font-size:1.1rem; }
.projection-lobby { grid-template-columns:minmax(0,1fr) minmax(310px,38%); }
.projection-lobby .join-qr { padding:30px; }
.projection-lobby .join-qr img { max-width:420px; }
.projection-lobby .qr-title { font-size:2rem; }
.projection-lobby h1 { margin-bottom:22px; }
.projection-count { display:inline-block; background:#d4f2e9; padding:12px 20px; border-radius:16px; color:#155c4b; font-size:1.5rem; margin:8px 0; }
.projection-title .pipin-moment { align-items:flex-start; margin-top:18px; }
.projection-title .pipin-moment img { width:200px; }
.reveal-suspense { position:relative; overflow:hidden; background:#173b70; border:2px solid #0f2d5b; box-shadow:0 6px 0 #c5d6ee; }
.reveal-suspense .pipin-moment { position:absolute; bottom:16px; right:20px; opacity:.95; }
.reveal-suspense .pipin-moment img { width:100px; }
.reveal-countdown { color:#ffb34f; }
.final-score { margin:26px 0; padding:24px; background:#fff0c6; border:2px solid #ebc66b; border-radius:20px; color:#774500; font-size:4rem; text-align:center; }
.final-score span { font-size:1.4rem; }
.rankings li { background:white; border:1px solid #cfdef1; padding:18px; box-shadow:0 3px 0 #dfe9f6; }
.rankings li:first-child { background:#fff0b9; border-color:#e6c76e; }
.rank { display:grid; place-items:center; min-width:40px; height:40px; border-radius:50%; background:#e6effa; font-size:1.2rem; }
.rankings li:first-child .rank { background:#ffce54; color:#513b00; }
.audio-settings { margin:24px 0; min-width:0; }
.audio-settings legend { font-size:1.2rem; font-weight:800; padding:0 10px; }
.audio-track { display:grid; grid-template-columns:minmax(140px,1fr) minmax(0,2fr); gap:12px; padding:18px 0; border-bottom:1px solid var(--line); align-items:center; }
.audio-track:last-child { border-bottom:0; }
.audio-track input[type=file] { font-size:.9rem; max-width:100%; }
.audio-volume { display:flex; align-items:center; gap:16px; }
.audio-volume input[type=range] { padding:0; accent-color:#173b70; }
@media(max-width:1100px) {
  .projection-live { gap:24px; grid-template-columns:minmax(0,1fr) 230px; }
  .projection-body .answer { flex-wrap:wrap; }
  .projection-join .timer strong { font-size:4.5rem; }
}
@media(max-width:700px) {
  .header-inner { gap:8px; padding:12px 16px; }
  .header-actions { gap:4px; }
  .header-actions .button { min-height:50px; font-size:.85rem; padding:10px; }
  .brand-mark { width:45px; }
  .brand-word { font-size:1.8rem; }
  .participant-sheet { padding:22px; }
  .participant-sheet .game-progress { font-size:.95rem; }
  .timer { min-width:95px; padding:10px 12px; }
  .timer strong { font-size:2.45rem; }
  .timer-label { font-size:.6rem; letter-spacing:.035em; }
  .projection-live { display:flex; flex-direction:column; position:relative; }
  .projection-live:has(.timer) .projection-body>.game-progress { padding-right:116px; min-height:84px; }
  .projection-join { position:static; align-self:stretch; display:grid; grid-template-columns:1fr 1fr; align-items:center; width:auto; }
  .projection-join .timer { position:absolute; top:0; right:0; width:104px; min-height:82px; padding:10px; border-radius:16px; }
  .projection-join .timer-label { font-size:.6rem; }
  .projection-join .timer strong { font-size:2.6rem; }
  .projection-join .join-qr { max-width:230px; }
  .projection-join .pipin-moment img { width:120px; }
  .projection-body h1 { font-size:clamp(1.65rem,6vw,2.5rem); margin:22px 0; }
  .projection-body .answer { padding:14px 12px; min-height:78px; }
  .projection-body .choice-letter { width:40px; height:40px; font-size:1.2rem; }
  .projection-body .game-progress { font-size:1rem; }
  .projection-lobby { grid-template-columns:1fr; text-align:center; }
  .projection-title .pipin-moment { align-items:center; }
  .projection-title .pipin-moment img { width:150px; }
  .projection-lobby .join-qr { max-width:380px; width:100%; margin:auto; }
  .projection-lobby h1 { font-size:2.4rem; }
  .audio-track { grid-template-columns:1fr; }
  .audio-volume { flex-wrap:wrap; }
}
@media(max-width:420px) {
  main { padding:20px 12px 36px; }
  .participant-sheet { padding:18px 16px; }
  .participant-sheet h1 { font-size:1.65rem; }
  .answer-text { min-width:0; }
  .answer { gap:10px; padding:14px 12px; }
  .answer .choice-letter { width:36px; height:36px; font-size:1.1rem; }
  .participant-sheet .answer--button { font-size:1.05rem; }
  .vote-confirmed { padding:20px 16px; gap:12px; }
  .vote-confirmed strong { font-size:1.15rem; }
  .confirmation-check { width:36px; height:36px; font-size:1.4rem; }
  .projection-join { grid-template-columns:1fr; }
  .projection-join .join-qr { margin:auto; width:230px; }
  .projection-join .pipin-moment { display:none; }
  .reveal-suspense .pipin-moment { right:10px; bottom:8px; }
  .reveal-suspense .pipin-moment img { width:70px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  .button:hover,.answer--button:hover { transform:none; }
}
.audio-disclosure { margin:28px 0; }
.player-identity { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:70px; margin:-10px 0 12px; }
.player-identity .player-name { min-width:0; overflow-wrap:anywhere; }
.player-identity .pipin-moment { margin:0; flex-shrink:0; }
.player-identity .pipin-moment img { width:72px!important; height:90px; }
@media(min-width:701px) and (max-height:900px) {
  .projection-join { gap:12px; }
  .projection-join .timer { min-height:116px; padding:12px; }
  .projection-join .timer strong { font-size:3.8rem; }
  .projection-join .join-qr { padding:12px; }
  .projection-join .join-qr img { max-width:220px; }
  .projection-join .qr-title { margin-bottom:6px; }
  .projection-join .join-qr figcaption { margin-top:8px; }
  .projection-join .pipin-moment img { width:104px; }
}
.audio-disclosure>summary { cursor:pointer; padding:20px 24px; min-height:64px; border:2px solid #c5d7ed; border-radius:16px; background:#fff; font-weight:800; font-size:1.1rem; }
.audio-disclosure>summary span { display:block; margin:6px 0 0 20px; color:#536984; font-size:.85rem; font-weight:500; }
.audio-disclosure>summary:focus-visible { outline:3px solid #007eaf; outline-offset:4px; }
.audio-disclosure[open]>summary { border-color:#799bc8; background:#e9f2ff; }
.audio-volumes { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.audio-volume { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; }
.audio-volume input { grid-row:2; grid-column:1 / -1; }
.audio-volume output { font-size:.9rem; }
.audio-track>strong { align-self:start; }
@media(max-width:700px) { .audio-volumes { grid-template-columns:1fr; } }
.rankings li>span:nth-child(2) { min-width:0; overflow-wrap:anywhere; }
.player-name { overflow-wrap:anywhere; }

/* Réponses reçues : bulles éphémères depuis le bas, derrière le QR. */
body[data-role=projection] .response-feedback {
  --bubble-gutter:max(24px,calc((100vw - 1600px)/2 + 32px));
  --bubble-rise:min(40vh,360px);
  position:fixed;
  z-index:12;
  left:var(--bubble-gutter);
  right:calc(var(--bubble-gutter) + clamp(230px,23vw,320px) + 36px);
  bottom:0;
  height:calc(var(--bubble-rise) + 108px);
  max-width:none;
  margin:0;
  padding:0;
  overflow:hidden;
  pointer-events:none;
  contain:layout paint;
}
body[data-role=projection] .response-bubbles {
  position:relative;
  display:block;
  width:100%;
  height:100%;
  max-height:none;
  margin:0;
  padding:0;
  overflow:visible;
  pointer-events:none;
  list-style:none;
}
body[data-role=projection] .response-bubble {
  position:absolute;
  left:calc(var(--bubble-lane) * 100% / var(--bubble-lanes) + 7px);
  bottom:18px;
  width:calc(100% / var(--bubble-lanes) - 14px);
  margin:0;
  padding:12px 14px;
  border:2px solid #6b9cca;
  border-radius:24px 24px 24px 8px;
  background:#edf7ff;
  color:#12365c;
  box-shadow:0 5px 16px #12365c22,inset 0 2px 0 #fff;
  font-size:clamp(.85rem,1.15vw,1.1rem);
  font-weight:750;
  line-height:1.25;
  text-align:center;
  overflow-wrap:anywhere;
  opacity:0;
  transform-origin:center;
  pointer-events:none;
  animation:response-float var(--bubble-duration,4500ms) linear var(--bubble-delay,0ms) forwards;
  will-change:transform,opacity;
}
body[data-role=projection] .response-bubble:nth-child(3n+2) { border-color:#d6a94c; background:#fff5d5; }
body[data-role=projection] .response-bubble:nth-child(3n) { border-color:#63aca3; background:#e9fcf7; }
body[data-role=projection] .response-bubble::after {
  content:'';
  position:absolute;
  inset:-7px;
  border:3px dotted currentColor;
  border-radius:50%;
  opacity:0;
  animation:response-pop-ring var(--bubble-duration,4500ms) linear var(--bubble-delay,0ms) forwards;
}
@keyframes response-float {
  0% { opacity:0; transform:translateY(10px) scale(.9); }
  7% { opacity:1; transform:translateY(calc(var(--bubble-rise) * -.07)) scale(1); }
  83% { opacity:1; transform:translateY(calc(var(--bubble-rise) * -.83)) scale(1); }
  93% { opacity:1; transform:translateY(calc(var(--bubble-rise) * -.93)) scale(1.08); }
  100% { opacity:0; transform:translateY(calc(var(--bubble-rise) * -1)) scale(.65); }
}
@keyframes response-pop-ring {
  0%,86% { opacity:0; transform:scale(.92); }
  92% { opacity:.65; transform:scale(1.05); }
  100% { opacity:0; transform:scale(1.35); }
}
body[data-role=projection] .response-bubble[data-motion=still] {
  bottom:calc(20px + var(--bubble-row) * 96px);
  opacity:1;
  transform:none;
  animation:none;
  will-change:auto;
}
body[data-role=projection] .response-bubble[data-motion=still]::after { display:none; }
body[data-role=projection] .projection-join .join-qr { position:relative; z-index:14; }
@media(max-width:1100px) and (min-width:701px) {
  body[data-role=projection] .response-feedback { right:calc(var(--bubble-gutter) + 254px); }
}
@media(max-width:700px) {
  body[data-role=projection] .response-feedback { left:12px; right:12px; --bubble-rise:min(38vh,300px); }
}
@media(prefers-reduced-motion:reduce) {
  body[data-role=projection] .response-bubble { animation:none!important; transform:none; will-change:auto; }
  body[data-role=projection] .response-bubble::after { display:none; }
}
.question-timing { display:grid; grid-template-columns:minmax(180px,1fr) minmax(180px,1fr); gap:10px 22px; padding:18px; border:1px solid #c9d9ee; border-radius:14px; background:#f0f6ff; align-items:end; }
.question-timing input[type=number] { max-width:180px; }
.question-timing input:disabled { background:#e4ebf4; color:#62748c; }
.question-timing .checkbox-label { display:flex; flex-direction:row; align-items:center; gap:10px; min-height:50px; cursor:pointer; }
.question-timing input[type=checkbox] { width:24px; height:24px; min-height:24px; padding:0; flex-shrink:0; accent-color:#173b70; }
.question-timing .field-help { grid-column:1 / -1; }
@media(max-width:600px) { .question-timing { grid-template-columns:1fr; padding:14px; } }
