Page d'inscription retravaillée
Trois étapes numérotées (formule, commerce, identifiants), cartes de formule avec prix et « Conseillée », récapitulatif fixe sur grand écran (prix, contenu de la formule, CGV, paiement), adaptée au mobile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f51920f1a6
commit
921f412d5b
7 changed files with 177 additions and 97 deletions
|
|
@ -21,9 +21,9 @@ const FIELDS = [
|
|||
['addressLine', 'Adresse', { autoComplete: 'street-address', maxLength: 200 }],
|
||||
['postalCode', 'Code postal', { autoComplete: 'postal-code', inputMode: 'numeric', maxLength: 5 }],
|
||||
['city', 'Ville', { autoComplete: 'address-level2', maxLength: 120 }],
|
||||
['contactName', 'Prénom et nom du dirigeant', { autoComplete: 'name', maxLength: 120 }],
|
||||
['contactName', 'Prénom et nom', { autoComplete: 'name', maxLength: 120 }],
|
||||
['contactPhone', 'Téléphone', { autoComplete: 'tel', type: 'tel' }],
|
||||
['contactEmail', 'E-mail (votre identifiant)', { autoComplete: 'email', type: 'email' }],
|
||||
['contactEmail', 'E-mail (votre identifiant de connexion)', { autoComplete: 'email', type: 'email' }],
|
||||
] as const;
|
||||
|
||||
type Values = Record<(typeof FIELDS)[number][0] | 'password', string>;
|
||||
|
|
@ -71,60 +71,83 @@ export function SignupPage() {
|
|||
}
|
||||
|
||||
const current = catalog.find((c) => c.plan === plan);
|
||||
const shown = catalog.length ? catalog : PLANS.map((p) => ({ plan: p, name: PLAN_LABEL[p], tagline: '', priceCents: { MONTH: 0, YEAR: 0 }, modules: [], limits: { maxStaff: null } }));
|
||||
const field = (k: (typeof FIELDS)[number][0]) => {
|
||||
const [, label, props] = FIELDS.find(([key]) => key === k)!;
|
||||
return (
|
||||
<div className="field" key={k}>
|
||||
<label htmlFor={`s-${k}`}>{label}</label>
|
||||
<input id={`s-${k}`} className="input" required value={v[k]} onChange={(e) => setV({ ...v, [k]: e.target.value })} {...props} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<main style={{ minHeight: '100vh', padding: '32px 16px' }}>
|
||||
<form onSubmit={submit} style={{ maxWidth: 720, margin: '0 auto', display: 'flex', flexDirection: 'column', gap: 24 }}>
|
||||
<a href="https://monespacepro.eu/tarif/" style={{ textDecoration: 'none', color: 'inherit' }}>
|
||||
<main className="s-page">
|
||||
<header className="s-head">
|
||||
<a href="https://monespacepro.eu/" style={{ textDecoration: 'none', color: 'inherit' }} aria-label="MonEspacePro, accueil">
|
||||
<Brand admin={false} />
|
||||
</a>
|
||||
<span className="muted" style={{ fontSize: 14 }}>
|
||||
Déjà inscrit ? <Link to="/espace">Se connecter</Link>
|
||||
</span>
|
||||
</header>
|
||||
|
||||
<form onSubmit={submit} className="s-layout">
|
||||
<div className="s-main">
|
||||
<div>
|
||||
<h1>Créer mon programme de fidélité</h1>
|
||||
<p className="muted" style={{ margin: 0 }}>Sans engagement, résiliable à tout moment. Votre espace est prêt dès le paiement validé.</p>
|
||||
<p className="muted" style={{ margin: '6px 0 0' }}>Trois minutes, sans engagement. Votre espace est prêt dès le paiement validé.</p>
|
||||
</div>
|
||||
{error && <div className="alert error" role="alert">{error}</div>}
|
||||
|
||||
<section className="card" style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
<h2>Formule</h2>
|
||||
<div role="group" aria-label="Périodicité" className="row" style={{ gap: 8 }}>
|
||||
<button type="button" className="chip" aria-pressed={interval === 'MONTH'} onClick={() => setInterval('MONTH')}>Mensuel</button>
|
||||
<button type="button" className="chip" aria-pressed={interval === 'YEAR'} onClick={() => setInterval('YEAR')}>Annuel — 2 mois offerts</button>
|
||||
{/* 1. Formule */}
|
||||
<section className="card s-section">
|
||||
<div className="s-title"><span className="s-num">1</span><h2>Votre formule</h2></div>
|
||||
<div role="group" aria-label="Périodicité" className="s-seg">
|
||||
<button type="button" aria-pressed={interval === 'MONTH'} onClick={() => setInterval('MONTH')}>Mensuel</button>
|
||||
<button type="button" aria-pressed={interval === 'YEAR'} onClick={() => setInterval('YEAR')}>Annuel · 2 mois offerts</button>
|
||||
</div>
|
||||
<div className="mode-cards" role="radiogroup" aria-label="Formule">
|
||||
{(catalog.length ? catalog : PLANS.map((p) => ({ plan: p, name: PLAN_LABEL[p], tagline: '', priceCents: { MONTH: 0, YEAR: 0 }, modules: [], limits: { maxStaff: null } }))).map((c) => (
|
||||
<label key={c.plan} className="mode-card" style={{ flexDirection: 'column', gap: 6 }}>
|
||||
<span className="row" style={{ gap: 10 }}>
|
||||
<input type="radio" name="plan" checked={plan === c.plan} onChange={() => setPlan(c.plan)} />
|
||||
<strong style={{ fontSize: 18 }}>{c.name}</strong>
|
||||
</span>
|
||||
<div className="s-plans" role="radiogroup" aria-label="Formule">
|
||||
{shown.map((c) => (
|
||||
<label key={c.plan} className={`s-plan${plan === c.plan ? ' on' : ''}`}>
|
||||
<input type="radio" name="plan" className="sr-only" checked={plan === c.plan} onChange={() => setPlan(c.plan)} />
|
||||
{c.plan === 'PRO' && <span className="s-tag">Conseillée</span>}
|
||||
<strong>{c.name}</strong>
|
||||
{c.priceCents[interval] > 0 && (
|
||||
<span style={{ fontSize: 22, fontWeight: 800 }}>
|
||||
<span className="s-price">
|
||||
{euros(c.priceCents[interval])}
|
||||
<span className="muted" style={{ fontSize: 14, fontWeight: 500 }}> / {interval === 'YEAR' ? 'an' : 'mois'}</span>
|
||||
<small> / {interval === 'YEAR' ? 'an' : 'mois'}</small>
|
||||
</span>
|
||||
)}
|
||||
<span className="muted" style={{ fontSize: 14 }}>{c.tagline}</span>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
{current && (
|
||||
<p className="muted" style={{ margin: 0, fontSize: 14 }}>
|
||||
{current.limits.maxStaff ? `${current.limits.maxStaff} employés` : 'Employés illimités'} ·{' '}
|
||||
{current.modules.length ? `Modules : ${current.modules.map((m) => m.name).join(', ')}` : 'Sans module complémentaire'}
|
||||
</p>
|
||||
)}
|
||||
</section>
|
||||
|
||||
<section className="card" style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
<h2>Votre commerce</h2>
|
||||
{FIELDS.map(([k, label, props]) => (
|
||||
<div className="field" key={k}>
|
||||
<label htmlFor={`s-${k}`}>{label} *</label>
|
||||
<input id={`s-${k}`} className="input" required value={v[k]} onChange={(e) => setV({ ...v, [k]: e.target.value })} {...props} />
|
||||
{/* 2. Commerce */}
|
||||
<section className="card s-section">
|
||||
<div className="s-title"><span className="s-num">2</span><h2>Votre commerce</h2></div>
|
||||
{field('name')}
|
||||
{field('siret')}
|
||||
{field('addressLine')}
|
||||
<div className="s-two">
|
||||
{field('postalCode')}
|
||||
{field('city')}
|
||||
</div>
|
||||
))}
|
||||
</section>
|
||||
|
||||
{/* 3. Identifiants */}
|
||||
<section className="card s-section">
|
||||
<div className="s-title"><span className="s-num">3</span><h2>Vos identifiants</h2></div>
|
||||
<div className="s-two">
|
||||
{field('contactName')}
|
||||
{field('contactPhone')}
|
||||
</div>
|
||||
{field('contactEmail')}
|
||||
<div className="field">
|
||||
<label htmlFor="s-password">Mot de passe *</label>
|
||||
<label htmlFor="s-password">Mot de passe</label>
|
||||
<input
|
||||
id="s-password"
|
||||
className="input"
|
||||
|
|
@ -138,18 +161,43 @@ export function SignupPage() {
|
|||
<span className="muted" style={{ fontSize: 14 }}>10 caractères minimum. Il ouvre votre espace web et l’app MonEspacePro.</span>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<label className="row" style={{ gap: 10, alignItems: 'flex-start' }}>
|
||||
<input type="checkbox" required checked={cgv} onChange={(e) => setCgv(e.target.checked)} style={{ marginTop: 4 }} />
|
||||
{/* Récapitulatif, fixe sur grand écran */}
|
||||
<aside className="s-side">
|
||||
<section className="card s-summary">
|
||||
<span className="muted" style={{ fontSize: 13, textTransform: 'uppercase', letterSpacing: '.05em' }}>Récapitulatif</span>
|
||||
<div className="row between" style={{ alignItems: 'baseline' }}>
|
||||
<strong style={{ fontSize: 20 }}>Formule {current?.name ?? PLAN_LABEL[plan]}</strong>
|
||||
{current && (
|
||||
<span style={{ fontSize: 22, fontWeight: 800 }}>
|
||||
{euros(current.priceCents[interval])}
|
||||
<span className="muted" style={{ fontSize: 14, fontWeight: 500 }}> / {interval === 'YEAR' ? 'an' : 'mois'}</span>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{current && (
|
||||
<ul className="s-list">
|
||||
<li>Carte dans Apple Wallet et Google Wallet</li>
|
||||
<li>{current.limits.maxStaff ? `${current.limits.maxStaff} employés` : 'Employés illimités'}</li>
|
||||
{current.modules.map((m) => <li key={m.id}>{m.name}</li>)}
|
||||
</ul>
|
||||
)}
|
||||
<label className="row" style={{ gap: 10, alignItems: 'flex-start', flexWrap: 'nowrap', fontSize: 14 }}>
|
||||
<input type="checkbox" required checked={cgv} onChange={(e) => setCgv(e.target.checked)} style={{ marginTop: 3 }} />
|
||||
<span>
|
||||
J’accepte les <a href="https://monespacepro.eu/cgv/" target="_blank" rel="noreferrer">conditions générales de vente</a> et la{' '}
|
||||
J’accepte les <a href="https://monespacepro.eu/cgv/" target="_blank" rel="noreferrer">CGV</a> et la{' '}
|
||||
<a href="https://monespacepro.eu/confidentialite/" target="_blank" rel="noreferrer">politique de confidentialité</a>.
|
||||
</span>
|
||||
</label>
|
||||
<button className="btn" disabled={busy}>{busy ? 'Redirection vers le paiement…' : 'Continuer vers le paiement'}</button>
|
||||
<p className="muted" style={{ margin: 0, fontSize: 14, textAlign: 'center' }}>
|
||||
Paiement sécurisé par Stripe (carte ou prélèvement SEPA). Déjà inscrit ? <Link to="/espace">Se connecter</Link>
|
||||
</p>
|
||||
<button className="btn" disabled={busy} style={{ width: '100%' }}>{busy ? 'Redirection vers le paiement…' : 'Continuer vers le paiement'}</button>
|
||||
<ul className="s-trust">
|
||||
<li>🔒 Paiement sécurisé par Stripe</li>
|
||||
<li>💳 Carte bancaire ou prélèvement SEPA</li>
|
||||
<li>↩︎ Sans engagement, résiliable à tout moment</li>
|
||||
</ul>
|
||||
</section>
|
||||
</aside>
|
||||
</form>
|
||||
</main>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -201,3 +201,35 @@ dialog::backdrop { background: rgb(0 0 0 / 0.45); }
|
|||
.m-copy { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 14px; word-break: break-all; }
|
||||
.m-copy code { flex: 1; font: inherit; }
|
||||
@media (max-width: 600px) { .m-top { padding: 12px 16px; } .m-hero { padding: 22px; } }
|
||||
|
||||
/* ── Inscription en ligne (monespacepro.eu/inscription) ── */
|
||||
.s-page { min-height: 100vh; padding: 0 16px 48px; }
|
||||
.s-head { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
|
||||
.s-layout { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
|
||||
.s-main { display: flex; flex-direction: column; gap: 20px; }
|
||||
.s-section { display: flex; flex-direction: column; gap: 16px; }
|
||||
.s-title { display: flex; align-items: center; gap: 12px; }
|
||||
.s-num { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px; }
|
||||
.s-seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; align-self: flex-start; padding: 4px; border-radius: 12px; background: var(--surface-2); gap: 4px; }
|
||||
.s-seg button { border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 15px; padding: 8px 14px; border-radius: 9px; color: var(--text-3); cursor: pointer; }
|
||||
.s-seg button[aria-pressed='true'] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }
|
||||
.s-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
|
||||
.s-plan { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 16px 16px; border: 2px solid var(--border); border-radius: 16px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
|
||||
.s-plan:hover { border-color: var(--border-strong); }
|
||||
.s-plan.on { border-color: var(--primary); background: var(--primary-soft); }
|
||||
.s-plan:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
|
||||
.s-plan strong { font-size: 18px; }
|
||||
.s-price { font-size: 26px; font-weight: 800; }
|
||||
.s-price small { font-size: 14px; font-weight: 500; color: var(--text-3); }
|
||||
.s-tag { position: absolute; top: -11px; left: 14px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
|
||||
.s-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
|
||||
.s-side { position: sticky; top: 24px; }
|
||||
.s-summary { display: flex; flex-direction: column; gap: 16px; }
|
||||
.s-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
|
||||
.s-list li::before { content: '✓'; color: var(--primary); font-weight: 800; margin-right: 8px; }
|
||||
.s-trust { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-3); }
|
||||
@media (max-width: 860px) {
|
||||
.s-layout { grid-template-columns: minmax(0, 1fr); }
|
||||
.s-side { position: static; }
|
||||
}
|
||||
@media (max-width: 520px) { .s-two { grid-template-columns: 1fr; } }
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -8,8 +8,8 @@
|
|||
<title>Affichette — MonEspacePro</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
|
||||
<script type="module" crossorigin src="/assets/espace/index-Bea8juAd.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/espace/index-CbAJ7a2F.css">
|
||||
<script type="module" crossorigin src="/assets/espace/index-fxzUSxGt.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/espace/index-BTYDwwaq.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
<title>Mon espace — MonEspacePro</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
|
||||
<script type="module" crossorigin src="/assets/espace/index-Bea8juAd.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/espace/index-CbAJ7a2F.css">
|
||||
<script type="module" crossorigin src="/assets/espace/index-fxzUSxGt.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/espace/index-BTYDwwaq.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
<title>Créer mon programme de fidélité — MonEspacePro</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
|
||||
<script type="module" crossorigin src="/assets/espace/index-Bea8juAd.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/espace/index-CbAJ7a2F.css">
|
||||
<script type="module" crossorigin src="/assets/espace/index-fxzUSxGt.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/espace/index-BTYDwwaq.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue