<template>
  <LayoutContainer>
    <v-row>
      <v-col cols="12">
        <div class="banner-container">
          <img
            :src="imageSrc"
            :alt="imageAlt"
            class="cover-image"
          />

          <div class="details-square">
            <v-row>
              <div class="content-row">
                <img
                  src="/images/logiciels/icons/la-musique.svg"
                  alt="icon instrument de musique"
                  class="custom-icon"
                />
                <p class="description">
                  {{ squareText }}
                </p>
              </div>
            </v-row>
          </div>

          <div class="logo-square alt-theme">
            <img :src="logoSrc" :alt="logoAlt"/>
          </div>
        </div>
      </v-col>
    </v-row>
  </LayoutContainer>
</template>

<script setup>

const props = defineProps({
  imageSrc: {
    type: String,
    required: true
  },
  imageAlt: {
    type: String,
    default: ""
  },
  squareText: {
    type: String,
    default: "École de musique, d'art, de danse, de cirque, conservatoires et MJC"
  },
  logoSrc: {
    type: String,
    required: true
  },
  logoAlt: {
    type: String,
    default: ""
  }
});
</script>

<style scoped lang="scss">
.banner-container {
  position: relative;
  overflow: hidden;
}

.cover-image {
  width: 100%;
  min-height: 400px;
  max-height: 400px;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.2s;
  margin: 0 auto;
  transform: scaleX(-1);
}

.custom-icon {
  width: 3rem;
  height: 3rem;
  margin-top: .5rem;
}

.details-square {
  position: absolute;
  bottom: 0.4rem;
  right: 0;
  width: 13rem;
  height: 10rem;
  background: var(--secondary-color);
}

.logo-square {
  position: absolute;
  bottom: 0.4rem;
  right: 13rem;
  width: 13rem;
  height: 10rem;

  img {
    width: 100%;
    height: 50%;
    margin-top: 2.5rem;
  }
}

.description {
  color: var(--on-secondary-color);
  font-weight: 300;
  font-size: 0.8rem;
  text-align: center;
  display: flex;
  align-items: center;
  margin: 0.5rem 2rem 1rem;
}

.content-row {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  height: 100%;
}

.icon {
  margin-left: 2rem;
  margin-right: 2rem;
}
</style>
