/* Au P'tit Jardin · version Immersive : « Poussez la porte », 3D au défilement + motion design (30/10/2026). */
:root {
  --nuit: #1f1813;
  --creme: #f5efe6;
  --papier: #fbf8f3;
  --encre: #2b2620;
  --gris: #6a6259;
  --kraft: #a47e58;
  --kraft-clair: #d8c09d;
  --rose: #d4a497;
  --titre: "Cormorant Garamond", Georgia, serif;
  --texte: "Jost", system-ui, -apple-system, sans-serif;
  --doux: cubic-bezier(.2, .7, .2, 1);
  --ressort: cubic-bezier(.34, 1.56, .64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
.mot { display: inline-block; white-space: nowrap; }
body { margin: 0; background: var(--nuit); color: var(--creme); font: 17px/1.6 var(--texte); }
/* Pas d'overflow sur body : avec overflow-x: clip sur html, il ferait de body un conteneur de défilement et casserait position: sticky (galerie épinglée). */
body.charge { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; line-height: 1.04; margin: 0 0 16px; }
h2 { font-size: clamp(38px, 5vw, 72px); letter-spacing: -0.01em; }
h3 { font-size: 30px; }
p { margin: 0 0 14px; }
.surtitre { text-transform: uppercase; letter-spacing: .2em; font-size: 13px; font-weight: 500; color: var(--rose); margin-bottom: 18px; }
.script { font: italic 500 clamp(26px, 2.6vw, 36px)/1.15 var(--titre); color: var(--kraft); margin: 0; }

/* Couches fixes */
.scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.grain { position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1s steps(6) infinite; }
@keyframes grain { 0%,100% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } }
.fondu { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgba(15, 11, 8, .65) 100%); }

.bandeau { position: relative; z-index: 31; margin: 0; background: rgba(15, 11, 8, .75); color: #f3ece2; font-size: 14px; text-align: center; padding: 8px 16px; }
.bandeau a { color: #f3ece2; font-weight: 500; }

.entete { position: fixed; z-index: 30; left: 0; right: 0; top: 36px; display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(16px, 4vw, 48px); mix-blend-mode: difference; color: #fff; transition: top .4s var(--doux); }
body.defile .entete { top: 0; }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 23px/1 var(--titre); }
.marque img { width: 40px; }
.entete__appel { text-decoration: none; border: 1px solid currentColor; border-radius: 999px; padding: 8px 18px; font-size: 15px; }

/* Ouverture */
.ouverture { position: fixed; inset: 0; z-index: 100; background: var(--nuit); display: grid; place-content: center; justify-items: center; gap: 6px; clip-path: circle(150% at 50% 50%); transition: clip-path .8s cubic-bezier(.76, 0, .24, 1), visibility 0s .8s; }
body:not(.charge) .ouverture { clip-path: circle(0% at 50% 50%); visibility: hidden; }
.ouverture__fleur { width: 110px; height: auto; stroke: var(--creme); stroke-width: 1.4; stroke-linecap: round; }
.ouverture .dessin path, .ouverture path.dessin { stroke-dasharray: 120; stroke-dashoffset: 120; animation: trace .7s var(--doux) forwards; }
.ouverture .aigrettes path { animation-delay: .25s; }
.ouverture .aigrettes path:nth-child(2n) { animation-delay: .35s; }
.ouverture .coeur { fill: var(--rose); stroke: none; opacity: 0; animation: apparaitre .6s 1.3s forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes apparaitre { to { opacity: 1; } }
.ouverture__nom { font: 600 34px/1 var(--titre); margin: 10px 0 0; opacity: 0; animation: apparaitre 1s .5s forwards; }
.ouverture__pct { font-size: 13px; letter-spacing: .2em; color: var(--kraft-clair); margin: 0; }

/* Parcours et calques de texte */
.parcours { position: relative; z-index: 2; height: 1350vh; }
.calque { position: fixed; z-index: 3; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 90px clamp(16px, 6vw, 96px); pointer-events: none; visibility: hidden; }
.calque.actif { visibility: visible; }
.calque::before { content: ""; position: fixed; inset: 0; z-index: -1; opacity: 0; transition: opacity 1s var(--doux); background: linear-gradient(90deg, rgba(18, 13, 10, .82) 0%, rgba(18, 13, 10, .45) 45%, transparent 75%); }
.calque--droite::before { background: linear-gradient(270deg, rgba(18, 13, 10, .82) 0%, rgba(18, 13, 10, .45) 45%, transparent 75%); }
.calque--bas::before { background: linear-gradient(0deg, rgba(18, 13, 10, .9) 0%, rgba(18, 13, 10, .55) 40%, transparent 70%); }
.calque--centre::before { background: radial-gradient(ellipse at center, rgba(18, 13, 10, .55), transparent 70%); }
.calque.actif::before { opacity: 1; }
.calque.actif a { pointer-events: auto; }
.calque--gauche { align-items: flex-start; max-width: 720px; }
.calque--droite { align-items: flex-end; text-align: right; left: auto; max-width: 760px; }
.calque--bas { justify-content: flex-end; padding-bottom: clamp(60px, 10vh, 110px); max-width: 860px; }
.calque--centre { align-items: center; text-align: center; justify-content: flex-start; padding-top: clamp(110px, 17vh, 180px); }
.calque p { max-width: 40ch; color: #eadfd2; font-size: 18px; }
.calque h2 { text-shadow: 0 2px 30px rgba(0, 0, 0, .45); }
.citation { font: italic 500 clamp(28px, 3.4vw, 50px)/1.18 var(--titre) !important; color: var(--creme) !important; max-width: 24ch !important; text-shadow: 0 2px 30px rgba(0, 0, 0, .5); }
.ligne { opacity: 0; transform: translateY(46px); filter: blur(6px); transition: opacity .9s var(--doux), transform 1s var(--doux), filter .9s var(--doux); }
.calque.actif .ligne { opacity: 1; transform: none; filter: none; }
.calque.actif .ligne:nth-child(2) { transition-delay: .08s; }
.calque.actif .ligne:nth-child(3) { transition-delay: .16s; }
.calque.actif .ligne:nth-child(4) { transition-delay: .24s; }

.geant { font-size: clamp(50px, 14vw, 210px); line-height: .9; letter-spacing: -0.025em; margin: 0 0 10px; text-shadow: 0 4px 50px rgba(0, 0, 0, .45); }
.geant .l { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(8deg); filter: blur(10px); transition: opacity 1s var(--doux), transform 1.1s var(--doux), filter 1s var(--doux); transition-delay: calc(var(--i) * .045s); }
.calque.actif .geant .l { opacity: 1; transform: none; filter: none; }
.sous { font: italic 500 clamp(26px, 3vw, 42px)/1.1 var(--titre) !important; color: var(--creme) !important; }
.indice { display: flex; align-items: center; gap: 12px; font-size: 13px !important; letter-spacing: .18em; text-transform: uppercase; margin-top: 28px; }
.indice span { width: 1px; height: 46px; background: linear-gradient(var(--creme), transparent); animation: goutte 2s var(--doux) infinite; transform-origin: top; }
@keyframes goutte { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.geant-script { font-size: clamp(44px, 10vw, 150px) !important; color: var(--creme) !important; line-height: 1 !important; max-width: none !important; margin-bottom: 18px; }
.geant-script .l { display: inline-block; opacity: 0; transform: translateY(30px) scale(.8); transition: opacity .8s var(--doux), transform 1s var(--ressort); transition-delay: calc(var(--i) * .035s); }
.calque.actif .geant-script .l { opacity: 1; transform: none; }

/* Boutons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.bouton { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 999px; background: var(--creme); color: var(--encre); text-decoration: none; font-weight: 500; border: 1px solid var(--creme); isolation: isolate; transition: color .45s var(--doux), transform .45s var(--doux); }
.bouton::before { content: ""; position: absolute; inset: 0; background: var(--rose); border-radius: inherit; transform: translateY(101%); transition: transform .5s var(--doux); z-index: -1; }
.bouton:hover::before { transform: none; }
.bouton:hover { transform: translateY(-2px); }
.bouton--trait { background: transparent; color: var(--creme); border-color: rgba(245, 239, 230, .6); }
.bouton--trait:hover { color: var(--encre); }
.bouton--fonce { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.bouton--fonce:hover { color: var(--encre); }
.bouton--trait-fonce { background: transparent; color: var(--encre); border-color: var(--encre); }

/* Chapitres */
.chapitres { position: fixed; z-index: 20; right: clamp(14px, 2.4vw, 34px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 18px; transition: opacity .5s; }
.chapitres a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-decoration: none; flex-direction: row-reverse; }
.chapitres i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(245, 239, 230, .7); transition: background .4s, transform .4s var(--ressort); }
.chapitres span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: 0; transform: translateX(8px); transition: opacity .4s, transform .4s var(--doux); }
.chapitres a.actif i { background: var(--rose); border-color: var(--rose); transform: scale(1.5); }
.chapitres a.actif span, .chapitres a:hover span { opacity: 1; transform: none; }
body.fin .chapitres { opacity: 0; pointer-events: none; }

/* La suite (contenu pratique), sur papier */
.suite { position: relative; z-index: 5; overflow: hidden; background: var(--creme); color: var(--encre); border-radius: 40px 40px 0 0; padding: clamp(80px, 12vh, 130px) clamp(16px, 5vw, 64px) 0; box-shadow: 0 -40px 80px rgba(0, 0, 0, .35); }
.suite p { color: var(--gris); }
.suite .surtitre { color: var(--kraft); }
.apparait { opacity: 0; transform: translateY(44px); transition: opacity 1s var(--doux), transform 1.1s var(--doux); transition-delay: var(--d, 0s); }
.apparait.vu { opacity: 1; transform: none; }

.livraisons { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; max-width: 1240px; margin: 0 auto clamp(90px, 14vh, 140px); }
.trajet { position: relative; }
.trajet svg { width: 100%; height: auto; overflow: visible; }
.trajet__fond { stroke: #e0d4c3; stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; }
.trajet__trait { stroke: var(--kraft); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.trajet__point { fill: var(--creme); stroke: var(--kraft); stroke-width: 3; }
.trajet.arrive .trajet__fin { fill: var(--rose); }
.trajet span { position: absolute; font: italic 500 22px/1 var(--titre); color: var(--kraft); }
.trajet__depart { left: 0; bottom: -6px; }
.trajet__arrivee { right: 0; top: -12px; opacity: .3; transition: opacity .5s; }
.trajet.arrive .trajet__arrivee { opacity: 1; }

/* Étiquettes kraft, comme celles des bouquets */
.etiquettes { display: grid; grid-template-columns: 1.1fr .9fr 1fr; gap: 34px; align-items: start; max-width: 1240px; margin: 0 auto; padding-bottom: clamp(90px, 14vh, 140px); }
.etiquette { position: relative; background: linear-gradient(160deg, #e4cfae, var(--kraft-clair)); color: var(--encre); border-radius: 16px 16px 16px 16px; padding: 46px 32px 32px; box-shadow: 0 30px 60px -30px rgba(43, 38, 32, .5); transform-origin: 50% -30px; clip-path: polygon(14% 0, 86% 0, 100% 9%, 100% 100%, 0 100%, 0 9%); }
.etiquette::before { content: ""; position: absolute; left: 50%; top: 16px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--creme); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.etiquette p { color: #4f4439; }
.etiquette .nom { color: var(--encre); font-weight: 500; }
.etiquette.apparait { transform: rotate(-9deg) translateY(30px); transition: opacity .8s var(--doux), transform 1.6s var(--ressort); }
.etiquette--2.apparait { transform: rotate(8deg) translateY(30px); }
.etiquette.apparait.vu { transform: rotate(-1.5deg); }
.etiquette--2.apparait.vu { transform: rotate(1.5deg); }
.etiquette:hover { animation: balance 1.6s var(--doux); }
@keyframes balance { 0% { rotate: 0deg; } 25% { rotate: 3deg; } 55% { rotate: -2deg; } 80% { rotate: 1deg; } 100% { rotate: 0deg; } }
.etiquette dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; }
.etiquette dt { font-weight: 500; }
.etiquette dd { margin: 0; text-align: right; color: #4f4439; }
.polaroid { margin: 0; background: #fff; padding: 14px 14px 52px; box-shadow: 0 30px 60px -28px rgba(43, 38, 32, .55); }
.polaroid.apparait { transform: rotate(10deg) translateY(40px); transition: opacity .8s var(--doux), transform 1.5s var(--ressort); }
.polaroid.apparait.vu { transform: rotate(3deg); }
.polaroid img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; }
.polaroid figcaption { font: italic 500 22px/1 var(--titre); color: var(--gris); margin-top: 16px; text-align: center; }

.pied { text-align: center; padding: 50px 16px 120px; border-top: 1px solid #e0d4c3; }
.pied img { width: 70px; margin: 0 auto 10px; }
.pied p { font-size: 15px; margin: 8px 0 0; }

/* Panneaux de l'allée : un texte à côté de chaque photo, du côté opposé */
.panneau__num { font-size: 13px; letter-spacing: .2em; color: var(--rose); margin-bottom: 14px !important; }
.panneau h2 { font-size: clamp(36px, 4.6vw, 68px); }

/* Légende de la photo en cours */
.legende { position: fixed; z-index: 6; left: 50%; bottom: clamp(26px, 6vh, 56px); transform: translate(-50%, 16px); max-width: min(560px, calc(100% - 40px)); display: flex; align-items: baseline; gap: 14px; padding: 14px 22px; border-radius: 999px; background: rgba(20, 15, 11, .62); border: 1px solid rgba(245, 239, 230, .18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity .5s var(--doux), transform .6s var(--doux); }
.legende.visible { opacity: 1; transform: translate(-50%, 0); }
.legende__num { font-size: 12px; letter-spacing: .18em; color: var(--rose); white-space: nowrap; }
.legende__texte { flex: 1; min-width: 0; margin: 0; font: italic 500 clamp(19px, 2vw, 25px)/1.2 var(--titre); color: var(--creme); }
.legende.change .legende__texte { animation: change .55s var(--doux); }
@keyframes change { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.legende--haut { top: 92px; bottom: auto; }
.livraison { font-size: 14px; margin-top: 16px; }

/* Bouton fixe en bas à gauche : retour aux aperçus (règle de Loan, 30/10/2026) */
.retour { position: fixed; z-index: 50; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px; background: rgba(245, 239, 230, .94); color: var(--encre); text-decoration: none; font-weight: 500; font-size: 15px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.retour:hover { background: var(--rose); }

/* Appel flottant et curseur */
.appel { position: fixed; z-index: 35; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; padding: 14px 20px 14px 16px; border-radius: 999px; background: var(--creme); color: var(--encre); text-decoration: none; font-weight: 500; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .6); transform: translateY(150%); transition: transform .6s var(--doux); }
.appel.visible { transform: none; }
.appel svg { width: 20px; height: 20px; fill: currentColor; }
.appel::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--rose); animation: onde 2.6s ease-out infinite; }
@keyframes onde { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
.curseur { display: none; }
@media (pointer: fine) {
  .curseur { display: block; position: fixed; z-index: 90; left: 0; top: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; mix-blend-mode: difference; pointer-events: none; transition: width .35s var(--doux), height .35s var(--doux), margin .35s var(--doux); }
  .curseur:not(.pret) { opacity: 0; }
  .curseur.grand { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
}

/* Sans 3D (vieux téléphone) : la visite devient une page simple */
body.sans3d .scene, body.sans3d .chapitres { display: none; }
body.sans3d { background: var(--nuit) url("../photos/devanture.jpg") center top / cover no-repeat fixed; }
body.sans3d .parcours { height: auto; background: rgba(31, 24, 19, .72); padding: 120px 0 60px; }
body.sans3d .calque { position: relative; inset: auto; visibility: visible; padding-top: 50px; padding-bottom: 50px; }
body.sans3d .ligne, body.sans3d .geant .l, body.sans3d .geant-script .l { opacity: 1; transform: none; filter: none; }

@media (max-width: 900px) {
  .livraisons, .etiquettes { grid-template-columns: 1fr; }
  .etiquettes { gap: 40px; }
  .calque--droite { text-align: left; align-items: flex-start; left: 0; }
}
@media (max-width: 560px) {
  .legende { bottom: calc(84px + env(safe-area-inset-bottom)); width: calc(100% - 32px); max-width: none; border-radius: 18px; padding: 12px 16px; gap: 10px; flex-direction: column; }
  .legende__texte { font-size: 20px; }
  .legende--haut { top: 80px; bottom: auto; }
  body { font-size: 16.5px; }
  .bandeau { font-size: 13px; }
  .entete { top: 34px; padding: 12px 16px; }
  .entete__appel { display: none; }
  .marque { font-size: 20px; }
  .marque img { width: 34px; }
  .chapitres { right: 10px; gap: 14px; }
  .chapitres span { display: none; }
  .calque { padding: 80px 34px 80px 18px; }
  .calque::before { background: linear-gradient(0deg, rgba(18, 13, 10, .55), rgba(18, 13, 10, .55)); }
  .calque--bas::before { background: linear-gradient(0deg, rgba(18, 13, 10, .92) 0%, rgba(18, 13, 10, .6) 50%, transparent 80%); }
  .panneau { width: 62%; padding-right: 12px; }
  .panneau.calque--droite { left: auto; right: 0; padding-left: 12px; padding-right: 34px; text-align: right; align-items: flex-end; }
  .panneau::before { background: linear-gradient(90deg, rgba(18, 13, 10, .88) 0%, rgba(18, 13, 10, .55) 60%, transparent 100%); }
  .panneau.calque--droite::before { background: linear-gradient(270deg, rgba(18, 13, 10, .88) 0%, rgba(18, 13, 10, .55) 60%, transparent 100%); }
  .panneau h2 { font-size: 34px; }
  .panneau p { font-size: 16px; }
  .calque p { font-size: 16.5px; }
  .calque--bas { padding-bottom: 92px; }
  .actions .bouton { flex: 1 1 100%; }
  .appel span { display: none; }
  .appel { padding: 15px; }
  .suite { border-radius: 26px 26px 0 0; }
  .etiquette { padding: 44px 24px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; transition-delay: 0s !important; }
}
