/* Base */
body {
  font-family: 'Roboto Slab', serif;
  color: white;
  background-color: #c9a018;
  margin: 0;
  padding: 0;
}

/* Variables CSS */
:root {
  --card-width: 300px;
  --card-height: 200px;
}

/* Box-sizing pour tous les éléments */
* {
  box-sizing: border-box;
}

/* Mise en page de la section de projets */
.projet {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
  padding: 20px;
}

/* Style des cartes de projet */
.card {
  width: var(--card-width);
  height: var(--card-height);
  position: relative;
  margin: 0 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 36px;
  perspective: 2500px;
}

/* Styles pour la modale */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1; 
}

.modal-content {
  background-color: #fff;
  color: black;
  margin: auto;
  padding: 20px;
  border-radius: 5px;
  width: 60%;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2; 
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

#modalTitle {
  font-size: 24px;
  margin-bottom: 10px;
}

/* Styles pour l'image de la modale */
#modalImage {
  max-width: 400px;
  max-height: 400px;
  display: block; 
  margin: 0 auto; 
}

#modalText {
  font-size: 16px;
}

#modalLink {
  display: block;
  margin-top: 20px;
  text-align: center;
  font-size: 18px;
  color: #007BFF;
}

#modalLink:hover {
  text-decoration: underline;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card .hover-image {
  display: none;
  position: absolute;
  bottom: calc(var(--card-height) + 25px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 50%;
}

.card:hover .hover-image {
  display: block;
  max-width: 100%;
}

.card .description {
  font-size: 14px;
  margin-top: 10px;
  display: none;
  width: 100%;
}

.card:hover .description {
  display: block;
  font-size: 25px;
  color: #000000;
}

/* Effet de perspective */
.wrapper {
  transition: all 0.5s;
  width: 100%;
  z-index: -1;
}

.card:hover .wrapper {
  transform: perspective(900px) translateY(-5%) rotateX(25deg) translateZ(0);
  box-shadow: 2px 35px 32px -8px rgba(187, 195, 206, 0.75);
}

.wrapper::before,
.wrapper::after {
  content: "";
  opacity: 0;
  width: 100%;
  height: 80px;
  transition: all 0.5s;
  position: absolute;
  left: 0;
}

.wrapper::before {
  top: 0;
}

.wrapper::after {
  bottom: 0;
  opacity: 1;
}

.card:hover .wrapper::before,
.wrapper::after {
  opacity: 1;
}

.card:hover .wrapper::after {
  height: 120px;
}

.title {
  width: 100%;
  transition: transform 0.5s;
  opacity: 0;
}

.card:hover .title {
  transform: translate3d(15%, -20px, 100px);
  opacity: 1;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin: 20px 50px;
}

/* Bouton "Retour en haut" */
#btt {
  position: fixed;
  bottom: 20px;
  right: 20px;
  opacity: 0.8;
  width: 50px;
  transition: margin-bottom 0.6s, opacity 0.6s;
}

#btt:hover {
  margin-bottom: 25px;
  opacity: 1;
  transition: margin-bottom 0.6s, opacity 0.6s;
}

/* Styles pour la section "Bienvenue" */
#welcome {
  font-family: 'Amatic SC', cursive;
  color: #FCFFFF;
  background: url("./assets/topbackground.jpg.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  height: 100vh;
  width: auto;
  padding: 5% 5% 5% 5%;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

#welcome h1 {
  font-size: 80px;
  font-weight: bold;
  text-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
}

/* Flèche vers le bas */
#press {
  width: 200px;
  margin-top: 10%;
  transition: background-color 0.6s, opacity 0.6s, margin-top 1s;
}

#press:hover {
  opacity: 0.8;
  margin-top: 20%;
  transition: background-color 0.6s, opacity 0.6s, margin-top 1s;
}

/* Styles pour la section "À propos" */
#about {
  background-color: #12878d;
  padding: 5% 5% 5% 5%;
  height: auto;
  width: auto;
}

#about h1 {
  font-family: 'Amatic SC', cursive;
  font-size: 40pt;
  font-weight: bold;
  text-align: left;
}

#about p {
  text-align: left;
}

#about #email img {
  text-align: left;
  width: 25px;
}

#email {
  background-color: #26816E;
  padding: 2% 2% 2% 2%;
  border-radius: 40px;
  transition: box-shadow 0.5s, color 0.8s, background-color 0.5s;
}

#portScroll {
  background-color: #c7902a;
  padding: 2% 2% 2% 2%;
  border-radius: 50px;
  box-shadow: 5px 5px grey;
  margin-left: 2%;
  transition: box-shadow 0.5s, color 0.8s, background-color 0.5s;
}

#about #portScroll img {
  text-align: left;
  margin-right: 5px;
  width: 18px;
}

#portScroll a,
#portScroll a:hover {
  color: white;
  text-decoration: none;
}

#email:hover,
#portScroll:hover {
  box-shadow: 5px 15px 30px #062928;
  background-color: #b04717;
  transition: box-shadow 0.5s, color 0.8s, background-color 0.5s;
  cursor: pointer;
}

#self img {
  width: 35%;
  float: right;
  border: solid 8px #0a614e;
  border-radius: 50%;
  box-shadow: 5px 15px 30px #062928;
}

/* Styles pour la section "Portfolio" */
#portfolio {
  font-family: 'Amatic SC', cursive;
  background-color: #ffffff;
  color: #000;
  padding: 5% 5% 5% 5%;
  width: auto;
  min-height: auto;
}

#portfolio h3 {
  font-family: 'Roboto Slab', serif;
  font-size: 15pt;
}

.portfolioTop {
  display: flex;
  justify-content: center;
  flex-direction: column;
  width: 300px;
  align-items: center;
  margin: 0 auto;
}

/* Styles pour la navigation */
#categorie {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  margin-bottom: 60px;
}

#categorie:hover {
  border-color: #007BFF;
}

#categorie:focus {
  outline: none;
  border-color: #007BFF;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

#openmenu {
  font-family: 'Amatic SC', cursive;
  font-size: 20pt;
  background-color: #c69927;
  border-bottom: solid 5px rgb(156, 146, 146);
  border-right: solid 5px rgb(148, 136, 136);
  position: fixed;
  padding: 2px;
  width: 15%;
  border-radius: 50px;
  text-align: center;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  cursor: pointer;
}

#openmenu:hover {
  width: 15%;
  transition: width 0.5s;
  cursor: pointer;
}

/* Overlay pour la navigation mobile */
.overlay {
  height: 0;
  width: 100%;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, 0.9);
  overflow-x: hidden;
  transition: height 0.5s;
}

.overlay.active {
  height: 100%;
}

.overlay-content {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  text-align: center;
}

.overlay a {
  padding: 8px;
  text-decoration: none;
  font-size: 36px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.overlay a:hover,
.overlay a:focus {
  color: #f1f1f1;
}

.closebtn {
  position: absolute;
  top: 20px;
  right: 45px;
  font-size: 60px !important;
}

@media screen and (max-height: 450px) {
  .overlay a {
    font-size: 20px;
  }
  .closebtn {
    font-size: 40px !important;
    top: 15px;
    right: 35px;
  }
}

/* Media queries pour les écrans plus petits */
@media screen and (max-width: 768px) {
  .modal-content {
    width: 90%;
  }

  .card {
    width: 100%;
    margin: 0;
  }

  .title {
    font-size: 20px;
  }

  #openmenu {
    font-size: 16px;
    padding: 8px;
  }

  #self img {
    width: 30%;
  }
}
