/* CSS moderne inspiré du design des actualités - Style professionnel */

.modern-news {
  padding: 3rem 0;
  background: #f8fafc;
  position: relative;
}

/* Titre de section */
.modern-news::before {
  content: "NOS DERNIÈRES ACTUALITÉS";
  display: block;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 3rem;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.modern-news .mod-articles-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.mod-articles-item {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 25px rgba(0, 0, 0, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  height: auto;
}

.mod-articles-item:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Effet coloré différent pour chaque card */
.mod-articles-item:nth-child(1)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(135deg, #e53e3e, #dd6b20);
}

.mod-articles-item:nth-child(2)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(135deg, #38a169, #2b6cb0);
}

.mod-articles-item:nth-child(3)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(135deg, #2b6cb0, #553c9a);
}

.mod-articles-item-content {
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Container pour l'image avec overlay coloré */
.pull-mod-articles-image {
  margin: 0;
  overflow: hidden;
  position: relative;
  height: 280px;
}

.pull-mod-articles-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mod-articles-item:hover .pull-mod-articles-image img {
  transform: scale(1.08);
}

/* Overlay coloré sur l'image selon la card */
.mod-articles-item:nth-child(1) .pull-mod-articles-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(229, 62, 62, 0.8), rgba(221, 107, 32, 0.6));
  mix-blend-mode: multiply;
}

.mod-articles-item:nth-child(2) .pull-mod-articles-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(56, 161, 105, 0.8), rgba(43, 108, 176, 0.6));
  mix-blend-mode: multiply;
}

.mod-articles-item:nth-child(3) .pull-mod-articles-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(43, 108, 176, 0.8), rgba(85, 60, 154, 0.6));
  mix-blend-mode: multiply;
}

/* Badge de date stylisé */
.mod-articles-date {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.mod-articles-date .icon-calendar {
  font-size: 0.9rem;
  color: #4299e1;
}

/* Contenu textuel */
.mod-articles-item-content > p {
  padding: 2rem;
  padding-bottom: 0;
  margin: 0;
  flex-grow: 1;
}

.mod-articles-item-content p:first-of-type strong {
  display: block;
  font-size: 1.4rem;
  color: #1a202c;
  margin-bottom: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.mod-articles-item-content p:last-of-type {
  color: #4a5568;
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* Boutons de lecture en ROUGE VIF */
.readmore {
  margin: 0;
  padding: 2rem;
  padding-top: 1.5rem;
}

.readmore-btn {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2rem;
  background: #ff0000; /* Rouge vif */
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

/* Tous les boutons en rouge vif */
.mod-articles-item .readmore-btn {
  background: linear-gradient(135deg, #ff0000, #cc0000); /* Dégradé de rouge vif */
}

.readmore-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 0, 0, 0.4);
  color: white;
  text-decoration: none;
  background: linear-gradient(135deg, #cc0000, #ff0000); /* Inversion du dégradé au survol */
}

.readmore-btn::after {
  content: '→';
  margin-left: 0.7rem;
  transition: transform 0.3s ease;
  font-size: 1.1rem;
}

.readmore-btn:hover::after {
  transform: translateX(6px);
}

/* Éléments cachés */
.visually-hidden,
.article-info-term {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .modern-news .mod-articles-items {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .modern-news {
    padding: 2rem 0;
  }
  
  .modern-news::before {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  
  .modern-news .mod-articles-items {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .pull-mod-articles-image {
    height: 220px;
  }
  
  .mod-articles-item-content p:first-of-type strong {
    font-size: 1.2rem;
  }
  
  .mod-articles-item-content > p {
    padding: 1.5rem;
    padding-bottom: 0;
  }
  
  .readmore {
    padding: 1.5rem;
    padding-top: 1rem;
  }
}

@media (max-width: 480px) {
  .modern-news::before {
    font-size: 1.8rem;
  }
  
  .mod-articles-date {
    top: 15px;
    right: 15px;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
  
  .pull-mod-articles-image {
    height: 200px;
  }
  
  .readmore-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.85rem;
  }
}

/* Animations d'entrée */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mod-articles-item {
  animation: slideInUp 0.8s ease forwards;
}

.mod-articles-item:nth-child(2) {
  animation-delay: 0.15s;
}

.mod-articles-item:nth-child(3) {
  animation-delay: 0.3s;
}

/* Effet de survol global */
@media (min-width: 768px) {
  .modern-news .mod-articles-items:hover .mod-articles-item:not(:hover) {
    opacity: 0.7;
    transform: scale(0.98);
  }
}
