.scratch-ticket { transform: rotate(2deg); }
.scratch-ticket [hidden] { display: none !important; }
.scratch-ticket h3 { margin: 1.25rem 0 .8rem; font-size: 1.4rem; letter-spacing: -.025em; color: white; }
.scratch-ticket section > p { font-size: .9rem; line-height: 1.55; }
.scratch-ticket .button { background: var(--sand); color: var(--ink); width: fit-content; font-size: .9rem; margin-top: 1rem; cursor: pointer; }
.scratch-ticket .button:hover { background: #fbeac0; }
.scratch-ticket .button:disabled { opacity: .7; cursor: wait; }
.ticket-prizes { padding-left: 1.15rem; margin: 1.1rem 0 .75rem; display: grid; gap: .5rem; font-size: .87rem; }
.ticket-prizes li::marker { color: var(--sand); }
.scratch-ticket .ticket-fine-print, .scratch-ticket .ticket-note { font-size: .75rem; color: #e0e7ff; margin-top: .75rem; }
.ticket-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-block: 1.25rem .8rem; }
.ticket-board canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: .7rem; touch-action: none; cursor: crosshair; }
#ticket-progress { font-size: .8rem; }
.scratch-ticket .ticket-win { color: var(--sand); font-weight: 700; margin-block: 1.2rem .5rem; }
.scratch-ticket .ticket-prize { font: 700 clamp(1.25rem, 2.5vw, 1.8rem)/1.15 var(--display); letter-spacing: -.025em; margin-block: 1rem; text-wrap: balance; }
#ticket-email-title { font: 500 1rem/1.5 "DM Sans", sans-serif; letter-spacing: 0; margin-block: 1.2rem .7rem; }
#ticket-email-form { display: grid; gap: .65rem; }
#ticket-email-form > label { font-size: .85rem; }
#ticket-email-form input[type=email] { width: 100%; min-height: 48px; padding: .65rem .8rem; border: 2px solid transparent; border-radius: .6rem; background: var(--surface); color: var(--ink); caret-color: var(--brand); font: inherit; }
#ticket-email-form input:focus-visible { outline: 3px solid var(--sand); outline-offset: 3px; }
.ticket-check { display: flex; align-items: flex-start; gap: .7rem; min-height: 44px; padding-top: .5rem; }
.ticket-check input { width: 1.2rem; height: 1.2rem; margin: .1rem 0 0; flex: none; accent-color: var(--sand); }
#ticket-email-form .button { margin: 0; }
.ticket-code { font-size: .8rem; padding: .8rem; margin-top: 1rem; border: 1px dashed #b4bfee; border-radius: .5rem; overflow-wrap: anywhere; }
.ticket-invitation { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #8799ed; font-size: .85rem; }
.ticket-invitation a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
#ticket-feedback:not(:empty) { margin-top: 1rem; color: var(--sand); font-size: .85rem; }
#ticket-result-detail { overflow-wrap: anywhere; }
.scratch-ticket #ticket-retry { background: transparent; color: white; border: 1px solid #b4bfee; }
.portfolio { padding-bottom: var(--email-keyboard-inset, 0px); }
@media (max-width: 700px) { .scratch-ticket { transform: none; } }
@media (prefers-reduced-motion: reduce) { .scratch-ticket * { scroll-behavior: auto; } }
.scratch-ticket { transform: none; }
.scratch-ticket [hidden] { display: none !important; }
.scratch-ticket h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); color: white; margin: 1.25rem 0 .6rem; }
.scratch-ticket [data-ticket-step="game"] > p { font-size: .9rem; color: #e0e7ff; }
.ticket-game-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
#ticket-reveal { min-height: 44px; padding: .5rem 0; border: 0; background: transparent; color: white; font: inherit; font-size: .8rem; text-decoration: underline; text-underline-offset: .25em; }
#ticket-reveal:disabled { cursor: wait; opacity: .7; }
.ticket-lots { margin-top: .8rem; border-top: 1px solid #8799ed; padding-top: .6rem; font-size: .85rem; }
.ticket-lots summary { min-height: 44px; align-content: center; cursor: pointer; }
.ticket-lots ul { margin-top: .5rem; padding-left: 1.25rem; }
.ticket-board canvas { background: var(--sand); }

.ticket-terms { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .85rem; margin-top: .8rem; color: #e0e7ff; font-size: .75rem; }
.ticket-terms a { display: inline-flex; min-height: 32px; align-items: center; }
@media (max-width: 700px) {
  .portfolio-intro-copy { display: contents; }
  .portfolio-intro h1 { grid-row: 1; }
  .portfolio-intro .scratch-ticket { grid-row: 5; }
  .portfolio-intro .intro { grid-row: 2; margin: 0; }
  .portfolio-intro .portfolio-actions { grid-row: 3; margin: 0; }
  .portfolio-intro .author-line { grid-row: 4; margin: 0; }
  #ticket-game-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .scratch-ticket [data-ticket-step="game"] > p { margin-top: .8rem; }
}

#jeu-concours { scroll-margin-top: 1.5rem; }

/* Gold foil, tactile feedback and a short reward celebration. */
.scratch-ticket { border: 1px solid #f5df9a55; box-shadow: 0 18px 42px #263b8b26, 0 0 0 5px #f5df9a0a; }
.scratch-ticket .ticket-nudge { display: flex; align-items: center; justify-content: center; gap: .55rem; color: #fff0bc; font-size: .8rem; font-weight: 700; text-align: center; margin-top: 1rem; }
.ticket-nudge > span:first-child { animation: ticket-twinkle 2.4s ease-in-out infinite; font-size: 1.2rem; }
.ticket-nudge > span:last-child { display: inline-block; animation: ticket-point 1.8s ease-in-out infinite; font-size: 1.3rem; }
.ticket-board { gap: .7rem; margin-top: .7rem; perspective: 700px; }
.ticket-board canvas { border: 1px solid #fff2b8; box-shadow: 0 4px 0 #b07b32, 0 7px 16px #101a5555; transition: transform .18s ease, box-shadow .18s ease; }
@media (hover: hover) {
  .ticket-board canvas:not(.is-revealed):hover { transform: translateY(-4px) rotate(-2deg); box-shadow: 0 6px 0 #b07b32, 0 12px 20px #101a5566; }
}
.ticket-board canvas.is-scratching { transform: scale(.97) rotate(-1deg); box-shadow: 0 1px 0 #b07b32, 0 2px 8px #101a5544; }
.ticket-board canvas.is-revealed { border-color: #fff2b8; box-shadow: 0 0 0 2px #f5df9a66, 0 6px 18px #101a5533; animation: ticket-pop .48s cubic-bezier(.2,.8,.3,1.3) both; }
.ticket-meter { display: flex; gap: .4rem; margin-top: 1rem; }
.ticket-meter span { height: 5px; flex: 1; background: #ffffff29; border-radius: 20px; transition: background .25s, box-shadow .25s; }
.ticket-meter .is-complete { background: #f5df9a; box-shadow: 0 0 12px #f5df9a77; }
.has-scratched .ticket-nudge > span { animation: none; }
.ticket-effects { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 100; pointer-events: none; }
.is-winner .ticket-award > .ticket-win { font-size: 1.5rem; animation: ticket-pop .6s cubic-bezier(.2,.8,.3,1.3) both; }
.is-winner #ticket-prize { animation: ticket-prize-in .65s .1s both; }
.is-winner #ticket-email-form .button { box-shadow: 0 4px 0 #b58b3f; transition: transform .18s, box-shadow .18s; }
.is-winner #ticket-email-form .button:active { transform: translateY(3px); box-shadow: 0 1px 0 #b58b3f; }
@keyframes ticket-point { 0%, 100% { transform: translate(3px,-3px) rotate(-10deg); } 50% { transform: translate(-3px,3px) rotate(0); } }
@keyframes ticket-twinkle { 0%, 100% { opacity: .65; transform: scale(.85) rotate(-15deg); } 50% { opacity: 1; transform: scale(1.15) rotate(15deg); } }
@keyframes ticket-pop { 0% { transform: scale(.9); } 55% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes ticket-prize-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 420px) { .scratch-ticket .ticket-nudge { font-size: .73rem; gap: .35rem; } .ticket-board { gap: .5rem; } }
@media (prefers-reduced-motion: reduce) {
  .scratch-ticket *, .scratch-ticket *::before, .scratch-ticket *::after { animation: none !important; transition: none !important; }
  .ticket-board canvas:not(.is-revealed):hover, .ticket-board canvas.is-scratching { transform: none; }
  .ticket-effects { display: none; }
}

/* Keep the scratched ticket in place while the reward appears above it. */
.ticket-award { padding: 1rem 0 .4rem; animation: ticket-prize-in .5s both; }
.scratch-ticket .ticket-award .ticket-win { margin: 0 0 .4rem; }
.scratch-ticket .ticket-award .ticket-prize { margin: 0 0 .5rem; }
.scratch-ticket.is-winner .ticket-board { margin-block: .7rem 1.25rem; }
.scratch-ticket.is-winner .ticket-board canvas { cursor: default; }
@media (prefers-reduced-motion: reduce) { .ticket-award { animation: none; } }

/* Step headings receive focus for screen readers, without a control outline. */
.scratch-ticket h3[tabindex="-1"]:focus { outline: none; }
