/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");

/* Base styles */
* {
  margin: 0;
  padding: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f9f9f9;
  color: #333;
  overflow-x: hidden;
}

/*Navbar*/

.navbar {
  z-index: 1;
  background: #fff;
  position: fixed;
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
}

/* Animation de rétrécissement de la navbar */

.navbar.scrolled {
  height: 60px;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .logo_d {
  width: 25%;
  transition: all 0.3s ease;
}

/* Amélioration du hover */

.navbar nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  transition: width 0.3s ease;
}

.navbar nav ul li a:hover::after,
.navbar nav ul li a.active::after {
  width: 100%;
}

/* Animation du menu hamburger */
.hamburger {
  transition: all 0.3s ease;
}

.hamburger.active div:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active div:nth-child(2) {
  opacity: 0;
}

.hamburger.active div:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hamburger div {
  transition: all 0.3s ease;
}

/* Animation du menu mobile */
.navbar nav {
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.navbar nav.active {
  left: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.logo_d {
  width: 30%;
}

header .logo {
  font-size: 30px;
  text-transform: uppercase;
}
header nav ul {
  display: flex;
}
header nav ul li a {
  display: inline-block;
  color: #000;
  padding: 5px 0;
  margin: 0 10px;
  border: 3px solid transparent;
  text-transform: uppercase;
  transition: 0.2s;
}
header nav ul li a:hover,
header nav ul li a.active {
  border-bottom-color: dodgerblue;
}
.hamburger {
  cursor: pointer;
  display: none;
}
.hamburger div {
  width: 30px;
  height: 3px;
  margin: 5px 0;
  background: #000;
}
@media only screen and (max-width: 900px) {
  header {
    padding: 0 30px;
  }
}
@media only screen and (max-width: 700px) {
  .hamburger {
    display: block;
  }
  header nav {
    position: absolute;
    width: 100%;
    left: -100%;
    top: 70px;
    width: 100%;
    background: #fff;
    padding: 30px;
    transition: 0.3s;
  }
  header #nav_check:checked ~ nav {
    left: 0;
  }
  header nav ul {
    display: block;
  }
  header nav ul li a {
    margin: 5px 0;
  }
}

/* Main content */
.main-content {
  padding-top: 100px;
  padding-bottom: 50px;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  margin-bottom: 50px;
  margin-top: -28px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: #2c3e50;
}

.hero .subtitle {
  font-size: 1.5rem;
  color: #7f8c8d;
  font-weight: 300;
}

/* Product categories */
.product-categories {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.category {
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.category.visible {
  opacity: 1;
  transform: translateY(0);
}

.category h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #34495e;
  text-align: center;
}

.category p {
  font-size: 1.2rem;
  color: #7f8c8d;
  text-align: center;
  margin-bottom: 40px;
}

/* Slider styles */
.slider-container {
  position: relative;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

.slider-wrapper {
  position: relative;
}

.slider-wrapper .slide-button {
  position: absolute;
  top: 50%;
  outline: none;
  border: none;
  height: 50px;
  width: 50px;
  z-index: 5;
  color: #fff;
  display: flex;
  cursor: pointer;
  font-size: 2.2rem;
  background: #2c3e50;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.slider-wrapper .slide-button:hover {
  background: #34495e;
  transform: translateY(-50%) scale(1.1);
}

.slider-wrapper .slide-button#prev-slide {
  left: -25px;
  display: none;
}

.slider-wrapper .slide-button#next-slide {
  right: -25px;
}

.image-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 30px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 20px 0;
  scroll-snap-type: x mandatory;
}

.image-list::-webkit-scrollbar {
  display: none;
}

.image-item {
  width: 280px;
  height: 380px;
  scroll-snap-align: start;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-item:hover img {
  transform: scale(1.05);
}

.image-item:hover .product-info {
  transform: translateY(0);
}

.product-info h3 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.product-info p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Scrollbar */
.slider-scrollbar {
  height: 24px;
  width: 100%;
  display: flex;
  align-items: center;
}

.scrollbar-track {
  background: #e0e0e0;
  width: 100%;
  height: 3px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  position: relative;
  transition: height 0.3s ease;
}

.slider-scrollbar:hover .scrollbar-track {
  height: 5px;
}

.scrollbar-thumb {
  position: absolute;
  background: #2c3e50;
  top: 0;
  bottom: 0;
  width: 50%;
  height: 100%;
  cursor: grab;
  border-radius: inherit;
  transition: background 0.3s ease, height 0.3s ease;
}

.scrollbar-thumb:active {
  cursor: grabbing;
  height: 8px;
  top: -2px;
  background: #34495e;
}

.scrollbar-thumb::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  bottom: -10px;
}

/* Responsive styles */
@media only screen and (max-width: 1023px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .subtitle {
    font-size: 1.2rem;
  }

  .category h2 {
    font-size: 2rem;
  }

  .slider-wrapper .slide-button {
    display: none !important;
  }

  .image-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .image-item {
    width: 250px;
    height: 350px;
  }
}

@media only screen and (max-width: 767px) {
  .hero {
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .category h2 {
    font-size: 1.8rem;
  }

  .image-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .image-item {
    width: 220px;
    height: 320px;
  }

  .slider-container {
    padding: 0 20px;
  }
}

/* Footer */

footer {
  margin-top: 15%;
  display: flex;
  min-height: 100vh;
  justify-content: flex-end;
  align-items: flex-end;
  position: relative;
  width: 100%;
  background: #3586ff;
  min-height: 100px;
  padding: 20px 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

footer .social_icon,
footer .menu {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 10px 0;
  flex-wrap: wrap;
}

footer .social_icon li,
footer .menu li {
  list-style: none;
}

footer .social_icon li a {
  font-size: 2em;
  color: #fff;
  margin: 0 10px;
  display: inline-block;
  transition: 0.5s;
}

footer .social_icon li a:hover {
  transform: translateY(-10px);
}

footer .menu li a {
  font-size: 1.2em;
  color: #fff;
  margin: 0 10px;
  display: inline-block;
  text-decoration: none;
  opacity: 0.75;
}
footer .menu li a:hover {
  opacity: 1;
}

footer p {
  color: #fff;
  text-align: center;
  margin-top: 15px;
  margin-bottom: 10px;
  font-size: 1.1em;
}

footer .wave {
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 100px;
  background: url(media/wave.png);
  background-size: 1000px 100px;
}

footer .wave#wave1 {
  z-index: 1000;
  opacity: 1;
  bottom: 0;
  animation: animateWave 4s linear infinite;
}

footer .wave#wave2 {
  z-index: 999;
  opacity: 0.5;
  bottom: 10px;
  animation: animateWave_02 4s linear infinite;
}

footer .wave#wave3 {
  z-index: 1000;
  opacity: 0.2;
  bottom: 0;
  animation: animateWave 3s linear infinite;
}

footer .wave#wave4 {
  z-index: 999;
  opacity: 0.7;
  bottom: 1 0px;
  animation: animateWave_02 3s linear infinite;
}

@keyframes animateWave {
  0% {
    background-position-x: 1000px;
  }
  100% {
    background-position-x: 0px;
  }
}

@keyframes animateWave_02 {
  0% {
    background-position-x: 0px;
  }
  100% {
    background-position-x: 1000px;
  }
}

/* iPhone Specific Adjustments */
@media only screen and (max-width: 767px) {
  /* Stack area adjustments */
  .stack-area {
    height: auto;
    flex-direction: column;
  }

  .left,
  .right {
    position: relative;
    height: auto;
    padding: 30px 20px;
  }

  .title {
    width: 100%;
    font-size: 42px;
    line-height: 48px;
    text-align: center;
  }

  .sub-title {
    width: 100%;
    font-size: 16px;
    text-align: center;
  }

  /* Cards adjustments */
  .card {
    position: relative;
    width: 90%;
    height: 250px;
    margin: 20px auto;
    left: auto;
    top: auto;
    transform: none !important;
  }

  /* Image section */
  .imgt h1 {
    padding-top: 5rem;
    font-size: 32px;
    line-height: 40px;
  }

  .imgt p {
    padding: 20px;
  }

  .card__container {
    flex-direction: column;
    align-items: center;
  }

  .card__article {
    margin-bottom: 100px;
  }

  /* Details section */
  .lol {
    min-height: auto;
    padding: 30px 20px;
  }

  .lol h1 {
    font-size: 32px;
    text-align: center;
  }

  .content2 {
    grid-template: 1fr / 1fr;
    padding: 0;
  }

  /* Footer adjustments */
  footer {
    padding: 50px 20px;
  }

  .wave {
    height: 50px;
    background-size: 500px 50px;
  }

  /* Button adjustments */
  .btn-17 {
    margin-right: 0;
    width: 100%;
    padding: 0.8rem 1rem;
  }

  /* Navbar fixes */
  .navbar {
    padding: 0 15px;
    height: 60px;
  }

  .logo_d {
    width: 50%;
  }

  .navbar nav {
    top: 60px;
  }
}

/* iPhone X/XS/11 Pro landscape */
@media only screen and (max-width: 767px) and (orientation: landscape) {
  .stack-area {
    height: auto;
  }

  .left,
  .right {
    height: auto;
  }

  .card {
    height: 200px;
  }

  .imgt h1 {
    padding-top: 3rem;
  }
}

/* iPhone 12/13 mini specific */
@media only screen and (max-width: 375px) and (max-height: 812px) {
  .title {
    font-size: 36px;
  }

  .card {
    height: 220px;
  }

  .card__content {
    font-size: 30px;
    line-height: 40px;
  }
}

/* Fix for Safari viewport units */
@supports (-webkit-touch-callout: none) {
  .stack-area,
  .left,
  .right {
    height: auto;
    min-height: 100vh;
  }
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Tap highlight color */
a,
button {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}
