/* ------------------------------------------------------------------ *
 * Ecran d'ouverture au logo, commun au site, a la regie et a
 * l'administration. Les couleurs viennent de /marque.css.
 * ------------------------------------------------------------------ */

#bss-ouverture {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 600px at 50% 38%, var(--accent-voile, rgba(255, 61, 87, .14)), transparent 70%),
    var(--bg, #070910);
  opacity: 1;
  transition: opacity .32s ease, visibility .32s ease;
}

#bss-ouverture.bss-ouverture-sortie {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bss-ouverture-boite {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  max-width: min(88vw, 520px);
}

.bss-ouverture-logo {
  max-width: min(64vw, 260px);
  max-height: 132px;
  object-fit: contain;
  filter: drop-shadow(var(--lueur-accent, 0 0 24px rgba(255, 61, 87, .45)));
}

.bss-ouverture-monogramme {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent, #ff3d57), var(--accent-2, #00e0ff));
  box-shadow: var(--ombre-forte, 0 24px 60px rgba(0, 0, 0, .6));
}

.bss-ouverture-nom {
  font-family: var(--font-titres, var(--font, sans-serif));
  font-size: clamp(19px, 4.4vw, 27px);
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink, #eef1f7);
}

.bss-ouverture-slogan {
  font-size: clamp(12.5px, 3vw, 14.5px);
  color: var(--ink-soft, #8b93a7);
  max-width: 34ch;
  line-height: 1.45;
}

/* ---------------------------- animations -------------------------- */

/* Fondu : la boite apparait, sans mouvement. */
.anim-fondu .bss-ouverture-boite { animation: bss-fondu .5s ease both; }
@keyframes bss-fondu { from { opacity: 0; } to { opacity: 1; } }

/* Pulsation : le logo respire. */
.anim-pulsation .bss-ouverture-boite { animation: bss-fondu .4s ease both; }
.anim-pulsation .bss-ouverture-logo,
.anim-pulsation .bss-ouverture-monogramme { animation: bss-pulsation 1.5s ease-in-out infinite; }
@keyframes bss-pulsation {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* Zoom : le logo avance vers le spectateur. */
.anim-zoom .bss-ouverture-boite { animation: bss-zoom .7s cubic-bezier(.16, .84, .32, 1) both; }
@keyframes bss-zoom {
  from { opacity: 0; transform: scale(.82); }
  to { opacity: 1; transform: scale(1); }
}

/* Balayage : un reflet traverse le logo. */
.anim-balayage .bss-ouverture-boite { animation: bss-fondu .4s ease both; }
.anim-balayage .bss-ouverture-logo,
.anim-balayage .bss-ouverture-monogramme {
  position: relative;
  animation: bss-zoom .6s cubic-bezier(.16, .84, .32, 1) both;
}
.anim-balayage .bss-ouverture-boite::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .22) 50%, transparent 62%);
  background-size: 260% 100%;
  animation: bss-balayage 1.5s ease-in-out .25s infinite;
}
.anim-balayage .bss-ouverture-boite { position: relative; overflow: hidden; }
@keyframes bss-balayage {
  from { background-position: 160% 0; }
  to { background-position: -60% 0; }
}

/* Le reglage systeme « animations reduites » l'emporte sur tout. */
@media (prefers-reduced-motion: reduce) {
  #bss-ouverture * { animation: none !important; }
  #bss-ouverture { transition: opacity .01s linear; }
}
