/* ======================================================
   VARIABLES ROOT (CIBLÉES)
   ==================================================*/
:root {
  /* Couleurs de base */
  --color-bg: #ffffff;
  --color-titre: #1a1a1a;
  --color-texte: #333333;
  --color-carte-bg: #f5f5f5;
  --darkblue: #00008B;
  --orange: #ff6600;
  --gris-texte: #555555;
  --blue-accent: #0077ff;
  --cyan-accent: #00ffcc;

  /* Typographie */
  --font-roboto: 'Roboto', sans-serif;
  --font-inter: 'Inter', sans-serif;

  /* Design */
  --card-radius: 12px;
  --shadow-default: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* ======================================================
   SECTION: TITRES DE PAGE (ARTICLES GENERAUX)
   ==================================================*/

.articles-section {
  margin: 20px auto;
  padding: 2px 5px;
  max-width: 1100px;
}

.articles-section h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-titre);
  margin-top: 30px;
  margin-bottom: 40px;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
  font-family: var(--font-roboto);
}

.articles-section h2::after {
  content: '';
  display: block;
  width: 100px;
  height: 3px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, var(--blue-accent), var(--orange));
  border-radius: 4px;
  opacity: 1;
  transition: width 0.3s ease, opacity 0.5s ease;
}

.articles-section h2:hover::after {
  width: 150px;
  opacity: 0.9;
}

/* ======================================================
   SECTION: HERO MODERNE
   ==================================================*/

.hero-news-modern {
  position: relative;
  height: 30vh; 
  min-height: 500px;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--black, #000);
  margin-bottom: 40px;
  z-index: 1; 
}

.hero-bg-parallax,
.hero-overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
}

.hero-bg-parallax {
  background-image: url('/images/artemis-ii-hero.webp'); 
  background-size: cover;
  background-position: center;
  z-index: 1;
  animation: slowZoom 20s infinite alternate;
  transform: translateZ(0); 
}

@keyframes slowZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.hero-overlay-gradient {
  background: linear-gradient(
    90deg, 
    rgba(0,0,0,0.95) 0%, 
    rgba(10, 37, 64, 0.8) 50%, 
    rgba(0,0,0,0.3) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  padding-bottom: 40px;
}

.hero-text-wrapper {
  max-width: 750px;
  padding-left: 15px;
  animation: slideInUp 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--cyan-accent, #00ffcc);
  font-family: var(--font-inter, sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.hero-title {
  font-family: var(--font-roboto, sans-serif);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 15px;
  text-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.text-gradient {
  background: linear-gradient(120deg, #ffffff 0%, #4aa3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-family: var(--font-inter, sans-serif);
  font-size: 1.15rem;
  color: #e0e0e0;
  line-height: 1.6;
  border-left: 3px solid var(--orange, #ff6600);
  padding-left: 20px;
  margin-top: 15px;
  max-width: 600px;
}

.scroll-indicator-wrapper {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  opacity: 0.8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mouse-icon {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.wheel {
  width: 4px;
  height: 6px;
  background: #fff;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
  0% { top: 6px; opacity: 1; height: 6px; }
  100% { top: 22px; opacity: 0; height: 4px; }
}

@media (max-width: 768px) {
  .hero-news-modern { height: 50vh; align-items: center; }
  .hero-overlay-gradient { background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(10, 37, 64, 0.95) 100%); }
  .hero-content { justify-content: center; text-align: center; padding-bottom: 60px; }
  .hero-text-wrapper { padding: 0 20px; max-width: 100%; display: flex; flex-direction: column; align-items: center; }
  .hero-badge { margin-bottom: 15px; font-size: 0.75rem; }
  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { border-left: none; padding-left: 0; font-size: 1rem; margin-top: 10px; color: #ccc; }
  .scroll-indicator-wrapper { display: flex !important; bottom: 20px; transform: translateX(-50%) scale(0.9); }
}

/* ======================================================
   SECTION: GRILLE ET CARTES D'ARTICLES
   ==================================================*/

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--color-carte-bg);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-default);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 3px solid var(--darkblue);
  transition: opacity 0.3s ease;
}

.article-card:hover img { opacity: 0.9; }

.article-card .content {
  padding: 15px 15px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-card .content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--darkblue);
  text-align: center;
  line-height: 1.3;
}

.article-card .content h3::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--orange);
  margin: 10px auto 12px;
  border-radius: 3px;
}

.article-card .content p {
  font-size: 0.95rem;
  color: var(--gris-texte);
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
}

.loader {
  text-align: center;
  padding: 20px;
  color: var(--blue-accent);
  display: none;
  font-family: var(--font-inter);
}

.read-more-button {
    display: block; 
    width: 60%; 
    max-width: 200px;
    margin: 10px auto 0;
    padding: 10px 15px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(45deg, var(--darkblue), #00b4d8); 
    border: none;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); 
    transition: all 0.25s ease-out;
    cursor: pointer;
}

.read-more-button:hover {
    background: linear-gradient(45deg, var(--orange), #ff9900);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px) scale(1.02); 
}

.read-more-button:active {
    transform: translateY(0); 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

@media (max-width: 768px) {
  .articles-section h2 { font-size: 1.7rem; margin-bottom: 30px; }
  .articles-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .articles-section h2 { font-size: 1.4rem; margin-bottom: 25px; }
  .article-card img { height: 180px; }
  .read-more-button { width: 80%; }
}

/* ======================================================
   SECTION: INTRO COSMOLOGIE & SOMMAIRE (CORRIGÉ)
   ==================================================*/

/* 1. L'espace global */
.intro-cosmo-section {
  margin-top: -30px; /* Superposition design sur desktop */
  margin-bottom: 50px;
  position: relative;
  z-index: 10;
}

/* 2. La Carte (CORRECTIF NEXUS : height auto) */
.intro-card {
  background-color: #ffffff;
  padding: 40px 50px;
  border-radius: 16px;
  max-width: 900px;
  margin: 0 auto;
  
  /* Style bordure/ombre */
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-top: 4px solid #0056b3;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08); 
  
  text-align: center;
  
  /* CRUCIAL : Permet à la carte de s'agrandir avec le sommaire */
  height: auto !important;
  min-height: auto;
  display: block;
  overflow: visible;
}

/* 3. Le Texte */
.intro-text {
  font-family: 'Roboto', sans-serif;
  font-size: 1.2rem;
  line-height: 1.8;
  color: #4a5568;
  margin: 0;
}

.intro-text strong {
  color: #000;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

/* --- AJOUT NEXUS : Style du Sommaire --- */
.table-of-contents {
  background: #f8f9fa; /* Gris très clair */
  padding: 25px;
  border-radius: 12px;
  margin-top: 35px;
  margin-bottom: 10px;
  border-left: 5px solid #0056b3;
  text-align: left; /* Texte aligné à gauche */
  width: 100%;
  box-sizing: border-box;
}

.table-of-contents h3 {
  font-family: 'Roboto', sans-serif;
  font-size: 1.2rem;
  color: #1a1a1a;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 700;
}

.table-of-contents ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.table-of-contents li {
  margin-bottom: 12px;
  border-bottom: 1px solid #eef0f2;
  padding-bottom: 8px;
}

.table-of-contents li:last-child {
  border-bottom: none;
}

.table-of-contents a {
  text-decoration: none;
  color: #333;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  display: block;
  transition: color 0.2s, padding-left 0.2s;
}

.table-of-contents a:hover {
  color: #0056b3;
  padding-left: 5px;
}

/* --- Adaptation Mobile --- */
@media (max-width: 768px) {
  .intro-cosmo-section {
    margin-top: 20px; /* IMPORTANT : Annule la superposition sur mobile */
    padding: 0 15px;
  }
  
  .intro-card {
    padding: 20px 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
  }
  
  .intro-text {
    font-size: 1.05rem;
    text-align: left;
  }
}

/* ======================================================
   SECTION: SILO CONTENT (TEXTE LONG)
   ==================================================*/

.silo-content-wrapper {
  max-width: 900px;
  margin: 0 auto 60px auto;
  padding: 0 20px;
}

.silo-main-title {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--darkblue);
  line-height: 1.2;
}

.silo-text-block h2 {
  font-family: 'Inter', sans-serif;
  color: var(--black);
  font-size: 1.6rem;
  margin-top: 40px;
  margin-bottom: 20px;
  border-left: 4px solid var(--orange);
  padding-left: 15px;
}

.silo-text-block h3 {
  font-family: 'Roboto', sans-serif;
  color: #444;
  font-size: 1.3rem;
  margin-top: 25px;
  margin-bottom: 15px;
  font-weight: 700;
}

.silo-text-block p {
  font-family: 'Roboto', sans-serif;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 20px;
  text-align: justify;
}

.silo-text-block ul {
  margin-bottom: 25px;
  padding-left: 20px;
}

.silo-text-block li {
  margin-bottom: 10px;
  line-height: 1.6;
}

/* Liens internes dans le texte */
.internal-link {
  color: var(--blue-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 86, 179, 0.3);
  transition: all 0.2s ease;
  font-weight: 500;
}

.internal-link:hover {
  background-color: rgba(0, 86, 179, 0.05);
  border-bottom-color: var(--blue-accent);
  color: var(--darkblue);
}

/* ======================================================
   SECTION: FAQ
   ==================================================*/

.faq-container {
  margin-top: 60px;
  background-color: #f8f9fa;
  padding: 30px;
  border-radius: 12px;
  border: 1px solid #eee;
}

.faq-container h3 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--gris-texte);
}

.faq-item {
  margin-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  padding: 15px 10px;
  cursor: pointer;
  font-weight: 700;
  color: var(--darkblue);
  list-style: none;
  position: relative;
  font-size: 1.1rem;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 10px;
  font-weight: 300;
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.faq-item details[open] summary::after {
  transform: rotate(45deg);
}

.faq-content {
  padding: 0 10px 20px 10px;
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

/* Mobile Adjustments FAQ & Silo */
@media (max-width: 768px) {
  .silo-main-title { font-size: 1.4rem; }
  .silo-text-block p { text-align: left; font-size: 1rem; }
  .faq-container { padding: 20px 15px; }
}
