/* ---- Fond général ---- */
body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  /* Animation CSS classique sur body ! */
  background: linear-gradient(120deg, #0f1836, #2a1e52 50%, #17365b 100%);
  background-size: 200% 200%;
  background-position: 50% 50%;
  animation: bgGalactic 8s ease-in-out infinite alternate;
}
@keyframes bgGalactic {
  0% {
    background-position: 0% 60%;
  }
  100% {
    background-position: 100% 40%;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Halo très petit et intense */
  background: radial-gradient(
    ellipse at var(--parallax-x, 50%) var(--parallax-y, 50%),
    rgba(120, 200, 255, 0.28) 0%,
    rgba(120, 200, 255, 0.13) 7%,
    rgba(120, 200, 255, 0.05) 13%,
    rgba(0, 0, 0, 0) 18%
  );
  transition: background-position 0.18s cubic-bezier(0.36, 1.25, 0.48, 1.05);
  background-position: var(--parallax-x, 12%) var(--parallax-y, 12%);
}

/* ---- NAVBAR ---- */
.navbar {
  /* width: 100vw; */
  background: rgba(51, 57, 65, 0.86);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3vw;
  min-height: 68px;
  box-shadow: 0 2px 24px #24272b33;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: auto; /* Pour éviter le débordement */
  opacity: 0;
  transform: translateY(-25px) scale(0.99);
  animation: navbarFadeIn 1.05s cubic-bezier(0.37, 1.55, 0.58, 1.03) 0.22s both;
}
@keyframes navbarFadeIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: bold;
  font-size: 1.24rem;
  letter-spacing: 1px;
  min-width: 0;
}
.navbar-logo .logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 2px 10px #2324252a;
}
.navbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}
.navbar-links a {
  color: #d1d6e3;
  text-decoration: none;
  font-size: 1.08em;
  font-weight: 500;
  padding: 0 6px;
  position: relative;
  letter-spacing: 0.02em;
  transition: color 0.18s;
  border-radius: 3px;
}
.navbar-links a.active,
.navbar-links a:hover {
  color: #fff;
  background: rgba(111, 128, 155, 0.12);
}
.navbar-links a.active::after,
.navbar-links a:hover::after {
  content: "";
  display: block;
  height: 2.5px;
  width: 80%;
  background: linear-gradient(90deg, #b5c7dd 10%, #8ea4b7 90%);
  border-radius: 2px;
  margin: 4px auto 0 auto;
  transition: all 0.22s;
}

/* ---- CARDS ---- */
.container {
  margin: 44px auto 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px 34px;
  justify-content: center;
  max-width: 1320px;
  min-height: 70vh;
}

.card {
  background: rgba(252, 253, 255, 0.97);
  border-radius: 28px;
  box-shadow: 0 10px 38px #2b30362c, 0 2px 8px #bfc7d7a6;
  width: 330px;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: #232e3a;
  padding: 0 0 26px 0;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.22s cubic-bezier(0.2, 0.55, 0.27, 1.07),
    transform 0.19s cubic-bezier(0.4, 0.22, 0.23, 1.17), background 0.22s;
  animation: fadeUp 0.9s cubic-bezier(0.7, 0.01, 0.22, 1.11) backwards;
  border: 1.5px solid #e2e6ea;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(60px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-main-img {
  width: 100%;
  height: 178px;
  object-fit: contain;
  background: linear-gradient(120deg, #eef0f4, #e7e8ea 70%);
  border-radius: 28px 28px 0 0;
  margin-bottom: 7px;
  transition: filter 0.22s, transform 0.18s;
  box-shadow: 0 2px 14px #bfc7d728;
}

.card:hover .card-main-img {
  filter: brightness(1.06) saturate(1.1);
  transform: scale(1.045);
}

img.p_lang {
  width: 32px;
  height: 32px;
  border: none;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

.card:hover {
  box-shadow: 0 18px 54px #454a5550, 0 2.5px 14px #a6a9b5a6;
  background: rgba(240, 241, 244, 0.98);
  transform: translateY(-8px) scale(1.045) rotateZ(0.17deg);
}

.card-title {
  font-size: 1.23rem;
  font-weight: bold;
  margin: 15px 0 5px 22px;
  color: #253050;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px #f4f7fa70;
}
.card-desc {
  font-size: 1.07rem;
  color: #5a6272;
  margin-left: 22px;
  margin-right: 13px;
  margin-bottom: 10px;
  margin-top: 2px;
}
.logos {
  text-align: center;
  margin-top: 8px;
}
.logos img.p_lang {
  margin: 0 3px;
  vertical-align: middle;
}

/* ---- Responsive ---- */
@media (max-width: 850px) {
  .container {
    gap: 22px 8px;
  }
  .card {
    width: 95vw;
    min-width: 0;
    max-width: 400px;
    margin: 0 auto;
  }
}
@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 4vw;
    min-height: 58px;
    width: 100vw;
  }
  .navbar-links {
    gap: 11px;
    width: 100%;
    justify-content: flex-start;
    margin-top: 2px;
    font-size: 1em;
    flex-wrap: wrap;
  }
  .container {
    gap: 12px 4px;
  }
  .card-title,
  .card-desc {
    margin-left: 9px;
  }
}

/* Pour éviter tout débordement horizontal */
html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}
.hamburger {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 1002;
  width: 32px;
  height: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 4px;
  width: 100%;
  background: #fff; /* Mets la couleur de ton thème */
  border-radius: 2px;
  transition: 0.3s;
}
.side-menu {
  position: fixed;
  top: 0;
  left: -220px;
  width: 220px;
  height: 100%;
  background: rgba(20, 22, 40, 0.95); /* Adapter selon ton background */
  box-shadow: 2px 0 8px #0007;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding-top: 70px;
  transition: left 0.3s;
}
.side-menu.open {
  left: 0;
}
.side-menu a {
  color: #fff;
  text-decoration: none;
  padding: 18px 32px;
  font-size: 1.2em;
  transition: background 0.2s;
}
.side-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.welcome-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 200px;
  padding: 36px 0 16px 16vw;
  background: transparent; /* pour voir le canvas derrière */
  z-index: 1;
}
.welcome-video {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 32px;
  box-shadow: 0 4px 24px #000a;
}
.welcome-text h1,
.welcome-text p {
  margin: 0;
  color: #fff; /* Adapter à ton background */
  text-shadow: 0 2px 8px #000a;
}
.welcome-text h1 {
  font-size: 2.3em;
}
.welcome-text p {
  font-size: 1.3em;
  opacity: 0.8;
}
