/* Global Styles */

@import url("https://fonts.googleapis.com/css2?family=Ubuntu+Mono&display=swap");

* {
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
  transition: all ease 0.3s;
  margin: 0;
  padding: 0;
}


/* Loader */

.loader {
  z-index: 1001;
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease 0.3s;
  animation: loader_load 0.1s ease-out;
}

.loader.end {
  transform: translateY(100%);
}

.loader img {
  width:25%;
  animation: loader_anim 2s ease infinite;
}

@keyframes loader_load {
  0% {
      transform: translateY(-100%);
  }
  100% {
      transform: translateY(0);
  }
}

@keyframes loader_anim {
  0% {
      transform:scale(1.2);
  }
  50% {
      transform: scale(1);
  }
  100% {
      transform:scale(1.2);  
  }
}

/* Background*/

html {
  height:100%;
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #333;
  background: #100721;
}

.bg {
  animation:slide 3s ease-in-out infinite alternate;
  background-image:linear-gradient(-60deg, #cc0000 50%, #333 50%);
  bottom:0;
  left:-50%;
  opacity:.5;
  position:fixed;
  right:-50%;
  top:0;
  z-index:-1;
}

.bg2 {
  animation-direction:alternate-reverse;
  animation-duration:4s;
}

.bg3 {
  animation-duration:5s;
}

@keyframes slide {
  0% {
    transform:translateX(-25%);
  }
  100% {
    transform:translateX(25%);
  }
}

/* Header */



/* Global */

main {
    padding: 2rem;
    text-align: center;
}

.section {
    margin-bottom: 2rem;
}

.section:nth-child(1) {
  margin-top: 200px;
}

.title {
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 1rem;
  width: 100vmax;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    overflow: hidden;
}

.item {
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 1rem;
    width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.item:hover {
    cursor: pointer;
    transform: translateY(-5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.item h3 {
    color: #333;
}

.item img {
    width: 200px;
    height: 200px;
    border-radius: 10%;
    &:hover {
      transform: scale(1.1);
      filter:drop-shadow(10px 7px 10px grey)
    }
}

.img2 {
  &:hover {
    transform: scale(1.1);
    filter:drop-shadow(10px 7px 10px grey)
  }
}

.item2 img {
  width: 200px;
  height: 200px;
  border-radius: 10%;
  &:hover {
    transform: scale(1.1);
    filter:drop-shadow(10px 7px 10px grey)
  }
}

.item2{
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 1rem;
  margin:0, 5rem, 0, 5rem;
  width: 1000px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  
  &:hover {
  cursor: pointer;
  transform: translateY(-5px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
}

h2 {
  color: white;
  mix-blend-mode:difference; 
}

h3 {
  font-weight: bold;
}

.prix {
  font-weight: bold;
  font-size: 20px;
  color: #cc0000;
  margin: 10px;
}

button {
  color: white;
  background-color: #cc0000;
  border-style: none;
  border-radius: 5%;
  padding: 5px;
  max-height: 30px;
  width: auto;
  max-width: 200px;
  font-size: 15px;
  font-weight: bold;
  border: solid 1px #cc0000;
  margin: 10px;

  &:hover {
    max-height: 40px;
    width: auto;
    max-width: 250px;
    font-size:20px;
    cursor: pointer;
  }
}

s:hover {
  text-decoration: none;
}

li{
  list-style:none;
}

li p {
  text-align: left;
}

li img {
  max-width: 25px;
  height: auto;
}

/* Tableau */

table {
  width: 100%;
  border-collapse:collapse;
  margin: 20px 0;
  background-color: rgba(255, 255, 255, 0.5);
}
th, td {
  border: 1px solid #ddd;
  text-align: center;
  padding: 8px;
}

th {
  background-color: white;
}

td {
  font-weight: bold;
}


/* Config */

#configurator {
  text-align: center;
}

.selectors {
  margin-bottom: 20px;
}

#preview {
  margin-top: 20px;
  display: inline-block;
}

canvas{
  background-color: lightgrey;
  border: solid 1px lightgrey;
  border-radius: 5px;
}

/* Footer */

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

  .footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .footer-section {
    flex: 1;
    margin: 20px;
    min-width: 200px;
    place-items: center;
  }

  .footer-container h3 {
    color: white;
  }
  
  .footer-container h4 {
    font-size: 40px;
    margin-bottom: 1rem;
    color: #cc0000;
  }

  .footer-section h5 {
    font-size: 18px;
    margin-bottom: 15px;
    color: white;
  }
  
  .footer-section p, .footer-section ul {
    margin: 0;
    padding: 0;
    color: white;
  }
  
  .footer-section ul li {
    margin-bottom: 10px;
  }
  
  .footer-section ul li a {
    color: white;
    text-decoration: none;
  }
  
  .footer-section ul li a:hover {
    color: white;
    text-decoration: underline;
  }
  
  .footer-section .social-icons {
    display: flex;
  }
  
  .footer-section .social-icons a {
    margin-right: 10px;
  }
  
  .footer-section .social-icons img {
    width: 24px;
    height: 24px;
  }
  
  .footer-bottom {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid gray;
    margin-top: 20px;
  }

/* TESTS */

.image-gallery {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  flex-wrap: wrap; /* Permet de passer à la ligne si nécessaire */
}

.image-card {
  position: relative;
  width: 300px;
  height: auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.image-card .info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(204, 0, 0, 0.5) 50%, rgba(255, 125, 0, 0) 100%);
  color: #fff;
  padding: 10px;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.image-card:hover .info {
  opacity: 1;
  transform: translateY(0);
}

.image-card .info h3 {
  margin: 0;
  font-size: 1.2em;
}

.image-card .info ul {
  margin: 5px 0 0;
  font-size: 0.9em;
  padding: 0;
  list-style: none;
}

/* Adaptation pour écrans de téléphone */
@media (max-width: 768px) {
  .image-gallery {
    flex-direction: column; /* Les cartes s'affichent en colonne */
    align-items: center; /* Centrer les cartes */
    gap: 15px; /* Réduire l'espacement */
  }

  .image-card {
    width: 90%; /* Réduire la largeur à 90% de l'écran */
  }

  .image-card .info h3 {
    font-size: 1em; /* Réduire légèrement la taille des titres */
  }

  .image-card .info ul {
    font-size: 0.8em; /* Réduire légèrement la taille du texte */
  }
}

@media (max-width: 480px) {
  .image-card {
    width: 100%; /* Utiliser toute la largeur de l'écran */
  }

  .image-card img {
    object-fit: contain; /* Éviter de couper les images si elles sont trop grandes */
  }
}

/* test header */

/* Styles généraux */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #333;
  padding: 10px 20px;
  color: white;
}

.logo img {
  height: 50px;
}

.site-name h1 {
  margin: 0;
  font-size: 24px;
}

header a {
  color: white;
  text-decoration: none;
}

/* Menu principal */
nav {
  text-align: center;
}

.menu {
  display: inline-block;
  margin-top:20px;
}
.menu > li {
  float: left;
  color: #ffffff;
  width: 140px;
  height: 40px;
  line-height: 40px;
  cursor: pointer;
  font-size: 17px;
  margin:0 1rem;
}
.sub-menu {
  transform: scale(0);
  transform-origin: top center;
  transition: all 300ms ease-in-out;
}
.sub-menu li {
  font-size: 14px;
  background: #333;
  padding: 8px 0;
  color: white;
  border: 1px solid white;
  transform: scale(0);
  transform-origin: top center;
  transition: all 300ms ease-in-out;
}

.menu a {
  color:white;
  text-decoration: none;
  box-shadow: inset 0 0 0 0 #cc0000;
  transition: color .3s ease-in-out, box-shadow .3s ease-in-out;
  &:hover{
    box-shadow: inset 200px 0 0 0 #cc0000;;
  }
}

.sub-menu li:hover {
  background:rgba(204, 0, 0, 0.2);
}

.menu > li:hover .sub-menu li {
  transform: scale(1);
}

.menu > li:hover .sub-menu {
  transform: scale(1);
}

/* --- Responsivité pour les écrans mobiles --- */
@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
}

  .logo img {
    height: 40px;
    margin-bottom: 10px;
  }

  .site-name h1 {
    font-size: 18px;
    text-align: center;
    margin-bottom: 10px;
  }

  body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #222;
}

/* Styles du menu */
.menu-container {
    background-color: #333;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.menu li {
    position: relative;
    margin-right: 20px;
}

.menu a {
    color: white;
    text-decoration: none;
    padding: 10px;
    display: block;
}

/* Sous-menu */
.sub-menu {
    display: none;
    position: absolute;
    background-color: #444;
    list-style: none;
    padding: 0;
    margin: 0;
    top: 100%;
    left: 0;
    width: 150px;
}

.menu li:hover .sub-menu {
    display: block;
}

.sub-menu li {
    margin: 0;
}

.sub-menu a {
    padding: 10px;
    display: block;
}

/* Bouton hamburger pour mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle div {
    width: 30px;
    height: 4px;
    background-color: white;
    margin: 5px;
}

/* Styles pour mobile */
@media (max-width: 768px) {
    .menu {
        display: none;
        flex-direction: column;
        background-color: #333;
        width: 100%;
        position: absolute;
        top: 50px;
        left: 0;
    }

    .menu li {
        margin: 0;
        text-align: center;
    }

    .menu a {
        padding: 15px;
        border-bottom: 1px solid #444;
    }

    .menu-toggle {
        display: flex;
    }

    .menu.active {
        display: flex;
    }
}
