:root {
  --primary: #1e4485;
  --secondary: #259f62;
}

html,
body,
main,
.page-host,
section {
  height: 100%;
  overflow: hidden;
}
body {
  font-family: "Heebo", sans-serif;
  font-weight: 400;
  color: #464d69;
  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

body,
.theme-light body {
  margin: 0;
}

div.body-loader,
.theme-light div.body-loader {
  background-color: var(--primary);
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: unset;
  line-height: unset;
  transition: opacity 0.6s ease;
}

div.body-loader.hidden,
.theme-light div.body-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-container {
  position: static;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Logo avec effet de remplissage de bas en haut */
.loader-logo-wrap {
  position: relative;
  width: 110px;
  height: 110px;
}
.loader-logo-base {
  width: 110px;
  height: 110px;
  border-radius: 22px;
  filter: grayscale(1) brightness(0.45) opacity(0.4);
  display: block;
}
.loader-logo-fill {
  position: absolute;
  inset: 0;
  width: 110px;
  height: 110px;
  border-radius: 22px;
  background: url("images/cropped-favicon.png") center / cover;
  clip-path: inset(100% 0 0 0);
  animation: logo-fill-up 2.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Barre de progression */
.loader-bar-wrap {
  width: 130px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 99px;
  animation: bar-fill 2.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.loader-text {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  font-family: "Heebo", sans-serif;
  letter-spacing: 0.05em;
  margin: 0;
}

@keyframes logo-fill-up {
  0% {
    clip-path: inset(100% 0 0 0);
  }
  100% {
    clip-path: inset(8% 0 0 0);
  }
}
@keyframes bar-fill {
  0% {
    width: 0%;
  }
  100% {
    width: 88%;
  }
}
