  :root {
    --background-color: #ffffff;
    --default-color: #212529;
    --heading-color: #1e1b4b;
    --accent-color: #fcb900;
    --surface-color: #ffffff;
    --contrast-color: #ffffff;
    --primary-color: var(--accent-color);
  }

  .bg-purple {
    background: linear-gradient(135deg, var(--heading-color) 0%, #2575fc 100%);
  }

  /* Barre de recherche avec hauteur augmentée */
.search-input {
  border: none;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  padding: 22px 30px; /* Augmenté de 18px 25px à 22px 30px */
  border-radius: 30px !important; /* Augmenté de 25px à 30px */
  font-size: 17px; /* Augmenté de 16px à 17px */
  background: var(--surface-color);
  transition: all 0.3s ease;
  height: 65px; /* Hauteur fixe pour plus de contrôle */
  line-height: 1.4;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 12px 35px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

.search-input::placeholder {
  color: #6c757d;
  font-weight: 400;
}

/* Ajustement du conteneur de recherche */
.search-container {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 50%; /* Augmenté de 45% à 50% */
  margin-top: -32px; /* Ajusté de -25px à -32px pour compenser la hauteur */
  z-index: 10;
}

/* Responsive pour la barre de recherche */
@media (max-width: 768px) {
  .search-container {
    width: 85%;
    margin-top: -30px;
  }
  
  .search-input {
    padding: 20px 25px;
    height: 60px;
    font-size: 16px;
    border-radius: 25px !important;
  }
}

  /* Espacement général */
  .blog-section {
    padding: 4rem 0;
  }

  .section-spacing {
    margin-bottom: 4rem;
  }

  .content-spacing {
    margin-bottom: 3rem;
  }

  /* Catégories centrées avec hover */
  .categories-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 3rem 0;
  }

  .category-tag {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: var(--surface-color);
    color: var(--default-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  .category-tag.active {
    background: var(--accent-color);
    color: var(--contrast-color);
    box-shadow: 0 4px 15px rgba(252, 185, 0, 0.3);
  }

  .category-tag:hover {
    background: var(--heading-color);
    color: var(--contrast-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 27, 75, 0.25);
  }

  /* Tags section */
  .tags-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 3rem;
  }

  .tag-item {
    display: inline-block;
    padding: 6px 15px;
    margin: 4px;
    background: var(--surface-color);
    color: var(--default-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
  }

  .tag-item:hover {
    background: var(--accent-color);
    color: var(--contrast-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
  }

  /* Boutons "Lire" */
  .read-btn {
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s ease;
  }

  .read-btn:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
  }

  .read-btn:hover {
    color: var(--heading-color);
  }

  .read-btn:hover:after {
    transform: scaleX(1);
    background-color: var(--heading-color);
  }

.article-card {
  transition: transform 0.3s ease;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  height: 100%;
  padding: 0;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: none;
}

/* Image des articles avec bordures arrondies */
.article-image {
  height: 250px;
  overflow: hidden;
  border-radius: 15px;
  margin-bottom: 1.5rem;
}

.article-image img,
.article-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-image img,
.article-card:hover .article-image video {
  transform: scale(1.05);
}

/* Contenu des articles avec espacement amélioré */
.article-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Badge catégorie avec plus d'espacement */
.article-badge {
  background: var(--accent-color);
  color: var(--contrast-color);
  width: fit-content;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Titre avec plus d'espacement */
.article-title {
  font-weight: bold;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  color: var(--heading-color);
  line-height: 1.4;
  transition: color 0.3s ease;
}

.article-card:hover .article-title {
  color: var(--accent-color);
}

/* Description avec espacement */
.article-description {
  color: #6c757d;
  margin-bottom: 2rem;
  font-size: 14px;
  line-height: 1.6;
  flex-grow: 1;
}

/* Footer de l'article */
.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.article-date {
  color: #6c757d;
  font-size: 13px;
  font-weight: 500;
}

/* Espacement entre les articles - 3 par ligne */
.articles-grid {
  gap: 3rem !important;
  margin-bottom: 4rem;
}

/* Forcer 3 colonnes par ligne */
.articles-grid .col-sm-6.col-lg-4 {
  flex: 0 0 calc(33.333333% - 2rem);
  max-width: calc(33.333333% - 2rem);
}
  .video-thumbnail {
    transition: transform 0.3s ease;
  }
  .video-thumbnail:hover {
    transform: scale(1.02);
  }
  .video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.2);
    z-index: 1;
  }
  /* Conteneurs vidéo */
  .video-container,
  .video-embed-container {
    position: relative;
    background: #000;
  }
  
  /* Vidéos uploadées */
  .video-container video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
  }
  
  /* Iframes embarquées */
  .embed-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }
  
  /* Image article */
  .article-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
  }
  
  /* Style pour les vidéos externes non reconnues */
  .generic-video-thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f5f5f5;
    padding: 2rem;
    text-align: center;
  }
  
  .play-button {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    transition: transform 0.3s;
  }
  
  .play-button:hover {
    transform: scale(1.1);
  }
  
  .video-source {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    word-break: break-all;
  }
  
  /* Ratio 16:9 pour les conteneurs */
  .ratio-16x9::before {
    padding-top: 56.25%;
  }

/* Responsive - 2 colonnes sur tablette, 1 sur mobile */
@media (max-width: 991px) {
  .articles-grid .col-sm-6.col-lg-4 {
    flex: 0 0 calc(50% - 1.5rem);
    max-width: calc(50% - 1.5rem);
  }
}

@media (max-width: 576px) {
  .articles-grid .col-sm-6.col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Responsive - espacement réduit sur mobile */
@media (max-width: 768px) {
  .articles-grid {
    gap: 2rem !important;
  }
  
  .article-image {
    height: 200px;
    margin-bottom: 1rem;
  }
  
  .article-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }
  
  .article-description {
    margin-bottom: 1rem;
  }
}
  /* Media queries pour responsive */
  @media (max-width: 768px) {
    .search-container {
      width: 85%;
    }
    
    .categories-container {
      flex-direction: column;
      align-items: center;
    }
  }
/* Ajoutez ces règles à la fin de votre CSS */

/* Correction de l'espacement entre l'image et le badge catégorie */
.article-image-container {
  position: relative;
}

.article-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 2;
  margin-bottom: 0 !important; /* Supprime la marge basse */
}

/* Ajustements mobiles plus efficaces */
@media (max-width: 768px) {
  /* Barre de recherche */
  .search-container {
    width: 90%;
    margin-top: -25px;
  }
  
  .search-input {
    padding: 12px 18px;
    height: 48px;
    font-size: 14px;
    border-radius: 20px !important;
  }

  /* Structure des articles */
  .article-card {
    margin-bottom: 1.25rem;
  }

  .article-image {
    height: 160px;
    margin-bottom: 0;
    border-radius: 12px;
  }

  .article-content {
    padding: 12px 0 0 0;
  }

  /* Textes */
  .article-title {
    font-size: 15px !important;
    margin-bottom: 8px;
    line-height: 1.35;
  }

  .article-description {
    font-size: 12px !important;
    line-height: 1.5;
    margin-bottom: 12px;
  }

  .article-badge {
    font-size: 10px !important;
    padding: 3px 8px;
    top: 10px;
    left: 10px;
  }

  .article-date {
    font-size: 11px !important;
  }

  .read-btn {
    font-size: 12px !important;
  }

  /* Catégories */
  .category-tag {
    padding: 6px 12px;
    font-size: 12px !important;
  }

  /* Espacements généraux */
  .blog-section {
    padding: 2rem 0;
  }

  .section-spacing {
    margin-bottom: 2rem;
  }

  .articles-grid {
    gap: 1.25rem !important;
  }
}

@media (max-width: 576px) {
  .article-image {
    height: 140px;
  }
  
  .search-input {
    height: 44px;
    font-size: 13px !important;
  }
  
  .article-title {
    font-size: 14px !important;
  }
  
  .category-tag {
    font-size: 11px !important;
  }
}