/*--------------------------------------------------------------
# Global Section Titles
--------------------------------------------------------------*/
.section-title {
  text-align: center;
  padding-bottom: 60px;
  position: relative;
}

.section-title h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 15px;
  padding-bottom: 15px;
  position: relative;
}

.section-title h2:after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent-color);
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.section-title p {
  margin-bottom: 0;
}

.orange-text {
  color: #ff7f50 !important; /* Orange color */
  font-weight: 700;
  font-family: 'Lato', sans-serif;
}

header a {
  text-decoration: none; /* Supprime le soulignement */
}

header a:hover {
  text-decoration: none; /* Assure qu'il n'y a pas de soulignement même au survol */
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
  background-color: #f2f3f5;
  padding: 100px 0;
  text-align: center;
}

.hero .carousel-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero h2 {
  font-family: 'Lato', sans-serif;
  font-size: 48px;
  color: #333;
  margin-bottom: 20px;
  font-weight: 400;
}

.hero p {
  font-family: 'Lato', sans-serif;
  font-size: 20px;
  color: #666;
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.5;
}

.hero .carousel,
.hero .carousel-item {
  background: none;
}

.carousel-fade .carousel-item {
  background: none;
}

.carousel::before {
  display: none;
}

/* Animations pour le hero */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Style pour les appareils mobiles */
@media (max-width: 768px) {
  .hero .carousel-item h2 {
    font-size: 2rem;
  }

  .hero .carousel-item p {
    font-size: 1rem;
    width: 90%;
  }

  .hero .carousel {
    min-height: 60vh;
  }

  .hero .carousel-item {
    min-height: 60vh;
    padding: 60px 0;
  }
}

/*--------------------------------------------------------------
# Featured Section
--------------------------------------------------------------*/
.hero .featured {
  margin-top: -150px;
  padding-top: 30px;
  padding-bottom: 30px;
  position: relative;
  z-index: 2;
}

.hero .featured-item {
  background-color: var(--surface-color);
  box-shadow: 0px 0 25px 0 rgba(0, 0, 0, 0.1);
  padding: 40px 30px;
  transition: all 0.3s ease-in-out;
  height: 100%;
  width: 100%;
  position: relative;
}

.hero .featured-item:before {
  content: "";
  position: absolute;
  background: var(--accent-color);
  inset: 100% 0 0 0;
  transition: all 0.3s;
}

.hero .featured-item .icon {
  margin-bottom: 10px;
}

.hero .featured-item .icon i {
  color: var(--accent-color);
  font-size: 36px;
}

.hero .featured-item h4 {
  font-weight: 700;
  margin-bottom: 15px;
  font-size: 20px;
}

.hero .featured-item h4 a {
  color: var(--heading-color);
}

.hero .featured-item p {
  line-height: 24px;
  font-size: 14px;
  margin-bottom: 0;
}

.hero .featured-item:hover h4 a,
.hero .featured-item:hover .icon i,
.hero .featured-item:hover p {
  color: var(--contrast-color);
}

.hero .featured-item:hover:before {
  background: var(--accent-color);
  inset: 0;
}

/* Ensure uniform card dimensions */
.card {
  height: 100%; /* Uniform card height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
}

.card:hover {
  transform: translateY(-10px);
}

/* Ensure uniform image dimensions */
.card-img-top {
  width: 100%;
  height: 200px; /* Fixed height for images */
  object-fit: cover; /* Maintain aspect ratio */
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Center align card content */
.card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 15px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 15px;
  min-height: 4em; /* Reserve space for 4 lines of text */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Orange buttons */
.btn-primary {
  background-color: #ff7f50; /* Orange button color */
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  transition: background-color 0.3s ease-in-out;
  border-radius: 5px;
}

.btn-primary:hover {
  background-color: #e96b56; /* Slightly darker orange on hover */
  color: #ffffff;
}

@media (min-width: 1200px) {
  .row {
    grid-template-columns: repeat(4, 1fr); /* 4 cards per row for large screens */
  }
}

/*--------------------------------------------------------------
# Blog Section
--------------------------------------------------------------*/

/* Section title styling */
.section-title {
  text-align: center;
  padding-bottom: 40px;
}

.section-title h2 {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 15px;
  position: relative;
}

.section-title h2:after {
  content: "";
  width: 50px;
  height: 3px;
  background: var(--accent-color);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

/* Blog cards */
.card {
  height: 100%; /* Uniform card height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 5px;
  overflow: hidden;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
}

/* Blog card image */
.card-img-top {
  width: 100%;
  height: 200px; /* Fixed height for uniformity */
  object-fit: cover; /* Ensures images maintain their aspect ratio */
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Blog card content */
.card-body {
  padding: 15px;
  text-align: center;
}

.card-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--heading-color);
}

.card-text {
  font-size: 14px;
  color: var(--default-color);
  margin-bottom: 15px;
  line-height: 1.5;
}

/* Buttons in blog cards */
.btn-primary {
  background-color: #ff7f50; /* Orange button color */
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 0; /* Remove rounded corners */
  transition: background-color 0.3s ease-in-out;
}

.btn-primary:hover {
  background-color: #e96b56; /* Slightly darker orange on hover */
  color: #ffffff;
}

/* Media query for small screens */
@media (max-width: 576px) {
  .card-img-top {
    height: 150px; /* Reduce image height for smaller screens */
  }

  .card-body {
    padding: 10px;
  }

  .btn-primary {
    padding: 6px 15px;
    font-size: 0.8rem;
  }
}

/*--------------------------------------------------------------
# Marques Disponibles Section
--------------------------------------------------------------*/

#brands {
  padding: 60px 0;
  background-color: #f9f9f9;
}

.brand-item {
  text-align: center;
}

.brand-logo {
  width: 100px; /* Fixed width for uniformity */
  height: 100px; /* Fixed height for uniformity */
  object-fit: contain; /* Maintain aspect ratio */
  margin-bottom: 10px;
  transition: transform 0.3s ease-in-out;
}

.brand-logo:hover {
  transform: scale(1.1); /* Slight zoom effect on hover */
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--default-color);
  text-align: center;
}

/* Marques Disponibles */
#brands .brand-item {
  text-align: center;
}

.brand-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 10px;
  transition: transform 0.3s ease-in-out;
}

.brand-logo:hover {
  transform: scale(1.1);
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin-top: 5px;
  color: #333;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

/* Produits d'une Marque */
#brand-products .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#brand-products .card-img-top {
  height: 200px;
  object-fit: cover;
}

#brand-products .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/*--------------------------------------------------------------
# Search Bar
--------------------------------------------------------------*/
.search-bar {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  margin-top: 30px;
}

.search-bar .form-control-lg {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px 20px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-bar .form-control-lg:focus {
  border-color: #ff7f50;
  box-shadow: 0 0 0 0.2rem rgba(255, 127, 80, 0.25);
}

.search-bar .form-select-lg {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px 20px;
  font-size: 1rem;
  height: auto;
  background-position: right 15px center;
}

.search-bar .btn-primary {
  background-color: #ff7f50;
  border-color: #ff7f50;
  padding: 15px 25px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.search-bar .btn-primary:hover {
  background-color: #ff6b3d;
  border-color: #ff6b3d;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .search-bar {
    margin-top: 20px;
  }

  .search-bar .col-md-2 {
    margin-top: 10px;
  }
}

/*--------------------------------------------------------------
# Sections General
--------------------------------------------------------------*/
.section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.section:nth-child(even) {
  background: #f8f9fa;
}

.section-title {
  text-align: center;
  padding-bottom: 40px;
  position: relative;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 20px;
  position: relative;
  color: #333333;
}

.section-title h2::after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: #ff7f50;
  bottom: 0;
  left: calc(50% - 25px);
}

.section-title p {
  margin-bottom: 0;
  font-size: 16px;
  color: #666666;
}

/*--------------------------------------------------------------
# Cards
--------------------------------------------------------------*/
.card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 25px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #333333;
}

.card-text {
  color: #666666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.card-footer {
  background: none;
  border-top: 1px solid #eee;
  padding: 15px 25px;
}

.card-link {
  color: #ff7f50;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.card-link:hover {
  color: #ff9966;
}

.card-link i {
  margin-left: 5px;
  font-size: 14px;
}

/*--------------------------------------------------------------
# Grid Layout
--------------------------------------------------------------*/
.row {
  margin-left: -15px;
  margin-right: -15px;
}

.row > * {
  padding-left: 15px;
  padding-right: 15px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .search-bar {
    margin-top: -30px;
    padding: 20px;
  }

  .search-bar .form-control,
  .search-bar .form-select,
  .search-bar .btn-primary {
    height: 48px;
    font-size: 14px;
    margin-bottom: 10px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .card-img-top {
    height: 180px;
  }
}

/* Ensure Lato font is loaded */
body {
  font-family: 'Lato', sans-serif;
}

/* Styles pour les cartes des produits et annonces */
.card {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 25px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.card-text {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem 1.5rem;
}

.card-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ff7f50;
}

.card-meta {
  font-size: 0.85rem;
  color: #95a5a6;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-meta i {
  margin-right: 0.3rem;
}

.card-link {
  color: #ff7f50;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.card-link:hover {
  color: #e96b56;
}

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 127, 80, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Grille responsive pour les cartes */
.row.gy-4 {
  margin: -12px;
}

.row.gy-4 > [class*="col"] {
  padding: 12px;
}

/* Protection contre les modifications dynamiques */
.guide-container,
.main-content,
.ads-container,
.ads-grid,
.ad-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    z-index: auto !important;
    transform: none !important;
    pointer-events: auto !important;
}

.main-content {
    display: flex !important;
}

.ads-grid {
    display: grid !important;
}

.ad-card {
    display: flex !important;
}
