/* Quiz des Bernadins — téléphone des participants */
html, body { height: 100%; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overscroll-behavior: none; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.top-titre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--script); font-size: 24px; color: var(--gold-light); }
.top-moi { display: flex; align-items: center; gap: 8px; flex: none; max-width: 60%; padding: 5px 6px 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 700; font-size: 14px; }
.top-moi > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-score { padding: 3px 10px; border-radius: 999px; background: var(--gold); color: var(--wine-dark); font-variant-numeric: tabular-nums; }

.scene { position: relative; flex: 1; display: flex; flex-direction: column; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); }
.vue { flex: 1; display: flex; flex-direction: column; animation: entree .45s var(--ease) both; }
.vue--centre { align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 10px 0 30px; }
@keyframes entree { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.grand-titre { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: .02em; }
.texte { max-width: 340px; font-size: 17px; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.pastille { padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 700; font-size: 14px; }
.pastille:empty { display: none; }
.carte { width: 100%; max-width: 380px; padding: 20px; border-radius: 22px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(240, 217, 168, .2); }

.sceau { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #a3283b 0%, #6d0a1b 55%, #4a0812 100%); box-shadow: inset 0 0 0 5px rgba(240, 217, 168, .2), 0 14px 30px -12px rgba(0, 0, 0, .7); font: 600 32px var(--display); color: var(--gold-light); }

.formulaire { display: grid; gap: 8px; text-align: left; }
.formulaire label { margin-top: 6px; font-weight: 700; font-size: 14px; color: var(--gold-light); }
.formulaire input { width: 100%; height: 54px; padding: 0 16px; border: 2px solid transparent; border-radius: 14px; background: #fff; color: #2a0710; font-size: 19px; font-weight: 700; }
.formulaire input:focus { outline: none; border-color: var(--gold); }
#code { letter-spacing: .3em; text-transform: uppercase; text-align: center; font-family: var(--display); }
.erreur { padding: 10px 12px; border-radius: 12px; background: rgba(224, 72, 94, .25); color: #ffd7dd; font-weight: 700; font-size: 14px; text-align: center; }

.bouton { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin-top: 10px; padding: 12px 18px; border: 0; border-radius: 16px; font-weight: 800; font-size: 18px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s, opacity .2s, filter .2s; }
.bouton:active { transform: scale(.97); }
.bouton--or { background: linear-gradient(135deg, #f3dfb3 0%, #d6b27b 46%, #c59c60 54%, #ead1a0 100%); color: var(--wine-dark); box-shadow: 0 14px 30px -14px rgba(233, 190, 120, .8); }
.bouton[disabled] { opacity: .45; cursor: default; box-shadow: none; }

.loader { display: flex; gap: 8px; }
.loader span { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: point 1s ease-in-out infinite; }
.loader span:nth-child(2) { animation-delay: .15s; } .loader span:nth-child(3) { animation-delay: .3s; }
@keyframes point { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-6px); } }

.pulse { display: grid; place-items: center; width: 86px; height: 86px; border-radius: 50%; background: rgba(47, 163, 98, .2); animation: pulse 2s ease-in-out infinite; }
.pulse span { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--ok); font-size: 32px; font-weight: 800; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 163, 98, .35); } 50% { box-shadow: 0 0 0 16px rgba(47, 163, 98, 0); } }

/* Question */
.vue--question { gap: 12px; padding-top: 4px; }
.q-entete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.q-num { font-family: var(--display); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); }
.q-chrono { min-width: 54px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-weight: 800; font-size: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.q-chrono.is-urgent { background: var(--no); }
.q-barre { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.q-barre span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--gold); transform-origin: left; }
.q-texte { font-size: 21px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.choix { flex: 1; display: grid; gap: 10px; align-content: stretch; }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border: 3px solid transparent; border-radius: 18px;
  background: var(--opt); color: #fff; font-weight: 800; font-size: 18px; line-height: 1.25; text-align: left; overflow-wrap: anywhere; cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); -webkit-tap-highlight-color: transparent; transition: transform .15s, opacity .2s, border-color .2s;
}
.opt .forme { width: 26px; height: 26px; }
.opt:active { transform: scale(.98); }
.opt[aria-checked="true"] { border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25), inset 0 -4px 0 rgba(0, 0, 0, .18); }
.choix.a-choisi .opt[aria-checked="false"] { opacity: .45; }
.opt[disabled] { cursor: default; }
.q-pied { position: sticky; bottom: 0; padding-bottom: 4px; }

/* Messages et résultats */
.grosse-icone { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; font-size: 48px; font-weight: 800; background: rgba(255, 255, 255, .12); animation: pop .5s var(--ease) both; }
.grosse-icone.ok { background: var(--ok); }
.grosse-icone.no { background: var(--no); }
.grosse-icone.or { background: linear-gradient(135deg, #f3dfb3 0%, #d6b27b 50%, #e6c98f 100%); color: var(--wine-dark); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.points { font-family: var(--display); font-weight: 600; font-size: 40px; color: var(--gold-light); animation: pop .6s var(--ease) .1s both; }
.resume { display: grid; gap: 8px; text-align: left; }
.resume p { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.resume strong { font-variant-numeric: tabular-nums; }
.bonne-rep { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 4px; padding: 8px 14px; border-radius: 12px; background: var(--opt); font-weight: 800; text-align: left; }

.hors-ligne { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: #000; color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; }

@media (min-width: 640px) {
  .scene { width: 100%; max-width: 560px; margin: 0 auto; }
  .choix { grid-template-columns: 1fr 1fr; }
}
