<template>
  <LayoutContainer :overflow="false">
    <div class="d-flex justify-center align-center flex-column">
      <v-icon size="8" class="fa-solid fa-circle icon-title" />
      <p class="text-center solution-subtitle">3 solutions</p>
    </div>
    <h3
      class="text-center title"
      :style="smAndDown ? '' : 'margin-bottom: 3rem'"
    >
      Trouvez la solution faites pour vous
    </h3>

    <v-row class="row-custom">
      <v-col
        v-for="(solution, index) in solutions"
        :key="index"
        cols="4"
        class="col-info"
      >
        <v-container>
            <small class="opentalent-small">Opentalent</small>
            <h2 class="logiciel-name">
              {{ solution.name }}
            </h2>
            <hr class="bar" />
            <p class="description-logiciel">
              {{ solution.description }}
            </p>

            <nuxt-link :to="solution.link">
              <v-row>
                <div :class="solution.class" class="image-container">
                  <v-img :src="solution.image" class="logo" />
                  <v-btn v-on:mouseover="mouseover" class="view-button"
                    >Découvrir</v-btn
                  >
                </div>
              </v-row>
            </nuxt-link>

            <v-row justify="center">
              <div class="list-container">
                <v-col cols="6">
                  <ul class="list-solutions">
                    <li
                      v-for="(sol, i) in solution.solutions.slice(0, 4)"
                      :key="'sol-' + i"
                      class="details-solution"
                    >
                      {{ sol }}
                    </li>
                  </ul>
                </v-col>
                <v-col cols="6">
                  <ul class="list-solutions">
                    <li
                      v-for="(sol, i) in solution.solutions.slice(4)"
                      :key="'sol-' + i"
                      class="details-solution"
                    >
                      {{ sol }}
                    </li>
                  </ul>
   
                </v-col>
                
              </div>
            </v-row>
        </v-container>
      </v-col>
    </v-row>
  </LayoutContainer>
</template>

<script setup>
import { ref, onMounted } from "vue";
import "vue3-carousel/dist/carousel.css";
import { useDisplay } from "vuetify";
const { smAndDown } = useDisplay();

const carousel = ref(null);

const goPrevious = () => {
  carousel.value.prev();
};

const goNext = () => {
  carousel.value.next();
};
const solutions = [
  {
    name: "Artist",
    description: "Orchestres, chorales, compagnies de danse, théâtre et cirque",
    image: "/images/logo/logiciels/Artist-Blanc.png",
    link: "/opentalent_artist",
    class: "artist-image",
    solutions: [
      "Gestion des membres",
      "Agenda de la structure",
      "Matériel & médiathèque",
      "Export de données",
      "Communication",
      "Statistiques",
      "Site internet intégré",
      "Partage de données en réseau",
    ],
    option: "* en option",
  },
  {
    name: "School",
    description: "Petits et grands établissements d'enseignement artistique",
    image: "/images/logo/logiciels/School-Blanc.png",
    link: "/opentalent_school",
    class: "school-image",
    solutions: [
      "Gestion des membres",
      "Préinscription en ligne*",
      "Agenda de la structure",
      "Suivi pédagogique",
      "Gestion administrative et financière",
      "Communication",
      "Site internet intégré",
      "Statistiques",
    ],
  },
  {
    name: "Manager",
    description: "Fédérations, confédérations et collectivités",
    image: "/images/logo/logiciels/Manager-Blanc.png",
    link: "/opentalent_manager",
    class: "manager-image",
    solutions: [
      "Gestion des membres",
      "Agenda du réseau",
      "Matériel & médiathèque",
      "Gestion administrative",
      "Statistiques du réseau",
      "Cotisations",
      "Site internet intégré",
      "Communication",
    ],
  },
];
onMounted(() => {
  setTimeout(() => goNext(), 0);
});
</script>

<style scoped>

.row-custom {
  width: 90%;
  margin-right: auto;
  margin-left: auto;
}

.list-container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.image-container {
  position: relative;
}

.view-button {
  position: absolute;
  z-index: 100;
  bottom: 40%;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  font-size: 0.8rem;
  border-radius: 6px;
  background: var(--Vert-60, #64afb7);
  color: white;
}

.image-container:hover .view-button {
  display: block;
}

.solution-subtitle {
  font-size: 1rem;
  line-height: 1rem;
  margin-top: 1rem;
  color: #c1eff0;
  text-align: center;
  letter-spacing: 2.16px;
  text-transform: uppercase;
}
.title {
  margin-top: 0.5rem;
  font-size: 2.8rem;
  line-height: 42px;
  text-align: center;
  color: #ffffff;
  width: 100%;
}

.logo {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 200px;
}

.artist-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  border-radius: 0px 0px 10px 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.artist-image:hover::before {
  opacity: 1;
  cursor: pointer;
}

.manager-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  border-radius: 0px 0px 10px 10px;
  opacity: 0;
  transition: opacity 0.3s;
}
.carousel-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background-color: transparent;
  border: 2px solid #fff;
  cursor: pointer;
  margin-right: 1rem;
  margin-top: 2rem;
}

.carousel-button i {
  color: #fff;
}
.manager-image:hover::before {
  opacity: 1;
  cursor: pointer;
}

.school-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  border-radius: 0px 0px 10px 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.school-image:hover::before {
  opacity: 1;
  cursor: pointer;
}

.description-logiciel {
  font-family: "Barlow";
  font-style: normal;
  font-size: 0.9rem;
  line-height: 0.9rem;
  margin-top: 1rem;
  color: #eff9fb;
  width: 20rem;
}

.opentalent-container {
  text-align: left;
  margin-left: 1rem;
}
.icon-title {
  margin-top: 1rem;
  color: #ffffff;
}



.details-solution {
  font-size: 0.9rem;
  width: 10rem;
  margin-left: 1rem;
  font-family: "Barlow";
  font-style: normal;
  line-height: 18px;
  color: #091d20;
}
.list-solutions {
  margin-top: 0.9rem;
  font-size: 0.5rem;
}

.bar {
  color: #c3e5e7;
  width: 20rem;
}

.artist-image {
  position: relative;
  background: url(/images/solutions/artist.jpg);
  background-size: cover;
  background-position: center;
  border-radius: 0px 0px 10px 10px;
  width: 21rem;
  height: 20rem;
  margin-top: 2rem;
  margin-left: 0.9rem;
}

.artist-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  border-radius: 0px 0px 10px 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.artist-image:hover::before {
  opacity: 1;
  cursor: pointer;
}
.manager-image {
  position: relative;
  background: url(/images/solutions/manager.png);
  background-size: cover;
  background-position: center;
  border-radius: 0px 0px 10px 10px;
  width: 21rem;
  height: 20rem;
  margin-top: 2rem;
  margin-left: 0.9rem;
}

.manager-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  border-radius: 0px 0px 10px 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.manager-image:hover::before {
  opacity: 1;
  cursor: pointer;
}

.school-image {
  position: relative;
  background: url(/images/solutions/school.jpg);
  background-size: cover;
  background-position: center;
  border-radius: 0px 0px 10px 10px;
  width: 21rem;
  height: 20rem;
  margin-top: 2rem;
  margin-left: 0.9rem;
}

.school-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  border-radius: 0px 0px 10px 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.school-image:hover::before {
  opacity: 1;
  cursor: pointer;
}

.description-logiciel {
  font-size: 1.3rem;
  line-height: 1.5rem;
  margin-top: 1rem;
  color: #eff9fb;
}

.logiciel-name {
  font-weight: 400;
  font-size: 30px;
  line-height: 2rem;
  color: #c3e5e7;
  margin-bottom: 1rem;
}

.opentalent-small {
  font-weight: 600;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
}

.container {
  background: #0e2d32;
  margin-bottom: 15rem;
  height: 35rem;
  position: relative;
}
</style>
