/* ==========================
   Fonts
========================== */
@font-face {
  font-family: 'PicNic';
  src: url('fonts/PicNic-Regular.otf') format('opentype');
  font-display: swap;
}

/* ==========================
   Global styles
========================== */
body {
  padding-top: 35px;
  margin: 0;
  font-family: 'PicNic', sans-serif;
  font-size: 14px;
  color: black;
  background-color: #070C26;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 0;
}

/* ==========================
   Image cluster (above bg, below content)
========================== */
/* Cluster d’images positionné full zone, mais en z-index bas (derrière le contenu) */
.image-cluster {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0; /* en dessous des blocs .main (qui ont 10) */
  overflow: visible;
}

/* Les images restent en absolute position */
.image-cluster img {
  position: absolute;
  opacity: 0;
  transition: opacity 0.6s ease;
  user-select: none;
  border: 1px solid black;
  box-shadow: 7px 7px rgba(0, 0, 0, 0.8);
  background: white;
  height: auto;
  width: auto;
}

/* Canvas en dessous des images dans le cluster, et sous les blocs aussi */
.image-cluster canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}


/* ==========================
   Top bar fixed
========================== */
.top-bar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: black;
  color: white;
  padding: 5px 15px;
  font-style: italic;
  letter-spacing: 5px;
  text-transform: uppercase;
  line-height: 25px;
  z-index: 10; /* always on top */
}

/* ==========================
   Main sections styling
========================== */
.main-first, .main {
  margin-top: 60px;
  width: 500px;
  background: #1E4DD9;
  opacity: 75%;
  border: 1px solid black;
  padding: 15px 25px;
  box-shadow: 
    7px 7px rgba(0, 0, 0, 0.8),      /* ombre existante */
    0 0 100px 5px #0D208C;            /* outer glow flouté */
  position: relative;
  z-index: 10; /* always above cluster */
}

.main-first h1, .main h1 {
  margin-top: 0;
}

/* Lists & links */
.main ul {
  padding-left: 1.2em;
}

.main a {
  color: black;
  text-decoration: none;
}

.main a:hover {
  text-decoration: underline;
}

/* ==========================
   Footer
========================== */
.footer {
  margin: 20px 0 40px;
  width: 500px;
  font-style: italic;
  font-size: 13px;
  text-align: right;
  position: relative;
  z-index: 10;
}

/* ==========================
   Responsive tweaks
========================== */
@media (max-width: 1100px) {
  .main, .main-first, .footer {
    width: 420px;
  }
}

@media (max-width: 700px), (orientation: portrait) {
  .main, .main-first, .footer {
    width: 80%;
    margin: 20px auto 0 auto;
    text-align: center;
  }

  .top-bar {
    font-size: 90%;
    letter-spacing: 4px;
  }

  .footer {
    margin: 20px auto 40px auto;
  }
}

/* ==========================
   Canvas carrés d'arrière-plan
========================== */
.bg-squares {
  position: fixed; /* couvre tout l'écran, même au scroll */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* au-dessus de body background, mais sous .image-cluster et .main */
  pointer-events: none;
}
