/* Splash lancement Coffre — même animation qu’Agenda / Chat. */
html,
body {
  margin: 0;
  background: var(--coffre-boot-bg, #0b1220);
  color: var(--coffre-boot-text, #e5e7eb);
}

.coffre-boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  min-height: 100dvh;
  width: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(
      ellipse 90% 70% at 50% -5%,
      color-mix(in srgb, var(--coffre-accent, #71baff) 28%, transparent),
      transparent 58%
    ),
    radial-gradient(
      ellipse 55% 45% at 100% 100%,
      color-mix(in srgb, var(--coffre-accent-strong, #2b7fd4) 16%, transparent),
      transparent 55%
    ),
    var(--coffre-boot-bg, #0b1220);
  font-family: Poppins, system-ui, sans-serif;
}

.coffre-boot__glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(56px);
  pointer-events: none;
  opacity: 0.55;
  animation: coffre-boot-glow 7s ease-in-out infinite;
}

.coffre-boot__glow--a {
  top: 12%;
  left: 8%;
  width: 10rem;
  height: 10rem;
  background: color-mix(in srgb, var(--coffre-accent, #71baff) 55%, transparent);
}

.coffre-boot__glow--b {
  right: 4%;
  bottom: 14%;
  width: 13rem;
  height: 13rem;
  background: color-mix(in srgb, var(--coffre-accent-strong, #2b7fd4) 35%, transparent);
  animation-delay: -3.2s;
}

.coffre-boot__mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(color-mix(in srgb, var(--coffre-boot-text, #e5e7eb) 8%, transparent) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}

.coffre-boot__stage {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 20rem);
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.coffre-boot__mark {
  margin-bottom: 1.35rem;
  animation: coffre-boot-mark-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.coffre-boot__icon-wrap {
  display: grid;
  place-items: center;
}

.coffre-boot__logo {
  display: block;
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--coffre-accent-strong, #2b7fd4) 45%, transparent));
  animation: coffre-boot-icon-breathe 2.4s ease-in-out infinite;
}

.coffre-boot__eyebrow {
  margin: 0 -0.28em 0 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--coffre-boot-muted, #94a3b8);
  animation: coffre-boot-text-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.coffre-boot__title {
  margin: 0.15rem 0 0;
  font-size: clamp(2.15rem, 8vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--coffre-boot-text, #f8fafc);
  animation: coffre-boot-text-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.coffre-boot__label {
  margin: 1.15rem 0 0;
  min-height: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--coffre-boot-muted, #94a3b8);
  animation: coffre-boot-text-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

.coffre-boot__bar {
  margin-top: 1.35rem;
  width: 9.5rem;
  height: 3px;
  overflow: hidden;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--coffre-boot-muted, #94a3b8) 28%, transparent);
  animation: coffre-boot-text-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.coffre-boot__bar-fill {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--coffre-accent, #71baff) 40%, transparent), var(--coffre-accent, #71baff), var(--coffre-accent-strong, #2b7fd4));
  animation: coffre-boot-bar 1.65s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.coffre-boot--exiting {
  animation: coffre-boot-out 0.42s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes coffre-boot-glow {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(14px, -12px) scale(1.08);
  }
}

@keyframes coffre-boot-mark-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.82);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes coffre-boot-icon-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.03);
  }
}

@keyframes coffre-boot-text-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes coffre-boot-bar {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(280%);
  }
}

@keyframes coffre-boot-out {
  to {
    opacity: 0;
    transform: scale(1.03);
    filter: blur(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .coffre-boot,
  .coffre-boot__glow,
  .coffre-boot__mark,
  .coffre-boot__logo,
  .coffre-boot__eyebrow,
  .coffre-boot__title,
  .coffre-boot__label,
  .coffre-boot__bar,
  .coffre-boot__bar-fill,
  .coffre-boot--exiting {
    animation: none !important;
  }

  .coffre-boot--exiting {
    opacity: 0;
  }
}
