/* === RESET & FOND === */
body {
  margin: 0;
  padding-bottom: 120px;
  font-family: 'TAModernTimes', sans-serif;
  background: black;
  color: white;
  overflow-x: hidden;
}

canvas#matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  opacity: 0.3;
  background: transparent;
}

#menu-container,
#footer-container {
  width: 100%;
}

/* === LAYOUT PRINCIPAL === */
main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  padding: 120px 20px 180px;
  max-width: 1300px;
  margin: 0 auto;
  z-index: 1000;
  position: sticky;
}

.content {
  display: flex;
  justify-content: center;
  gap: 40px;
  width: 100%;
}

/* === HERO === */
.hero {
  width: 100%;
  text-align: center;
  margin-bottom: 30px;
  margin-top: 150px;
}

.hero h1 {
  font-size: 3em;
  color: #fff;
  font-family: 'Magnetar', sans-serif;
  margin-bottom: 10px;
}

.hero p {
  color: #ccc;
  font-family: 'Summer Miracle', sans-serif;
  font-size: 1.3em;
}

/* === BLOCS === */
.block {
  background: rgba(20, 20, 20, 0.85);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.articles {
  width: 60%;
}

.avis-slider {
  width: 30%;
}

.block h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #ff4de9;
  font-family: 'Magnetar', sans-serif;
}

/* === ARTICLES === */
.article {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.article:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.01);
}

.article-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  margin-right: 15px;
  border: 2px solid white;
}

.article h3 {
  font-size: 1.2rem;
  margin: 0 0 5px;
  color: #ff73f8;
}

.article p {
  color: #ddd;
  font-size: 0.95em;
  margin: 0;
}

/* === AVIS === */
.avis-container {
  min-height: 150px;
  position: relative;
}

.avis {
  display: none;
  animation: fadeIn 1s ease forwards;
}

.avis.active {
  display: block;
}

.avis-stars {
  color: gold;
  font-size: 1.2em;
  margin-bottom: 5px;
}

.avis-nom {
  font-size: 0.95em;
  font-weight: bold;
  color: #fff;
  margin-top: 5px;
}

.avis-commentaire {
  font-size: 1em;
  color: #ddd;
}

.avis-date {
  font-size: 0.9em;
  color: #aaa;
  margin-top: 10px;
}

.btn-avis {
  margin-top: 20px;
  display: inline-block;
  background: linear-gradient(90deg, #ff00cc, #3333ff);
  border: none;
  padding: 10px 25px;
  color: white;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-avis:hover {
  transform: scale(1.05);
}

/* === POPUPS === */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 420px;
  transform: translate(-50%, -50%);
  background: #121212;
  border-radius: 12px;
  padding: 25px;
  z-index: 9999;
  display: none;
  box-shadow: 0 0 30px rgba(255,0,255,0.3);
}

.popup.show {
  display: block;
}

.popup input,
.popup textarea,
.popup select {
  width: 100%;
  background: #1e1e1e;
  border: none;
  color: white;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  font-size: 15px;
}

.popup button {
  width: 100%;
  background: #ff33cc;
  color: white;
  border: none;
  padding: 12px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
}

.popup .close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  cursor: pointer;
  color: #aaa;
}

.popup .close-btn:hover {
  color: white;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  main {
    flex-direction: column;
    align-items: center;
    padding: 100px 15px 150px;
  }

  .content {
    flex-direction: column;
    width: 100%;
    gap: 40px;
  }

  .articles, .avis-slider {
    width: 100%;
  }

  .article {
    flex-direction: row;
    gap: 10px;
  }

  .article-thumb {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2em;
  }

  .hero p {
    font-size: 1em;
  }

  .block {
    padding: 15px;
  }

  .article h3 {
    font-size: 1.1em;
  }

  .btn-avis {
    font-size: 0.9em;
    padding: 10px 20px;
  }

  .popup {
    width: 95%;
    padding: 15px;
  }

  .popup input, .popup textarea, .popup select {
    font-size: 14px;
    padding: 10px;
  }

  .popup button {
    font-size: 15px;
    padding: 10px;
  }
}
