/* ÉCLIPSE — carte autonome : toile plein cadre, repères discrets, phrases et écran final en surimpression. */
@font-face { font-family: "Lexend"; font-weight: 100 900; font-style: normal; font-display: block; src: url("fonts/lexend-latin-var.woff2") format("woff2"); }
:root { --gold: #FFC466; --amber: #E8A02A; --violet: #7424DF; --text: #fff; --ease: cubic-bezier(.22, .8, .24, 1); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--text); font-family: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
.el { position: fixed; inset: 0; overflow: hidden; background: #000; user-select: none; -webkit-user-select: none; }
.el-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: none; }
.el.is-final .el-canvas { cursor: crosshair; }
.el-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* étapes */
.el-dots { position: absolute; left: max(18px, env(safe-area-inset-left)); top: max(18px, env(safe-area-inset-top)); display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; transition: opacity .6s; }
.el-dots li { width: 22px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .22); transition: background .5s, width .5s var(--ease); }
.el-dots li.is-current { width: 34px; background: var(--gold); }
.el-dots li.is-done { background: rgba(255, 196, 102, .6); }
.el.is-final .el-dots { opacity: 0; }

/* son */
.el-sound { position: absolute; right: max(14px, env(safe-area-inset-right)); top: max(14px, env(safe-area-inset-top)); z-index: 4; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.el-sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.el-sound svg path:first-child { fill: currentColor; stroke: none; }
.el-sound[aria-pressed="true"] .off, .el-sound[aria-pressed="false"] .on { display: none; }
.el-sound:focus-visible, .el-btn:focus-visible, .el-final a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* phrase de la totalité, sous le message */
.el-say { position: absolute; left: 0; right: 0; top: var(--say-y, 66%); margin: 0; padding: 0 7%; text-align: center; pointer-events: none;
  font-size: clamp(1.05rem, .75rem + 1.5vw, 1.9rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.25; text-wrap: balance;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(10px); filter: blur(4px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease); }
.el-say.is-on { opacity: 1; transform: none; filter: none; }

/* jauge + consigne */
.el-gauge { position: absolute; left: 50%; bottom: max(22px, calc(env(safe-area-inset-bottom) + 14px)); width: min(88%, 460px); transform: translate(-50%, 10px); display: grid; justify-items: center; gap: 8px; text-align: center; opacity: 0; transition: opacity .5s, transform .5s var(--ease); pointer-events: none; }
.el.is-playing .el-gauge { opacity: 1; transform: translate(-50%, 0); }
.el-gauge__t { margin: 0; font-size: clamp(.9rem, .82rem + .3vw, 1.05rem); font-weight: 550; }
.el-gauge__bar { width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.el-gauge__bar span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--gold)); transform-origin: 0 50%; transform: scaleX(var(--g, 0)); transition: transform .25s linear; }
.el-gauge__how { margin: 0; font-size: .82rem; color: rgba(255, 255, 255, .6); }

/* boutons */
.el-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 0; border-radius: 999px; font: inherit; font-size: .95rem; font-weight: 500; color: #fff; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); cursor: pointer; transition: background .2s; }
.el-btn:hover { background: rgba(255, 255, 255, .16); }
.el-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* « Révéler » : accessible au clavier, discret à la souris (visible au focus) */
.el-reveal { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 4; opacity: 0; pointer-events: none; }
.el-reveal:focus-visible { opacity: 1; pointer-events: auto; }
.el.is-final .el-reveal { display: none; }

/* écran final, sous l'année */
.el-final { position: absolute; left: 0; right: 0; top: var(--final-y, 64%); bottom: 0; display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.6vh, 16px); padding: 0 22px max(16px, env(safe-area-inset-bottom)); text-align: center; }
.el-final__text { display: grid; gap: .3em; }
.el-final__text p { margin: 0; opacity: 0; transform: translateY(12px); filter: blur(5px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); transition-delay: var(--t, 0s); }
.el-final__text p:first-child { font-size: clamp(1.15rem, .8rem + 1.7vw, 2.1rem); font-weight: 550; letter-spacing: -.015em; line-height: 1.2; text-wrap: balance; }
.el-final__text p + p { font-size: clamp(.95rem, .8rem + .6vw, 1.2rem); color: var(--gold); }
.el-final__logo, .el-final__actions, .el-credit { opacity: 0; transition: opacity 1s ease var(--t, 0s); }
.el-final.is-on .el-final__text p, .el-final.is-on .el-final__logo, .el-final.is-on .el-final__actions, .el-final.is-on .el-credit { opacity: 1; transform: none; filter: none; }
.el-final__logo { color: #fff; }
.el-final__logo img, .el-final__logo svg { display: block; height: var(--logo-h, 52px); width: auto; max-width: min(64vw, 280px); }
.el-final__actions { display: flex; gap: 10px; }
.el-credit { margin: auto 0 0; font-size: .74rem; color: rgba(255, 255, 255, .45); }
.el-credit a { color: inherit; text-decoration: none; }
.el-credit a:hover { color: #fff; }
@media (max-height: 520px) { .el-final { gap: 6px; } .el-credit { display: none; } .el-final__logo img, .el-final__logo svg { height: 40px; } }

.el-noscript { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; font-size: 1.4rem; }

@media (prefers-reduced-motion: reduce) {
  .el-say, .el-final__text p { transform: none; filter: none; }
}
