<template>
  <LayoutContainer>
    <v-row>
      <v-col cols="12">
        <div class="banner-container">
          <img
            :src="imageSrc"
            :alt="imageAlt"
            class="cover-image"
          />
          <div class="black-square" :style="{ backgroundColor: squareColor }">
            <v-row>
              <div class="content-row">
                <v-icon size="50"  class="fa-brands fa-react icon "  />
                <p class="description-square" :style="{ color: textColor }">
                  {{ squareText }}
                </p>
              </div>
            </v-row>
          </div>

          <div class="blue-square" :style="{ backgroundColor: blueSquareColor }">
            <img
              :src="logoSrc"
              :alt="logoAlt"
              class="logo-image"
            />
          </div>
        </div>
      </v-col>
    </v-row>
  </LayoutContainer>
</template>

<script setup>
import { defineProps } from 'vue';

const props = defineProps({
  imageSrc: {
    type: String,
    required: true
  },
  imageAlt: {
    type: String,
    default: ""
  },
  squareColor: {
    type: String,
    default: "#9edbdd" 
  },
  textColor: {
    type: String,
    default: "#091d20" 
  },
  squareText: {
    type: String,
    default: "École de musique, d'art, de danse, de cirque, conservatoires et MJC"
  },
  blueSquareColor: {
    type: String,
    default: "#0e2d32"
  },
  logoSrc: {
    type: String,
    required: true
  },
  logoAlt: {
    type: String,
    default: ""
  }
});
</script>

<style scoped>

.black-square {
  position: absolute;
  bottom: 0.4rem;
  right: 0;
  width: 13rem;
  height: 10rem;
  background-color: black;
  background: #9edbdd;
}

.blue-square {
  position: absolute;
  bottom: 0.4rem;
  right: 13rem;
  width: 13rem;
  height: 10rem;
  background: #0e2d32;
}

.description-square {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 300;
  font-size: 0.8rem;
  text-align: center;
  color: #091d20;
  display: flex;
  align-items: center;
  text-align: center;
  margin-top: 0.5rem;
  margin-left: 2rem;
  margin-right: 2rem;
  margin-bottom: 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;
}

.logo-image {
  width: 100%;
  height: 50%;
  margin-top: 2.5rem;
}

.banner-container {
  position: relative;
  overflow: hidden;
}

.cover-image {
  width: 100%;
  height: 30rem;
  object-fit: cover;
  object-position: center 20%; 
  transition: transform 0.2s;
  margin: 0 auto;
  transform: scaleX(-1);
}
</style>
