Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : UQO Éval — Le Grand Défi Immobilier8 * File : apps/web/src/components/GiftCard.tsx9 * Module : components10 * Repository : https://git.spboucher.ai/uqo-eval-jeux11 * Project Website : https://jeux.uqo-eval.app12 * Created : 2026-11-2513 * Last Modified : 2026-11-2514 *15 * Author : Simon-Pierre Boucher16 * Position : Professor of Finance17 * Institution : Université du Québec en Outaouais (UQO)18 * Organization : SP Boucher19 * Website : https://spboucher.ai20 * Git : https://git.spboucher.ai21 *22 * Preferred Contact: contact@spboucher.ai23 * Development : dev@spboucher.ai24 * Support : support@spboucher.ai25 * Security/Admin : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License : None specified (no license file in this repository)34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243import { formatMoney } from "@jeux/engine/format";4445/**46 * Carte-cadeau illustrée. Le mot « amazon » y figure comme simple mention du47 * détaillant : Amazon n'est ni commanditaire ni partenaire du jeu.48 */49export function GiftCard({ amount, rank, size = "md" }: { amount: number; rank: number; size?: "md" | "lg" }) {50 const label = `Carte-cadeau Amazon de ${formatMoney(amount)} pour la ${rank === 1 ? "première" : rank === 2 ? "deuxième" : "troisième"} place`;51 return (52 <figure className={`giftcard giftcard-${size}`} data-rank={rank} role="img" aria-label={label}>53 <svg viewBox="0 0 320 200" aria-hidden="true">54 <rect x="1" y="1" width="318" height="198" rx="10" fill="#16181b" stroke="rgba(233,237,238,0.25)" />55 <path d="M0 150 L320 96 L320 200 L0 200 Z" fill="#0d1b24" />56 <text x="24" y="50" fill="#e9edee" fontFamily="var(--font-display)" fontWeight="700" fontSize="34" letterSpacing="-1.5">amazon</text>57 <path d="M26 60 Q 84 82 142 58" fill="none" stroke="#ff9900" strokeWidth="5" strokeLinecap="round" />58 <path d="M133 55 l11 2 -5 10" fill="none" stroke="#ff9900" strokeWidth="5" strokeLinecap="round" strokeLinejoin="round" />59 <text x="24" y="96" fill="#8497a1" fontFamily="var(--font-mono)" fontSize="11" letterSpacing="2.4">CARTE-CADEAU</text>60 <text x="296" y="172" textAnchor="end" fill="#2bccae" fontFamily="var(--font-display)" fontWeight="700" fontSize="62" letterSpacing="-3">{formatMoney(amount)}</text>61 <text x="296" y="42" textAnchor="end" fill="#e9edee" fontFamily="var(--font-mono)" fontSize="12" letterSpacing="2">{rank === 1 ? "1RE PLACE" : `${rank}E PLACE`}</text>62 </svg>63 </figure>64 );65}66