/* Tombola draw screen: 1920x1080, scaled to fit (see tirage.js) */
html, body { margin: 0; height: 100%; background: #071418; overflow: hidden; font-family: 'Be Vietnam Pro', system-ui, sans-serif; cursor: pointer; }
#viewport { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#stage { position: relative; width: 1920px; height: 1080px; flex: none; overflow: hidden; background: var(--teal); color: var(--cream); transform-origin: center; }
* { box-sizing: border-box; margin: 0; padding: 0; }

.bg { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(244,239,236,.07) 2.5px, transparent 3px), radial-gradient(ellipse at 50% 40%, rgba(228,93,118,.14), transparent 60%); background-size: 64px 64px, auto; animation: drift 60s linear infinite; }
@keyframes drift { to { background-position: 64px 64px, 0 0; } }

header { position: absolute; left: 100px; right: 100px; top: 44px; display: flex; align-items: center; gap: 28px; z-index: 2; }
.logo { display: block; width: 170px; height: 72px; background: var(--cream); -webkit-mask: url(/assets/logo.svg) left center / contain no-repeat; mask: url(/assets/logo.svg) left center / contain no-repeat; }
.event { font-size: 30px; font-weight: 700; color: var(--mist); }
.event span { color: var(--coral); margin: 0 6px; }
.progress { margin-left: auto; font-size: 30px; font-weight: 800; color: var(--mist); font-variant-numeric: tabular-nums; }
.progress b { color: var(--cream); }


#screen { position: absolute; inset: 0; }
#confetti { position: absolute; inset: 0; pointer-events: none; z-index: 5; }

.eyebrow { font-size: 28px; font-weight: 800; text-transform: uppercase; letter-spacing: 3px; color: var(--coral); }

/* Everything that enters builds in one after the other (--n set by tirage.js) */
.in { animation: rise .7s cubic-bezier(.2,1.1,.4,1) both; animation-delay: calc(.1s + var(--n, 0) * .12s); }
@keyframes rise { from { opacity: 0; translate: 0 50px; } }

/* --- Intro */
.intro { position: absolute; left: 100px; right: 100px; top: 190px; bottom: 90px; display: flex; flex-direction: column; }
.intro h1 { font-size: 170px; font-weight: 900; letter-spacing: -6px; line-height: .95; margin-top: 14px; }
.intro .sub { font-size: 44px; font-weight: 700; color: var(--mist); margin-top: 20px; }
.ladder { margin-top: auto; display: flex; align-items: flex-end; gap: 28px; height: 420px; }
.ladder div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px 32px; border-radius: 30px; background: var(--teal-soft); border: 3px solid var(--teal-line); }
.ladder div:nth-child(1) { height: 34%; }
.ladder div:nth-child(2) { height: 54%; }
.ladder div:nth-child(3) { height: 76%; background: var(--cream); border-color: var(--cream); color: var(--teal); }
.ladder div:nth-child(4) { height: 100%; background: var(--coral); border-color: var(--coral); color: var(--teal); }
.ladder b { font-size: 24px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; opacity: .7; }
.ladder span { font-size: 46px; font-weight: 900; letter-spacing: -1px; line-height: 1.05; margin-top: 6px; }

/* --- Category card */
.cat { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 140px; }
.cat .big { position: absolute; right: 60px; bottom: -120px; font-size: 900px; font-weight: 900; line-height: 1; letter-spacing: -40px; opacity: .08; }
.cat h1 { font-size: 220px; font-weight: 900; letter-spacing: -8px; line-height: .92; margin-top: 18px; }
.cat p { font-size: 50px; font-weight: 700; color: var(--mist); margin-top: 34px; }
.cat p.eyebrow { font-size: 30px; color: var(--coral); margin-top: 0; }
.cat .count { display: inline-block; margin-top: 46px; padding: 16px 34px; border-radius: 999px; background: var(--cream); color: var(--teal); font-size: 34px; font-weight: 800; align-self: flex-start; }
.cat[data-cat="grand"] { background: var(--coral); color: var(--teal); }
.cat[data-cat="grand"] p, .cat[data-cat="grand"] p.eyebrow { color: var(--teal); }
.cat[data-cat="grand"] .count { background: var(--teal); color: var(--cream); }

/* --- Countdown */
.count3 { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.count3 .label { position: absolute; top: 190px; left: 0; right: 0; text-align: center; font-size: 34px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--coral); }
.ring { position: absolute; width: 620px; height: 620px; }
.ring circle { fill: none; stroke-width: 16; }
.ring .track { stroke: var(--teal-line); }
.ring .run { stroke: var(--coral); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; }
.num { position: relative; font-size: 400px; font-weight: 900; letter-spacing: -14px; line-height: 1; color: var(--cream); font-variant-numeric: tabular-nums; }
.num.pop { animation: pop .9s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes pop { 0% { scale: 1.8; opacity: 0; } 30% { opacity: 1; } 100% { scale: 1; } }
.flash { position: absolute; inset: 0; background: var(--cream); pointer-events: none; z-index: 4; animation: flash .6s ease-out both; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }

/* --- Reveal */
.reveal { position: absolute; left: 100px; right: 100px; top: 170px; bottom: 90px; display: grid; grid-template-columns: 780px 1fr; gap: 90px; align-items: center; }
.photo { position: relative; width: 780px; height: 780px; padding: 18px; border-radius: 30px; background: var(--cream); rotate: -2.5deg; box-shadow: 0 30px 70px rgba(0,0,0,.4); animation: photoIn .9s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes photoIn { from { scale: .4; rotate: -14deg; opacity: 0; } }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; display: block; }
.photo .placeholder { width: 100%; height: 100%; border-radius: 18px; border: 5px dashed #D3C8C4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; color: #9A8F8B; font-size: 34px; font-weight: 700; }
.photo .placeholder b { font-size: 200px; line-height: 1; }
.info .pill { display: inline-block; padding: 14px 32px; border-radius: 999px; font-size: 30px; font-weight: 800; text-transform: uppercase; letter-spacing: 3px; background: var(--teal-soft); border: 3px solid var(--teal-line); color: var(--cream); }
.info .lot { font-size: 40px; font-weight: 800; color: var(--mist); margin-top: 40px; }
.info h1 { font-size: 110px; font-weight: 900; letter-spacing: -4px; line-height: 1; margin-top: 12px; }
.info .draw { margin-top: 60px; display: inline-flex; align-items: center; gap: 18px; font-size: 36px; font-weight: 700; color: var(--mist); }
.info .draw i { font-style: normal; font-size: 50px; animation: wiggle 1.4s ease-in-out infinite; display: inline-block; }
@keyframes wiggle { 50% { rotate: 14deg; } }
[data-cat="petit"] .pill { background: var(--cream); border-color: var(--cream); color: var(--teal); }
[data-cat="moyen"] .pill { background: var(--coral); border-color: var(--coral); color: var(--teal); }
[data-cat="grand"] .pill { background: var(--coral); border-color: var(--coral); color: var(--teal); box-shadow: 0 0 60px rgba(228,93,118,.6); }
.reveal[data-cat="grand"] .photo { box-shadow: 0 0 0 10px var(--coral), 0 30px 90px rgba(228,93,118,.5); }

/* --- End */
.end { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.end h1 { font-size: 200px; font-weight: 900; letter-spacing: -8px; line-height: .95; color: var(--coral); }
.end p { font-size: 54px; font-weight: 700; color: var(--mist); margin-top: 30px; }

/* --- One click to allow sound, then it disappears */
#start { position: fixed; left: 50%; bottom: 40px; translate: -50% 0; z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 44px; border: 0; border-radius: 999px; background: var(--coral); color: var(--teal); font: 800 26px 'Be Vietnam Pro', sans-serif; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
#start small { font-size: 16px; font-weight: 600; opacity: .8; }
