@font-face { font-family: Saldo; src: url("assets/Saldo-Light.otf"); font-display: swap; }

:root {
  --argile: #8f8b6a;
  --ivoire: #fffaef;
  --bronze: #9f562f;
  --encre: #2F3124;
  --sable: #e9dfc7;
  --ligne: #e3ddc9;
  --titre: Saldo, "Cormorant Garamond", serif;
  --sur: Raleway, "Avenir Next", Avenir, sans-serif;
  --texte: "Avenir Next", Avenir, Raleway, sans-serif;
  --italique: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--ivoire); color: var(--encre); font-family: var(--texte); font-size: 16px; line-height: 1.5; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }

.sur { font-family: var(--sur); font-weight: 600; letter-spacing: .32em; font-size: 11px; text-transform: uppercase; color: var(--argile); }
.it { font-family: var(--italique); font-style: italic; font-weight: 400; }
h1, h2, .saldo { font-family: var(--titre); font-weight: 300; text-transform: uppercase; letter-spacing: .03em; line-height: 1.02; }

/* ---------- en-tête ---------- */
.top { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; background: var(--encre); }
.top img { height: 58px; margin: -10px 0; width: auto; }
.top a { font-family: var(--sur); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--sable); text-decoration: none; }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 560px; }
.hero .panneau { background: var(--encre); color: var(--ivoire); padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.hero h1 { font-size: clamp(54px, 8vw, 112px); }
.hero h1 span { display: block; overflow: hidden; padding-top: .14em; margin-top: -.1em; }
.hero h1 span i { display: inline-block; font-style: normal; animation: monte .9s cubic-bezier(.2,.8,.2,1) both; }
.hero h1 span:nth-child(2) i { animation-delay: .12s; color: var(--sable); }
.hero .accroche { font-size: clamp(26px, 3vw, 38px); color: var(--sable); line-height: 1.1; animation: fondu 1s .5s both; }
.hero .intro { max-width: 30em; color: var(--sable); font-size: 15px; animation: fondu 1s .7s both; }
.hero .photo { background: url("assets/photo-5.jpg") center 25% / cover; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--sur); font-weight: 600; font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  padding: 18px 30px; background: var(--bronze); color: var(--ivoire); transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); background: #8a4824; }
.btn.clair { background: transparent; color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); }
.hero .btn { align-self: flex-start; animation: fondu 1s .9s both; }

@keyframes monte { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fondu { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- bandeau ---------- */
.bandeau { background: var(--bronze); color: var(--ivoire); overflow: hidden; white-space: nowrap; padding: 14px 0; }
.bandeau div { display: inline-block; animation: defile 28s linear infinite; font-family: var(--sur); font-size: 11px; letter-spacing: .34em; text-transform: uppercase; }
.bandeau b { font-weight: 600; margin: 0 22px; }
@keyframes defile { to { transform: translateX(-50%); } }

/* ---------- formulaire ---------- */
.atelier { max-width: 1180px; margin: 0 auto; padding: 80px 24px; display: grid; grid-template-columns: 1fr 440px; gap: 64px; align-items: start; }
.etape { border-top: 1px solid var(--argile); padding: 26px 0 34px; }
.etape h2 { font-size: 34px; margin: 8px 0 18px; display: flex; gap: 14px; align-items: baseline; }
.etape h2 em { font-style: normal; color: var(--bronze); font-size: 22px; }

.bascule { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--encre); margin-bottom: 26px; }
.bascule button { background: none; border: 0; padding: 16px 10px; cursor: pointer; font-family: var(--sur); font-weight: 600; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; }
.bascule button[aria-pressed="true"] { background: var(--encre); color: var(--ivoire); }

.montant { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--encre); padding-bottom: 6px; max-width: 360px; }
.montant input { font-family: var(--titre); font-size: 72px; width: 100%; border: 0; background: none; outline: none; line-height: 1; -moz-appearance: textfield; }
.montant input::-webkit-outer-spin-button, .montant input::-webkit-inner-spin-button { -webkit-appearance: none; }
.montant span { font-family: var(--titre); font-size: 48px; color: var(--bronze); }
.aide { font-size: 13px; color: var(--argile); margin-top: 10px; }
.aide.erreur { color: var(--bronze); }

.groupe { margin-bottom: 22px; }
.groupe > .sur { display: block; margin-bottom: 8px; }
.presta { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--ligne); margin-top: -1px; cursor: pointer; transition: background .2s; }
.presta:hover { background: #f6efdd; }
.presta input { position: absolute; opacity: 0; pointer-events: none; }
.presta .nom { font-family: var(--sur); font-weight: 600; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.presta .sous { grid-column: 1; font-family: var(--italique); font-style: italic; font-size: 17px; color: var(--argile); line-height: 1.2; }
.presta .prix small { font-family: var(--sur); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; vertical-align: middle; }
.presta .prix { grid-row: 1 / 3; grid-column: 2; font-family: var(--titre); font-size: 28px; color: var(--bronze); }
.presta:has(input:checked) { background: var(--encre); color: var(--ivoire); border-color: var(--encre); position: relative; }
.presta:has(input:checked) .sous { color: var(--sable); }
.presta:has(input:checked) .prix { color: var(--sable); }
.presta:has(input:focus-visible) { outline: 2px solid var(--bronze); outline-offset: 2px; }

.champ { display: block; margin-bottom: 20px; }
.champ .sur { display: block; margin-bottom: 6px; }
.champ input, .champ textarea { width: 100%; border: 0; border-bottom: 1px solid var(--encre); background: none; padding: 8px 0; font-size: 18px; outline: none; border-radius: 0; }
.champ textarea { resize: vertical; min-height: 84px; font-family: var(--italique); font-style: italic; font-size: 20px; }
.champ input:focus, .champ textarea:focus { border-bottom-color: var(--bronze); }
.compte { float: right; font-size: 12px; color: var(--argile); }

/* ---------- aperçu ---------- */
.apercu { position: sticky; top: 24px; }
.apercu > .sur { display: block; margin-bottom: 12px; text-align: center; }
.payer { margin-top: 22px; width: 100%; font-size: 13px; padding: 22px; }
.payer[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.securite { text-align: center; font-size: 12px; color: var(--argile); margin-top: 10px; }

/* ---------- la carte ---------- */
.carte { position: relative; aspect-ratio: 105 / 148; background: var(--encre); color: var(--ivoire); padding: 9% 9% 8%; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(47,49,36,.55); }
.carte::before { content: ""; position: absolute; inset: 4.5%; border: 1px solid rgba(233,223,199,.35); pointer-events: none; }
.carte .logo { width: 46%; margin: 0 auto; }
.carte .titre { text-align: center; margin-top: 7%; font-family: var(--sur); font-weight: 600; font-size: clamp(9px, 2.3cqw, 11px); letter-spacing: .4em; color: var(--sable); text-transform: uppercase; }
.carte .pour { text-align: center; margin-top: 9%; font-family: var(--italique); font-style: italic; font-size: 1.35em; color: var(--sable); }
.carte .prenom { text-align: center; font-family: var(--titre); text-transform: uppercase; font-size: 2.6em; line-height: 1; margin-top: 2%; word-break: break-word; }
.carte .valeur { margin: auto 0; text-align: center; }
.carte .valeur .grand { font-family: var(--titre); font-size: 3.4em; line-height: 1; color: var(--ivoire); text-transform: uppercase; }
.carte .valeur .grand.long { font-size: 2.1em; }
.carte .valeur .petit { font-family: var(--italique); font-style: italic; color: var(--sable); font-size: 1.15em; margin-top: 6px; }
.carte .mot { text-align: center; font-family: var(--italique); font-style: italic; font-size: 1.05em; line-height: 1.3; color: var(--ivoire); min-height: 1.3em; }
.carte .de { text-align: center; margin-top: 5%; font-family: var(--sur); font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--sable); }
.carte .pied { display: flex; justify-content: space-between; margin-top: 7%; padding-top: 4%; border-top: 1px solid rgba(233,223,199,.35); font-family: var(--sur); font-size: 8.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--sable); }
.carte .pied b { color: var(--ivoire); font-weight: 600; }
.carte-cadre { container-type: inline-size; font-size: 15px; }

/* ---------- comment ça marche ---------- */
.marche { background: var(--sable); padding: 80px 24px; }
.marche .in { max-width: 1180px; margin: 0 auto; }
.marche h2 { font-size: clamp(40px, 6vw, 72px); margin: 10px 0 40px; }
.marche ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.marche li { border-top: 1px solid var(--encre); padding-top: 18px; }
.marche li .n { font-family: var(--titre); font-size: 44px; color: var(--bronze); line-height: 1; }
.marche li h3 { font-family: var(--sur); font-weight: 600; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; margin: 12px 0 8px; }

.cheeky { display: grid; grid-template-columns: 1fr 1fr; }
.cheeky .photo { background: url("assets/photo-6.jpg") center 20% / cover; min-height: 560px; }
.cheeky .txt { background: var(--bronze); color: var(--ivoire); padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.cheeky .txt p.saldo { font-size: clamp(30px, 4vw, 50px); }
.cheeky .txt p.it { font-size: 28px; color: var(--sable); line-height: 1.15; }

footer { background: var(--encre); color: var(--sable); padding: 48px 24px; text-align: center; }
footer img { height: 40px; width: auto; margin: 0 auto 18px; }
footer p { font-family: var(--sur); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; line-height: 2.2; }
footer a { color: var(--ivoire); }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .hero, .cheeky { grid-template-columns: 1fr; }
  .hero .panneau, .cheeky .txt { padding: 44px 16px; }
  .hero .photo { min-height: 340px; order: 2; }
  .atelier { grid-template-columns: 1fr; padding: 48px 16px; gap: 24px; }
  .apercu { position: static; max-width: 420px; width: 100%; margin: 0 auto; }
  .marche { padding: 56px 16px; }
  .marche ol { grid-template-columns: 1fr; gap: 22px; }
  .top { padding: 14px 16px; }
  .montant input { font-size: 60px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- impression / PDF de la carte ---------- */
@media print {
  @page { size: 105mm 148mm; margin: 0; }
  body { background: var(--encre); }
  body > *:not(.impression) { display: none !important; }
  .impression { display: block !important; }
  .impression .carte { width: 105mm; height: 148mm; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .impression .carte-cadre { font-size: 15px; }
}

/* ---------- carte recto / verso ---------- */
.flip { perspective: 1400px; cursor: pointer; }
.flip-in { position: relative; aspect-ratio: 2236 / 1588; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3,.7,.2,1); }
.flip.retournee .flip-in { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 30px 60px -28px rgba(47,49,36,.55); }
.face.verso { transform: rotateY(180deg); }
.face.verso > img { width: 100%; height: 100%; }
.champ-carte { position: absolute; transform: translateY(-80%); white-space: nowrap; overflow: hidden; font-family: var(--titre); color: var(--encre); line-height: 1; }
.champ-carte.sur-carte { font-family: var(--sur); font-weight: 600; letter-spacing: .12em; }
.retourner { display: block; margin: 12px auto 0; background: none; border: 0; cursor: pointer; font-family: var(--sur); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--argile); text-decoration: underline; text-underline-offset: 4px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 1180px; margin: 0 auto; }
.duo figure { margin: 0; }
.duo img { width: 100%; box-shadow: 0 30px 60px -28px rgba(0,0,0,.6); }
.duo figcaption { margin-top: 12px; font-family: var(--sur); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--sable); }
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; } }

.cartes-bloc { background: var(--encre); color: var(--ivoire); padding: 80px 24px; }
.cartes-bloc .in { max-width: 1180px; margin: 0 auto; }
.cartes-bloc h2 { font-size: clamp(40px, 6vw, 72px); margin: 10px 0 40px; }
.cartes-bloc .bronze { color: #c08a5f; }
.cartes-bloc a { text-decoration: none; }
.cartes-bloc a img { transition: transform .4s; }
.cartes-bloc a:hover img { transform: translateY(-6px) rotate(-1deg); }
@media (max-width: 900px) { .cartes-bloc { padding: 56px 16px; } }

.galerie { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; padding: 80px 24px; max-width: 1280px; margin: 0 auto; align-items: end; }
.galerie figure { margin: 0; overflow: hidden; }
.galerie img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.galerie figure:hover img { transform: scale(1.04); }
.galerie .milieu img { aspect-ratio: 3 / 4; }
.galerie .milieu p { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; color: var(--bronze); text-align: center; margin-bottom: 22px; }
@media (max-width: 900px) {
  .galerie { grid-template-columns: 1fr 1fr; padding: 56px 16px; gap: 10px; }
  .galerie .milieu { grid-column: 1 / -1; order: -1; }
  .cheeky .photo { min-height: 420px; }
}
