/* --- Global styles --- */
body {
  margin: 0;
  font-family: 'Questrial', sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }

/* --- Header --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #ddd;
  height: 50px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 50px;
  display: block;
}

.logo h1 {
  margin: 0;
  font-size: 32px;
  font-weight: normal;
}
.muzeo { font-family: 'Sen', sans-serif; }
.x { font-family: 'Manjari', sans-serif; color: red;}

/* conteneur inline */
.muzeox {
  display: inline; /* important : reste dans le flow du texte */
  font-size: 1em;  /* suit la taille du texte environnant */
  line-height: 1;
}

/* "muzeo" : noir + Sen */
.muzeox .sen {
  font-family: 'Sen', sans-serif;
  color: #000;
  font-weight: 700; /* choisi : 400 si tu veux plus fin */
}

/* "x" : rouge + Manjari */
.muzeox .manjari {
  font-family: 'Manjari', sans-serif;
  color:  red;
  font-weight: 700;
}

/* --- Nav --- */
nav {
  display: flex;
  gap: 10px;
}

nav a {
  margin: 0 10px;
  font-weight: bold;
}

.lang-switch {
  border: 1px solid #111;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 5px;
  background: none;
  font-size: 14px;
}

/* --- Burger --- */
.burger {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  width:12px;
  display: none;
  text-align: center;     /* utile pour centrer le symbole */
  color:black;        /* exemple : rouge */

  transition: transform 0.3s ease;
}
.burger:hover { transform: scale(1.1); }

/* style quand il est en mode "x" */
.burger.open {
  font-size: 32px;
  font-weight: 700;
    text-align: center;     /* utile pour centrer le symbole */

  font-family: manjari, sans-serif;
  color: red;        /* exemple : rouge */
}

/* --- Sections --- */
section {
  padding: 0px 20px;
  max-width: 1000px;
  margin: auto;
  scroll-margin-top: 110px;
}

h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

h3 {
  margin-top: 20px;
  font-size: 22px;
}

/* --- Cards --- */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.card {
  flex: 1 1 calc(50% - 20px); 
  max-width: 500px;           
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
  background: #ffffff;
  padding: 15px;
}
.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* --- Fiche détaillée --- */
.card-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease, padding 0.6s ease;
  background: #f9f9f9;
  padding: 0 15px;
  border-top: 1px solid #ccc;
}

.card-details.open {
  max-height: 1000px; /* Adjust as needed */
  padding: 15px;
}

.fade-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.card-details.open .fade-item {
  opacity: 1;
  transform: translateY(0);
}

.card-details.open .fade-item:nth-child(2) { transition-delay: 0.1s; }
.card-details.open .fade-item:nth-child(3) { transition-delay: 0.2s; }
.card-details.open .fade-item:nth-child(4) { transition-delay: 0.3s; }

.card-details img,
.card-details video {
  width: 100%;
  margin-top: 10px;
  border-radius: 5px;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 10px;
  background: #eee;
  font-size: 14px;
  margin-top: 20px;
}

/* Removed: .lang-en { display: none; } as it's handled by separate pages */

/* --- Responsive styles --- */
@media (max-width: 768px) {
  .modal-content {
    max-width: 90% !important;
    width: 90% !important;
    max-height: 90%;
    padding: 15px;
    border-radius: 0;
  }

  .card {
    flex: 1 1 100%;
  }

  .video-container iframe {
    width: 100%;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #ddd;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, box-shadow 0.4s ease;
    box-shadow: none;
    z-index: 9;
  }

  nav.show {
    opacity: 1;
    max-height: 500px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  }

  nav a {
    display: block;
    padding: 15px;
    border-bottom: 1px solid #eee;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  nav.show a {
    opacity: 1;
    transform: translateY(0);
  }

  .burger { display: block; }

  header {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }

  .logo {
    position: absolute;
    left: 15px;
    top: 15px;
  }

  .burger, .lang-switch {
    order: 1;
  }

  .lang-switch {
    margin-left: 5px;
  }
}

/* --- Desktop styles --- */
@media (min-width: 769px) {
  nav {
    position: static;
    flex-direction: row;
    max-height: none;
    opacity: 1;
    box-shadow: none;
    background: none;
  }

  nav a {
    display: inline-block;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .burger { display: none; }
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.video-container iframe {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
}

.inline-webp {
  vertical-align: middle;
  float: left;
  margin: 0px 20px 10px 0px;
}

/* --- Modal --- */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.show {
  display: flex;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor:pointer;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 50%;
  max-height: 70%;
  overflow: auto;
  padding: 20px;
  position: relative;
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  cursor: default;
  border:#ccc solid 1px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.modal.show .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-content .close {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 42px;
  font-family: 'Manjari', sans-serif; color: red;
  cursor: pointer;
    font-weight: 700;

}

/* Removed duplicate modal fade items, relying on the card-details open ones. */
/* If you want different animation for modal items, keep original. For now, simplified */


#background-hypercube {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.1;
  }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-text {
  flex: 1;
}

.card-thumb {
  max-width: 40%;
  height: auto;
  object-fit: contain;
}

/* Version mobile */
@media (max-width: 768px) {
  .card-header {
    flex-direction: column;
  }
  .card-thumb {
    max-width: 80%;
  }
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.5em;
}