good with docker
25
.dockerignore
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Git
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
|
||||||
|
# Secrets — JAMAIS dans l'image
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.production
|
||||||
|
|
||||||
|
# Dev
|
||||||
|
node_modules
|
||||||
|
*.log
|
||||||
|
.cursor
|
||||||
|
|
||||||
|
# Assets source bruts (seul public/ va dans l'image Docker)
|
||||||
|
assets/
|
||||||
|
|
||||||
|
# Infra (pas besoin dans le conteneur)
|
||||||
|
Dockerfile
|
||||||
|
docker-compose.yml
|
||||||
|
nginx.conf
|
||||||
|
ssl/
|
||||||
|
|
||||||
|
# Docs
|
||||||
|
README.md
|
||||||
@ -1,3 +1,10 @@
|
|||||||
|
# ── Stripe ────────────────────────────────────────────────────────────────────
|
||||||
|
# Clé secrète Stripe (test: sk_test_... / prod: sk_live_...)
|
||||||
STRIPE_SECRET_KEY=sk_test_...
|
STRIPE_SECRET_KEY=sk_test_...
|
||||||
|
|
||||||
|
# Secret webhook (obtenu via: stripe listen --print-secret)
|
||||||
STRIPE_WEBHOOK_SECRET=whsec_...
|
STRIPE_WEBHOOK_SECRET=whsec_...
|
||||||
DOMAIN=http://localhost:3000
|
|
||||||
|
# ── App ───────────────────────────────────────────────────────────────────────
|
||||||
|
# URL publique du site (sans slash final)
|
||||||
|
DOMAIN=https://rebour.studio
|
||||||
|
|||||||
11
.gitignore
vendored
@ -32,3 +32,14 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
|
|||||||
|
|
||||||
# Finder (MacOS) folder config
|
# Finder (MacOS) folder config
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
# Secrets
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# SSL certs
|
||||||
|
ssl/
|
||||||
|
|
||||||
|
# Nginx logs volume
|
||||||
|
nginx-logs/
|
||||||
|
|||||||
40
Dockerfile
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
# REBOUR — Dockerfile
|
||||||
|
# Runtime : Bun + Elysia (pas de SSR, le HTML est statique dans public/)
|
||||||
|
# Stratégie : multi-stage pour image finale la plus légère possible
|
||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
# ── Stage 1 : installation des dépendances ────────────────────────────────────
|
||||||
|
FROM oven/bun:1.3-alpine AS deps
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json bun.lock ./
|
||||||
|
RUN bun install --frozen-lockfile --production
|
||||||
|
|
||||||
|
# ── Stage 2 : image de production ─────────────────────────────────────────────
|
||||||
|
FROM oven/bun:1.3-alpine AS runner
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Dépendances uniquement runtime
|
||||||
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
|
|
||||||
|
# Code serveur
|
||||||
|
COPY server.ts ./
|
||||||
|
|
||||||
|
# Fichiers publics (HTML statique + assets + CSS/JS)
|
||||||
|
# Le HTML est pré-écrit, pas de build step nécessaire (pas de SSR/bundler)
|
||||||
|
COPY public/ ./public/
|
||||||
|
|
||||||
|
# Utilisateur non-root (sécurité)
|
||||||
|
USER bun
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||||
|
CMD wget -qO- http://localhost:3000/robots.txt || exit 1
|
||||||
|
|
||||||
|
CMD ["bun", "run", "server.ts"]
|
||||||
24
Dockerfile.dev
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
# REBOUR — Dockerfile.dev
|
||||||
|
# Hot reload via `bun --hot` : redémarre le serveur à chaque changement de
|
||||||
|
# server.ts. Les fichiers statiques (public/) sont montés en volume, donc
|
||||||
|
# toute modif HTML/CSS/JS est immédiatement visible sans rebuild.
|
||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
FROM oven/bun:1.3-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Installe les dépendances (dev incluses pour les types)
|
||||||
|
COPY package.json bun.lock* ./
|
||||||
|
RUN bun install
|
||||||
|
|
||||||
|
# Le code source est monté en volume (voir docker-compose.dev.yml),
|
||||||
|
# on copie uniquement pour que l'image soit autonome si besoin.
|
||||||
|
COPY server.ts ./
|
||||||
|
COPY public/ ./public/
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
ENV NODE_ENV=development
|
||||||
|
|
||||||
|
CMD ["bun", "--watch", "server.ts"]
|
||||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
21
docker-compose.dev.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.dev
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
volumes:
|
||||||
|
# Monte tout le projet pour le hot reload
|
||||||
|
- .:/app
|
||||||
|
# Évite d'écraser node_modules de l'image par le dossier local (s'il est vide)
|
||||||
|
- /app/node_modules
|
||||||
|
environment:
|
||||||
|
NODE_ENV: development
|
||||||
|
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY:-}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET:-}
|
||||||
|
DOMAIN: ${DOMAIN:-http://localhost:3000}
|
||||||
|
# Force bun --watch à utiliser le polling sur Docker Desktop Mac
|
||||||
|
# (les événements inotify ne sont pas propagés depuis macOS)
|
||||||
|
CHOKIDAR_USEPOLLING: "true"
|
||||||
|
restart: unless-stopped
|
||||||
49
docker-compose.yml
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
# ── App Elysia/Bun ────────────────────────────────────────────────────────
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: runner
|
||||||
|
restart: unless-stopped
|
||||||
|
# Port NON exposé publiquement : nginx est le seul point d'entrée
|
||||||
|
expose:
|
||||||
|
- "3000"
|
||||||
|
environment:
|
||||||
|
NODE_ENV: production
|
||||||
|
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
|
||||||
|
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
|
||||||
|
DOMAIN: ${DOMAIN:-http://localhost}
|
||||||
|
networks:
|
||||||
|
- rebour-net
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/robots.txt || exit 1"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 3s
|
||||||
|
retries: 5
|
||||||
|
start_period: 5s
|
||||||
|
|
||||||
|
# ── Nginx : reverse proxy, gzip, cache headers, rate-limit API ───────────
|
||||||
|
nginx:
|
||||||
|
image: nginx:1.27-alpine
|
||||||
|
restart: on-failure
|
||||||
|
ports:
|
||||||
|
- "0.0.0.0:80:80"
|
||||||
|
- "0.0.0.0:443:443"
|
||||||
|
volumes:
|
||||||
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
|
# En prod : décommenter + monter les certificats Let's Encrypt
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt:ro
|
||||||
|
- nginx-logs:/var/log/nginx
|
||||||
|
depends_on:
|
||||||
|
- app
|
||||||
|
networks:
|
||||||
|
- rebour-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
rebour-net:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
nginx-logs:
|
||||||
113
index.html
@ -3,7 +3,62 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>REBOUR</title>
|
|
||||||
|
<!-- SEO Primary -->
|
||||||
|
<title>REBOUR — Mobilier d'art contemporain | Collection 001</title>
|
||||||
|
<meta name="description" content="REBOUR Studio crée du mobilier d'art contemporain inspiré du Space Age et du mouvement Memphis. Pièces uniques fabriquées à Paris. Collection 001 en cours.">
|
||||||
|
<meta name="keywords" content="mobilier art, design contemporain, space age, memphis design, lampe béton, Paris, pièce unique">
|
||||||
|
<meta name="author" content="REBOUR Studio">
|
||||||
|
<meta name="robots" content="index, follow">
|
||||||
|
<link rel="canonical" href="https://rebour.studio/">
|
||||||
|
|
||||||
|
<!-- Open Graph -->
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<meta property="og:url" content="https://rebour.studio/">
|
||||||
|
<meta property="og:title" content="REBOUR — Mobilier d'art contemporain">
|
||||||
|
<meta property="og:description" content="Pièces uniques fabriquées à Paris. Space Age × Memphis. Collection 001.">
|
||||||
|
<meta property="og:image" content="https://rebour.studio/assets/lamp-violet.jpg">
|
||||||
|
<meta property="og:locale" content="fr_FR">
|
||||||
|
<meta property="og:site_name" content="REBOUR Studio">
|
||||||
|
|
||||||
|
<!-- Twitter Card -->
|
||||||
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
<meta name="twitter:title" content="REBOUR — Mobilier d'art contemporain">
|
||||||
|
<meta name="twitter:description" content="Pièces uniques fabriquées à Paris. Space Age × Memphis. Collection 001.">
|
||||||
|
<meta name="twitter:image" content="https://rebour.studio/assets/lamp-violet.jpg">
|
||||||
|
|
||||||
|
<!-- Schema.org structured data -->
|
||||||
|
<script type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@type": "Store",
|
||||||
|
"name": "REBOUR Studio",
|
||||||
|
"description": "Mobilier d'art contemporain. Space Age × Memphis. Pièces uniques fabriquées à Paris.",
|
||||||
|
"url": "https://rebour.studio",
|
||||||
|
"image": "https://rebour.studio/assets/lamp-violet.jpg",
|
||||||
|
"address": { "@type": "PostalAddress", "addressLocality": "Paris", "addressCountry": "FR" },
|
||||||
|
"hasOfferCatalog": {
|
||||||
|
"@type": "OfferCatalog",
|
||||||
|
"name": "Collection 001",
|
||||||
|
"itemListElement": [
|
||||||
|
{
|
||||||
|
"@type": "Offer",
|
||||||
|
"itemOffered": {
|
||||||
|
"@type": "Product",
|
||||||
|
"name": "LUMIÈRE ORBITALE",
|
||||||
|
"description": "Lampe de table unique. Béton texturé coulé à la main + dôme céramique laqué.",
|
||||||
|
"image": "https://rebour.studio/assets/lamp-violet.jpg"
|
||||||
|
},
|
||||||
|
"price": "1800",
|
||||||
|
"priceCurrency": "EUR",
|
||||||
|
"availability": "https://schema.org/LimitedAvailability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
|
||||||
@ -100,8 +155,8 @@
|
|||||||
<div class="page-wrapper">
|
<div class="page-wrapper">
|
||||||
|
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<span class="logo-text">REBOUR</span>
|
<a href="/" class="logo-text" aria-label="REBOUR — Accueil">REBOUR</a>
|
||||||
<nav class="header-nav">
|
<nav class="header-nav" aria-label="Navigation principale">
|
||||||
<a href="#collection">COLLECTION_001</a>
|
<a href="#collection">COLLECTION_001</a>
|
||||||
<a href="#contact">CONTACT</a>
|
<a href="#contact">CONTACT</a>
|
||||||
<span class="wip-tag"><span class="blink">■</span> W.I.P</span>
|
<span class="wip-tag"><span class="blink">■</span> W.I.P</span>
|
||||||
@ -111,7 +166,7 @@
|
|||||||
<main>
|
<main>
|
||||||
|
|
||||||
<!-- HERO -->
|
<!-- HERO -->
|
||||||
<section class="hero">
|
<section class="hero" aria-label="Introduction">
|
||||||
<div class="hero-left">
|
<div class="hero-left">
|
||||||
<p class="label">// ARCHIVE_001 — 2026</p>
|
<p class="label">// ARCHIVE_001 — 2026</p>
|
||||||
<h1>REBOUR<br>STUDIO</h1>
|
<h1>REBOUR<br>STUDIO</h1>
|
||||||
@ -119,14 +174,19 @@
|
|||||||
<p class="hero-sub mono-sm">STATUS: [PROTOTYPE EN COURS]<br>COLLECTION_001 — BIENTÔT DISPONIBLE</p>
|
<p class="hero-sub mono-sm">STATUS: [PROTOTYPE EN COURS]<br>COLLECTION_001 — BIENTÔT DISPONIBLE</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="hero-right">
|
<div class="hero-right">
|
||||||
<img src="assets/WhatsApp Image 2026-02-14 at 12.23.09 (2).jpeg" alt="Rebour — Lampe prototype" class="hero-img">
|
<img
|
||||||
|
src="/assets/lamp-violet.jpg"
|
||||||
|
alt="REBOUR — Lampe Orbitale, prototype béton laqué violet, Paris 2026"
|
||||||
|
class="hero-img"
|
||||||
|
width="1024" height="1024"
|
||||||
|
fetchpriority="high">
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<!-- COLLECTION GRID -->
|
<!-- COLLECTION GRID -->
|
||||||
<section class="collection" id="collection">
|
<section class="collection" id="collection" aria-label="Collection 001">
|
||||||
<div class="collection-header">
|
<div class="collection-header">
|
||||||
<p class="label">// COLLECTION_001</p>
|
<p class="label">// COLLECTION_001</p>
|
||||||
<span class="label">3 OBJETS — CLIQUER POUR OUVRIR</span>
|
<span class="label">3 OBJETS — CLIQUER POUR OUVRIR</span>
|
||||||
@ -144,9 +204,13 @@
|
|||||||
data-desc="Exploration de la lumière à travers des contraintes géométriques. Le dôme sphérique en céramique laquée coiffe un corps en béton texturé peint à la main. Chaque pièce est unique."
|
data-desc="Exploration de la lumière à travers des contraintes géométriques. Le dôme sphérique en céramique laquée coiffe un corps en béton texturé peint à la main. Chaque pièce est unique."
|
||||||
data-specs="H: 45cm / Ø: 18cm Poids: 3.2kg Alimentation: 220V — E27 Câble: tressé rouge 2m"
|
data-specs="H: 45cm / Ø: 18cm Poids: 3.2kg Alimentation: 220V — E27 Câble: tressé rouge 2m"
|
||||||
data-notes="Inspiré des lampadaires soviétiques des années 60. Le béton est coulé à la main dans des moules uniques. La peinture acrylique est appliquée au spalter."
|
data-notes="Inspiré des lampadaires soviétiques des années 60. Le béton est coulé à la main dans des moules uniques. La peinture acrylique est appliquée au spalter."
|
||||||
data-img="assets/WhatsApp Image 2026-02-14 at 12.23.09 (2).jpeg">
|
data-img="/assets/lamp-violet.jpg"
|
||||||
|
aria-label="Ouvrir le détail de LUMIÈRE ORBITALE">
|
||||||
<div class="card-img-wrap">
|
<div class="card-img-wrap">
|
||||||
<img src="assets/WhatsApp Image 2026-02-14 at 12.23.09 (2).jpeg" alt="Lumière Orbitale">
|
<img src="/assets/lamp-violet.jpg"
|
||||||
|
alt="LUMIÈRE ORBITALE — Lampe béton violet, dôme céramique bleu, REBOUR 2026"
|
||||||
|
width="600" height="600"
|
||||||
|
loading="lazy">
|
||||||
</div>
|
</div>
|
||||||
<div class="card-meta">
|
<div class="card-meta">
|
||||||
<span class="card-index">001</span>
|
<span class="card-index">001</span>
|
||||||
@ -165,9 +229,13 @@
|
|||||||
data-desc="Collision du brutalisme et de la couleur Memphis. Le plateau en terrazzo fait à la main intègre des inclusions de marbre rose et bleu. Les colonnes cylindriques bicolores sont en acier peint au four."
|
data-desc="Collision du brutalisme et de la couleur Memphis. Le plateau en terrazzo fait à la main intègre des inclusions de marbre rose et bleu. Les colonnes cylindriques bicolores sont en acier peint au four."
|
||||||
data-specs="Table: L120 × P60 × H38cm Poids plateau: 28kg Pieds: acier Ø60mm Étagère: H180 × L80 × P35cm"
|
data-specs="Table: L120 × P60 × H38cm Poids plateau: 28kg Pieds: acier Ø60mm Étagère: H180 × L80 × P35cm"
|
||||||
data-notes="Le terrazzo est réalisé dans l'atelier de Pantin. Chaque dalle est unique. L'étagère est assemblée à partir de tubes industriels récupérés et de panneaux laqués."
|
data-notes="Le terrazzo est réalisé dans l'atelier de Pantin. Chaque dalle est unique. L'étagère est assemblée à partir de tubes industriels récupérés et de panneaux laqués."
|
||||||
data-img="assets/WhatsApp Image 2026-02-14 at 12.23.09 (1).jpeg">
|
data-img="/assets/table-terrazzo.jpg"
|
||||||
|
aria-label="Ouvrir le détail de TABLE TERRAZZO">
|
||||||
<div class="card-img-wrap">
|
<div class="card-img-wrap">
|
||||||
<img src="assets/WhatsApp Image 2026-02-14 at 12.23.09 (1).jpeg" alt="Table Terrazzo">
|
<img src="/assets/table-terrazzo.jpg"
|
||||||
|
alt="TABLE TERRAZZO — Table basse terrazzo et étagère acier, REBOUR 2026"
|
||||||
|
width="600" height="600"
|
||||||
|
loading="lazy">
|
||||||
</div>
|
</div>
|
||||||
<div class="card-meta">
|
<div class="card-meta">
|
||||||
<span class="card-index">002</span>
|
<span class="card-index">002</span>
|
||||||
@ -186,9 +254,13 @@
|
|||||||
data-desc="Série de 7 lampes aux corps béton colorés, chacune avec un dôme d'une couleur différente. Les néons horizontaux créent un anneau lumineux entre le dôme et le corps."
|
data-desc="Série de 7 lampes aux corps béton colorés, chacune avec un dôme d'une couleur différente. Les néons horizontaux créent un anneau lumineux entre le dôme et le corps."
|
||||||
data-specs="H: 35–65cm (7 tailles) Dôme: Ø15–28cm Anneau néon: 8W — 3000K Édition: 7 ex. par coloris"
|
data-specs="H: 35–65cm (7 tailles) Dôme: Ø15–28cm Anneau néon: 8W — 3000K Édition: 7 ex. par coloris"
|
||||||
data-notes="Les corps sont coulés en série mais peints individuellement. Les dômes sont réalisés par un souffleur de verre artisanal. Le câble tressé rouge est la signature de la série."
|
data-notes="Les corps sont coulés en série mais peints individuellement. Les dômes sont réalisés par un souffleur de verre artisanal. Le câble tressé rouge est la signature de la série."
|
||||||
data-img="assets/WhatsApp Image 2026-02-14 at 12.23.09.jpeg">
|
data-img="/assets/lampes-serie.jpg"
|
||||||
|
aria-label="Ouvrir le détail de MODULE SÉRIE">
|
||||||
<div class="card-img-wrap">
|
<div class="card-img-wrap">
|
||||||
<img src="assets/WhatsApp Image 2026-02-14 at 12.23.09.jpeg" alt="Module Série">
|
<img src="/assets/lampes-serie.jpg"
|
||||||
|
alt="MODULE SÉRIE — Collection de 7 lampes béton colorées, REBOUR 2026"
|
||||||
|
width="600" height="600"
|
||||||
|
loading="lazy">
|
||||||
</div>
|
</div>
|
||||||
<div class="card-meta">
|
<div class="card-meta">
|
||||||
<span class="card-index">003</span>
|
<span class="card-index">003</span>
|
||||||
@ -203,16 +275,16 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<!-- NEWSLETTER -->
|
<!-- NEWSLETTER -->
|
||||||
<section class="newsletter" id="contact">
|
<section class="newsletter" id="contact" aria-label="Accès anticipé">
|
||||||
<div class="nl-left">
|
<div class="nl-left">
|
||||||
<p class="label">// ACCÈS_ANTICIPÉ</p>
|
<p class="label">// ACCÈS_ANTICIPÉ</p>
|
||||||
<h2>REJOINDRE<br>L'EXPÉRIENCE</h2>
|
<h2>REJOINDRE<br>L'EXPÉRIENCE</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="nl-right">
|
<div class="nl-right">
|
||||||
<form class="nl-form" onsubmit="event.preventDefault();">
|
<form class="nl-form" onsubmit="event.preventDefault();" aria-label="Inscription newsletter">
|
||||||
<label for="email">EMAIL :</label>
|
<label for="nl-email">EMAIL :</label>
|
||||||
<div class="nl-row">
|
<div class="nl-row">
|
||||||
<input type="email" id="email" name="email" placeholder="votre@email.com" autocomplete="off" required>
|
<input type="email" id="nl-email" name="email" placeholder="votre@email.com" autocomplete="email" required>
|
||||||
<button type="submit">ENVOYER →</button>
|
<button type="submit">ENVOYER →</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="mono-sm"><span class="blink">■</span> CONNECTION_STATUS: PENDING</p>
|
<p class="mono-sm"><span class="blink">■</span> CONNECTION_STATUS: PENDING</p>
|
||||||
@ -224,10 +296,11 @@
|
|||||||
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<span>© 2026 REBOUR STUDIO — PARIS</span>
|
<span>© 2026 REBOUR STUDIO — PARIS</span>
|
||||||
<span>
|
<nav aria-label="Liens secondaires">
|
||||||
<a href="#">INSTAGRAM</a> /
|
<a href="https://instagram.com/rebour.studio" rel="noopener" target="_blank">INSTAGRAM</a>
|
||||||
<a href="#">CONTACT</a>
|
/
|
||||||
</span>
|
<a href="mailto:contact@rebour.studio">CONTACT</a>
|
||||||
|
</nav>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
165
nginx.conf
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
# REBOUR — nginx.conf
|
||||||
|
# Rôle : reverse proxy devant Elysia/Bun
|
||||||
|
# SEO : pas de SSR → HTML statique pré-rendu, on optimise le delivery
|
||||||
|
# (gzip, cache, headers) et la crawlabilité
|
||||||
|
# ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
user nginx;
|
||||||
|
worker_processes auto;
|
||||||
|
error_log /var/log/nginx/error.log warn;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
use epoll;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
log_format main '$remote_addr "$request" $status $body_bytes_sent '
|
||||||
|
'"$http_referer" "$http_user_agent" ${request_time}s';
|
||||||
|
access_log /var/log/nginx/access.log main;
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
|
# ── Gzip : réduit poids HTML/CSS/JS → Core Web Vitals ───────────────────
|
||||||
|
gzip on;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_comp_level 5;
|
||||||
|
gzip_min_length 256;
|
||||||
|
gzip_types
|
||||||
|
text/plain text/css text/javascript text/xml
|
||||||
|
application/javascript application/json application/xml
|
||||||
|
image/svg+xml font/woff2;
|
||||||
|
|
||||||
|
# ── Rate limiting ────────────────────────────────────────────────────────
|
||||||
|
limit_req_zone $binary_remote_addr zone=api:10m rate=10r/m;
|
||||||
|
limit_req_zone $binary_remote_addr zone=general:10m rate=60r/s;
|
||||||
|
|
||||||
|
# ── Resolver DNS Docker ───────────────────────────────────────────────────
|
||||||
|
# 127.0.0.11 = resolver interne Docker. La résolution dynamique via variable
|
||||||
|
# $backend évite le crash "host not found in upstream" au démarrage nginx
|
||||||
|
# si le container "app" n'est pas encore prêt (upstream statique résout au
|
||||||
|
# boot, pas à la requête — d'où le crash).
|
||||||
|
resolver 127.0.0.11 valid=5s ipv6=off;
|
||||||
|
|
||||||
|
# Variable résolue dynamiquement à chaque requête (pas au démarrage nginx)
|
||||||
|
# Permet à nginx de démarrer même si "app" n'existe pas encore en DNS.
|
||||||
|
map $host $elysia_backend {
|
||||||
|
default "http://app:3000";
|
||||||
|
}
|
||||||
|
|
||||||
|
# ── Redirection HTTP → HTTPS (décommenter en prod) ──────────────────────
|
||||||
|
# server {
|
||||||
|
# listen 80;
|
||||||
|
# server_name rebour.studio www.rebour.studio;
|
||||||
|
# return 301 https://rebour.studio$request_uri;
|
||||||
|
# }
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
# ── SSL / prod (décommenter avec Certbot) ────────────────────────────
|
||||||
|
# listen 443 ssl http2;
|
||||||
|
# ssl_certificate /etc/letsencrypt/live/rebour.studio/fullchain.pem;
|
||||||
|
# ssl_certificate_key /etc/letsencrypt/live/rebour.studio/privkey.pem;
|
||||||
|
# ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
# ssl_session_cache shared:SSL:10m;
|
||||||
|
|
||||||
|
# ── Headers sécurité ────────────────────────────────────────────────
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||||
|
add_header X-Content-Type-Options "nosniff" always;
|
||||||
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||||
|
add_header Permissions-Policy "camera=(), microphone=()" always;
|
||||||
|
# HSTS — décommenter en prod UNIQUEMENT après config SSL
|
||||||
|
# add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
|
||||||
|
|
||||||
|
# ── Images / fonts : cache 1 an immutable ───────────────────────────
|
||||||
|
# Les crawlers sociaux (og:image) et Google téléchargent ces fichiers
|
||||||
|
location ~* \.(jpg|jpeg|png|webp|svg|ico|woff2)$ {
|
||||||
|
proxy_pass $elysia_backend;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
|
add_header Vary "Accept-Encoding";
|
||||||
|
}
|
||||||
|
|
||||||
|
# ── CSS / JS : cache 1 an ────────────────────────────────────────────
|
||||||
|
location ~* \.(css|js)$ {
|
||||||
|
proxy_pass $elysia_backend;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
|
add_header Vary "Accept-Encoding";
|
||||||
|
}
|
||||||
|
|
||||||
|
# ── Checkout Stripe : rate-limit strict, no-cache ───────────────────
|
||||||
|
location = /api/checkout {
|
||||||
|
limit_req zone=api burst=3 nodelay;
|
||||||
|
proxy_pass $elysia_backend;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
add_header Cache-Control "no-store";
|
||||||
|
}
|
||||||
|
|
||||||
|
# ── Webhook Stripe : body raw, pas de buffering ──────────────────────
|
||||||
|
location = /api/webhook {
|
||||||
|
proxy_pass $elysia_backend;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header stripe-signature $http_stripe_signature;
|
||||||
|
proxy_request_buffering off;
|
||||||
|
add_header Cache-Control "no-store";
|
||||||
|
}
|
||||||
|
|
||||||
|
# ── API (session verify, etc.) ───────────────────────────────────────
|
||||||
|
location /api/ {
|
||||||
|
limit_req zone=api burst=10 nodelay;
|
||||||
|
proxy_pass $elysia_backend;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
add_header Cache-Control "no-store";
|
||||||
|
}
|
||||||
|
|
||||||
|
# ── SEO : sitemap + robots ───────────────────────────────────────────
|
||||||
|
location ~* ^/(sitemap\.xml|robots\.txt)$ {
|
||||||
|
proxy_pass $elysia_backend;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
add_header Cache-Control "public, max-age=86400";
|
||||||
|
}
|
||||||
|
|
||||||
|
# ── Pages HTML ───────────────────────────────────────────────────────
|
||||||
|
# Cache 1h côté client, stale-while-revalidate pour UX fluide
|
||||||
|
# Google re-crawle dès que le cache expire → pas de contenu périmé indexé
|
||||||
|
location / {
|
||||||
|
limit_req zone=general burst=20 nodelay;
|
||||||
|
proxy_pass $elysia_backend;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
add_header Cache-Control "public, max-age=3600, stale-while-revalidate=86400";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,7 +2,8 @@
|
|||||||
"name": "rebours",
|
"name": "rebours",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "bun run --hot server.ts",
|
"dev": "bun --watch server.ts",
|
||||||
|
"dev:docker": "docker compose -f docker-compose.dev.yml up --build",
|
||||||
"start": "bun run server.ts"
|
"start": "bun run server.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
BIN
public/assets/lamp-violet.jpg
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
public/assets/lampes-serie.jpg
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
public/assets/table-terrazzo.jpg
Normal file
|
After Width: | Height: | Size: 84 KiB |
310
public/index.html
Normal file
@ -0,0 +1,310 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<!-- SEO Primary -->
|
||||||
|
<title>REBOUR — Mobilier d'art contemporain | Collection 001</title>
|
||||||
|
<meta name="description" content="REBOUR Studio crée du mobilier d'art contemporain inspiré du Space Age et du mouvement Memphis. Pièces uniques fabriquées à Paris. Collection 001 en cours.">
|
||||||
|
<meta name="keywords" content="mobilier art, design contemporain, space age, memphis design, lampe béton, Paris, pièce unique">
|
||||||
|
<meta name="author" content="REBOUR Studio">
|
||||||
|
<meta name="robots" content="index, follow">
|
||||||
|
<link rel="canonical" href="https://rebour.studio/">
|
||||||
|
|
||||||
|
<!-- Open Graph -->
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<meta property="og:url" content="https://rebour.studio/">
|
||||||
|
<meta property="og:title" content="REBOUR — Mobilier d'art contemporain">
|
||||||
|
<meta property="og:description" content="Pièces uniques fabriquées à Paris. Space Age × Memphis. Collection 001.">
|
||||||
|
<meta property="og:image" content="https://rebour.studio/assets/lamp-violet.jpg">
|
||||||
|
<meta property="og:locale" content="fr_FR">
|
||||||
|
<meta property="og:site_name" content="REBOUR Studio">
|
||||||
|
|
||||||
|
<!-- Twitter Card -->
|
||||||
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
<meta name="twitter:title" content="REBOUR — Mobilier d'art contemporain">
|
||||||
|
<meta name="twitter:description" content="Pièces uniques fabriquées à Paris. Space Age × Memphis. Collection 001.">
|
||||||
|
<meta name="twitter:image" content="https://rebour.studio/assets/lamp-violet.jpg">
|
||||||
|
|
||||||
|
<!-- Schema.org structured data -->
|
||||||
|
<script type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@type": "Store",
|
||||||
|
"name": "REBOUR Studio",
|
||||||
|
"description": "Mobilier d'art contemporain. Space Age × Memphis. Pièces uniques fabriquées à Paris.",
|
||||||
|
"url": "https://rebour.studio",
|
||||||
|
"image": "https://rebour.studio/assets/lamp-violet.jpg",
|
||||||
|
"address": { "@type": "PostalAddress", "addressLocality": "Paris", "addressCountry": "FR" },
|
||||||
|
"hasOfferCatalog": {
|
||||||
|
"@type": "OfferCatalog",
|
||||||
|
"name": "Collection 001",
|
||||||
|
"itemListElement": [
|
||||||
|
{
|
||||||
|
"@type": "Offer",
|
||||||
|
"itemOffered": {
|
||||||
|
"@type": "Product",
|
||||||
|
"name": "LUMIÈRE ORBITALE",
|
||||||
|
"description": "Lampe de table unique. Béton texturé coulé à la main + dôme céramique laqué.",
|
||||||
|
"image": "https://rebour.studio/assets/lamp-violet.jpg"
|
||||||
|
},
|
||||||
|
"price": "1800",
|
||||||
|
"priceCurrency": "EUR",
|
||||||
|
"availability": "https://schema.org/LimitedAvailability"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="cursor-dot"></div>
|
||||||
|
<div class="cursor-outline"></div>
|
||||||
|
|
||||||
|
<!-- Grid background -->
|
||||||
|
<div id="interactive-grid" class="interactive-grid"></div>
|
||||||
|
|
||||||
|
<!-- PRODUCT PANEL (overlay) -->
|
||||||
|
<div id="product-panel" class="product-panel" aria-hidden="true">
|
||||||
|
<div class="panel-close" id="panel-close">
|
||||||
|
<span>← RETOUR</span>
|
||||||
|
</div>
|
||||||
|
<div class="panel-inner">
|
||||||
|
<div class="panel-img-col">
|
||||||
|
<img id="panel-img" src="" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="panel-info-col">
|
||||||
|
<p class="panel-index" id="panel-index"></p>
|
||||||
|
<h2 id="panel-name"></h2>
|
||||||
|
<hr>
|
||||||
|
<div class="panel-meta">
|
||||||
|
<div class="panel-meta-row">
|
||||||
|
<span class="meta-key">TYPE</span>
|
||||||
|
<span id="panel-type"></span>
|
||||||
|
</div>
|
||||||
|
<div class="panel-meta-row">
|
||||||
|
<span class="meta-key">MATÉRIAUX</span>
|
||||||
|
<span id="panel-mat"></span>
|
||||||
|
</div>
|
||||||
|
<div class="panel-meta-row">
|
||||||
|
<span class="meta-key">ANNÉE</span>
|
||||||
|
<span id="panel-year"></span>
|
||||||
|
</div>
|
||||||
|
<div class="panel-meta-row">
|
||||||
|
<span class="meta-key">STATUS</span>
|
||||||
|
<span id="panel-status" class="red"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<p id="panel-desc" class="panel-desc"></p>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- Accordion specs -->
|
||||||
|
<details class="accordion">
|
||||||
|
<summary>SPÉCIFICATIONS TECHNIQUES <span>↓</span></summary>
|
||||||
|
<div class="accordion-body" id="panel-specs"></div>
|
||||||
|
</details>
|
||||||
|
<details class="accordion">
|
||||||
|
<summary>NOTES DE CONCEPTION <span>↓</span></summary>
|
||||||
|
<div class="accordion-body" id="panel-notes"></div>
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- Bouton + form commande — uniquement PROJET_001 -->
|
||||||
|
<div id="checkout-section" style="display:none;">
|
||||||
|
<div class="checkout-price-line">
|
||||||
|
<span class="checkout-price">1 800 €</span>
|
||||||
|
<span class="checkout-edition">ÉDITION UNIQUE — 1/1</span>
|
||||||
|
</div>
|
||||||
|
<button id="checkout-toggle-btn" class="checkout-btn">
|
||||||
|
[ COMMANDER CETTE PIÈCE ]
|
||||||
|
</button>
|
||||||
|
<div id="checkout-form-wrap" class="checkout-form-wrap" style="display:none;">
|
||||||
|
<form id="checkout-form" class="checkout-form">
|
||||||
|
<div class="checkout-form-field">
|
||||||
|
<label for="checkout-email">EMAIL *</label>
|
||||||
|
<input type="email" id="checkout-email" name="email" placeholder="votre@email.com" required autocomplete="off">
|
||||||
|
</div>
|
||||||
|
<div class="checkout-form-note">
|
||||||
|
Pièce fabriquée à Paris. Délai : 6 à 8 semaines.<br>
|
||||||
|
Paiement sécurisé via Stripe.
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="checkout-submit" id="checkout-submit-btn">
|
||||||
|
PROCÉDER AU PAIEMENT →
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel-footer">
|
||||||
|
<span class="blink">■</span> COLLECTION_001 — W.I.P
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="page-wrapper">
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<a href="/" class="logo-text" aria-label="REBOUR — Accueil">REBOUR</a>
|
||||||
|
<nav class="header-nav" aria-label="Navigation principale">
|
||||||
|
<a href="#collection">COLLECTION_001</a>
|
||||||
|
<a href="#contact">CONTACT</a>
|
||||||
|
<span class="wip-tag"><span class="blink">■</span> W.I.P</span>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<!-- HERO -->
|
||||||
|
<section class="hero" aria-label="Introduction">
|
||||||
|
<div class="hero-left">
|
||||||
|
<p class="label">// ARCHIVE_001 — 2026</p>
|
||||||
|
<h1>REBOUR<br>STUDIO</h1>
|
||||||
|
<p class="hero-sub">Mobilier d'art contemporain.<br>Space Age × Memphis.</p>
|
||||||
|
<p class="hero-sub mono-sm">STATUS: [PROTOTYPE EN COURS]<br>COLLECTION_001 — BIENTÔT DISPONIBLE</p>
|
||||||
|
</div>
|
||||||
|
<div class="hero-right">
|
||||||
|
<img
|
||||||
|
src="/assets/lamp-violet.jpg"
|
||||||
|
alt="REBOUR — Lampe Orbitale, prototype béton laqué violet, Paris 2026"
|
||||||
|
class="hero-img"
|
||||||
|
width="1024" height="1024"
|
||||||
|
fetchpriority="high">
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- COLLECTION GRID -->
|
||||||
|
<section class="collection" id="collection" aria-label="Collection 001">
|
||||||
|
<div class="collection-header">
|
||||||
|
<p class="label">// COLLECTION_001</p>
|
||||||
|
<span class="label">3 OBJETS — CLIQUER POUR OUVRIR</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="product-grid">
|
||||||
|
|
||||||
|
<article class="product-card"
|
||||||
|
data-index="PROJET_001"
|
||||||
|
data-name="LUMIÈRE_ORBITALE"
|
||||||
|
data-type="LAMPE DE TABLE"
|
||||||
|
data-mat="BÉTON TEXTURÉ + DÔME CÉRAMIQUE LAQUÉ"
|
||||||
|
data-year="2026"
|
||||||
|
data-status="PROTOTYPE [80%]"
|
||||||
|
data-desc="Exploration de la lumière à travers des contraintes géométriques. Le dôme sphérique en céramique laquée coiffe un corps en béton texturé peint à la main. Chaque pièce est unique."
|
||||||
|
data-specs="H: 45cm / Ø: 18cm Poids: 3.2kg Alimentation: 220V — E27 Câble: tressé rouge 2m"
|
||||||
|
data-notes="Inspiré des lampadaires soviétiques des années 60. Le béton est coulé à la main dans des moules uniques. La peinture acrylique est appliquée au spalter."
|
||||||
|
data-img="/assets/lamp-violet.jpg"
|
||||||
|
aria-label="Ouvrir le détail de LUMIÈRE ORBITALE">
|
||||||
|
<div class="card-img-wrap">
|
||||||
|
<img src="/assets/lamp-violet.jpg"
|
||||||
|
alt="LUMIÈRE ORBITALE — Lampe béton violet, dôme céramique bleu, REBOUR 2026"
|
||||||
|
width="600" height="600"
|
||||||
|
loading="lazy">
|
||||||
|
</div>
|
||||||
|
<div class="card-meta">
|
||||||
|
<span class="card-index">001</span>
|
||||||
|
<span class="card-name">LUMIÈRE_ORBITALE</span>
|
||||||
|
<span class="card-arrow">↗</span>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article class="product-card"
|
||||||
|
data-index="PROJET_002"
|
||||||
|
data-name="TABLE_TERRAZZO"
|
||||||
|
data-type="TABLE BASSE + ÉTAGÈRE MODULAIRE"
|
||||||
|
data-mat="TERRAZZO + ACIER TUBULAIRE + RÉSINE"
|
||||||
|
data-year="2026"
|
||||||
|
data-status="STRUCTURAL_TEST"
|
||||||
|
data-desc="Collision du brutalisme et de la couleur Memphis. Le plateau en terrazzo fait à la main intègre des inclusions de marbre rose et bleu. Les colonnes cylindriques bicolores sont en acier peint au four."
|
||||||
|
data-specs="Table: L120 × P60 × H38cm Poids plateau: 28kg Pieds: acier Ø60mm Étagère: H180 × L80 × P35cm"
|
||||||
|
data-notes="Le terrazzo est réalisé dans l'atelier de Pantin. Chaque dalle est unique. L'étagère est assemblée à partir de tubes industriels récupérés et de panneaux laqués."
|
||||||
|
data-img="/assets/table-terrazzo.jpg"
|
||||||
|
aria-label="Ouvrir le détail de TABLE TERRAZZO">
|
||||||
|
<div class="card-img-wrap">
|
||||||
|
<img src="/assets/table-terrazzo.jpg"
|
||||||
|
alt="TABLE TERRAZZO — Table basse terrazzo et étagère acier, REBOUR 2026"
|
||||||
|
width="600" height="600"
|
||||||
|
loading="lazy">
|
||||||
|
</div>
|
||||||
|
<div class="card-meta">
|
||||||
|
<span class="card-index">002</span>
|
||||||
|
<span class="card-name">TABLE_TERRAZZO</span>
|
||||||
|
<span class="card-arrow">↗</span>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article class="product-card"
|
||||||
|
data-index="PROJET_003"
|
||||||
|
data-name="MODULE_SÉRIE"
|
||||||
|
data-type="LAMPES — SÉRIE LIMITÉE"
|
||||||
|
data-mat="BÉTON COLORÉ + DÔME LAQUÉ + NÉON"
|
||||||
|
data-year="2026"
|
||||||
|
data-status="FINAL_ASSEMBLY"
|
||||||
|
data-desc="Série de 7 lampes aux corps béton colorés, chacune avec un dôme d'une couleur différente. Les néons horizontaux créent un anneau lumineux entre le dôme et le corps."
|
||||||
|
data-specs="H: 35–65cm (7 tailles) Dôme: Ø15–28cm Anneau néon: 8W — 3000K Édition: 7 ex. par coloris"
|
||||||
|
data-notes="Les corps sont coulés en série mais peints individuellement. Les dômes sont réalisés par un souffleur de verre artisanal. Le câble tressé rouge est la signature de la série."
|
||||||
|
data-img="/assets/lampes-serie.jpg"
|
||||||
|
aria-label="Ouvrir le détail de MODULE SÉRIE">
|
||||||
|
<div class="card-img-wrap">
|
||||||
|
<img src="/assets/lampes-serie.jpg"
|
||||||
|
alt="MODULE SÉRIE — Collection de 7 lampes béton colorées, REBOUR 2026"
|
||||||
|
width="600" height="600"
|
||||||
|
loading="lazy">
|
||||||
|
</div>
|
||||||
|
<div class="card-meta">
|
||||||
|
<span class="card-index">003</span>
|
||||||
|
<span class="card-name">MODULE_SÉRIE</span>
|
||||||
|
<span class="card-arrow">↗</span>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- NEWSLETTER -->
|
||||||
|
<section class="newsletter" id="contact" aria-label="Accès anticipé">
|
||||||
|
<div class="nl-left">
|
||||||
|
<p class="label">// ACCÈS_ANTICIPÉ</p>
|
||||||
|
<h2>REJOINDRE<br>L'EXPÉRIENCE</h2>
|
||||||
|
</div>
|
||||||
|
<div class="nl-right">
|
||||||
|
<form class="nl-form" onsubmit="event.preventDefault();" aria-label="Inscription newsletter">
|
||||||
|
<label for="nl-email">EMAIL :</label>
|
||||||
|
<div class="nl-row">
|
||||||
|
<input type="email" id="nl-email" name="email" placeholder="votre@email.com" autocomplete="email" required>
|
||||||
|
<button type="submit">ENVOYER →</button>
|
||||||
|
</div>
|
||||||
|
<p class="mono-sm"><span class="blink">■</span> CONNECTION_STATUS: PENDING</p>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="footer">
|
||||||
|
<span>© 2026 REBOUR STUDIO — PARIS</span>
|
||||||
|
<nav aria-label="Liens secondaires">
|
||||||
|
<a href="https://instagram.com/rebour.studio" rel="noopener" target="_blank">INSTAGRAM</a>
|
||||||
|
/
|
||||||
|
<a href="mailto:contact@rebour.studio">CONTACT</a>
|
||||||
|
</nav>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
201
public/main.js
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
/**
|
||||||
|
* REBOUR — Main Script
|
||||||
|
*/
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
// ---- CUSTOM CURSOR ----
|
||||||
|
const cursorDot = document.querySelector('.cursor-dot');
|
||||||
|
const cursorOutline = document.querySelector('.cursor-outline');
|
||||||
|
|
||||||
|
let mouseX = 0, mouseY = 0;
|
||||||
|
let outlineX = 0, outlineY = 0;
|
||||||
|
let rafId = null;
|
||||||
|
|
||||||
|
window.addEventListener('mousemove', (e) => {
|
||||||
|
mouseX = e.clientX;
|
||||||
|
mouseY = e.clientY;
|
||||||
|
cursorDot.style.transform = `translate(calc(-50% + ${mouseX}px), calc(-50% + ${mouseY}px))`;
|
||||||
|
if (!rafId) rafId = requestAnimationFrame(animateOutline);
|
||||||
|
});
|
||||||
|
|
||||||
|
function animateOutline() {
|
||||||
|
rafId = null;
|
||||||
|
outlineX += (mouseX - outlineX) * 0.18;
|
||||||
|
outlineY += (mouseY - outlineY) * 0.18;
|
||||||
|
cursorOutline.style.transform = `translate(calc(-50% + ${outlineX}px), calc(-50% + ${outlineY}px))`;
|
||||||
|
if (Math.abs(mouseX - outlineX) > 0.1 || Math.abs(mouseY - outlineY) > 0.1) {
|
||||||
|
rafId = requestAnimationFrame(animateOutline);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function attachCursorHover(elements) {
|
||||||
|
elements.forEach(el => {
|
||||||
|
el.addEventListener('mouseenter', () => {
|
||||||
|
cursorOutline.style.width = '38px';
|
||||||
|
cursorOutline.style.height = '38px';
|
||||||
|
cursorDot.style.opacity = '0';
|
||||||
|
cursorDot.style.scale = '0';
|
||||||
|
});
|
||||||
|
el.addEventListener('mouseleave', () => {
|
||||||
|
cursorOutline.style.width = '26px';
|
||||||
|
cursorOutline.style.height = '26px';
|
||||||
|
cursorDot.style.opacity = '1';
|
||||||
|
cursorDot.style.scale = '1';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
attachCursorHover(document.querySelectorAll('a, button, input, .product-card, summary, .panel-close'));
|
||||||
|
|
||||||
|
// ---- INTERACTIVE GRID ----
|
||||||
|
const gridContainer = document.getElementById('interactive-grid');
|
||||||
|
const CELL = 60;
|
||||||
|
const COLORS = [
|
||||||
|
'rgba(160,160,155,0.3)',
|
||||||
|
'rgba(140,140,135,0.22)',
|
||||||
|
'rgba(120,120,115,0.18)',
|
||||||
|
];
|
||||||
|
|
||||||
|
function buildGrid() {
|
||||||
|
if (!gridContainer) return;
|
||||||
|
gridContainer.innerHTML = '';
|
||||||
|
const cols = Math.ceil(window.innerWidth / CELL);
|
||||||
|
const rows = Math.ceil(window.innerHeight / CELL);
|
||||||
|
gridContainer.style.display = 'grid';
|
||||||
|
gridContainer.style.gridTemplateColumns = `repeat(${cols}, ${CELL}px)`;
|
||||||
|
gridContainer.style.gridTemplateRows = `repeat(${rows}, ${CELL}px)`;
|
||||||
|
|
||||||
|
for (let i = 0; i < cols * rows; i++) {
|
||||||
|
const cell = document.createElement('div');
|
||||||
|
cell.className = 'grid-cell';
|
||||||
|
cell.addEventListener('mouseenter', () => {
|
||||||
|
cell.style.transition = 'none';
|
||||||
|
cell.style.backgroundColor = COLORS[Math.floor(Math.random() * COLORS.length)];
|
||||||
|
});
|
||||||
|
cell.addEventListener('mouseleave', () => {
|
||||||
|
cell.style.transition = 'background-color 1.4s ease-out';
|
||||||
|
cell.style.backgroundColor = 'transparent';
|
||||||
|
});
|
||||||
|
gridContainer.appendChild(cell);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildGrid();
|
||||||
|
let rt;
|
||||||
|
window.addEventListener('resize', () => { clearTimeout(rt); rt = setTimeout(buildGrid, 150); });
|
||||||
|
|
||||||
|
// ---- PRODUCT PANEL ----
|
||||||
|
const panel = document.getElementById('product-panel');
|
||||||
|
const panelClose = document.getElementById('panel-close');
|
||||||
|
const cards = document.querySelectorAll('.product-card');
|
||||||
|
|
||||||
|
// Champs du panel
|
||||||
|
const fields = {
|
||||||
|
img: document.getElementById('panel-img'),
|
||||||
|
index: document.getElementById('panel-index'),
|
||||||
|
name: document.getElementById('panel-name'),
|
||||||
|
type: document.getElementById('panel-type'),
|
||||||
|
mat: document.getElementById('panel-mat'),
|
||||||
|
year: document.getElementById('panel-year'),
|
||||||
|
status: document.getElementById('panel-status'),
|
||||||
|
desc: document.getElementById('panel-desc'),
|
||||||
|
specs: document.getElementById('panel-specs'),
|
||||||
|
notes: document.getElementById('panel-notes'),
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---- CHECKOUT LOGIC ----
|
||||||
|
const checkoutSection = document.getElementById('checkout-section');
|
||||||
|
const checkoutToggleBtn = document.getElementById('checkout-toggle-btn');
|
||||||
|
const checkoutFormWrap = document.getElementById('checkout-form-wrap');
|
||||||
|
const checkoutForm = document.getElementById('checkout-form');
|
||||||
|
const checkoutSubmitBtn = document.getElementById('checkout-submit-btn');
|
||||||
|
|
||||||
|
// Toggle affichage du form
|
||||||
|
checkoutToggleBtn.addEventListener('click', () => {
|
||||||
|
const isOpen = checkoutFormWrap.style.display !== 'none';
|
||||||
|
checkoutFormWrap.style.display = isOpen ? 'none' : 'block';
|
||||||
|
checkoutToggleBtn.textContent = isOpen
|
||||||
|
? '[ COMMANDER CETTE PIÈCE ]'
|
||||||
|
: '[ ANNULER ]';
|
||||||
|
});
|
||||||
|
|
||||||
|
// Submit → appel API Elysia → redirect Stripe
|
||||||
|
checkoutForm.addEventListener('submit', async (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
const email = document.getElementById('checkout-email').value;
|
||||||
|
|
||||||
|
checkoutSubmitBtn.disabled = true;
|
||||||
|
checkoutSubmitBtn.textContent = 'CONNEXION STRIPE...';
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await fetch('/api/checkout', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
body: JSON.stringify({ product: 'lumiere_orbitale', email }),
|
||||||
|
});
|
||||||
|
const data = await res.json();
|
||||||
|
if (data.url) {
|
||||||
|
window.location.href = data.url;
|
||||||
|
} else {
|
||||||
|
throw new Error('No URL returned');
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
checkoutSubmitBtn.disabled = false;
|
||||||
|
checkoutSubmitBtn.textContent = 'ERREUR — RÉESSAYER';
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function openPanel(card) {
|
||||||
|
fields.img.src = card.dataset.img;
|
||||||
|
fields.img.alt = card.dataset.name;
|
||||||
|
fields.index.textContent = card.dataset.index;
|
||||||
|
fields.name.textContent = card.dataset.name;
|
||||||
|
fields.type.textContent = card.dataset.type;
|
||||||
|
fields.mat.textContent = card.dataset.mat;
|
||||||
|
fields.year.textContent = card.dataset.year;
|
||||||
|
fields.status.textContent = card.dataset.status;
|
||||||
|
fields.desc.textContent = card.dataset.desc;
|
||||||
|
fields.specs.textContent = card.dataset.specs;
|
||||||
|
fields.notes.textContent = card.dataset.notes;
|
||||||
|
|
||||||
|
// Affiche le bouton de commande uniquement pour PROJET_001
|
||||||
|
const isOrderable = card.dataset.index === 'PROJET_001';
|
||||||
|
checkoutSection.style.display = isOrderable ? 'block' : 'none';
|
||||||
|
// Reset form state
|
||||||
|
checkoutFormWrap.style.display = 'none';
|
||||||
|
checkoutToggleBtn.textContent = '[ COMMANDER CETTE PIÈCE ]';
|
||||||
|
checkoutSubmitBtn.disabled = false;
|
||||||
|
checkoutSubmitBtn.textContent = 'PROCÉDER AU PAIEMENT →';
|
||||||
|
checkoutForm.reset();
|
||||||
|
|
||||||
|
// Ferme les accordéons
|
||||||
|
panel.querySelectorAll('details').forEach(d => d.removeAttribute('open'));
|
||||||
|
|
||||||
|
panel.classList.add('is-open');
|
||||||
|
panel.setAttribute('aria-hidden', 'false');
|
||||||
|
document.body.style.overflow = 'hidden';
|
||||||
|
|
||||||
|
// Refresh cursor sur les nouveaux éléments
|
||||||
|
attachCursorHover(panel.querySelectorAll('summary, .panel-close, .checkout-btn, .checkout-submit'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function closePanel() {
|
||||||
|
panel.classList.remove('is-open');
|
||||||
|
panel.setAttribute('aria-hidden', 'true');
|
||||||
|
document.body.style.overflow = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
cards.forEach(card => {
|
||||||
|
card.addEventListener('click', () => openPanel(card));
|
||||||
|
});
|
||||||
|
|
||||||
|
panelClose.addEventListener('click', closePanel);
|
||||||
|
|
||||||
|
// Echap pour fermer
|
||||||
|
document.addEventListener('keydown', (e) => {
|
||||||
|
if (e.key === 'Escape') closePanel();
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
592
public/style.css
Normal file
@ -0,0 +1,592 @@
|
|||||||
|
/* ==========================================================================
|
||||||
|
REBOUR — RAW HTML 2000s + GRILLE GUFRAM + PANEL PRODUIT
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--clr-bg: #e8e8e4;
|
||||||
|
--clr-black: #111;
|
||||||
|
--clr-white: #f5f5f0;
|
||||||
|
--clr-card-bg: #f0f0ec;
|
||||||
|
--clr-grid: rgba(0,0,0,0.055);
|
||||||
|
--clr-red: #e8a800;
|
||||||
|
--font-mono: 'Space Mono', monospace;
|
||||||
|
--border: 1px solid #111;
|
||||||
|
--pad: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
|
|
||||||
|
html { font-size: 13px; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: var(--clr-bg);
|
||||||
|
color: var(--clr-black);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
overflow-x: hidden;
|
||||||
|
cursor: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- CURSOR ---- */
|
||||||
|
.cursor-dot {
|
||||||
|
width: 5px; height: 5px;
|
||||||
|
background: var(--clr-black);
|
||||||
|
position: fixed; top: 0; left: 0;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 99999;
|
||||||
|
transition: opacity 0.15s, scale 0.15s;
|
||||||
|
will-change: transform;
|
||||||
|
}
|
||||||
|
.cursor-outline {
|
||||||
|
width: 26px; height: 26px;
|
||||||
|
border: 1px solid var(--clr-black);
|
||||||
|
position: fixed; top: 0; left: 0;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 99998;
|
||||||
|
transition: width 0.15s, height 0.15s, border-color 0.15s;
|
||||||
|
will-change: transform;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- INTERACTIVE GRID (derrière tout) ---- */
|
||||||
|
.interactive-grid {
|
||||||
|
position: fixed;
|
||||||
|
top: 0; left: 0;
|
||||||
|
width: 100vw; height: 100vh;
|
||||||
|
z-index: 0;
|
||||||
|
pointer-events: auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.grid-cell {
|
||||||
|
border-right: 1px solid var(--clr-grid);
|
||||||
|
border-bottom: 1px solid var(--clr-grid);
|
||||||
|
pointer-events: auto;
|
||||||
|
transition: background-color 1.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- PAGE WRAPPER ---- */
|
||||||
|
.page-wrapper {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
pointer-events: none; /* laisse passer vers la grid */
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
/* Re-active pointer-events sur les éléments interactifs */
|
||||||
|
.page-wrapper a,
|
||||||
|
.page-wrapper button,
|
||||||
|
.page-wrapper input,
|
||||||
|
.page-wrapper form,
|
||||||
|
.page-wrapper nav,
|
||||||
|
.page-wrapper .product-card,
|
||||||
|
.page-wrapper summary,
|
||||||
|
.page-wrapper details {
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- HEADER ---- */
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: baseline;
|
||||||
|
padding: 1.1rem var(--pad);
|
||||||
|
border-bottom: var(--border);
|
||||||
|
background: var(--clr-bg);
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.logo-text {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 0.18em;
|
||||||
|
}
|
||||||
|
.header-nav {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 2.5rem;
|
||||||
|
font-size: 0.82rem;
|
||||||
|
}
|
||||||
|
.header-nav a {
|
||||||
|
color: var(--clr-black);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.header-nav a:hover { text-decoration: underline; }
|
||||||
|
.wip-tag { color: #999; font-size: 0.78rem; }
|
||||||
|
|
||||||
|
/* ---- UTILS ---- */
|
||||||
|
.label { font-size: 0.75rem; color: #888; letter-spacing: 0.04em; }
|
||||||
|
.mono-sm { font-size: 0.75rem; line-height: 1.9; color: #777; }
|
||||||
|
.red { color: var(--clr-red); font-weight: 700; }
|
||||||
|
.blink { animation: blink 1.4s step-end infinite; color: var(--clr-red); }
|
||||||
|
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
|
||||||
|
hr { border: none; border-top: var(--border); margin: 0; }
|
||||||
|
|
||||||
|
/* ---- HERO ---- */
|
||||||
|
.hero {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
min-height: 88vh;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.hero-left {
|
||||||
|
padding: 5rem var(--pad) 3rem;
|
||||||
|
border-right: var(--border);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 1.6rem;
|
||||||
|
}
|
||||||
|
.hero-left h1 {
|
||||||
|
font-size: clamp(3.5rem, 7vw, 6rem);
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 0.92;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
.hero-sub { font-size: 0.85rem; line-height: 1.75; max-width: 300px; }
|
||||||
|
.hero-right { overflow: hidden; background: #1c1c1c; }
|
||||||
|
.hero-img {
|
||||||
|
width: 100%; height: 100%;
|
||||||
|
object-fit: cover; display: block;
|
||||||
|
filter: grayscale(10%);
|
||||||
|
opacity: 0.92;
|
||||||
|
transition: opacity 0.5s, filter 0.5s;
|
||||||
|
}
|
||||||
|
.hero-right:hover .hero-img { opacity: 1; filter: grayscale(0%); }
|
||||||
|
|
||||||
|
/* ---- COLLECTION ---- */
|
||||||
|
.collection { pointer-events: none; }
|
||||||
|
.collection-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 1rem var(--pad);
|
||||||
|
border-bottom: var(--border);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- PRODUCT GRID — style Gufram ---- */
|
||||||
|
/* 3 colonnes, image centrée sur fond neutre, bordure fine */
|
||||||
|
.product-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
border-left: var(--border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-card {
|
||||||
|
border-right: var(--border);
|
||||||
|
border-bottom: var(--border);
|
||||||
|
background: var(--clr-card-bg);
|
||||||
|
cursor: none;
|
||||||
|
pointer-events: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
transition: background 0.2s;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.product-card:hover {
|
||||||
|
background: var(--clr-white);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Image : objet centré sur fond neutre, comme Gufram */
|
||||||
|
.card-img-wrap {
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 2rem;
|
||||||
|
border-bottom: var(--border);
|
||||||
|
background: var(--clr-card-bg);
|
||||||
|
transition: background 0.2s;
|
||||||
|
}
|
||||||
|
.product-card:hover .card-img-wrap {
|
||||||
|
background: var(--clr-white);
|
||||||
|
}
|
||||||
|
.card-img-wrap img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
display: block;
|
||||||
|
filter: grayscale(15%);
|
||||||
|
transition: filter 0.4s, transform 0.5s ease;
|
||||||
|
}
|
||||||
|
.product-card:hover .card-img-wrap img {
|
||||||
|
filter: grayscale(0%);
|
||||||
|
transform: scale(1.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Bas de la card : index + nom + flèche, tout en ligne */
|
||||||
|
.card-meta {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0.9rem 1.1rem;
|
||||||
|
gap: 0.8rem;
|
||||||
|
}
|
||||||
|
.card-index {
|
||||||
|
font-size: 0.72rem;
|
||||||
|
color: #999;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.card-name {
|
||||||
|
font-size: 0.82rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
.card-arrow {
|
||||||
|
font-size: 1rem;
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(3px);
|
||||||
|
transition: opacity 0.2s, transform 0.2s;
|
||||||
|
}
|
||||||
|
.product-card:hover .card-arrow {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- PRODUCT PANEL (overlay) ---- */
|
||||||
|
.product-panel {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
background: var(--clr-bg);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
transform: translateY(100%);
|
||||||
|
transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
|
pointer-events: none;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.product-panel.is-open {
|
||||||
|
transform: translateY(0);
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-close {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 1.1rem var(--pad);
|
||||||
|
border-bottom: var(--border);
|
||||||
|
font-size: 0.78rem;
|
||||||
|
font-weight: 700;
|
||||||
|
cursor: none;
|
||||||
|
background: var(--clr-bg);
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
pointer-events: auto;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.panel-close:hover { background: var(--clr-white); }
|
||||||
|
.panel-close span { pointer-events: none; }
|
||||||
|
|
||||||
|
.panel-inner {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
flex-grow: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Colonne image : sticky, fond sombre, image centrée */
|
||||||
|
.panel-img-col {
|
||||||
|
border-right: var(--border);
|
||||||
|
background: #1a1a1a;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#panel-img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
display: block;
|
||||||
|
opacity: 0.92;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Colonne infos : scrollable */
|
||||||
|
.panel-info-col {
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 2.5rem var(--pad);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.4rem;
|
||||||
|
background: var(--clr-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-index {
|
||||||
|
font-size: 0.72rem;
|
||||||
|
color: #999;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-info-col h2 {
|
||||||
|
font-size: clamp(1.8rem, 3vw, 2.8rem);
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Meta table */
|
||||||
|
.panel-meta {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0;
|
||||||
|
}
|
||||||
|
.panel-meta-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 1.5rem;
|
||||||
|
padding: 0.55rem 0;
|
||||||
|
border-bottom: 1px solid rgba(0,0,0,0.1);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
.meta-key {
|
||||||
|
color: #888;
|
||||||
|
width: 7rem;
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-size: 0.72rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-desc {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
line-height: 1.85;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Accordion */
|
||||||
|
.accordion {
|
||||||
|
border-bottom: var(--border);
|
||||||
|
}
|
||||||
|
.accordion summary {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 1rem 0;
|
||||||
|
font-size: 0.78rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
cursor: none;
|
||||||
|
list-style: none;
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.accordion summary::-webkit-details-marker { display: none; }
|
||||||
|
.accordion summary span {
|
||||||
|
transition: transform 0.2s;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.accordion[open] summary span { transform: rotate(180deg); }
|
||||||
|
.accordion-body {
|
||||||
|
font-size: 0.78rem;
|
||||||
|
line-height: 2;
|
||||||
|
color: #444;
|
||||||
|
padding-bottom: 1rem;
|
||||||
|
white-space: pre-line;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-footer {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
color: #888;
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- CHECKOUT SECTION ---- */
|
||||||
|
.checkout-price-line {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 1.2rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
.checkout-price {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
}
|
||||||
|
.checkout-edition {
|
||||||
|
font-size: 0.72rem;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Bouton jaune parking rectangulaire — aucun border-radius */
|
||||||
|
.checkout-btn {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
background: #e8a800;
|
||||||
|
color: var(--clr-black);
|
||||||
|
border: var(--border);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.82rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
padding: 1.1rem 1.5rem;
|
||||||
|
text-align: center;
|
||||||
|
cursor: none;
|
||||||
|
transition: background 0.15s, color 0.15s;
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.checkout-btn:hover {
|
||||||
|
background: var(--clr-black);
|
||||||
|
color: #e8a800;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Form qui se déploie */
|
||||||
|
.checkout-form-wrap {
|
||||||
|
border: var(--border);
|
||||||
|
border-top: none;
|
||||||
|
background: var(--clr-white);
|
||||||
|
}
|
||||||
|
.checkout-form {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0;
|
||||||
|
}
|
||||||
|
.checkout-form-field {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.4rem;
|
||||||
|
padding: 1.1rem;
|
||||||
|
border-bottom: var(--border);
|
||||||
|
}
|
||||||
|
.checkout-form-field label {
|
||||||
|
font-size: 0.68rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #888;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
}
|
||||||
|
.checkout-form-field input {
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
outline: none;
|
||||||
|
cursor: none;
|
||||||
|
padding: 0;
|
||||||
|
color: var(--clr-black);
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.checkout-form-field input::placeholder { color: #bbb; }
|
||||||
|
.checkout-form-field input:focus { outline: none; }
|
||||||
|
.checkout-form-note {
|
||||||
|
padding: 0.9rem 1.1rem;
|
||||||
|
font-size: 0.72rem;
|
||||||
|
line-height: 1.8;
|
||||||
|
color: #777;
|
||||||
|
border-bottom: var(--border);
|
||||||
|
}
|
||||||
|
.checkout-submit {
|
||||||
|
background: var(--clr-black);
|
||||||
|
color: #e8a800;
|
||||||
|
border: none;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.78rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
padding: 1.1rem 1.5rem;
|
||||||
|
cursor: none;
|
||||||
|
text-align: center;
|
||||||
|
transition: background 0.15s, color 0.15s;
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.checkout-submit:hover {
|
||||||
|
background: #e8a800;
|
||||||
|
color: var(--clr-black);
|
||||||
|
}
|
||||||
|
.checkout-submit:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- NEWSLETTER ---- */
|
||||||
|
.newsletter {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.nl-left {
|
||||||
|
padding: 3rem var(--pad);
|
||||||
|
border-right: var(--border);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
.nl-left h2 {
|
||||||
|
font-size: clamp(2rem, 4vw, 3rem);
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 0.95;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
.nl-right {
|
||||||
|
padding: 3rem var(--pad);
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
.nl-form {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.7rem;
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.nl-form label { font-size: 0.75rem; font-weight: 700; }
|
||||||
|
.nl-row {
|
||||||
|
display: flex;
|
||||||
|
border: var(--border);
|
||||||
|
background: var(--clr-white);
|
||||||
|
}
|
||||||
|
.nl-row input {
|
||||||
|
flex-grow: 1;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
padding: 0.9rem;
|
||||||
|
outline: none;
|
||||||
|
cursor: none;
|
||||||
|
}
|
||||||
|
.nl-row input::placeholder { color: #bbb; }
|
||||||
|
.nl-row input:focus { background: rgba(0,0,0,0.03); }
|
||||||
|
.nl-row button {
|
||||||
|
border: none;
|
||||||
|
border-left: var(--border);
|
||||||
|
background: var(--clr-black);
|
||||||
|
color: var(--clr-white);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 0 1.3rem;
|
||||||
|
cursor: none;
|
||||||
|
transition: background 0.15s;
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.nl-row button:hover { background: var(--clr-red); }
|
||||||
|
|
||||||
|
/* ---- FOOTER ---- */
|
||||||
|
.footer {
|
||||||
|
margin-top: auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 1.1rem var(--pad);
|
||||||
|
border-top: var(--border);
|
||||||
|
font-size: 0.75rem;
|
||||||
|
pointer-events: auto;
|
||||||
|
background: var(--clr-bg);
|
||||||
|
}
|
||||||
|
.footer a { color: var(--clr-black); text-decoration: none; }
|
||||||
|
.footer a:hover { text-decoration: underline; }
|
||||||
|
|
||||||
|
/* ---- RESPONSIVE ---- */
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.hero, .newsletter { grid-template-columns: 1fr; }
|
||||||
|
.hero-left { border-right: none; border-bottom: var(--border); min-height: 55vw; padding: 3rem var(--pad); }
|
||||||
|
.hero-right { height: 55vw; }
|
||||||
|
.nl-left { border-right: none; border-bottom: var(--border); }
|
||||||
|
.product-grid { grid-template-columns: 1fr 1fr; }
|
||||||
|
.panel-inner { grid-template-columns: 1fr; }
|
||||||
|
.panel-img-col { height: 50vw; }
|
||||||
|
.panel-info-col { overflow-y: auto; }
|
||||||
|
}
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.product-grid { grid-template-columns: 1fr; }
|
||||||
|
.header-nav { gap: 1rem; }
|
||||||
|
}
|
||||||
168
public/success.html
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>REBOUR — COMMANDE CONFIRMÉE</title>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--clr-bg: #e8e8e4;
|
||||||
|
--clr-black: #111;
|
||||||
|
--clr-accent: #e8a800;
|
||||||
|
--border: 1px solid #111;
|
||||||
|
--font-mono: 'Space Mono', monospace;
|
||||||
|
}
|
||||||
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
|
html { font-size: 13px; }
|
||||||
|
body {
|
||||||
|
background: var(--clr-bg);
|
||||||
|
color: var(--clr-black);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: baseline;
|
||||||
|
padding: 1.1rem 2rem;
|
||||||
|
border-bottom: var(--border);
|
||||||
|
}
|
||||||
|
.logo { font-size: 1rem; font-weight: 700; letter-spacing: 0.18em; }
|
||||||
|
main {
|
||||||
|
flex-grow: 1;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
}
|
||||||
|
.left {
|
||||||
|
border-right: var(--border);
|
||||||
|
padding: 5rem 2rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 2rem;
|
||||||
|
}
|
||||||
|
.label { font-size: 0.75rem; color: #888; }
|
||||||
|
h1 {
|
||||||
|
font-size: clamp(2.5rem, 5vw, 4.5rem);
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 0.95;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
.status-line {
|
||||||
|
font-size: 0.82rem;
|
||||||
|
line-height: 1.8;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
.amount {
|
||||||
|
display: inline-block;
|
||||||
|
background: var(--clr-accent);
|
||||||
|
padding: 0.3rem 0.7rem;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
padding: 5rem 2rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
hr { border: none; border-top: var(--border); }
|
||||||
|
.info-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 1.5rem;
|
||||||
|
padding: 0.6rem 0;
|
||||||
|
border-bottom: 1px solid rgba(0,0,0,0.1);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
.info-key { color: #888; width: 8rem; flex-shrink: 0; font-size: 0.72rem; }
|
||||||
|
a.back {
|
||||||
|
display: inline-block;
|
||||||
|
border: var(--border);
|
||||||
|
padding: 0.9rem 1.5rem;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.78rem;
|
||||||
|
font-weight: 700;
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--clr-black);
|
||||||
|
transition: background 0.15s;
|
||||||
|
align-self: flex-start;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
a.back:hover { background: var(--clr-black); color: #f5f5f0; }
|
||||||
|
footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 1.1rem 2rem;
|
||||||
|
border-top: var(--border);
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
#loading { color: #888; font-size: 0.78rem; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<span class="logo">REBOUR</span>
|
||||||
|
<span style="font-size:0.78rem;color:#888">COLLECTION_001</span>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="left">
|
||||||
|
<p class="label">// COMMANDE_CONFIRMÉE</p>
|
||||||
|
<h1>MERCI<br>POUR<br>VOTRE<br>COMMANDE</h1>
|
||||||
|
<p class="status-line" id="loading">Vérification du paiement...</p>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<p class="label">// RÉCAPITULATIF</p>
|
||||||
|
<hr>
|
||||||
|
<div id="order-details" style="display:none; flex-direction:column; gap:0;">
|
||||||
|
<div class="info-row"><span class="info-key">PRODUIT</span><span>LUMIÈRE_ORBITALE</span></div>
|
||||||
|
<div class="info-row"><span class="info-key">COLLECTION</span><span>001 — ÉDITION UNIQUE</span></div>
|
||||||
|
<div class="info-row"><span class="info-key">MONTANT</span><span id="amount-display"></span></div>
|
||||||
|
<div class="info-row"><span class="info-key">EMAIL</span><span id="email-display"></span></div>
|
||||||
|
<div class="info-row"><span class="info-key">DÉLAI</span><span>6 À 8 SEMAINES</span></div>
|
||||||
|
<div class="info-row"><span class="info-key">STATUS</span><span style="color:#e8a800; font-weight:700">CONFIRMÉ ■</span></div>
|
||||||
|
</div>
|
||||||
|
<p style="font-size:0.78rem; line-height:1.8; color:#555; margin-top:1rem;">
|
||||||
|
Un email de confirmation vous sera envoyé.<br>
|
||||||
|
Votre lampe est fabriquée à la main à Paris.
|
||||||
|
</p>
|
||||||
|
<a href="/" class="back">← RETOUR À LA COLLECTION</a>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<span>© 2026 REBOUR STUDIO — PARIS</span>
|
||||||
|
<span>INSTAGRAM / CONTACT</span>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const params = new URLSearchParams(window.location.search)
|
||||||
|
const sessionId = params.get('session_id')
|
||||||
|
|
||||||
|
if (sessionId) {
|
||||||
|
fetch(`/api/session/${sessionId}`)
|
||||||
|
.then(r => r.json())
|
||||||
|
.then(data => {
|
||||||
|
document.getElementById('loading').style.display = 'none'
|
||||||
|
document.getElementById('order-details').style.display = 'flex'
|
||||||
|
|
||||||
|
const amount = data.amount ? `${(data.amount / 100).toLocaleString('fr-FR')} €` : '—'
|
||||||
|
document.getElementById('amount-display').textContent = amount
|
||||||
|
document.getElementById('email-display').textContent = data.customer_email ?? '—'
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
document.getElementById('loading').textContent = 'Commande enregistrée.'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
document.getElementById('loading').textContent = 'Commande enregistrée.'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
151
server.ts
@ -1,66 +1,124 @@
|
|||||||
import { Elysia, t } from 'elysia'
|
import { Elysia, t } from 'elysia'
|
||||||
import { cors } from '@elysiajs/cors'
|
import { cors } from '@elysiajs/cors'
|
||||||
import { staticPlugin } from '@elysiajs/static'
|
|
||||||
import Stripe from 'stripe'
|
import Stripe from 'stripe'
|
||||||
|
import { readFileSync, existsSync, statSync } from 'fs'
|
||||||
|
import { join, extname } from 'path'
|
||||||
|
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? '', {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? '', {
|
||||||
apiVersion: '2025-01-27.acacia',
|
apiVersion: '2025-01-27.acacia',
|
||||||
})
|
})
|
||||||
|
|
||||||
const DOMAIN = process.env.DOMAIN ?? 'http://localhost:3000'
|
const DOMAIN = process.env.DOMAIN ?? 'http://localhost:3000'
|
||||||
|
const PUBLIC_DIR = join(import.meta.dir, 'public')
|
||||||
|
|
||||||
// Produit LUMIÈRE_ORBITALE — prix en centimes (EUR)
|
|
||||||
const PRODUCTS = {
|
const PRODUCTS = {
|
||||||
lumiere_orbitale: {
|
lumiere_orbitale: {
|
||||||
name: 'LUMIÈRE_ORBITALE — REBOUR',
|
name: 'LUMIÈRE_ORBITALE — REBOUR',
|
||||||
description: 'Lampe de table unique. Béton texturé coulé à la main + dôme céramique laqué. Collection 001.',
|
description: 'Lampe de table unique. Béton texturé coulé à la main + dôme céramique laqué. Collection 001.',
|
||||||
amount: 180000, // 1800 EUR
|
amount: 180000,
|
||||||
currency: 'eur',
|
currency: 'eur',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const app = new Elysia()
|
// Map extensions → MIME types
|
||||||
.use(cors({
|
const MIME: Record<string, string> = {
|
||||||
origin: DOMAIN,
|
'.html': 'text/html; charset=utf-8',
|
||||||
methods: ['GET', 'POST'],
|
'.css': 'text/css',
|
||||||
}))
|
'.js': 'application/javascript',
|
||||||
// Sert les fichiers statiques (html, css, js, assets)
|
'.json': 'application/json',
|
||||||
.use(staticPlugin({
|
'.jpg': 'image/jpeg',
|
||||||
assets: '.',
|
'.jpeg': 'image/jpeg',
|
||||||
prefix: '/',
|
'.png': 'image/png',
|
||||||
indexHTML: true,
|
'.webp': 'image/webp',
|
||||||
}))
|
'.svg': 'image/svg+xml',
|
||||||
|
'.ico': 'image/x-icon',
|
||||||
|
'.woff2':'font/woff2',
|
||||||
|
'.txt': 'text/plain',
|
||||||
|
'.xml': 'application/xml',
|
||||||
|
}
|
||||||
|
|
||||||
// ── Créer une session de checkout Stripe ──────────────────────────────────
|
const HTML_HEADERS = {
|
||||||
|
'Content-Type': 'text/html; charset=utf-8',
|
||||||
|
'Cache-Control': 'public, max-age=3600, stale-while-revalidate=86400',
|
||||||
|
'X-Content-Type-Options': 'nosniff',
|
||||||
|
'X-Frame-Options': 'SAMEORIGIN',
|
||||||
|
'Referrer-Policy': 'strict-origin-when-cross-origin',
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sert un fichier statique depuis public/
|
||||||
|
function serveStatic(relativePath: string): Response {
|
||||||
|
const filePath = join(PUBLIC_DIR, relativePath)
|
||||||
|
if (!existsSync(filePath) || statSync(filePath).isDirectory()) {
|
||||||
|
return new Response('Not Found', { status: 404 })
|
||||||
|
}
|
||||||
|
const ext = extname(filePath).toLowerCase()
|
||||||
|
const mime = MIME[ext] ?? 'application/octet-stream'
|
||||||
|
const isAsset = ['.jpg', '.jpeg', '.png', '.webp', '.svg', '.ico', '.woff2', '.css', '.js'].includes(ext)
|
||||||
|
|
||||||
|
return new Response(Bun.file(filePath), {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': mime,
|
||||||
|
'Cache-Control': isAsset
|
||||||
|
? 'public, max-age=31536000, immutable'
|
||||||
|
: 'public, max-age=3600',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const app = new Elysia()
|
||||||
|
.use(cors({ origin: '*', methods: ['GET', 'POST'] }))
|
||||||
|
|
||||||
|
// ── Pages HTML ─────────────────────────────────────────────────────────────
|
||||||
|
.get('/', () =>
|
||||||
|
new Response(readFileSync(join(PUBLIC_DIR, 'index.html'), 'utf-8'), { headers: HTML_HEADERS })
|
||||||
|
)
|
||||||
|
.get('/success', () =>
|
||||||
|
new Response(readFileSync(join(PUBLIC_DIR, 'success.html'), 'utf-8'), { headers: HTML_HEADERS })
|
||||||
|
)
|
||||||
|
|
||||||
|
// ── SEO : robots + sitemap ─────────────────────────────────────────────────
|
||||||
|
.get('/robots.txt', () =>
|
||||||
|
new Response(`User-agent: *\nAllow: /\nSitemap: ${DOMAIN}/sitemap.xml\n`, {
|
||||||
|
headers: { 'Content-Type': 'text/plain', 'Cache-Control': 'public, max-age=86400' },
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.get('/sitemap.xml', () => {
|
||||||
|
const today = new Date().toISOString().split('T')[0]
|
||||||
|
return new Response(
|
||||||
|
`<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n <url><loc>${DOMAIN}/</loc><lastmod>${today}</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url>\n</urlset>`,
|
||||||
|
{ headers: { 'Content-Type': 'application/xml', 'Cache-Control': 'public, max-age=86400' } }
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
// ── Fichiers statiques : /assets/*, /style.css, /main.js, etc. ────────────
|
||||||
|
.get('/assets/*', ({ params }) => serveStatic(`assets/${(params as any)['*']}`))
|
||||||
|
.get('/style.css', () => serveStatic('style.css'))
|
||||||
|
.get('/main.js', () => serveStatic('main.js'))
|
||||||
|
|
||||||
|
// ── API Stripe : créer session checkout ───────────────────────────────────
|
||||||
.post(
|
.post(
|
||||||
'/api/checkout',
|
'/api/checkout',
|
||||||
async ({ body }) => {
|
async ({ body }) => {
|
||||||
const product = PRODUCTS[body.product as keyof typeof PRODUCTS]
|
const product = PRODUCTS[body.product as keyof typeof PRODUCTS]
|
||||||
if (!product) {
|
if (!product) return new Response('Produit inconnu', { status: 404 })
|
||||||
throw new Error('Produit inconnu')
|
|
||||||
}
|
|
||||||
|
|
||||||
const session = await stripe.checkout.sessions.create({
|
const session = await stripe.checkout.sessions.create({
|
||||||
mode: 'payment',
|
mode: 'payment',
|
||||||
payment_method_types: ['card'],
|
payment_method_types: ['card'],
|
||||||
line_items: [
|
line_items: [{
|
||||||
{
|
|
||||||
price_data: {
|
price_data: {
|
||||||
currency: product.currency,
|
currency: product.currency,
|
||||||
unit_amount: product.amount,
|
unit_amount: product.amount,
|
||||||
product_data: {
|
product_data: { name: product.name, description: product.description },
|
||||||
name: product.name,
|
|
||||||
description: product.description,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
},
|
}],
|
||||||
],
|
success_url: `${DOMAIN}/success?session_id={CHECKOUT_SESSION_ID}`,
|
||||||
success_url: `${DOMAIN}/success.html?session_id={CHECKOUT_SESSION_ID}`,
|
|
||||||
cancel_url: `${DOMAIN}/#collection`,
|
cancel_url: `${DOMAIN}/#collection`,
|
||||||
locale: 'fr',
|
locale: 'fr',
|
||||||
|
customer_email: body.email ?? undefined,
|
||||||
custom_text: {
|
custom_text: {
|
||||||
submit: { message: 'Pièce unique — fabriquée à Paris. Délai de fabrication : 6 à 8 semaines.' },
|
submit: { message: 'Pièce unique — fabriquée à Paris. Délai : 6 à 8 semaines.' },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -69,12 +127,12 @@ const app = new Elysia()
|
|||||||
{
|
{
|
||||||
body: t.Object({
|
body: t.Object({
|
||||||
product: t.String(),
|
product: t.String(),
|
||||||
email: t.Optional(t.String({ format: 'email' })),
|
email: t.Optional(t.String()),
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// ── Vérification de session (page success) ────────────────────────────────
|
// ── API : vérifier session après paiement ─────────────────────────────────
|
||||||
.get(
|
.get(
|
||||||
'/api/session/:id',
|
'/api/session/:id',
|
||||||
async ({ params }) => {
|
async ({ params }) => {
|
||||||
@ -86,43 +144,30 @@ const app = new Elysia()
|
|||||||
customer_email: session.customer_details?.email ?? null,
|
customer_email: session.customer_details?.email ?? null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{ params: t.Object({ id: t.String() }) }
|
||||||
params: t.Object({ id: t.String() }),
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ── Webhook Stripe ────────────────────────────────────────────────────────
|
// ── Webhook Stripe ─────────────────────────────────────────────────────────
|
||||||
.post('/api/webhook', async ({ request, headers }) => {
|
.post('/api/webhook', async ({ request, headers }) => {
|
||||||
const sig = headers['stripe-signature']
|
const sig = headers['stripe-signature']
|
||||||
const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET
|
const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET
|
||||||
|
if (!sig || !webhookSecret) return new Response('Missing signature', { status: 400 })
|
||||||
if (!sig || !webhookSecret) {
|
|
||||||
return new Response('Missing signature', { status: 400 })
|
|
||||||
}
|
|
||||||
|
|
||||||
let event: Stripe.Event
|
let event: Stripe.Event
|
||||||
const rawBody = await request.arrayBuffer()
|
|
||||||
try {
|
try {
|
||||||
event = stripe.webhooks.constructEvent(
|
event = stripe.webhooks.constructEvent(
|
||||||
Buffer.from(rawBody),
|
Buffer.from(await request.arrayBuffer()), sig, webhookSecret
|
||||||
sig,
|
|
||||||
webhookSecret
|
|
||||||
)
|
)
|
||||||
} catch (err) {
|
} catch {
|
||||||
console.error('⚠ Webhook signature invalide:', err)
|
|
||||||
return new Response('Webhook Error', { status: 400 })
|
return new Response('Webhook Error', { status: 400 })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.type === 'checkout.session.completed') {
|
if (event.type === 'checkout.session.completed') {
|
||||||
const session = event.data.object as Stripe.Checkout.Session
|
const session = event.data.object as Stripe.Checkout.Session
|
||||||
if (session.payment_status === 'paid') {
|
if (session.payment_status === 'paid') {
|
||||||
console.log(`✓ Paiement reçu — session: ${session.id}`)
|
console.log(`✓ Paiement — ${session.id} — ${session.customer_details?.email}`)
|
||||||
console.log(` Client: ${session.customer_details?.email}`)
|
|
||||||
console.log(` Montant: ${(session.amount_total ?? 0) / 100} EUR`)
|
|
||||||
// → ici : envoyer email confirmation, mettre à jour BDD, etc.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { received: true }
|
return { received: true }
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -130,11 +175,7 @@ const app = new Elysia()
|
|||||||
|
|
||||||
console.log(`
|
console.log(`
|
||||||
┌──────────────────────────────────────┐
|
┌──────────────────────────────────────┐
|
||||||
│ REBOUR — SERVEUR DÉMARRÉ │
|
│ REBOUR — http://localhost:3000 │
|
||||||
│ http://localhost:3000 │
|
│ NODE_ENV: ${process.env.NODE_ENV ?? 'development'}
|
||||||
│ │
|
|
||||||
│ POST /api/checkout │
|
|
||||||
│ GET /api/session/:id │
|
|
||||||
│ POST /api/webhook │
|
|
||||||
└──────────────────────────────────────┘
|
└──────────────────────────────────────┘
|
||||||
`)
|
`)
|
||||||
|
|||||||