From 60e3c9251123fbbc1c47a1632f7a27ec3a5983bc Mon Sep 17 00:00:00 2001 From: Tom Boullay Date: Sat, 30 May 2026 17:06:29 +0200 Subject: [PATCH] fix(site): update situation cards --- src/components/site/SiteCard.tsx | 22 +++++++++++++++++---- src/components/site/SiteSituationScreen.tsx | 8 +++++--- src/data/site/siteConfig.ts | 10 +++++----- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/components/site/SiteCard.tsx b/src/components/site/SiteCard.tsx index 05d4eca..18d98e3 100644 --- a/src/components/site/SiteCard.tsx +++ b/src/components/site/SiteCard.tsx @@ -4,17 +4,21 @@ interface SiteCardProps { config: SiteCardConfig; selected: boolean; onSelect: () => void; + variant?: "default" | "situation"; } export function SiteCard({ config, selected, onSelect, + variant = "default", }: SiteCardProps): React.JSX.Element { const { label, imagePath, disabled } = config; + const isSituation = variant === "situation"; const getBackground = (): string => { if (imagePath) return `url(${imagePath}) center/cover`; + if (isSituation) return "rgba(255, 255, 255, 0.42)"; if (disabled) return "#b8b8b8"; if (selected) return "#d9d9d9"; return "#e8e8e8"; @@ -22,11 +26,14 @@ export function SiteCard({ const getBorder = (): string => { if (selected) return "3px solid #a8d5a2"; + if (isSituation) return "3px solid rgba(255, 255, 255, 0.55)"; if (disabled) return "none"; return "2px solid #ffffff"; }; const getTextColor = (): string => { + if (isSituation && disabled) return "rgba(77, 77, 77, 0.72)"; + if (isSituation) return "#4d4d4d"; if (disabled) return "#888888"; return "#666666"; }; @@ -37,8 +44,12 @@ export function SiteCard({ onClick={onSelect} disabled={disabled} style={{ - width: "clamp(120px, 15vw, 160px)", - height: "clamp(140px, 18vw, 180px)", + width: isSituation + ? "clamp(220px, 24vw, 300px)" + : "clamp(120px, 15vw, 160px)", + height: isSituation + ? "clamp(48px, 6vw, 60px)" + : "clamp(140px, 18vw, 180px)", border: getBorder(), background: getBackground(), cursor: disabled ? "not-allowed" : "pointer", @@ -54,10 +65,13 @@ export function SiteCard({ {label} diff --git a/src/components/site/SiteSituationScreen.tsx b/src/components/site/SiteSituationScreen.tsx index d24589d..52f21b0 100644 --- a/src/components/site/SiteSituationScreen.tsx +++ b/src/components/site/SiteSituationScreen.tsx @@ -52,10 +52,11 @@ export function SiteSituationScreen(): React.JSX.Element {
{SITUATION_CARDS.map((card, index) => ( @@ -63,6 +64,7 @@ export function SiteSituationScreen(): React.JSX.Element { key={card.id} config={card} selected={selectedSituation === index} + variant="situation" onSelect={() => { if (!card.disabled) { setSelectedSituation(index); diff --git a/src/data/site/siteConfig.ts b/src/data/site/siteConfig.ts index 59593c2..6f4d36c 100644 --- a/src/data/site/siteConfig.ts +++ b/src/data/site/siteConfig.ts @@ -24,12 +24,12 @@ export const EXPERIENCE_CARDS: readonly SiteCardConfig[] = [ * Cards for screen 2: "Quelle est votre situation ?" */ export const SITUATION_CARDS: readonly SiteCardConfig[] = [ - { id: "sit-habitants", label: "Habitants d'Altera", disabled: true }, - { id: "sit-apprentis", label: "Apprentis-Citoyens", disabled: true }, + { id: "sit-refugie-climat", label: "Réfugié.e climatique", disabled: true }, + { id: "sit-refugie-guerre", label: "Réfugié.e de guerre", disabled: true }, { - id: "sit-refugies", - label: "Réfugiés Climatiques arrivants", + id: "sit-sans-domicile", + label: "Sans domicile fixe", disabled: false, }, - { id: "sit-seniors", label: "Seniors Hyper-Connectés", disabled: true }, + { id: "sit-autre", label: "Autre", disabled: true }, ];