/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  position: relative;
  z-index: 1;
  background-color: #0c0c0c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  scroll-behavior: smooth;
  background-image: url("./Images /YvesTv-Logo.png");
}
.category h3 {
  color: #00bcd4; /* bleu Apple TV */
  font-weight: 600;
  font-size: 1.6rem;
  border-left: 4px solid #00bcd4;
  padding-left: 10px;
}

/* Intro logo plein écran */
#intro-logo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #0c0c0c;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOutIntro 4.5s ease-out forwards;
}

#intro-logo img {
  width: clamp(150px, 25vw, 400px);
  animation: fadeInLogo 3s ease-out;
}

/* Apparition douce du logo */
@keyframes fadeInLogo {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Disparition en fondu lent */
@keyframes fadeOutIntro {
  0% {
    opacity: 1;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* Header */
header {
  background-color: rgba(51, 51, 51, 0.8);
  color: white;
  padding: 1.5rem;
  text-align: center;
}

header h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

/* Main */

main {
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.85);
}

/* Catégories */
#categories {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.category h3 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  margin-bottom: 1rem;
}

/* Image container */
.image-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* Cartes */
/*.card {
  background-color: #000;
  color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  cursor: pointer;
}*/
.card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: scale(1.02);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.card-info {
  padding: 1rem;
  text-align: center;
}

.card-info h4 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.card-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #0c0c0c;
}

.card:hover .card-info p {
  color: #26c6da; /* variante plus claire du bleu Apple */
}

/* Footer */
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 1rem;
}

@media (min-width: 768px) {
  footer {
    position: fixed;
    bottom: 0;
    width: 100%;
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  animation: zoomIn 0.5s ease-in-out;
}

#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  cursor: pointer;
}

/* Animation */
@keyframes zoomIn {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive */
@media (max-width: 768px) {
  main {
    padding: 1rem;
  }

  .card-info h4 {
    font-size: 1rem;
  }

  .card-info p {
    font-size: 0.8rem;
  }

  header,
  footer {
    padding: 1rem;
  }
}
