/* ==========================================================================
   SESSIONS EN DIRECT — téléphone (.live-phone), écran projeté (.live-screen),
   salle de contrôle de l'animateur (.live-control). Complète styles.css.
   ========================================================================== */

/* La règle globale « small » de styles.css (cyan, espacé) ne s'applique pas ici */
:where(.live-phone, .live-screen, .live-control) small {
  color: inherit;
  font-weight: inherit;
  letter-spacing: normal;
}

/* ── 1. Téléphone de l'agent ─────────────────────────────────────────────── */
body.live-phone {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.live-phone-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: var(--navy);
  color: #fff;
  border: 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.live-phone-header img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 3px;
}

.live-phone-header strong { display: block; font-size: 1.05rem; }
.live-phone-header small {
  display: block;
  color: #b9cde3;
  font-size: .8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100vw - 100px);
}

.live-phone-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom, 0px));
}

.live-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 8px 24px rgba(8, 40, 77, .07);
  margin-bottom: 14px;
}

.live-card h2 { margin: 0 0 8px; color: var(--navy); font-size: 1.3rem; line-height: 1.3; }
.live-card h3 { margin: 0 0 12px; color: var(--navy); }
.live-center { text-align: center; }
.live-muted { color: var(--muted); }
.live-eyebrow { color: var(--orange); font-weight: 800; text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; }
.live-wide { width: 100%; margin-top: 10px; }
.live-small { padding: 7px 12px; font-size: .85rem; }
.live-mt { margin-top: 8px; }
.live-error { color: var(--red); font-weight: 700; min-height: 0; margin: 8px 0 0; }
.live-error:empty { display: none; }
.live-fineprint { font-size: .75rem; color: var(--muted); margin: 14px 0 0; text-align: center; }

.live-link {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 0;
  background: none;
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
}

.live-label { display: block; font-weight: 700; color: var(--navy); margin: 14px 0 6px; }

.live-phone input,
.live-phone select,
.live-phone textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cfdce8;
  border-radius: 11px;
  background: #fff;
  font-size: 16px; /* évite le zoom automatique sur iPhone */
  color: var(--ink);
}

.live-phone .form-group { margin: 14px 0 0; }
.live-phone .form-group label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 6px; }

.live-code-input {
  margin-top: 10px;
  text-align: center;
  font-size: 2rem !important;
  font-weight: 800;
  letter-spacing: .35em;
  text-transform: uppercase;
}

.live-net-banner {
  margin: 0;
  padding: 8px 16px;
  background: #fff4e5;
  color: #8a4b08;
  font-weight: 700;
  text-align: center;
}

/* Liste d'émargement */
.live-roster-results { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.live-roster-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: #f4f8fc;
  color: var(--navy);
  border: 1px solid #dbe6f0;
  padding: 13px 14px;
}
.live-roster-item span { color: var(--muted); font-weight: 600; font-size: .85rem; }
.live-roster-item:disabled { opacity: .5; cursor: not-allowed; }
.live-roster-chosen {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  background: #e9f7ee;
  border: 1px solid #b9e2c7;
}
.live-roster-chosen > i { color: var(--green); font-size: 1.5rem; }
.live-roster-chosen div { flex: 1; min-width: 0; }
.live-roster-chosen strong { display: block; color: var(--navy); }
.live-roster-chosen span { color: var(--muted); font-size: .85rem; }

/* Salle d'attente */
.live-pulse {
  width: 84px;
  height: 84px;
  margin: 8px auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 2.2rem;
  animation: live-pulse 2s infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(43, 155, 84, .5); }
  70% { box-shadow: 0 0 0 22px rgba(43, 155, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 155, 84, 0); }
}

/* Question */
.live-q-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.live-q-counter { font-weight: 800; color: var(--navy); }
.live-q-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.live-q-timer.is-urgent { background: var(--red); animation: live-blink 1s infinite; }
@keyframes live-blink { 50% { opacity: .65; } }

.live-progress { height: 6px; background: #dbe6f0; border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.live-progress i { display: block; height: 100%; background: var(--orange); transition: width .3s; }

.live-q-text { font-size: 1.2rem !important; }
.live-options { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.live-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  text-align: left;
  padding: 12px 14px;
  background: #f7fafd;
  color: var(--ink);
  border: 2px solid #dbe6f0;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: border-color .12s, background .12s, transform .08s;
}
.live-option:active { transform: scale(.985); }
.live-option.is-selected { border-color: var(--blue); background: #e7f1fa; }
.live-option:disabled { cursor: default; opacity: .75; }
.live-option-letter {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #cfdce8;
  color: var(--navy);
  font-weight: 800;
}
.live-option-letter .fa-check { opacity: 0; }
.live-option.is-selected .live-option-letter { background: var(--blue); border-color: var(--blue); color: #fff; }
.live-option.is-selected .live-option-letter .fa-check { opacity: 1; }

.live-q-status { margin: 14px 0 0; color: var(--green); font-weight: 700; }
.live-q-status:empty { display: none; }

.live-q-nav { display: flex; gap: 10px; }
.live-q-nav button { flex: 1; min-height: 52px; }
.live-q-nav .hidden + button { flex: 1; }

.live-missing { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

/* Correction / résultat */
.live-result-icon {
  width: 84px;
  height: 84px;
  margin: 4px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.3rem;
  background: #eaf3fa;
  color: var(--blue);
}
.live-result-icon.is-success { background: var(--green); color: #fff; }
.live-result-icon.is-failure { background: var(--red); color: #fff; }

.live-reveal-answer {
  margin: 8px 0 16px;
  padding: 14px;
  border-radius: 12px;
  background: #e9f7ee;
  border: 1px solid #b9e2c7;
  color: var(--navy);
  font-weight: 700;
  text-align: left;
}
.live-reveal-answer p { margin: 4px 0; }
.live-reveal-answer ol { margin: 0; padding-left: 22px; }
.live-reveal-answer .fa-check { color: var(--green); margin-right: 6px; }

.live-score { font-size: 3.6rem; font-weight: 900; color: var(--navy); margin: 6px 0; }
.live-score small { font-size: 1.4rem; color: var(--muted); }

.live-stars { display: flex; justify-content: center; gap: 6px; margin: 4px 0 14px; }
.live-stars button {
  width: 52px;
  height: 52px;
  padding: 0;
  font-size: 2rem;
  line-height: 1;
  background: #f1f5f9;
  color: #c3cfdb;
}
.live-stars button.is-on { color: #f5a623; background: #fff7e6; }

.live-cert-preview { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); margin: 12px 0 4px; }

/* ── 2. Écran projeté ────────────────────────────────────────────────────── */
body.live-screen {
  --s-bg: #061d39;
  --s-panel: #0b2c52;
  --s-line: #1d4573;
  --s-text: #f3f7fb;
  --s-muted: #9fb7d1;
  margin: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 20% 0%, #0d3a6b 0%, var(--s-bg) 60%);
  color: var(--s-text);
  overflow: hidden;
  /* Suit la largeur ET la hauteur : un écran moins haut (4:3, barre du navigateur) ne coupe plus le bas */
  font-size: clamp(12px, min(1.15vw, 2.05vh), 26px);
}

.ls-top {
  position: static;
  min-height: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  padding: .8em 1.6em;
  background: rgba(0, 0, 0, .18);
  border: 0;
  flex-wrap: nowrap;
}
.ls-brand { display: flex; align-items: center; gap: .8em; min-width: 0; }
.ls-brand img { height: 2.6em; background: #fff; border-radius: .5em; padding: .2em; }
.ls-brand strong { display: block; font-size: 1.15em; }
.ls-brand span:not(.text-orange) { display: block; color: var(--s-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-top-right { display: flex; align-items: center; gap: .7em; flex-shrink: 0; }
.ls-pill { padding: .45em 1em; border-radius: 999px; background: var(--s-panel); border: 1px solid var(--s-line); white-space: nowrap; }
.ls-pill b { font-size: 1.1em; }
.ls-fullscreen { background: transparent; color: var(--s-muted); border: 1px solid var(--s-line); padding: .45em .7em; font-size: 1em; }

.ls-main { flex: 1; display: flex; min-height: 0; padding: 1.5em 2em 1.5em; overflow: hidden; }
.ls-view { flex: 1; display: flex; min-height: 0; }
.ls-view.hidden { display: none !important; }
.ls-muted { color: var(--s-muted); }
.ls-center { margin: auto; text-align: center; }

/* Accueil */
#vLobby { gap: 3em; align-items: center; }
.ls-join { flex: 0 0 auto; text-align: center; }
.ls-qr {
  width: min(42vh, 30vw, 22em);
  height: min(42vh, 30vw, 22em);
  padding: 1.1em;
  background: #fff;
  border-radius: 1.2em;
  box-shadow: 0 1.5em 3em rgba(0, 0, 0, .35);
}
.ls-qr img, .ls-qr canvas { width: 100% !important; height: 100% !important; display: block; }
.ls-join-label { font-size: 1.5em; font-weight: 800; margin: .8em 0 .2em; }
.ls-join-alt { color: var(--s-muted); margin: 0; line-height: 1.6; }
.ls-join-alt b { color: var(--s-text); }
.ls-code { display: inline-block; font-size: 1.6em; letter-spacing: .25em; color: var(--orange) !important; }

.ls-lobby-side { flex: 1; min-width: 0; }
.ls-big-count { display: flex; flex-direction: column; }
.ls-big-count span { font-size: 7em; font-weight: 900; line-height: 1; color: var(--orange); }
.ls-big-count small { font-size: 1.6em; color: var(--s-muted); }
.ls-names { display: flex; flex-wrap: wrap; gap: .5em; margin-top: 1.5em; max-height: 40vh; overflow: hidden; }
.ls-names span { padding: .35em .9em; border-radius: 999px; background: var(--s-panel); border: 1px solid var(--s-line); animation: ls-pop .3s ease-out; }
@keyframes ls-pop { from { transform: scale(.6); opacity: 0; } }

.ls-counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; }
.ls-counters div { background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 1em; padding: .8em 1em; }
.ls-counters b { display: block; font-size: 3em; line-height: 1.1; }
.ls-counters span { color: var(--s-muted); }
.ls-free-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; margin: 1em 0; }

.ls-bar { height: .7em; background: rgba(255, 255, 255, .12); border-radius: 99px; overflow: hidden; margin: .8em 0; }
.ls-bar i { display: block; height: 100%; width: 0; background: var(--orange); border-radius: 99px; transition: width .6s ease; }
.ls-bar-lg { height: 1em; }
.ls-bar.is-result i { background: var(--green); }

.ls-kpi { background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 1em; padding: 1em 1.2em; }
.ls-kpi b { display: block; font-size: 3em; line-height: 1.1; }
.ls-kpi span { color: var(--s-muted); font-size: 1.1em; }
.ls-kpi small { display: block; color: var(--s-muted); margin-top: .3em; }
.ls-kpi.is-good b { color: #5fd18b; }
.ls-kpi.is-mid b { color: #f6c35b; }
.ls-kpi.is-bad b { color: #ff7f7f; }

.ls-qrates { display: grid; gap: .45em; }
.ls-qrates.is-columns { grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 11), auto); column-gap: 1.6em; }
.ls-qrate { display: grid; grid-template-columns: 3em 1fr 4em; align-items: center; gap: .8em; }
.ls-qrate .ls-bar { margin: 0; height: .9em; }
.ls-qrate-num { color: var(--s-muted); font-weight: 700; }
.ls-qrate b { text-align: right; }
.ls-qrate.is-good .ls-bar i { background: #3fb873; }
.ls-qrate.is-mid .ls-bar i { background: #f0ad3c; }
.ls-qrate.is-bad .ls-bar i { background: #e05a5a; }

/* Question */
#vQuestion { flex-direction: column; gap: 1em; }
.ls-q-head { display: flex; justify-content: space-between; align-items: center; }
.ls-q-num { font-size: 1.3em; font-weight: 800; color: var(--orange); text-transform: uppercase; letter-spacing: .05em; }
.ls-q-text { margin: 0; font-size: 2.3em; line-height: 1.25; }
.ls-q-body { flex: 1; min-height: 0; display: flex; gap: 2em; align-items: stretch; }
.ls-q-image { max-width: 32%; max-height: 100%; object-fit: contain; border-radius: 1em; background: #fff; }

.ls-tiles { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1em; align-content: start; }
.ls-tiles.is-ordering { grid-template-columns: 1fr; }
.ls-tiles.is-many { gap: .7em; }
.ls-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1em;
  min-height: 4.2em;
  padding: .9em 1.2em;
  border-radius: 1em;
  overflow: hidden;
  font-size: 1.35em;
  font-weight: 700;
  background: var(--tile, #1d4f8a);
  transition: opacity .3s, filter .3s, transform .3s;
}
.ls-tile-0 { --tile: #1f6fc0; }
.ls-tile-1 { --tile: #d9721c; }
.ls-tile-2 { --tile: #1b9a8a; }
.ls-tile-3 { --tile: #8a4fc2; }
.ls-tile-4 { --tile: #c4416b; }
.ls-tile-5 { --tile: #5a7d1f; }
.ls-tile-letter {
  flex-shrink: 0;
  width: 1.8em;
  height: 1.8em;
  display: grid;
  place-items: center;
  border-radius: .45em;
  background: rgba(255, 255, 255, .22);
  font-weight: 900;
  position: relative;
  z-index: 1;
}
.ls-tile-text { flex: 1; position: relative; z-index: 1; line-height: 1.25; }
.ls-tile-count { position: relative; z-index: 1; white-space: nowrap; font-size: 1.1em; }
.ls-tile-count small { font-size: .7em; opacity: .9; font-weight: 700; }
.ls-tile-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 255, 255, .18); transition: width .8s ease; }
.ls-tile.is-wrong { opacity: .45; filter: saturate(.4); }
.ls-tiles.is-ordering .ls-tile.is-wrong { opacity: 1; filter: none; }
.ls-tile.is-correct { --tile: #2b9b54; box-shadow: 0 0 0 .2em #8be3ad inset; transform: scale(1.02); }
.ls-tile.is-correct .ls-tile-letter::after { content: '✓'; position: absolute; right: -.5em; top: -.6em; font-size: .9em; background: #fff; color: var(--green); border-radius: 50%; width: 1.2em; height: 1.2em; display: grid; place-items: center; }

.ls-q-foot { font-size: 1.2em; color: var(--s-muted); }
.ls-q-foot .ls-bar { margin-top: .4em; }

.ls-timer { position: relative; width: 5em; height: 5em; }
.ls-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ls-timer circle { fill: none; stroke-width: 9; }
.ls-timer-bg { stroke: rgba(255, 255, 255, .15); }
.ls-timer-fg { stroke: var(--orange); stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.ls-timer b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.8em; font-variant-numeric: tabular-nums; }
.ls-timer.is-urgent .ls-timer-fg { stroke: #ff6b6b; }
.ls-timer.is-urgent b { color: #ff8f8f; }

/* Bilan */
#vSummary { flex-direction: column; gap: 1.4em; }
.ls-summary-title { margin: 0; font-size: 2.2em; }
.ls-summary-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1em; }
.ls-kpi-hero b { font-size: 4.2em; }
.ls-summary-charts { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.4em; }
.ls-chart { background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 1em; padding: 1em 1.4em; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ls-chart h2 { margin: 0 0 .8em; font-size: 1.2em; color: var(--s-muted); }
.ls-histo { flex: 1; min-height: 8em; display: flex; align-items: flex-end; gap: .5em; }
.ls-histo-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .3em; }
.ls-histo-col i { display: block; width: 100%; min-height: 2px; border-radius: .4em .4em 0 0; transition: height .6s ease; }
.ls-histo-col.is-pass i { background: #3fb873; }
.ls-histo-col.is-fail i { background: #e05a5a; }
.ls-histo-count { font-weight: 800; }
.ls-histo-label { color: var(--s-muted); }

/* ── 3. Salle de contrôle de l'animateur ─────────────────────────────────── */
body.live-control { background: var(--bg); min-height: 100vh; }

.lc-top {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px max(20px, calc((100vw - 1400px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-wrap: nowrap;
}
.lc-back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #edf3f8;
  color: var(--navy);
  text-decoration: none;
}
.lc-logo { height: 44px; width: auto; }
.lc-top-title small { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }
.lc-top-title h1 { margin: 0; font-size: 1.3rem; color: var(--navy); }
.lc-user { margin-left: auto; color: var(--muted); font-weight: 700; white-space: nowrap; }

.lc-main { max-width: 1400px; margin: 0 auto; padding: 22px 20px 60px; }
.lc-muted { color: var(--muted); font-weight: 500; }
.lc-small { padding: 7px 12px; font-size: .85rem; }
.lc-wide { width: 100%; }
.lc-error { color: var(--red); font-weight: 700; }
.lc-error:empty { display: none; }

.lc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 6px 18px rgba(8, 40, 77, .05);
  margin-bottom: 18px;
  min-width: 0;
}
.lc-card h3 { margin: 0 0 14px; color: var(--navy); font-size: 1.05rem; }
.lc-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.lc-card-head h3 { margin: 0; }
.lc-table-card { overflow-x: auto; }

.lc-intro { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.lc-intro h2 { margin: 0 0 4px; color: var(--navy); }
.lc-intro p { margin: 0; color: var(--muted); max-width: 720px; }

.lc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.live-control .form-group { margin: 0 0 14px; }
.live-control .form-group label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.live-control input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.live-control select,
.live-control textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfdce8;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.live-control textarea { font-family: ui-monospace, Consolas, monospace; font-size: .88rem; }

.lc-modes { border: 0; padding: 0; margin: 4px 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lc-modes legend { font-weight: 700; color: var(--navy); margin-bottom: 8px; padding: 0; }
.lc-mode { cursor: pointer; position: relative; }
.lc-mode input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.lc-mode span {
  display: block;
  height: 100%;
  padding: 14px 16px 14px 54px;
  position: relative;
  border: 2px solid #dbe6f0;
  border-radius: 12px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}
.lc-mode span i { position: absolute; left: 16px; top: 16px; font-size: 1.4rem; color: var(--blue); }
.lc-mode strong { display: block; color: var(--navy); font-size: 1rem; margin-bottom: 2px; }
.lc-mode input:checked + span { border-color: var(--blue); background: #f0f7fd; }
.lc-mode input:focus-visible + span { outline: 3px solid #9fc3e3; }

.lc-checks { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.lc-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--ink); cursor: pointer; }
.lc-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--blue); }

.lc-roster { margin: 6px 0 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fafcfe; }
.lc-roster summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.lc-roster p { font-size: .88rem; }
.lc-file { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--blue); font-weight: 700; cursor: pointer; }
.lc-file input { display: none; }
.lc-actions { display: flex; justify-content: flex-end; gap: 10px; }

.lc-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #edf3f8;
  color: var(--navy);
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}
.lc-badge:empty { display: none; }
.lc-badge.is-ouverte { background: #e6f4ff; color: #0b5ca3; }
.lc-badge.is-en_cours { background: #fff3e0; color: #b45309; }
.lc-badge.is-terminee { background: #e9f7ee; color: #1e7a42; }
.lc-badge.is-ok { background: #e9f7ee; color: #1e7a42; }
.lc-badge.is-wait { background: #fdf2f2; color: #a33a3a; }

.lc-table { width: 100%; border-collapse: collapse; }
.lc-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lc-table td { padding: 10px; border-bottom: 1px solid #eef3f8; vertical-align: middle; }
.lc-table-compact td { padding: 7px 10px; }
.lc-row-link { cursor: pointer; }
.lc-row-link:hover { background: #f5f9fc; }
.lc-table tr.is-absent td { color: var(--muted); background: #fbfbfc; }
.lc-empty { text-align: center; color: var(--muted); padding: 24px; margin: 0; }
.lc-code-sm { font-weight: 800; letter-spacing: .12em; color: var(--navy); background: #edf3f8; padding: 3px 8px; border-radius: 6px; }
.lc-filter { max-width: 240px; }
.lc-icon-btn { padding: 6px 9px; }
.lc-ok { color: var(--green); }
.lc-ko { color: var(--red); }
.lc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c8d3df; margin-right: 8px; vertical-align: middle; }
.lc-dot.is-online { background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }

.lc-session-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.lc-session-title h2 { margin: 0; color: var(--navy); }
.lc-session-title p { margin: 4px 0 0; }
.lc-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.lc-toolbar button { padding: 9px 14px; font-size: .9rem; }
.lc-danger { color: var(--red) !important; margin-left: auto; }
.lc-notice { padding: 10px 14px; border-radius: 10px; background: #eaf3fa; color: var(--navy); font-weight: 700; margin: 0 0 16px; white-space: pre-line; }
.lc-notice.is-error { background: #fdecec; color: #9b2c2c; }
.lc-notice.is-success { background: #e9f7ee; color: #1e7a42; }

.lc-session-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.lc-side { position: sticky; top: 86px; }
.lc-qr-card { text-align: center; }
.lc-qr { width: 220px; height: 220px; margin: 0 auto; }
.lc-qr img, .lc-qr canvas { width: 100% !important; height: 100% !important; }
.lc-code { font-size: 2rem; font-weight: 900; letter-spacing: .25em; color: var(--orange); margin: 10px 0 0; }
.lc-url { font-size: .82rem; word-break: break-all; margin: 4px 0 10px; }

.lc-ctrl-state { margin: 0 0 6px; color: var(--navy); line-height: 1.5; }
.lc-ctrl-question { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.lc-ctrl-question:empty { display: none; }
.lc-timer { font-variant-numeric: tabular-nums; color: var(--orange); font-weight: 800; }
.lc-bar { height: 8px; background: #e3ebf3; border-radius: 99px; overflow: hidden; margin: 6px 0 12px; }
.lc-bar i { display: block; height: 100%; width: 0; background: var(--orange); transition: width .5s; }
.lc-ctrl-secondary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lc-ctrl-secondary:empty { display: none; }
.lc-review { margin-top: 12px; }
.lc-review p { margin: 0 0 6px; font-size: .88rem; }
.lc-review div { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-chip { padding: 6px 11px; border-radius: 999px; background: #edf3f8; color: var(--navy); font-size: .85rem; }
.lc-chip.is-active { background: var(--navy); color: #fff; }
.lc-shortcuts { font-size: .78rem; margin: 12px 0 0; }

.lc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.lc-kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; position: relative; }
.lc-kpi i { position: absolute; right: 14px; top: 14px; color: #b9cde3; }
.lc-kpi b { display: block; font-size: 1.9rem; color: var(--navy); line-height: 1.1; }
.lc-kpi span { color: var(--muted); font-weight: 600; font-size: .88rem; }
.lc-kpi small { font-weight: 500; }

.lc-questions { display: flex; flex-direction: column; gap: 6px; }
.lc-question { border: 1px solid #e6edf4; border-radius: 10px; }
.lc-question.is-current { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.lc-question summary { display: grid; grid-template-columns: 30px minmax(0, 1fr) 140px 52px 56px; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; list-style: none; }
.lc-question summary::-webkit-details-marker { display: none; }
.lc-qnum { width: 26px; height: 26px; border-radius: 7px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.lc-qtext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.lc-question[open] .lc-qtext { white-space: normal; }
.lc-qbar { height: 10px; background: #e8eef4; border-radius: 99px; overflow: hidden; }
.lc-qbar i { display: block; height: 100%; background: #9fb3c8; transition: width .5s; }
.lc-qbar.is-good i { background: #2b9b54; }
.lc-qbar.is-mid i { background: #e7a23b; }
.lc-qbar.is-bad i { background: #d65454; }
.lc-qrate { text-align: right; color: var(--navy); }
.lc-options { list-style: none; margin: 0; padding: 0 12px 12px 54px; display: flex; flex-direction: column; gap: 4px; }
.lc-options li { display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: #f7fafc; font-size: .9rem; }
.lc-options li span { font-weight: 800; color: var(--muted); }
.lc-options li em { margin-left: auto; font-style: normal; color: var(--muted); white-space: nowrap; }
.lc-options li.is-correct { background: #e9f7ee; color: #14532d; font-weight: 700; }
.lc-options li.is-correct span { color: var(--green); }

.lc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lc-two .lc-card { overflow-x: auto; }
.lc-histo { height: 180px; display: flex; align-items: flex-end; gap: 6px; }
.lc-histo-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-size: .8rem; }
.lc-histo-col i { width: 100%; min-height: 2px; border-radius: 5px 5px 0 0; transition: height .5s; }
.lc-histo-col.is-pass i { background: #2b9b54; }
.lc-histo-col.is-fail i { background: #d65454; }
.lc-histo-col span { font-weight: 800; color: var(--navy); }
.lc-histo-col small { color: var(--muted); }

.lc-comments { display: grid; gap: 10px; }
.lc-comments blockquote { margin: 0; padding: 10px 14px; border-left: 4px solid var(--orange); background: #fffaf3; border-radius: 0 10px 10px 0; }
.lc-comments cite { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; font-style: normal; }
.lc-stars { color: #f5a623; margin-right: 8px; letter-spacing: 1px; }

/* Mode présentation */
.lc-present { position: fixed; inset: 0; z-index: 1000; background: #061d39; }
.lc-present iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.lc-present-bar {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  opacity: .25;
  transition: opacity .2s;
  max-width: calc(100vw - 32px);
}
.lc-present-bar:hover, .lc-present-bar:focus-within { opacity: 1; }
.lc-present-bar span { color: var(--navy); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Feuille d'émargement : visible seulement à l'impression */
.lc-print { display: none; }

@media (max-width: 1000px) {
  .lc-session-grid { grid-template-columns: 1fr; }
  .lc-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .lc-two { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .lc-form-grid, .lc-modes, .lc-side { grid-template-columns: 1fr; }
  .lc-question summary { grid-template-columns: 26px minmax(0, 1fr) 48px; }
  .lc-question summary .lc-qbar, .lc-question summary small { display: none; }
  .lc-logo, .lc-user { display: none; }
  .lc-danger { margin-left: 0; }
}

@media print {
  body.live-control > *:not(#printSheet) { display: none !important; }
  body.live-control { background: #fff; }
  .lc-print { display: block; color: #000; font-size: 11pt; }
  .lc-print header { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; position: static; min-height: 0; padding: 0; border: 0; }
  .lc-print header img { height: 60px; }
  .lc-print h1 { margin: 0 0 4px; font-size: 18pt; }
  .lc-print p { margin: 0; }
  .lc-print table { width: 100%; border-collapse: collapse; }
  .lc-print th, .lc-print td { border: 1px solid #555; padding: 6px 8px; text-align: left; }
  .lc-print th { background: #eee; }
  .lc-print td:last-child { width: 28%; }
  .lc-print tr { height: 30px; page-break-inside: avoid; }
  .lc-print-foot { margin-top: 10px !important; font-size: 9pt; color: #444; }
}

/* Liste d'émargement : sélection dans l'application, import CSV, copier-coller */
.lc-roster-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; padding: 4px; border-radius: 12px; background: #eef3f9; width: fit-content; max-width: 100%; }
.lc-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; background: transparent; color: var(--navy); font-size: .86rem; font-weight: 700; box-shadow: none; }
.lc-tab:hover { background: #fff; }
.lc-tab.active { background: #fff; color: var(--blue); box-shadow: 0 2px 6px rgba(8, 40, 77, .08); }
.lc-roster-panel { margin-bottom: 12px; }
.lc-roster-panel textarea { width: 100%; margin-bottom: 8px; }
.lc-pick-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.lc-pick-bar input { flex: 1 1 220px; min-width: 0; }
.lc-pick-bar select { flex: 0 1 220px; }
.lc-pick-bar button { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.lc-pick-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.lc-pick-list > p { margin: 0; padding: 14px; }
.lc-pick-item { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; margin: 0; padding: 9px 12px; border-bottom: 1px solid #eef2f7; cursor: pointer; font-weight: 400; }
.lc-pick-item:last-child { border-bottom: 0; }
.lc-pick-item:hover { background: #f6f9fc; }
.lc-pick-item.is-chosen { background: #eef7f1; }
.lc-pick-item input { grid-row: span 2; width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.lc-pick-name { font-weight: 700; color: var(--navy); }
.lc-pick-meta { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-csv-report { margin: 0 0 10px; color: #1e7a42; font-size: .85rem; font-weight: 700; }
.lc-csv-report:empty { display: none; }
.lc-roster-selected { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.lc-roster-selected-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--navy); }
.lc-roster-selected-head span { display: inline-block; min-width: 24px; margin-left: 4px; padding: 1px 8px; border-radius: 99px; background: #e6f4ff; color: var(--blue); font-size: .8rem; text-align: center; }
.lc-linkbtn { padding: 0; background: none; color: #b42318; font-size: .82rem; font-weight: 700; box-shadow: none; }
.lc-linkbtn:hover { background: none; text-decoration: underline; }
.lc-roster-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.lc-roster-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #eef2f7; }
.lc-roster-list li:last-child { border-bottom: 0; }
.lc-roster-list li.lc-roster-empty { display: block; color: var(--muted); font-size: .86rem; padding: 14px 12px; }
.lc-roster-avatar { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; background: #fff4e5; color: #b45309; }
.lc-roster-avatar.is-linked { background: #e9f7ee; color: #1e7a42; }
.lc-roster-name { color: var(--navy); }
.lc-roster-meta { grid-column: 2; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-roster-remove { grid-column: 3; grid-row: 1 / span 2; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); box-shadow: none; }
.lc-roster-remove:hover { background: #fdecec; color: #b42318; }
