/* ==========================================================================
   Style de la page — palette "minuit" (bleu nuit + cartes claires)
   Pour changer les couleurs, modifie les variables ci-dessous.
   ========================================================================== */
:root {
  --bg-1: #2a55a8;
  --bg-2: #1b3478;
  --bg-3: #13265e;
  --card: #f8fafc;
  --card-border: rgba(255,255,255,.7);
  --ink: #060912;
  --ink-soft: #52525b;
  --muted: #71717a;
  --accent: #d946ef;
  --heart: #ef4444;
  --radius: 26px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-title: "Fraunces", Georgia, "Times New Roman", serif;
  --font-hand: "Caveat", "Bradley Hand", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(1200px 700px at 15% 0%, var(--bg-1) 0%, transparent 60%),
              linear-gradient(160deg, var(--bg-2) 0%, var(--bg-3) 55%, var(--bg-2) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

/* Motif de petits cœurs en fond */
.bg-pattern {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 33.5s-6-3.8-6-7.6a3.2 3.2 0 0 1 6-1.6 3.2 3.2 0 0 1 6 1.6c0 3.8-6 7.6-6 7.6z' fill='none' stroke='%2393c5fd' stroke-width='1.1'/%3E%3C/svg%3E");
  background-size: 56px 56px;
}

/* Cœurs qui tombent */
.hearts { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.heart-fall {
  position: absolute; top: -40px; color: var(--heart);
  animation: fall linear forwards; will-change: transform;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
}
@keyframes fall {
  0%   { transform: translate3d(0,0,0) rotate(0deg); opacity: 0; }
  10%  { opacity: var(--o, .8); }
  100% { transform: translate3d(var(--dx, 30px), 110vh, 0) rotate(var(--r, 40deg)); opacity: 0; }
}

main { position: relative; z-index: 1; padding: 0 16px 80px; }

/* ---------- En-têtes de section (sur fond bleu) ---------- */
.hero { text-align: center; color: #f8fafc; padding: 72px 12px 90px; max-width: 900px; margin: 0 auto; }
.hero h1, .hero h2 {
  font-family: var(--font-title); font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1.05; margin: 0;
  text-shadow: 0 2px 20px rgba(0,0,0,.18);
}
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 26px 0 18px; opacity: .85; }
.divider::before, .divider::after { content: ""; width: 52px; height: 1px; background: currentColor; opacity: .5; }
.divider span { font-size: 12px; }
.hero p {
  font-family: var(--font-hand); font-size: clamp(1.35rem, 2.6vw, 1.6rem);
  line-height: 1.6; margin: 0 auto; max-width: 520px; opacity: .92;
}

/* ---------- Cartes ---------- */
.card {
  position: relative; max-width: 896px; margin: 0 auto 48px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 44px 28px;
  box-shadow: 0 30px 60px -20px rgba(2,6,23,.45), inset 0 1px 0 #fff;
  text-align: center;
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.card.visible, .hero.visible { opacity: 1; transform: none; }
.hero { opacity: 0; transform: translateY(16px); transition: opacity 1s ease, transform 1s ease; }
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(600px 200px at 50% 0%, rgba(255,255,255,.9), transparent 70%);
}
.card > * { position: relative; }
.card h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.35rem); font-weight: 800; letter-spacing: -.02em;
  line-height: 1.15; margin: 0 auto 10px; max-width: 700px;
  background: linear-gradient(120deg, #02050e 0%, #030712 60%, #4f5159 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.card h2 .emoji { color: initial; -webkit-text-fill-color: initial; }
.card .sub { color: var(--ink-soft); margin: 0 0 6px; font-size: 1rem; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 14px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: #18181b;
  background: linear-gradient(#ececef, #d9d9de); border: 1px solid #b9b9c0;
  box-shadow: inset 0 1px 0 #fff;
}
.mini-divider { color: #a1a1aa; margin: 14px 0 26px; font-size: 12px; display: flex; justify-content: center; gap: 10px; align-items: center; }
.mini-divider::before, .mini-divider::after { content: ""; width: 34px; height: 1px; background: #c4c4cc; }

.btn-dark {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 0; border-radius: 999px; padding: 14px 26px; margin-top: 18px;
  background: #050608; color: #fff; font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.55);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(0,0,0,.6); }
.btn-dark:active { transform: scale(.96); }

/* ---------- Explosion de fleurs ---------- */
.fx-layer {
  position: fixed; inset: 0; z-index: 2000; pointer-events: none;
  overflow: hidden; contain: strict;
}
.flower {
  position: absolute; left: 0; top: 0; line-height: 1; pointer-events: none;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
  will-change: transform, opacity; user-select: none;
}
.btn-dark.pop { animation: btnpop .35s ease; }
@keyframes btnpop { 40% { transform: scale(.92); } 70% { transform: scale(1.06); } }

/* ---------- Compteur ---------- */
.counter-grid { display: grid; gap: 14px; margin-top: 26px; }
.counter-row { display: grid; gap: 14px; }
.tile {
  background: linear-gradient(#fff, #ededf0); border: 1px solid #c9c9cf;
  border-bottom: 4px solid #0a0a0a; border-radius: 18px; padding: 22px 8px 16px;
  box-shadow: 0 12px 22px -12px rgba(0,0,0,.35), inset 0 1px 0 #fff;
}
.tile .num { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .lbl { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-top: 10px; font-weight: 600; }
.counter-row.small .tile { padding: 14px 6px 12px; }
.counter-row.small .num { font-size: clamp(1.25rem, 3.6vw, 1.6rem); }

/* ---------- Enveloppe ---------- */
/* ---------- Enveloppe (papier, rabat 3D, cachet de cire) ---------- */
.envelope-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: clamp(56px, 14vw, 96px); }
.envelope {
  --paper: #f3ece0; --paper-2: #e6dccb; --lining: #1b3478;
  position: relative; width: min(330px, 80vw); aspect-ratio: 16 / 10; cursor: pointer;
  border: 0; padding: 0; background: none; perspective: 1800px;
  animation: float 4.5s ease-in-out infinite; -webkit-tap-highlight-color: transparent;
}
.envelope:focus-visible { outline: 3px solid #93c5fd; outline-offset: 8px; border-radius: 10px; }
@keyframes float { 50% { translate: 0 -6px; } }
.envelope > span { position: absolute; }
.envelope > span:not(.seal):not(.stamp) { inset: 0; border-radius: 8px; }
.env-shadow { width: min(280px, 68vw); height: 14px; margin-top: -6px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(15,23,42,.35), transparent); animation: shadow 4.5s ease-in-out infinite; }
@keyframes shadow { 50% { transform: scaleX(.88); opacity: .7; } }
/* intérieur (doublure bleu nuit à motif) */
.env-back { z-index: 1; background:
  radial-gradient(circle at 20% 30%, rgba(255,255,255,.14) 1.5px, transparent 2px) 0 0 / 14px 14px,
  linear-gradient(160deg, #24438f, var(--lining)); box-shadow: 0 16px 30px -12px rgba(2,6,23,.55); }
/* la lettre qui dépasse */
.env-letter { z-index: 2; inset: 8% 7% 6% 7% !important; border-radius: 4px !important;
  background: 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%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .3  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(#fffdf8, #f7f1e6); box-shadow: 0 2px 6px rgba(0,0,0,.15);
  transition: transform .6s cubic-bezier(.3,.7,.3,1); display: flex; flex-direction: column; gap: 9px; padding: 20% 14% 0; }
.env-letter i { display: block; height: 3px; border-radius: 3px; background: #d6cbb8; }
.env-letter i:nth-child(2) { width: 80%; } .env-letter i:nth-child(3) { width: 60%; }
/* poche avant : 3 triangles en papier */
.env-front { z-index: 3; overflow: hidden;
  background: 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%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .3  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(to top right, var(--paper) 49.6%, transparent 50%) left bottom / 51% 100% no-repeat,
    linear-gradient(to top left, var(--paper) 49.6%, transparent 50%) right bottom / 51% 100% no-repeat;
  filter: drop-shadow(0 -1px 0 rgba(0,0,0,.06)); }
.env-front::before { content: ""; position: absolute; inset: 0; border-radius: 8px;
  background: 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%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .3  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(to bottom, var(--paper-2), var(--paper));
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%); }
.env-front::after { content: ""; position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(to top, rgba(0,0,0,.07), transparent 40%),
              linear-gradient(115deg, transparent 49.4%, rgba(0,0,0,.08) 50%, transparent 51%),
              linear-gradient(-115deg, transparent 49.4%, rgba(0,0,0,.08) 50%, transparent 51%);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%); }
/* rabat (s'ouvre en 3D) */
.env-flap { z-index: 4; height: 60%; bottom: auto !important; transform-origin: 50% 0;
  background: 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%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .3  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(to bottom, #efe6d6, #ddd0bb);
  clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 8px 8px 0 0 !important;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.18));
  transition: transform .6s cubic-bezier(.4,.1,.3,1), z-index 0s .3s; }
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 1; filter: brightness(.92); }
.envelope.out .env-letter { transform: translateY(-46%); }
/* cachet de cire */
.envelope .seal {
  z-index: 5; left: 50%; top: 60%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 47% 53% 50% 50% / 52% 46% 54% 48%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 30%, #e0475f 0%, #a3162f 45%, #6d0d1e 100%);
  box-shadow: 0 3px 6px rgba(60,0,10,.45), inset 0 -3px 6px rgba(0,0,0,.35), inset 0 3px 5px rgba(255,255,255,.25);
  transition: transform .45s cubic-bezier(.5,-.4,.5,1.4), opacity .4s;
}
.envelope .seal::before { content: ""; position: absolute; inset: 7px; border-radius: 50%;
  border: 2px solid rgba(70,0,12,.45); box-shadow: inset 0 1px 1px rgba(255,255,255,.25), 0 1px 0 rgba(255,255,255,.2); }
.envelope .seal span { position: relative; font-family: var(--font-title); font-weight: 600; font-size: 22px; color: #7a0f22;
  text-shadow: 0 1px 0 rgba(255,255,255,.35), 0 -1px 0 rgba(0,0,0,.4); }
.envelope.open .seal { transform: translateY(18px) scale(.6) rotate(-25deg); opacity: 0; }
.envelope .stamp {
  z-index: 5; right: 12px; top: 12px; width: 34px; height: 40px; padding: 3px;
  background: radial-gradient(circle, transparent 2px, #fffdf8 2.5px) -3px -3px / 6px 6px; border-radius: 2px;
  transform: rotate(5deg); transition: opacity .3s; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}
.envelope .stamp span { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(160deg, #24438f, #13265e); color: #f43f6e; font-size: 14px; }
.envelope.open .stamp { opacity: 0; }
.envelope:hover .seal { transform: scale(1.06); }
.envelope.open:hover .seal { transform: translateY(18px) scale(.6) rotate(-25deg); }

.pill-hint {
  display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; color: #3f3f46;
  padding: 6px 14px; border-radius: 999px; background: linear-gradient(#ececef, #dcdce0); border: 1px solid #c4c4ca; cursor: pointer;
}

/* ---------- Fenêtre lettre ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8,12,30,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .3s ease; }
.letter-paper {
  position: relative; width: min(640px, 100%); max-height: 88vh; overflow-y: auto;
  background: #fffdf8; border-radius: 22px; padding: 44px clamp(22px, 5vw, 46px) 40px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.6); border-top: 8px solid #050608;
  animation: pop .45s cubic-bezier(.2,.9,.3,1.2);
  overscroll-behavior: contain;
}
@keyframes pop { from { transform: translateY(40px) scale(.94); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.modal-close {
  position: sticky; top: 0; float: right; margin: -26px -20px 0 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid #d4d4d8; background: #fff; cursor: pointer; font-size: 14px;
}
.letter-date { text-align: right; color: #71717a; font-size: .9rem; margin: 0 0 18px; padding-right: 30px; }
.letter-greeting { font-weight: 400; font-size: 1.9rem; margin: 0 0 14px; }
.letter-body { white-space: pre-wrap; overflow-wrap: break-word; font-size: 1.12rem; line-height: 1.85; color: #1c1917; }
.letter-signature { text-align: right; margin: 28px 0 0; font-size: 1.6rem; }
.letter-paper.hand .letter-greeting,
.letter-paper.hand .letter-signature { font-family: var(--font-hand); font-size: 2.2rem; }
.letter-paper.hand .letter-body { font-family: var(--font-hand); font-size: 1.55rem; line-height: 1.55; }
.letter-paper.serif { font-family: Georgia, "Times New Roman", serif; }

/* ---------- Carrousel ---------- */
.carousel { position: relative; width: min(330px, 100%); margin: 22px auto 0; }
.carousel-frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: 22px; padding: 8px; background: #fff;
  box-shadow: 0 20px 40px -14px rgba(0,0,0,.4); border: 1px solid #e4e4e7; overflow: hidden;
  touch-action: pan-y;
}
.slides { position: relative; width: 100%; height: 100%; border-radius: 16px; overflow: hidden; background: #111; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease, transform .6s ease; transform: scale(1.04); }
.slide.active { opacity: 1; transform: none; }
.slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.slide .note { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(255,255,255,.9); border-radius: 12px; padding: 6px 10px; font-size: .9rem; }
.slide-count { position: absolute; top: 18px; right: 18px; z-index: 2; background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 800; }
.nav-btn {
  position: absolute; top: 50%; z-index: 2; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.95); cursor: pointer; font-size: 16px; font-weight: 800;
  box-shadow: 0 4px 10px rgba(0,0,0,.25); display: grid; place-items: center;
}
.nav-btn.prev { left: 16px; } .nav-btn.next { right: 16px; }
.thumbs { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.thumb { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; border: 2px solid #d4d4d8; padding: 0; cursor: pointer; opacity: .65; transition: .2s; background: none; }
.thumb.active { border-color: #050608; opacity: 1; transform: translateY(-2px); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.hint { margin-top: 14px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #8a8a93; font-weight: 700; }

/* ---------- Image à gratter ---------- */
.scratch { position: relative; width: min(536px, 100%); margin: 0 auto; padding: 8px; background: #fff; border-radius: 26px; box-shadow: 0 24px 40px -18px rgba(0,0,0,.45); }
.scratch-inner { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 5 / 2; }
.scratch-inner img { width: 100%; height: 100%; object-fit: cover; }
.scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .8s ease; }
.scratch canvas.done { opacity: 0; pointer-events: none; }
.scratch-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); pointer-events: none;
  background: #fff; border-radius: 12px; padding: 8px 20px 10px; box-shadow: 0 6px 16px rgba(0,0,0,.2); transition: opacity .4s;
}
.scratch-label b { display: block; font-family: var(--font-hand); font-size: 1.6rem; font-weight: 600; }
.scratch-label small { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: #52525b; font-weight: 700; }

/* ---------- Raisons ---------- */
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 14px; text-align: left; margin-top: 10px; }
.reason {
  position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 20px 18px 18px;
  background: linear-gradient(#fafafa, #e9e9ec); border: 1px solid #c9c9cf; border-radius: 16px;
  box-shadow: 0 10px 18px -12px rgba(0,0,0,.35); transition: transform .25s ease;
}
.reason:nth-child(odd) { transform: rotate(-.4deg); } .reason:nth-child(even) { transform: rotate(.4deg); }
.reason:hover { transform: translateY(-3px) rotate(0); }
.reason::before { /* morceau de scotch */
  content: ""; position: absolute; top: -9px; left: 50%; width: 64px; height: 16px; margin-left: -32px;
  background: repeating-linear-gradient(-45deg, #8d8d94 0 5px, #b8b8be 5px 10px); border-radius: 3px; opacity: .9;
}
.reason .ico { flex: 0 0 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: #fff; border: 1px solid #d4d4d8; box-shadow: 0 3px 6px rgba(0,0,0,.12); }
.reason p { margin: 0; font-weight: 600; font-size: .95rem; line-height: 1.6; padding-top: 6px; }
.reason em { display: block; font-weight: 400; font-size: .82rem; color: #52525b; margin-top: 2px; }

/* ---------- Playlist ---------- */
.eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; margin: 14px 0 22px; }
.eq i { width: 3px; background: #52525b; border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s } .eq i:nth-child(3) { animation-delay: .4s } .eq i:nth-child(4) { animation-delay: .1s } .eq i:nth-child(5) { animation-delay: .3s }
@keyframes eq { 0%,100% { height: 5px } 50% { height: 17px } }
.songs { display: grid; gap: 10px; max-width: 616px; margin: 0 auto; text-align: left; }
.song {
  background: linear-gradient(#fafafa, #ececef); border: 1px solid #c9c9cf; border-radius: 14px;
  box-shadow: 0 8px 16px -12px rgba(0,0,0,.35); overflow: hidden;
}
.song-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 20px; }
.song .idx { font-size: 12px; font-weight: 700; color: #71717a; width: 18px; }
.vinyl {
  flex: 0 0 52px; height: 52px; border-radius: 50%; background: repeating-radial-gradient(#111 0 2px, #1d1d1d 2px 4px);
  display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0,0,0,.35);
}
.vinyl img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.song.playing .vinyl { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.song .meta { flex: 1; min-width: 0; }
.song .t { font-weight: 700; font-size: 1.05rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.song .tag { font-size: 9px; letter-spacing: .1em; color: #059669; background: #d1fae5; border-radius: 999px; padding: 2px 7px; font-weight: 800; text-transform: uppercase; }
.song .a { font-size: .85rem; color: #52525b; }
.song .n { font-size: .83rem; font-style: italic; color: #3f3f46; margin-top: 4px; }
.play { flex: 0 0 38px; height: 38px; border-radius: 50%; border: 0; background: #050608; color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0,0,0,.35); transition: transform .2s; }
.play:hover { transform: scale(1.08); }
.player { padding: 0 14px 14px; }
.player iframe { width: 100%; height: 152px; border: 0; border-radius: 12px; display: block; }
.player .offline { font-size: .85rem; color: #52525b; padding: 4px 6px; }
.player a { color: #059669; font-weight: 700; }

footer { position: relative; z-index: 1; text-align: center; color: rgba(248,250,252,.8); font-family: var(--font-hand); font-size: 1.5rem; padding: 0 0 40px; }
.noscript { color: #fff; text-align: center; padding: 80px 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  main { padding: 0 12px 60px; }
  .hero { padding: 56px 6px 64px; }
  .card { padding: 34px 16px; margin-bottom: 34px; border-radius: 22px; }
  .reasons { grid-template-columns: 1fr; }
  .song-row { padding: 12px; gap: 10px; }
  .song .idx { display: none; }
  .vinyl { flex-basis: 44px; height: 44px; }
  .counter-row.small { gap: 8px; }
  .tile .lbl { letter-spacing: .1em; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
html { background: #13265e; }
@media (max-width: 640px) {
  .letter-paper.hand .letter-body { font-size: 1.35rem; }
  .letter-paper.hand .letter-greeting, .letter-paper.hand .letter-signature { font-size: 1.9rem; }
}

/* ==========================================================================
   v2 : mots cachés, finitions, appli installable
   ========================================================================== */
html { -webkit-tap-highlight-color: transparent; }
body.modal-open { overflow: hidden; }
:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
.btn-dark, .play, .nav-btn, .thumb, .pill-hint, .modal-close { transition: transform .18s ease, box-shadow .2s ease, background .2s; }
.play:active, .nav-btn:active, .thumb:active, .pill-hint:active, .modal-close:active { transform: scale(.9); }
.pill-hint:hover { background: linear-gradient(#f4f4f6, #e4e4e8); }
.letter-paper { background: 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%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .3  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(#fffdf8, #fbf6ec); }
.card + .hero { padding-top: 40px; }

/* apparition en cascade des éléments de listes */
.stagger { opacity: 0; translate: 0 14px; transition: opacity .6s ease var(--d, 0ms), translate .6s ease var(--d, 0ms); }
.visible .stagger { opacity: 1; translate: none; }

/* cœurs-mots : un peu plus lumineux, ils "battent" doucement */
.heart-fall.secret { color: #ff5d8f; }
.heart-fall.secret svg { animation: secretPulse 1.6s ease-in-out infinite; filter: drop-shadow(0 0 4px rgba(255,170,200,.9)) drop-shadow(0 0 10px rgba(255,93,143,.55)); }
.heart-fall.secret.live { pointer-events: auto; cursor: pointer; }
.heart-fall.secret::after { content: ""; position: absolute; inset: -12px; }  /* zone de toucher plus grande */
@keyframes secretPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.heart-pop { position: fixed; z-index: 140; pointer-events: none; color: #ff5d8f; transform: translate(-50%, -50%); }
.heart-pop > svg { animation: popBig .5s ease-out forwards; }
.heart-pop i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; color: #ffb3c9; animation: popMini .8s ease-out forwards; }
@keyframes popBig { to { transform: scale(2.1); opacity: 0; } }
@keyframes popMini { from { transform: translate(0,0) scale(.4); opacity: 1; } to { transform: translate(var(--mx), var(--my)) scale(1); opacity: 0; } }

/* le petit mot révélé */
.note-pop {
  position: fixed; z-index: 150; left: 50%; top: 42%; width: min(340px, 86vw);
  transform: translate(-50%, -50%) scale(.88); opacity: 0;
  background: 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%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .3  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(#fffdf8, #fbf3ec); color: #1c1917; text-align: center;
  border-radius: 22px; padding: 26px 24px 18px; cursor: pointer;
  box-shadow: 0 30px 60px -18px rgba(2,6,23,.65), 0 0 0 1px rgba(255,255,255,.6), 0 0 40px rgba(255,93,143,.25);
  transition: opacity .45s ease, transform .5s cubic-bezier(.2,.9,.3,1.25);
}
.note-pop.in { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.note-pop.out { opacity: 0; transform: translate(-50%, -58%) scale(.96); transition: opacity .4s ease, transform .45s ease; }
.note-pop .note-heart { display: block; width: 30px; height: 30px; margin: -46px auto 10px; color: #ff5d8f;
  filter: drop-shadow(0 0 8px rgba(255,93,143,.7)); animation: secretPulse 1.4s ease-in-out infinite; }
.note-pop p { margin: 0; font-family: var(--font-hand); font-size: 1.85rem; line-height: 1.25; font-weight: 600; }
.note-pop small { display: block; margin-top: 12px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #9f8f80; font-weight: 700; }

/* conseil "Ajouter à l'écran d'accueil" */
.install-hint {
  position: fixed; z-index: 90; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  width: max-content; max-width: min(420px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 18px;
  background: rgba(255,255,255,.94); color: #18181b; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 36px -12px rgba(2,6,23,.6); font-size: .9rem; line-height: 1.45;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .5s cubic-bezier(.2,.9,.3,1.1), opacity .4s;
}
.install-hint.in { transform: translate(-50%, 0); opacity: 1; }
.install-hint p { margin: 0; }
.ih-main { border: 0; background: #050608; color: #fff; font-weight: 700; border-radius: 999px; padding: 9px 16px; cursor: pointer; font-size: .9rem; }
.ih-close { flex: 0 0 30px; height: 30px; border-radius: 50%; border: 0; background: #ececef; cursor: pointer; font-size: 12px; color: #52525b; }
.ios-share { display: inline-block; width: 14px; height: 17px; vertical-align: -3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 18' fill='none' stroke='%23007aff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 1v10M3.5 4.5 7 1l3.5 3.5M4.5 7.5H2v9h10v-9H9.5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* sécurité : zone du haut sur iPhone en mode appli */
@supports (padding: env(safe-area-inset-top)) { .hero:first-child { padding-top: calc(56px + env(safe-area-inset-top)); } }

@media (prefers-reduced-motion: reduce) {
  .card, .hero, .stagger { opacity: 1 !important; transform: none !important; translate: none !important; }
  .heart-fall.secret svg, .note-pop .note-heart { animation: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .heart-fall.secret { animation-duration: 16s !important; }
}

/* ==========================================================================
   v3 : écran du code secret
   ========================================================================== */
body.locked { overflow: hidden; }
body.locked main, body.locked footer { visibility: hidden; }
.lock {
  position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; overflow-y: auto;
  padding: calc(20px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
  background: radial-gradient(900px 600px at 20% 0%, var(--bg-1) 0%, transparent 60%),
              linear-gradient(160deg, var(--bg-2) 0%, var(--bg-3) 55%, var(--bg-2) 100%);
  color: #f8fafc; transition: opacity .85s ease, transform .85s ease, filter .85s ease;
}
.lock::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 33.5s-6-3.8-6-7.6a3.2 3.2 0 0 1 6-1.6 3.2 3.2 0 0 1 6 1.6c0 3.8-6 7.6-6 7.6z' fill='none' stroke='%2393c5fd' stroke-width='1.1'/%3E%3C/svg%3E");
  background-size: 56px 56px; }
.lock.leaving { opacity: 0; transform: scale(1.06); filter: blur(4px); pointer-events: none; }
.lock-inner { position: relative; width: min(360px, 100%); text-align: center; animation: lockIn .9s cubic-bezier(.2,.8,.3,1) both; transition: opacity .5s ease, transform .6s ease; }
@keyframes lockIn { from { opacity: 0; transform: translateY(18px); } }
.lock.success .lock-inner { opacity: 0; transform: scale(.94); transition-delay: .25s; }
.lock-emblem { position: relative; width: 62px; height: 62px; margin: 0 auto 14px; color: #ff5d8f;
  filter: drop-shadow(0 0 14px rgba(255,93,143,.55)); animation: secretPulse 2.2s ease-in-out infinite; }
.lock-emblem svg { width: 100%; height: 100%; }
.keyhole { position: absolute; left: 50%; top: 40%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #13265e; }
.keyhole::after { content: ""; position: absolute; left: 2px; top: 6px; width: 5px; height: 10px; background: #13265e; clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
.lock-title { font-family: var(--font-title); font-weight: 500; font-size: clamp(2rem, 8.4vw, 2.6rem); line-height: 1.08; letter-spacing: -.02em; margin: 0; text-shadow: 0 2px 18px rgba(0,0,0,.2); }
.lock-divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 8px; opacity: .8; font-size: 11px; }
.lock-divider::before, .lock-divider::after { content: ""; width: 40px; height: 1px; background: currentColor; opacity: .5; }
.lock-sub { font-family: var(--font-hand); font-size: 1.45rem; margin: 0 0 22px; opacity: .92; }
.slots { display: flex; justify-content: center; gap: clamp(6px, 2.4vw, 10px); cursor: text; }
.slot { position: relative; width: clamp(40px, 12vw, 48px); height: clamp(52px, 15vw, 60px); border-radius: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 18px -10px rgba(0,0,0,.5);
  display: grid; place-items: center; transition: background .2s, border-color .2s, transform .2s, box-shadow .3s; }
.slot b { font-family: var(--font-title); font-weight: 500; font-size: 1.75rem; line-height: 1; }
.slot.filled { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.45); }
.slot.filled b { animation: digitIn .25s ease; }
@keyframes digitIn { from { transform: translateY(6px) scale(.7); opacity: 0; } }
.slot.current::after { content: ""; position: absolute; bottom: 10px; left: 50%; width: 16px; height: 2px; margin-left: -8px; border-radius: 2px; background: #ff9cbc; animation: caret 1.1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.lock.success .slot { border-color: #ff9cbc; background: rgba(255,93,143,.22); box-shadow: 0 0 18px rgba(255,93,143,.55); }
.slots.shake { animation: shake .5s cubic-bezier(.36,.07,.19,.97); }
.slots.shake .slot { border-color: rgba(255,156,188,.75); }
@keyframes shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(5px); } 45%, 55% { transform: translateX(-7px); } 50% { transform: translateX(7px); } }
.lock-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: 50%; top: 40%; font-size: 16px; border: 0; padding: 0; }
.lock-msg, .lock-hint { min-height: 0; margin: 0; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .4s ease, max-height .4s ease, margin .4s ease; }
.lock-msg { font-size: .95rem; color: #ffd1de; }
.lock-msg.show { opacity: 1; max-height: 40px; margin-top: 14px; }
.lock-hint { font-family: var(--font-hand); font-size: 1.4rem; line-height: 1.3; color: #fff; }
.lock-hint.show { opacity: 1; max-height: 120px; margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px dashed rgba(255,255,255,.28); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px auto 0; max-width: 300px; }
.key {
  height: 62px; border-radius: 20px; border: 1px solid rgba(255,255,255,.16); cursor: pointer;
  background: linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.05)); color: #f8fafc;
  font-family: var(--font-title); font-size: 1.6rem; font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 20px -14px rgba(0,0,0,.7);
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
  transition: transform .12s ease, background .2s, box-shadow .2s;
}
.key:hover { background: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.08)); }
.key:active { transform: scale(.92); background: rgba(255,93,143,.28); box-shadow: 0 0 18px rgba(255,93,143,.45); }
.key-hint, .key-del { background: transparent; border-color: transparent; box-shadow: none; font-family: var(--font-body); }
.key-hint { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 1.1rem; }
.key-hint small { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; opacity: .85; }
.key-hint.pulse { animation: hintPulse 1.6s ease-in-out infinite; }
@keyframes hintPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,93,143,0); } 50% { box-shadow: 0 0 0 6px rgba(255,93,143,.25), 0 0 22px rgba(255,93,143,.45); background: rgba(255,93,143,.12); } }
.key-del svg { width: 30px; height: 30px; }
@media (max-height: 700px) { .key { height: 52px; } .lock-emblem { width: 48px; height: 48px; margin-bottom: 8px; } .lock-sub { margin-bottom: 14px; } .keypad { margin-top: 16px; gap: 10px; } }

/* animation de déverrouillage : le cœur s'ouvre + éclat */
.unlock-fx { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.unlock-fx .half { position: absolute; left: -70px; top: -70px; width: 140px; height: 140px; color: #ff5d8f;
  filter: drop-shadow(0 0 24px rgba(255,93,143,.75)); animation: heartGrow .55s cubic-bezier(.2,.9,.3,1.3) both; }
.unlock-fx .half svg { width: 100%; height: 100%; }
.unlock-fx .half.left { clip-path: polygon(-60% -60%, 50% -60%, 50% 160%, -60% 160%); animation: heartGrow .55s cubic-bezier(.2,.9,.3,1.3) both, openL .8s .6s cubic-bezier(.5,0,.3,1) forwards; }
.unlock-fx .half.right { clip-path: polygon(50% -60%, 160% -60%, 160% 160%, 50% 160%); animation: heartGrow .55s cubic-bezier(.2,.9,.3,1.3) both, openR .8s .6s cubic-bezier(.5,0,.3,1) forwards; }
@keyframes heartGrow { from { transform: scale(.2); opacity: 0; } }
@keyframes openL { to { transform: translateX(-70px) rotate(-28deg); opacity: 0; } }
@keyframes openR { to { transform: translateX(70px) rotate(28deg); opacity: 0; } }
.unlock-fx .ring { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid rgba(255,180,205,.9); opacity: 0; animation: ring 1s .55s ease-out forwards; }
@keyframes ring { from { transform: scale(.4); opacity: .9; } to { transform: scale(4.2); opacity: 0; } }
.unlock-fx i { position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; color: #ffb3c9; opacity: 0;
  animation: mini 1s calc(.6s + var(--dl)) cubic-bezier(.2,.8,.3,1) forwards; }
.unlock-fx i svg { width: 100%; height: 100%; }
@keyframes mini { 0% { transform: translate(0,0) scale(.3); opacity: 1; } 100% { transform: translate(var(--x), var(--y)) scale(var(--s)); opacity: 0; } }

/* ==========================================================================
   v3 : frise "Notre histoire"
   ========================================================================== */
.tl { list-style: none; margin: 8px auto 0; padding: 0; position: relative; max-width: 640px; text-align: left; }
.tl::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 30px; width: 2px; border-radius: 2px;
  background: linear-gradient(#ff9cbc, #f43f6e 70%, rgba(244,63,110,.35)); }
.tl-item { position: relative; padding: 0 0 22px 58px; opacity: 0; translate: 0 18px; transition: opacity .7s ease var(--d), translate .7s ease var(--d); }
.tl-item.visible { opacity: 1; translate: none; }
.tl-item:last-child { padding-bottom: 0; }
.tl-node { position: absolute; left: 6px; top: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: #0b1638; color: #ff5d8f; padding: 7px; box-shadow: 0 0 0 4px #f8fafc, 0 0 16px rgba(255,93,143,.55); }
.tl-node svg { width: 100%; height: 100%; }
.tl-card { background: linear-gradient(#fff, #f1f1f4); border: 1px solid #d9d9df; border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 10px 20px -14px rgba(0,0,0,.4); transition: transform .25s ease; }
.tl-item:hover .tl-card { transform: translateX(3px); }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; }
.tl-date { font-family: var(--font-title); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; color: #0b1638; }
.tl-text { margin: 0; font-size: .97rem; line-height: 1.55; color: #27272a; display: flex; gap: 10px; align-items: baseline; }
.tl-emoji { font-size: 1.2rem; flex: 0 0 auto; }
.tl-tag { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; }
.tl-tag.today { background: #ffe4ec; color: #be123c; }
.tl-tag.soon { background: #0b1638; color: #fff; }
/* passé = "vécu" : nœud plein */
.tl-item.past .tl-node { background: linear-gradient(160deg, #ff7aa8, #e11d48); color: #fff; box-shadow: 0 0 0 4px #f8fafc, 0 0 12px rgba(244,63,110,.45); }
/* aujourd'hui : nœud qui bat */
.tl-item.today .tl-node { background: linear-gradient(160deg, #ff7aa8, #e11d48); color: #fff; animation: nodePulse 1.8s ease-in-out infinite; }
.tl-item.today .tl-card { border-color: #fbb6cb; box-shadow: 0 12px 24px -14px rgba(225,29,72,.5); }
@keyframes nodePulse { 0%, 100% { box-shadow: 0 0 0 4px #f8fafc, 0 0 0 6px rgba(244,63,110,.0), 0 0 14px rgba(244,63,110,.5); } 50% { box-shadow: 0 0 0 4px #f8fafc, 0 0 0 10px rgba(244,63,110,.18), 0 0 24px rgba(244,63,110,.7); } }
/* futur : pointillés + halo */
.tl-item.future::before, .tl-item.month::before { content: ""; position: absolute; left: 21px; top: -22px; height: 34px; width: 2px;
  background: repeating-linear-gradient(#f8fafc 0 4px, transparent 4px 8px); }
.tl-item.future .tl-node, .tl-item.month .tl-node { background: #f8fafc; color: #f43f6e; border: 2px dashed #f43f6e; padding: 6px; animation: nodePulse 2.2s ease-in-out infinite; }
.tl-item.future .tl-card, .tl-item.month .tl-card { background: linear-gradient(135deg, #fff5f8, #f3f6ff); border: 1.5px dashed #f59ab5; }
@media (min-width: 760px) {
  .tl::before { left: 50%; margin-left: -1px; }
  .tl-item { width: 50%; padding: 0 40px 26px 0; }
  .tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 26px 40px; }
  .tl-item:nth-child(odd) .tl-node { left: auto; right: -16px; }
  .tl-item:nth-child(even) .tl-node { left: -16px; }
  .tl-item:nth-child(odd) .tl-card { text-align: right; }
  .tl-item:nth-child(odd) .tl-head { justify-content: flex-end; }
  .tl-item:nth-child(odd) .tl-text { flex-direction: row-reverse; }
  .tl-item:nth-child(odd):hover .tl-card { transform: translateX(-3px); }
  .tl-item.future::before, .tl-item.month::before { left: auto; right: -1px; }
  .tl-item:nth-child(even).future::before, .tl-item:nth-child(even).month::before { right: auto; left: -1px; }
}
@media (prefers-reduced-motion: reduce) { .tl-item { opacity: 1 !important; translate: none !important; } }

/* ===== Typographie « Moderne élégant » (Plus Jakarta Sans + Inter) ===== */
:root { --font-title: "Plus Jakarta Sans", "Inter", system-ui, sans-serif; --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
body { font-family: var(--font-body); }
h1, h2, .lock-title, .tl-date { text-wrap: balance; }
.hero h1, .hero h2 { font-family: var(--font-title); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; }
.hero p { font-family: var(--font-body); font-style: italic; font-size: 1.08rem; letter-spacing: .005em; opacity: .85; }
.card h2 {
  font-family: var(--font-title); font-weight: 800; letter-spacing: -.035em; line-height: 1.1;
  font-size: clamp(1.7rem, 5.6vw, 2.4rem); color: #0b1638;
  background: none; -webkit-background-clip: border-box; background-clip: border-box;
}
.accent {
  background: linear-gradient(100deg, #ff5d8f 0%, #e11d48 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.hero .accent, .lock-title .accent { background: linear-gradient(100deg, #ffb3c9, #ff5d8f); -webkit-background-clip: text; background-clip: text; }
.card h2::after { content: ""; display: block; width: 36px; height: 3px; border-radius: 3px; margin: 12px auto 0; background: linear-gradient(90deg, #ff5d8f, #e11d48); }
.card .sub { font-size: .98rem; color: #52525b; letter-spacing: .005em; }
.badge { font-family: var(--font-body); font-weight: 600; letter-spacing: .12em; font-size: 10.5px; }
.tile .num { font-family: var(--font-title); font-weight: 800; letter-spacing: -.03em; }
.tl-date { font-family: var(--font-title); font-weight: 800; letter-spacing: -.02em; }
.btn-dark, .pill-hint { font-family: var(--font-title); font-weight: 700; }
.lock-title { font-weight: 800; letter-spacing: -.04em; }
.lock-sub { font-family: var(--font-body); font-style: italic; font-size: 1.05rem; opacity: .85; }
.key, .slot b { font-family: var(--font-title); font-weight: 600; }
.song .t { font-family: var(--font-title); font-weight: 700; letter-spacing: -.01em; }
.envelope .seal span { font-family: "Fraunces", Georgia, serif; }   /* enveloppe rétro inchangée */

/* ==========================================================================
   v5 : lettre dans sa carte, frise alignée, image à gratter identique partout
   ========================================================================== */
/* Lettre : titre + sous-titre dans la carte, comme les autres sections */
.letter-card .envelope-wrap { padding-top: clamp(92px, 12vw, 104px); }  /* place pour le rabat qui s’ouvre */

/* Frise : contenu aligné à gauche dans toutes les cartes, emoji devant le texte */
.tl-text { align-items: flex-start; }
.tl-emoji { line-height: 1.3; }
@media (min-width: 760px) {
  .tl-item:nth-child(odd) .tl-card { text-align: left; }
  .tl-item:nth-child(odd) .tl-head { justify-content: flex-start; }
  .tl-item:nth-child(odd) .tl-text { flex-direction: row; }
}

/* Image à gratter : l'étiquette suit la taille de la zone (mêmes proportions mobile / ordi) */
.scratch-inner { container-type: inline-size; }
.scratch-label { padding: clamp(5px, 1.55cqw, 8px) clamp(12px, 3.85cqw, 20px) clamp(6px, 1.9cqw, 10px); border-radius: clamp(8px, 2.3cqw, 12px); text-align: center; white-space: nowrap; }
.scratch-label b { font-size: clamp(1rem, 4.9cqw, 1.6rem); line-height: 1.1; }
.scratch-label small { font-size: clamp(7px, 1.83cqw, 9.5px); letter-spacing: .14em; }

/* ==========================================================================
   v6 : pied de page (cœur qui bat → pluie de fleurs, jours d'amour, signature)
   ========================================================================== */
.site-footer { position: relative; z-index: 1; text-align: center; color: #f8fafc; font-family: var(--font-body); font-size: 1rem;
  max-width: 560px; margin: 0 auto; padding: 8px 20px calc(44px + env(safe-area-inset-bottom)); }
.ft-divider { display: flex; align-items: center; justify-content: center; gap: 12px; color: rgba(248,250,252,.55); font-size: 12px; margin: 0 auto 22px; }
.ft-divider i { width: 64px; height: 1px; background: linear-gradient(90deg, transparent, rgba(248,250,252,.45)); }
.ft-divider i:last-child { transform: scaleX(-1); }
.ft-heart { display: block; width: 76px; height: 76px; margin: 0 auto; padding: 10px; border: 0; background: none; cursor: pointer;
  border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.ft-heart:focus-visible { outline: 2px solid #ff8fb1; outline-offset: 2px; }
.ft-beat { display: block; width: 100%; height: 100%; animation: ftBeat 1.25s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.3)) drop-shadow(0 0 14px rgba(244,63,110,.55)); }
.ft-beat svg { display: block; width: 100%; height: 100%; }
.ft-heart.pop { animation: ftPop .4s ease; }
.ft-heart:hover .ft-beat { animation-duration: .8s; }
@keyframes ftBeat { 0%, 40%, 100% { transform: scale(1); } 12% { transform: scale(1.16); } 24% { transform: scale(.98); } 32% { transform: scale(1.1); } }
@keyframes ftPop { 0% { transform: scale(1); } 40% { transform: scale(.82); } 100% { transform: scale(1); } }
.ft-hint { font-family: var(--font-hand); font-size: 1.3rem; line-height: 1; color: rgba(248,250,252,.75); margin: 2px 0 18px; transform: rotate(-3deg); }
.ft-days { margin: 0 0 8px; font-family: var(--font-title); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.ft-n { font-weight: 800; font-variant-numeric: tabular-nums; background: linear-gradient(100deg, #ffb3c9, #ff5d8f 55%, #f43f6e);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.ft-sign { margin: 0; font-size: .88rem; color: rgba(248,250,252,.7); letter-spacing: .01em; }
.ft-name { font-family: var(--font-title); font-weight: 800; color: #fff; letter-spacing: -.01em; }
.ft-name.accent { background: linear-gradient(100deg, #ffb3c9, #ff5d8f); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
@media (prefers-reduced-motion: reduce) { .ft-beat, .ft-heart.pop { animation: none !important; } }

/* ==========================================================================
   v7 : nos lettres à venir (petites enveloppes datées)
   ========================================================================== */
.mb-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 18px; padding: 18px 4px 6px; }
.mb-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 196px; padding: 26px 14px 16px;
  border: 1px solid #e4e4ea; border-radius: 20px; background: linear-gradient(#ffffff, #f4f4f7); cursor: pointer; font: inherit; color: inherit;
  box-shadow: 0 10px 22px -16px rgba(11,22,56,.5); transition: transform .25s ease, box-shadow .25s ease; -webkit-tap-highlight-color: transparent; }
.mb-item:hover { transform: translateY(-2px); box-shadow: 0 16px 26px -16px rgba(11,22,56,.55); }
.mb-item:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
/* l'enveloppe principale, en miniature (exactement la même, réduite de moitié) */
.mb-env { position: relative; display: block; width: 165px; height: 103px; }
.mb-env .envelope { position: absolute; left: 0; top: 0; width: 330px; transform: scale(.5); transform-origin: 0 0; animation: none; cursor: inherit; }
.mb-env .envelope:hover .seal { transform: none; }
.mb-env .envelope.open .seal, .mb-env .envelope.open:hover .seal { transform: translateY(18px) scale(.6) rotate(-25deg); }
.mb-item.read .mb-env .envelope * { transition: none; }
.mb-item.read .mb-env { margin-top: 18px; }
.mb-env .env-back { box-shadow: 0 10px 18px -8px rgba(2,6,23,.45); }
/* tampon de la poste avec la date */
.mb-postmark { position: absolute; right: -10px; top: -14px; z-index: 6; width: 52px; height: 52px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; transform: rotate(-12deg);
  color: #be123c; background: rgba(255,253,248,.92); border: 2px dashed rgba(190,18,60,.55); box-shadow: 0 0 0 3px rgba(255,253,248,.92), 0 2px 6px rgba(0,0,0,.18);
  font-family: var(--font-title); }
.mb-postmark b { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.mb-postmark small { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: 1px; }
.mb-postmark i { font-style: normal; font-size: 7.5px; font-weight: 600; opacity: .75; margin-top: 1px; }
.mb-lock { position: absolute; left: 50%; top: 60%; z-index: 7; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; background: rgba(255,255,255,.95); box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.mb-title { margin-top: 8px; font-family: var(--font-title); font-weight: 800; font-size: .98rem; letter-spacing: -.02em; color: #0b1638; line-height: 1.2; text-wrap: balance; }
.mb-status { font-size: .8rem; font-weight: 600; color: #52525b; line-height: 1.3; }
.mb-item.locked .mb-env, .mb-item.pending .mb-env { filter: saturate(.75); opacity: .92; }
.mb-item.pending .mb-status { color: #be123c; }
.mb-item.new { border-color: #fbb6cb; box-shadow: 0 0 0 4px rgba(255,93,143,.12), 0 14px 28px -12px rgba(225,29,72,.55); animation: mbGlow 2.4s ease-in-out infinite; }
.mb-item.new .mb-env { animation: mbWiggle 3.2s ease-in-out infinite; }
.mb-item.new .mb-status { color: #e11d48; font-weight: 700; }
.mb-new { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 8;
  font-family: var(--font-title); font-weight: 700; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: linear-gradient(100deg, #ff5d8f, #e11d48); padding: 5px 11px; border-radius: 999px; box-shadow: 0 6px 14px -4px rgba(225,29,72,.6); }
.mb-item.read .mb-status { color: #0b1638; }
.mb-item.shake { animation: mbShake .5s ease; }
@keyframes mbShake { 20% { transform: translateX(-6px) rotate(-1.5deg); } 40% { transform: translateX(5px) rotate(1deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes mbWiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-4deg); } 82% { transform: rotate(3.5deg); } 88% { transform: rotate(-2deg); } 94% { transform: rotate(1deg); } }
@keyframes mbGlow { 50% { box-shadow: 0 0 0 7px rgba(255,93,143,.08), 0 16px 34px -10px rgba(225,29,72,.7); } }
.mb-msg { min-height: 1.4em; margin: 12px 0 0; font-family: var(--font-hand); font-size: 1.35rem; color: #be123c; opacity: 0; transition: opacity .3s; }
.mb-msg.show { opacity: 1; }
/* mobile : on fait glisser les enveloppes */
@media (max-width: 640px) {
  .mb-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 22px 16px 10px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mb-row::-webkit-scrollbar { display: none; }
  .mb-item { flex: 0 0 196px; scroll-snap-align: center; }
  .mb-row:has(> .mb-item:only-child) { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .mb-item.new, .mb-item.new .mb-env, .mb-item.shake { animation: none !important; } }

/* ==========================================================================
   v8 : diaporama des fonds d'écran « duo » (images presque carrées, ~0,92 : 1)
   ========================================================================== */
.carousel { width: min(480px, 100%); }
.carousel-frame { aspect-ratio: auto; }
.slides { height: auto; aspect-ratio: 1356 / 1470; }
.slide img { object-fit: cover; object-position: 50% 50%; display: block; }
.thumbs { flex-wrap: wrap; }
.thumb { width: 44px; height: 48px; }

/* ==========================================================================
   v9 : signature du couple au-dessus du titre
   ========================================================================== */
.hero .couple-sign { margin: 0 auto 18px; }
.hero .couple-names { margin: 0 auto; font-family: var(--font-hand); font-weight: 600; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.1;
  color: #fde4ec; letter-spacing: .01em; font-style: normal; opacity: 1; text-shadow: 0 2px 14px rgba(255,93,143,.35); }
.hero .couple-names .cn { display: inline-block; }
.couple-heart { display: inline-block; margin: 0 .22em; font-size: .78em; vertical-align: .06em;
  filter: drop-shadow(0 0 5px rgba(255,143,177,.95)) drop-shadow(0 0 12px rgba(255,93,143,.55)); animation: coupleBeat 1.6s ease-in-out infinite; }
@keyframes coupleBeat { 0%, 45%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1.06); } }
.hero .couple-since { margin: 6px auto 0; font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  font-variant-numeric: tabular-nums; color: rgba(248,250,252,.55); font-style: normal; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .couple-heart { animation: none; } }

/* ==========================================================================
   v10 : « 💾 Garder cette lettre » (export en image)
   ========================================================================== */
.letter-keep { display: flex; justify-content: center; margin: 26px 0 2px; }
.letter-keep[hidden] { display: none; }
.keep-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: .01em; color: #be185d;
  padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(244,63,110,.28);
  background: linear-gradient(#fff1f5, #ffe4ec); box-shadow: 0 6px 16px -10px rgba(225,29,72,.55), inset 0 1px 0 #fff;
  transition: transform .18s ease, box-shadow .2s ease, background .2s, color .2s;
}
.keep-btn:hover { background: linear-gradient(#ffe8ef, #ffd6e2); box-shadow: 0 10px 20px -10px rgba(225,29,72,.6), inset 0 1px 0 #fff; }
.keep-btn:active { transform: scale(.94); }
.keep-btn:focus-visible { outline: 2px solid #ff5d8f; outline-offset: 3px; }
.keep-btn .keep-ico { font-size: 14px; line-height: 1; }
.keep-btn.busy { opacity: .75; cursor: progress; }
.keep-btn.done, .keep-btn.ready { color: #fff; border-color: transparent; background: linear-gradient(100deg, #ff5d8f, #e11d48); }
.keep-btn.done { animation: keepPop .4s ease; }
@keyframes keepPop { 40% { transform: scale(1.07); } }
.keep-view { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 18px;
  background: rgba(8,12,30,.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s ease; }
.keep-view-in { display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 100%; }
.keep-view img { max-width: min(92vw, 520px); max-height: calc(100vh - 150px); border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7);
  -webkit-touch-callout: default; user-select: auto; }
.keep-view p { margin: 0; color: #fde4ec; font-family: var(--font-hand); font-size: 1.5rem; text-align: center; }
.keep-view-close { font-family: var(--font-body); font-weight: 600; font-size: 13px; color: #fff; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 8px 18px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .keep-btn.done { animation: none; } }
