/* Logo « Instant Sucré by Yona » et ouverture du site — généré par scripts/build-logo.mjs (npm run logo). Ne pas modifier à la main.
   Sans la classe .is-playing, le logo est affiché dans son état final. */
.logo {
  --lg-gold-1: #99654A; --lg-gold-2: #C39470; --lg-gold-3: #D8AE86; --lg-gold-4: #B07E5D; --lg-gold-5: #8E5C41;
  --lg-rose: #C9A58C; --lg-rose-deep: #B98A6B; --lg-caramel: #C98F4F; --lg-choc: #4A2C1E; --lg-cream: #F6EBDD;
  --lg-disc-1: #FFFBF5; --lg-disc-2: #FBF3EA; --lg-disc-3: #F3E5D6;
  display: block; width: 100%; height: auto; aspect-ratio: 1; overflow: visible;
}
.logo-host { position: relative; display: block; width: 100%; }

.lg-s-a { stop-color: var(--lg-gold-1); } .lg-s-b { stop-color: var(--lg-gold-2); } .lg-s-c { stop-color: var(--lg-gold-3); }
.lg-s-d { stop-color: var(--lg-gold-4); } .lg-s-e { stop-color: var(--lg-gold-5); }
.lg-d-a { stop-color: var(--lg-disc-1); } .lg-d-b { stop-color: var(--lg-disc-2); } .lg-d-c { stop-color: var(--lg-disc-3); }

/* Les dégradés (#lg-ink…) sont référencés par des attributs du SVG, pas d'ici : leurs id sont uniques par logo. */
.lg-ring { stroke-width: 3.2; }
.lg-ring2 { fill: none; stroke: var(--lg-rose); stroke-width: .8; }
.lg-fill { stroke-width: var(--lg-bold, 0); stroke-linejoin: round; }
.lg-ornament, .lg-rules { stroke-linecap: round; stroke-linejoin: round; }
.lg-ornament { stroke-width: 1.05; }
.lg-rules { stroke-width: .9; }
.lg-twinkle { opacity: 0; }
.lg-disc, .lg-ring2, .lg-art, .lg-ornament, .lg-by, .lg-l, .lg-cap, .lg-star, .lg-twinkle { transform-box: view-box; }
.lg-disc, .lg-ring2, .lg-art { transform-origin: 200px 200px; }

/* Petite taille (barre de navigation) : on épaissit les déliés pour rester lisible */
.logo--small { --lg-bold: 1.5; }
.logo--small .lg-ornament { stroke-width: 2; }
.logo--small .lg-rules { stroke-width: 1.8; }
.logo--small .lg-ring2 { display: none; }

/* Sur fond sombre : pas de disque, traits or clair */
.logo--on-dark {
  --lg-gold-1: #DDB993; --lg-gold-2: #F0D9BC; --lg-gold-3: #FFF1DC; --lg-gold-4: #E8C9A6; --lg-gold-5: #DDB993;
  --lg-rose: #D9B899;
}
.logo--on-dark .lg-disc { display: none; }

/* État de repos : l'étincelle respire doucement */
.logo.is-idle .lg-star { animation: lg-breathe 4.2s ease-in-out infinite; }

/* ── Séquence (1050 ms) : opacité, transformations et tracé des filets uniquement ── */
.logo.is-playing .lg-disc { animation: lg-disc .42s cubic-bezier(.2, .7, .2, 1) both; }
.logo.is-playing .lg-ring path { stroke-dasharray: 1 2; animation: lg-draw .5s cubic-bezier(.5, 0, .2, 1) 40ms both; }
.logo.is-playing .lg-ring2 { animation: lg-ring2 .5s cubic-bezier(.2, .7, .2, 1) .16s both; }
.logo.is-playing .lg-l { animation: lg-letter .4s cubic-bezier(.2, .8, .2, 1) var(--d) both; }
.logo.is-playing .lg-ornament { animation: lg-rise .34s cubic-bezier(.2, .8, .2, 1) 330ms both; }
.logo.is-playing .lg-cap { animation: lg-cap .42s cubic-bezier(.2, .8, .2, 1) var(--d) both; }
.logo.is-playing .lg-rule { stroke-dasharray: 1 2; animation: lg-draw .32s cubic-bezier(.3, 0, .2, 1) 560ms both; }
.logo.is-playing .lg-star { animation: lg-star .4s cubic-bezier(.3, 1.4, .5, 1) 610ms both; }
.logo.is-playing .lg-by { animation: lg-rise .34s cubic-bezier(.2, .8, .2, 1) 620ms both; }
.logo.is-playing .lg-twinkle { animation: lg-twinkle .42s ease-in-out var(--d) both; }

@keyframes lg-draw { from { stroke-dashoffset: 1.02; } to { stroke-dashoffset: 0; } }
@keyframes lg-disc { from { opacity: 0; transform: scale(.93); } to { opacity: 1; transform: none; } }
@keyframes lg-ring2 { from { opacity: 0; transform: scale(.955); } to { opacity: 1; transform: none; } }
@keyframes lg-letter { from { opacity: 0; transform: translate(-7px, 9px); } to { opacity: 1; transform: none; } }
@keyframes lg-rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes lg-cap { from { opacity: 0; transform: translate(var(--x), 3px); } to { opacity: 1; transform: none; } }
@keyframes lg-star { 0% { opacity: 0; transform: scale(0) rotate(-90deg); } 60% { opacity: 1; transform: scale(1.5) rotate(8deg); } 100% { opacity: 1; transform: none; } }
@keyframes lg-twinkle { 0%, 100% { opacity: 0; transform: scale(0) rotate(-30deg); } 45% { opacity: 1; transform: scale(1) rotate(0deg); } }
@keyframes lg-breathe { 0%, 100% { transform: none; opacity: 1; } 50% { transform: scale(.72) rotate(45deg); opacity: .7; } }

/* Brillance dorée : une bande de lumière qui traverse le médaillon (élément HTML rogné en cercle, simple translation) */
.logo-shine { position: absolute; inset: 2.2%; border-radius: 50%; overflow: hidden; pointer-events: none; -webkit-mask-image: -webkit-radial-gradient(white, black); }
.logo-shine i {
  position: absolute; top: -10%; bottom: -10%; left: 0; width: 46%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 244, 222, .55) 38%, rgba(255, 255, 255, .95) 50%, rgba(255, 236, 200, .55) 62%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-130%) skewX(-16deg);
  animation: lg-shine .46s cubic-bezier(.4, 0, .3, 1) 600ms both;
}
@keyframes lg-shine { from { transform: translateX(-130%) skewX(-16deg); } to { transform: translateX(330%) skewX(-16deg); } }

@media (prefers-reduced-motion: reduce) {
  .logo, .logo * { animation: none !important; }
  .logo-shine { display: none !important; }
}

/* ───────────── Ouverture du site (voir assets/js/intro.js) ─────────────
   Première visite seulement, environ 1,3 s, jamais bloquante : le site est déjà affiché dessous et défile librement. */
.intro {
  position: fixed; inset: 0; z-index: 200; display: none; place-content: center; justify-items: center; gap: 1.1rem;
  background: var(--ivory-light, #FBF6EF) url('../img/photos/marbre.webp') center / cover;
}
.intro::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 45%, rgba(251, 246, 239, .15), rgba(246, 235, 221, .8)); pointer-events: none; }
html.intro-on .intro, .intro.is-leaving { display: grid; }
.intro-logo { position: relative; width: min(64vw, 19rem); aspect-ratio: 1; filter: drop-shadow(0 24px 32px rgba(63, 36, 24, .16)); }
.intro-tag {
  position: relative; margin: 0; font: 600 .7rem/1 var(--font-sans, system-ui, sans-serif); letter-spacing: .32em; text-indent: .32em; text-transform: uppercase;
  color: var(--rose-deep, #8A5D43); opacity: 0; animation: intro-tag .5s cubic-bezier(.16, 1, .3, 1) .55s forwards;
}
/* Sortie : le voile se dissout pendant que le logo s'échappe vers l'avant */
.intro.is-leaving { pointer-events: none; animation: intro-out .34s cubic-bezier(.4, 0, .6, 1) forwards; }
.intro.is-leaving .intro-logo { animation: intro-logo-out .34s cubic-bezier(.4, 0, .9, .6) forwards; }
.intro.is-leaving .intro-tag { animation: intro-out .2s ease forwards; }
.intro.is-leaving.is-fast, .intro.is-leaving.is-fast .intro-logo { animation-duration: .16s; }
@keyframes intro-tag { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes intro-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes intro-logo-out { from { transform: none; } to { transform: scale(1.12); } }
