@import './index.css' layer(index);

header {
  background-image: url('./images/miantvbg.jpeg'),
    linear-gradient(to top, rgb(235, 19, 19, 0.4), transparent);
  min-height: auto;

  .text {
    text-transform: uppercase;
    padding-block: 4rem;
    font-size: 6rem;
    font-weight: 400;
  }
}
main {
  color: black;
  line-height: 2;

  section.miantv {
    .description {
      color: black;
      font-weight: 400;
      p {
        margin-bottom: 1rem;
        text-align: justify;
        hyphens: auto;
        line-height: 1.5;
      }
    }
  }

  section.emissions {
    .emissions {
      padding-block: 2rem;

      .emission {
        padding-block: 2rem;
        display: grid;
        gap: 3rem;
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
          'img desc'
          'video video';
        align-items: center;

        &:nth-child(even) {
          grid-template-areas:
            'desc img'
            'video video';
        }

        .img {
          grid-area: img;
          display: flex;
          align-items: center;
          justify-content: center;

          img {
            width: 100%;
            height: auto;
            object-fit: contain;
          }
        }

        .descriptif {
          grid-area: desc;

          strong {
            font-weight: 700;
          }

          .emission__title {
            text-align: center;
            text-transform: uppercase;
            margin-bottom: 2rem;
            letter-spacing: 10px;
          }
          .emission__descriptif {
            p {
              padding-block: 0.5rem;
              text-align: justify;
              hyphens: auto;
            }

            ul {
              list-style: disc;
            }
          }
        }

        .videos {
          grid-area: video;
          text-align: center;
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 2rem;

          &:has(.video, video) {
            display: flex;
            align-items: center;
            justify-content: center;
          }

          img {
            border-radius: 10px;
          }

          video {
            border-radius: 15px;
          }
        }
      }
    }
  }
}

@media screen and (max-width: 768px) {
  header {
    .text {
      font-size: 4rem;
      padding-block: 2rem;
    }
  }
  main {
    section.emissions {
      .emissions {
        .emission {
          padding-bottom: 5rem;
          grid-template-columns: 1fr;
          grid-template-areas:
            'desc'
            'img'
            'video';
          gap: 4rem;

          &:nth-of-type(even) {
            grid-template-areas:
              'desc'
              'img'
              'video';
          }

          .videos:has(.video, video) {
            display: initial;

            video {
              vertical-align: middle;
              border-radius: 15px;
            }
          }
        }
      }
    }
  }
}
