/* ==========================================================================
   MEDELEC - ACTUALITÉS STYLE DEFINITIONS (PHASE V15.0 - WHITE CARDS EDITION)
   Vibrant Blue Tech-Blueprint Background (Pure Cyan/Indigo Glows, Zero Gold Glows)
   Crisp White High-Contrast News Cards & Navbar fully restored to site defaults
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Montserrat:wght@700;800;900&display=swap');

/* --- PAGE BASE & DUAL-LAYER HIGH-CONTRAST TECH BACKDROP --- */
[data-page="actualite"] body,
body[data-page="actualite"] {
  background-color: #030712 !important; /* Deep cosmic dark */
  background-image: none !important;
  color: #ffffff !important; /* Crisp white for absolute contrast */
  font-family: 'Outfit', sans-serif !important;
}

[data-page="actualite"] body::before,
body[data-page="actualite"]::before {
  content: "";
  position: fixed;
  inset: 0;
  background-color: #030712 !important;
  background-image:
    /* Layer 1: Fine Precision 30px Tech Grid (Highly Visible Neon Cyan) */
    linear-gradient(rgba(14, 165, 233, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.04) 1px, transparent 1px),
    /* Layer 2: Main Technical 120px Grid (Refined Technical Blue) */
    linear-gradient(rgba(11, 94, 146, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 94, 146, 0.03) 1px, transparent 1px),
    /* Layer 3: High-Saturated Atmospheric Glowing Nebulas (Pure Cyans, Indigos & Royal Blues - No Yellow/Gold) */
    radial-gradient(circle at 15% 25%, rgba(14, 165, 233, 0.28) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(99, 102, 241, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 0%, rgba(11, 94, 146, 0.42) 0%, #030712 90%) !important;
  background-size: 30px 30px, 30px 30px, 120px 120px, 120px 120px, 100% 100%, 100% 100%, 100% 100%, 100% 100% !important;
  z-index: -1;
  pointer-events: none;
}


/* --- SYMMETRIC CENTRED HERO DESIGN --- */
[data-page="actualite"] .page-hero {
  background: transparent;
  position: relative;
  overflow: hidden;
  padding: clamp(140px, 18vw, 190px) clamp(20px, 5%, 40px) clamp(100px, 12vw, 130px);
  margin-top: 0;
}

/* Grid Mask for depth shading */
[data-page="actualite"] .page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* Horizontal Laser Conduit Separator */
[data-page="actualite"] .page-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(14, 165, 233, 0.25) 20%, 
    rgba(14, 165, 233, 0.6) 50%, 
    rgba(14, 165, 233, 0.25) 80%, 
    transparent 100%
  );
  z-index: 2;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.3);
}

/* Enforcing absolute symmetry in flex direction */
[data-page="actualite"] .page-hero .container,
[data-page="actualite"] .page-hero .hero-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 28px !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  z-index: 2;
}

/* Centred Breathtaking Headline (Brilliant White to Technical Cyan) */
[data-page="actualite"] .page-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  text-align: center !important;
  background: linear-gradient(to bottom, #ffffff 40%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 15px rgba(14, 165, 233, 0.2));
  text-shadow: none !important;
}

.gold-dot {
  color: #facc15;
  text-shadow: 0 0 15px rgba(250, 204, 21, 0.85);
  display: inline;
  -webkit-text-fill-color: #facc15;
}

/* Symmetric Subtitle box */
[data-page="actualite"] .page-hero .hero-text-right {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

[data-page="actualite"] .page-hero .hero-text-right p {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85); /* Premium soft white for strong legibility */
  font-weight: 400;
  text-align: center !important;
  max-width: 650px;
}


/* --- SECTION ACTUALITÉS & TECH POWER LINES --- */
.news-list {
  padding: clamp(80px, 12vw, 120px) 0 clamp(100px, 15vw, 150px);
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* Vertical Power Cable 1 (Left Margin - Vibrant Cyan/Indigo Gradient) */
.news-list::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(14, 165, 233, 0.25) 20%, 
    rgba(99, 102, 241, 0.15) 50%, 
    rgba(14, 165, 233, 0.25) 80%, 
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Vertical Power Cable 2 (Right Margin - Vibrant Indigo/Cyan Gradient) */
.news-list::after {
  content: "";
  position: absolute;
  top: 0;
  right: 12%;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(99, 102, 241, 0.15) 20%, 
    rgba(14, 165, 233, 0.25) 50%, 
    rgba(99, 102, 241, 0.15) 80%, 
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 1200px) {
  .news-list::before,
  .news-list::after {
    display: none; /* Hide vertical cables on smaller screens to avoid card overlaps */
  }
}

.news-list h2 {
  text-align: center;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  font-weight: 700;
  max-width: 800px;
  margin: 0 auto clamp(55px, 8vw, 80px);
  line-height: 1.4;
  letter-spacing: -0.015em;
  position: relative;
  z-index: 1;
  padding: 0 24px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}


/* --- NEWS GRID & CRYSTAL GLASSMORPHIC CARDS --- */
.news-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: clamp(28px, 4vw, 45px);
  position: relative;
  z-index: 1;
}

/* Base Link Wrapper */
.news-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  outline: none;
  border-radius: 24px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* The Premium Card Structure (Vivid High-Contrast Crisp White) */
.news-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff !important; /* Pristine solid white cards */
  border: 1px solid rgba(11, 94, 146, 0.08);
  box-shadow: 
    0 15px 35px rgba(2, 6, 23, 0.06),
    0 5px 15px rgba(11, 94, 146, 0.02);
  transition: 
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow, border-color;
}

/* Hover Lift Effect with Cyan Tech Border Glow */
.news-card-link:hover .news-card {
  transform: translateY(-12px) scale(1.015);
  border-color: rgba(14, 165, 233, 0.45); /* Glowing Cyan border tint */
  box-shadow: 
    0 30px 60px rgba(2, 6, 23, 0.12),
    0 0 30px rgba(14, 165, 233, 0.1); /* subtle cyan tech aura */
}

.news-card-link:focus-visible .news-card {
  border-color: #0b5e92;
  box-shadow: 0 0 0 4px rgba(11, 94, 146, 0.2);
}

/* Image Wrapper with soft atmospheric technical dark vignette */
.news-img-wrapper {
  width: 100%;
  height: 260px;
  overflow: hidden;
  position: relative;
  background-color: #020b18;
}

.news-img-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(3, 7, 18, 0.15) 100%);
  z-index: 1;
  pointer-events: none;
}

.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.001);
  will-change: transform;
}

/* Gentle image scale on hover */
.news-card-link:hover img {
  transform: scale(1.06);
}


/* --- CARD CONTENT & TYPOGRAPHY --- */
.news-content {
  padding: clamp(24px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

/* Headline typography - Navy for high-contrast on white card */
.news-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  color: #032542 !important; /* Deep Navy Blue */
  line-height: 1.35;
  margin: 0 0 14px;
  transition: color 0.3s ease;
  letter-spacing: -0.01em;
}

.news-card-link:hover h3 {
  color: #0b5e92 !important; /* Turn Medelec Blue on hover */
}

/* Date metadata */
.news-date {
  display: flex;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b !important; /* Slate grey */
  margin-bottom: 20px;
}

.news-date::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #0ea5e9 !important; /* Saturated Cyan Dot */
  margin-right: 10px;
  box-shadow: 0 0 6px rgba(14, 165, 233, 0.6);
}

/* Paragraph styling */
.news-content p {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #475569 !important; /* Deep Slate text for superb legibility on white card */
  margin: 0 0 28px;
  flex-grow: 1;
  font-weight: 400;
  transition: color 0.3s ease;
}

.news-card-link:hover p {
  color: #1e293b !important; /* Darker on hover */
}

/* Read-more interaction indicator - Sleek Tech Capsule */
.read-more-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0b5e92 !important; /* Signature Blue */
  background: rgba(11, 94, 146, 0.05) !important;
  border: 1px solid rgba(11, 94, 146, 0.15) !important;
  padding: 8px 20px;
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: auto;
}

.read-more-btn .arrow {
  font-size: 1rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card-link:hover .read-more-btn {
  color: #ffffff !important;
  background: #0b5e92 !important; /* Tech blue background on hover */
  border-color: #0b5e92 !important;
  box-shadow: 0 5px 15px rgba(11, 94, 146, 0.2) !important;
}

.news-card-link:hover .read-more-btn .arrow {
  transform: translateX(4px);
}


/* --- STAGGERED TRANSITIONS INTEGRATION --- */
.news-list.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUpSection 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.news-card.fade-in {
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}

@keyframes fadeInUpSection {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive grid media queries */
@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 28px;
  }
  .news-img-wrapper {
    height: 220px;
  }
  .news-content {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .news-content {
    padding: 22px;
  }
  .news-img-wrapper {
    height: 190px;
  }
}