/*
Theme Name: UDS Scientific
Author: Clément Delaunay (optimisé par Claude)
Author URI: clement-delaunay.fr
Description: Thème scientifique simplifié pour l'Union des Savoirs
Version: 2.0
Text Domain: uds-scientific
*/

:root {
  --primary-color: #003264;
  --secondary-color: #0068b7;
  --accent-color: #14b384;
  --light-accent: #e1f5fe;
  --dark-color: #111827;
  --text-color: #374151;
  --light-text: #6b7280;
  --white: #ffffff;
  --light-bg: #f3f4f6;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --grid-unit: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-main: 'Space Grotesk', 'Montserrat', sans-serif;
  --font-secondary: 'Inter', 'Open Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* --- Normalisation & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Container & Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--grid-unit) * 2);
}

article {
  padding : 30px;
}

article p {
  text-align: justify;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.gap-sm {
  gap: calc(var(--grid-unit) * 2);
}

.gap-md {
  gap: calc(var(--grid-unit) * 4);
}

.gap-lg {
  gap: calc(var(--grid-unit) * 6);
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  padding: 5px 0;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.site-header .site-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--grid-unit) * 1) 0;
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-logo {
  max-height: 60px;
}

.custom-logo {
  max-height: 60px;
  width: auto;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.site-title a {
  color: var(--primary-color);
  text-decoration: none;
}

/* --- Navigation et sous-menus --- */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: calc(var(--grid-unit) * 3);
  margin: 0;
  padding: 0;
}

.main-navigation li {
  position: relative;
}

/* Style des liens principaux */
.main-navigation a {
  color: var(--primary-color);
  font-weight: 500;
  padding: calc(var(--grid-unit)) 0;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: block;
  position: relative;
  border-bottom: 2px solid transparent;
}

.main-navigation a:hover {
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  transform: translateY(-2px);
}

/* Style pour les sous-menus */
.main-navigation .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white);
  min-width: 200px;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  padding: calc(var(--grid-unit) * 1.5);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  display: block;
  flex-direction: column;
}

.main-navigation .menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-navigation .sub-menu li {
  margin-bottom: calc(var(--grid-unit) * 1);
  width: 100%;
}

.main-navigation .sub-menu a {
  padding: calc(var(--grid-unit) * 0.8) calc(var(--grid-unit) * 1);
  font-size: 0.9rem;
  display: block;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  border-bottom: none;
  border-left: 2px solid transparent;
}

.main-navigation .sub-menu a:hover {
  background-color: var(--light-bg);
  padding-left: calc(var(--grid-unit) * 1.5);
  color: var(--accent-color);
  border-bottom: none;
  border-left: 2px solid var(--accent-color);
  transform: none;
}

/* Sous-menus à droite */
.main-navigation .sub-menu .sub-menu {
  left: 100%;
  top: 0;
}

/* INDICATEURS DE SOUS-MENU */
/* Icône pour les éléments avec sous-menu */
.main-navigation .menu-item-has-children > a::after {
  content: '\f107';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-left: calc(var(--grid-unit) * 0.8);
  font-size: 0.8rem;
  color: var(--accent-color);
  background-color: var(--light-bg);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  position: relative;
  top: -1px;
  display: inline-block;
  transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.main-navigation .menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
  background-color: var(--accent-color);
  color: var(--white);
}

/* Icône pour les sous-menus qui ont des sous-sous-menus */
.main-navigation .sub-menu .menu-item-has-children > a::after {
  content: '\f105';
  position: absolute;
  right: calc(var(--grid-unit) * 1);
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--light-bg);
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
}

.main-navigation .sub-menu .menu-item-has-children:hover > a::after {
  transform: translateY(-50%) rotate(0deg);
  background-color: var(--accent-color);
  color: var(--white);
}

/* Animation pour les liens courants */
.main-navigation a.current-menu-item,
.main-navigation .current-menu-item > a {
  color: var(--accent-color);
  font-weight: 600;
  position: relative;
}

.social-icons {
  display: flex;
  gap: calc(var(--grid-unit) * 1.5);
  margin-left: calc(var(--grid-unit) * 3);
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--light-bg);
  color: var(--primary-color);
  transition: all var(--transition-normal);
}

.social-icons a:hover {
  background-color: var(--accent-color);
  color: var(--white);
  transform: translateY(-2px);
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-menu span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--primary-color);
  transition: all var(--transition-normal);
}

.hamburger-menu.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* État du body avec menu ouvert */
body.nav-open {
  overflow: hidden;
}

/* --- Éléments scientifiques --- */
.molecule-animation {
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  opacity: 0.1;
  z-index: -1;
  pointer-events: none;
}

.atom {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-color), transparent);
  animation: pulse 4s infinite alternate ease-in-out;
}

.electron-path {
  position: absolute;
  border: 1px solid rgba(0, 104, 183, 0.2);
  border-radius: 50%;
}

.electron {
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
}

@keyframes orbit1 {
  from { transform: rotate(0deg) translateX(80px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(80px) rotate(-360deg); }
}

@keyframes orbit2 {
  from { transform: rotate(0deg) translateX(120px) rotate(0deg); }
  to { transform: rotate(-360deg) translateX(120px) rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.05); opacity: 0.7; }
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 2rem 0;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  background-image: radial-gradient(circle, var(--accent-color) 1px, transparent 1px);
  background-size: 20px 20px;
}

.hero-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  background-image: linear-gradient(var(--light-bg) 1px, transparent 1px),
                    linear-gradient(90deg, var(--light-bg) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.hero-text {
  color: var(--light-bg);
  max-width: 600px;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero-title span {
  display: block;
  font-size: 1.25em;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 3rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  gap: 0.5rem;
}

.button-primary {
  background-color: var(--accent-color);
  color: var(--dark-color);
}

.button-primary:hover {
  background-color: var(--light-accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button-secondary {
  background-color: transparent;
  color: var(--light-bg);
  border: 2px solid var(--light-bg);
}

.button-secondary:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button i {
  font-size: 0.9em;
}

/* Animation d'atome dans le héros */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.atomic-model {
  position: relative;
  width: 250px;
  height: 250px;
  animation: float 6s ease-in-out infinite;
}

.atom-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent-color);
}

.electron-shell {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: rotate 10s linear infinite;
}

.electron-shell:nth-child(2) {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  animation-duration: 7s;
  animation-direction: reverse;
}

.electron-shell:nth-child(3) {
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  animation-duration: 5s;
}

.electron-shell:nth-child(4) {
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  animation-duration: 15s;
}

.electron {
  position: absolute;
  width: 15px;
  height: 15px;
  background-color: var(--light-bg);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--light-bg);
}

.electron-shell:nth-child(2) .electron {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.electron-shell:nth-child(3) .electron {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.electron-shell:nth-child(4) .electron {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Éléments de décoration moléculaire */
.molecular-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.15;
}

.molecule {
  position: absolute;
  border-radius: 50%;
}

.molecule-1 {
  top: 20%;
  left: 15%;
  width: 150px;
  height: 150px;
  border: 2px solid var(--light-bg);
  opacity: 0.2;
  animation: pulse 6s infinite alternate;
}

.molecule-2 {
  bottom: 30%;
  right: 10%;
  width: 100px;
  height: 100px;
  border: 2px solid var(--accent-color);
  opacity: 0.3;
  animation: pulse 4s infinite alternate-reverse;
}

.molecule-3 {
  top: 60%;
  left: 30%;
  width: 80px;
  height: 80px;
  border: 1px solid var(--light-bg);
  opacity: 0.2;
  animation: pulse 7s infinite alternate;
}

.geometric-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.shape {
  position: absolute;
  opacity: 0.1;
  border: 1px solid var(--light-bg);
}

.hexagon {
  top: 15%;
  right: 25%;
  width: 100px;
  height: 60px;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background-color: var(--accent-color);
  animation: rotate 20s linear infinite;
}

.triangle {
  bottom: 20%;
  left: 10%;
  width: 70px;
  height: 70px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  background-color: var(--light-bg);
  animation: float 15s ease-in-out infinite;
}

.square {
  top: 70%;
  right: 15%;
  width: 50px;
  height: 50px;
  transform: rotate(45deg);
  background-color: var(--accent-color);
  animation: rotate 25s linear infinite reverse;
}

.circle {
  top: 35%;
  left: 20%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--light-bg);
  animation: pulse 10s infinite alternate;
}

/* Styles généraux pour les sections */
.section {
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.section-description {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.scientific-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto 2rem;
}

.divider-line {
  height: 3px;
  width: 80px;
  background-color: var(--accent-color);
  position: relative;
}

.divider-atom {
  width: 15px;
  height: 15px;
  background-color: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.3);
  margin: 0 5px;
}

.section-footer {
  text-align: center;
  margin-top: 3rem;
}

.section-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  background-image: radial-gradient(var(--primary-color) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: -1;
}

/* Grilles et cartes */
.grid {
  display: grid;
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.gap-md {
  gap: 1.5rem;
}

.gap-lg {
  gap: 2rem;
}

/* Cartes de fonctionnalités */
.feature-card {
  background-color: white;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border-top: 4px solid var(--accent-color);
}

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

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: rgba(var(--accent-color-rgb), 0.1);
  margin-bottom: 1.5rem;
  color: var(--accent-color);
}

.feature-icon i {
  font-size: 2rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.feature-card p {
  color: var(--text-color);
  line-height: 1.6;
}

/* Objectifs */
.objectives-section {
  background-color: var(--light-bg);
}

.objective-item {
  text-align: center;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.objective-item:hover {
  transform: translateY(-5px);
}

.objective-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: white;
  margin-bottom: 1rem;
  color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.objective-icon i {
  font-size: 1.5rem;
}

.objective-item p {
  font-weight: 500;
  color: var(--primary-color);
}

/* Section Science Transition */
.science-transition-section {
  padding: 6rem 0;
  background-color: var(--primary-color);
  color: white;
  position: relative;
  overflow: hidden;
}

.science-bg-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.1;
}

.science-bg-element {
  position: absolute;
  color: white;
  font-family: 'Courier New', monospace;
}

.molecule {
  top: 20%;
  left: 10%;
  font-size: 3rem;
}

.dna-strand {
  top: 50%;
  right: 15%;
  font-size: 2rem;
}

.physics-formula {
  bottom: 20%;
  left: 20%;
  font-size: 1.5rem;
}

.quantum-equation {
  top: 30%;
  right: 20%;
  font-size: 1.5rem;
}

.formula-extra {
  display: block;
  margin-top: 0.5rem;
  opacity: 0.7;
}

.science-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.science-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.science-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  opacity: 0.9;
}

/* Sections de contenu */
.content-section {
  position: relative;
}

.content-section-alt {
  background-color: var(--light-bg);
}

.scientific-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.05;
  pointer-events: none;
}

.sci-shape {
  position: absolute;
}

.molecular-bonds {
  top: 10%;
  left: 5%;
  width: 150px;
  height: 150px;
  background-image: radial-gradient(circle, var(--primary-color) 1px, transparent 1px);
  background-size: 15px 15px;
}

.neural-network {
  bottom: 15%;
  right: 5%;
  width: 200px;
  height: 200px;
  background-image: radial-gradient(circle, var(--accent-color) 1px, transparent 1px);
  background-size: 20px 20px;
}

.atomic-orbital {
  top: 20%;
  right: 10%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px dashed var(--primary-color);
  opacity: 0.5;
}

.mathematical-symbols {
  bottom: 10%;
  left: 10%;
  width: 150px;
  height: 150px;
  opacity: 0.3;
}

.dna-helix-vertical {
  top: 5%;
  left: 8%;
  height: 300px;
  width: 50px;
  background-image: linear-gradient(0deg, var(--primary-color) 1px, transparent 1px);
  background-size: 10px 20px;
}

.binary-code {
  bottom: 8%;
  right: 5%;
  width: 250px;
  height: 200px;
  opacity: 0.3;
}

.quantum-wave {
  top: 15%;
  right: 8%;
  height: 100px;
  width: 200px;
  opacity: 0.6;
}

.chemical-structure {
  bottom: 10%;
  left: 5%;
  height: 180px;
  width: 180px;
  opacity: 0.4;
}

/* Cartes scientifiques */
.scientific-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
}

.scientific-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-img, .card-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.scientific-card:hover .card-img {
  transform: scale(1.05);
}

.card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: var(--white);
}

.card-img-placeholder i {
  font-size: 3rem;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.card-meta {
  font-size: 0.85rem;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  margin-right: 1rem;
}

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

.card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 1.25rem;
}

/* Éléments spécifiques aux cartes vidéo */
.video-card .card-image {
  position: relative;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: white;
  opacity: 0.8;
  transition: all 0.3s ease;
  z-index: 2;
}

.video-card:hover .video-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-matrix {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.5;
  z-index: 1;
}

.molecular-dots, .dna-dots {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 50px;
  height: 50px;
  background-image: radial-gradient(circle, white 1px, transparent 1px);
  background-size: 10px 10px;
  opacity: 0.5;
  border-radius: 10px;
  z-index: 1;
}

/* Particules flottantes */
.floating-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: float 15s infinite ease-in-out;
}

.p1 {
  top: 15%;
  left: 10%;
  background-color: rgba(var(--primary-color-rgb), 0.3);
  animation-delay: 0s;
}

.p2 {
  top: 70%;
  left: 20%;
  background-color: rgba(var(--accent-color-rgb), 0.3);
  animation-delay: 2s;
}

.p3 {
  top: 40%;
  left: 80%;
  background-color: rgba(var(--primary-color-rgb), 0.3);
  animation-delay: 5s;
}

.p4 {
  top: 80%;
  left: 70%;
  background-color: rgba(var(--accent-color-rgb), 0.3);
  animation-delay: 7s;
}

.p5 {
  top: 25%;
  left: 30%;
  background-color: rgba(var(--primary-color-rgb), 0.3);
  animation-delay: 1s;
}

.p6 {
  top: 60%;
  left: 50%;
  background-color: rgba(var(--accent-color-rgb), 0.3);
  animation-delay: 4s;
}

.p7 {
  top: 10%;
  left: 60%;
  background-color: rgba(var(--primary-color-rgb), 0.3);
  animation-delay: 6s;
}

.p8 {
  top: 30%;
  left: 90%;
  background-color: rgba(var(--accent-color-rgb), 0.3);
  animation-delay: 3s;
}

/* Animations */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-15px) translateX(10px);
  }
  50% {
    transform: translateY(0) translateX(20px);
  }
  75% {
    transform: translateY(15px) translateX(10px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  
  .hero-visual {
    display: none;
  }
  
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .grid-cols-3, .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  .gap-md, .gap-lg {
    gap: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .button {
    width: 100%;
  }

  .site-header {
    padding: calc(var(--grid-unit) * 2);
  }

  .main-navigation {
    position: fixed;
    display: block;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: var(--white);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    padding: calc(var(--grid-unit) * 8) calc(var(--grid-unit) * 2);
    overflow-y: auto;
  }

  .main-navigation.active {
    left: 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  }

  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1001;
    width: 30px;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
  }

  .menu-toggle span:nth-child(1) {
    top: 0px;
  }

  .menu-toggle span:nth-child(2) {
    top: 10px;
  }

  .menu-toggle span:nth-child(3) {
    top: 20px;
  }

  .menu-toggle.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
  }

  .menu-toggle.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
  }

  .main-navigation ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

  .main-navigation ul li {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .main-navigation ul li a {
    display: block;
    padding: calc(var(--grid-unit) * 2) 0;
    font-size: 1.2rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
  }

  .main-navigation ul li:last-child a {
    border-bottom: none;
  }

  .main-navigation ul li a:hover,
  .main-navigation ul li a:focus {
    color: var(--accent-color);
  }

  /* Animation du menu */
  .main-navigation ul li {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease-out;
  }

  .main-navigation.active ul li {
    opacity: 1;
    transform: translateX(0);
  }

  .main-navigation.active ul li:nth-child(1) { transition-delay: 0.1s; }
  .main-navigation.active ul li:nth-child(2) { transition-delay: 0.2s; }
  .main-navigation.active ul li:nth-child(3) { transition-delay: 0.3s; }
  .main-navigation.active ul li:nth-child(4) { transition-delay: 0.4s; }
  .main-navigation.active ul li:nth-child(5) { transition-delay: 0.5s; }

  /* Empêcher le défilement du body quand le menu est ouvert */
  body.menu-open {
    overflow: hidden;
  }

  /* Logo */
  .site-branding {
    max-width: 200px;
  }

  .site-branding img {
    max-height: 40px;
  }

  /* Header fixe */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  /* Ajuster le contenu principal pour le header fixe */
  body {
    padding-top: 70px;
  }
}

/* Ajustements pour les très petits écrans */
@media (max-width: 480px) {
  .main-navigation ul li a {
    font-size: 1.1rem;
    padding: calc(var(--grid-unit) * 1.5) 0;
  }

  .site-branding {
    max-width: 160px;
  }

  .menu-toggle {
    width: 24px;
    height: 20px;
  }

  .menu-toggle span:nth-child(2) {
    top: 8px;
  }

  .menu-toggle span:nth-child(3) {
    top: 16px;
  }
}

/* Animations pour les éléments scientifiques */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animated {
  animation: fadeInUp 0.8s ease forwards;
}

/* Version mobile des sous-menus */
@media (max-width: 768px) {
  .main-navigation .sub-menu {
    position: static;
    background-color: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0 0 0 calc(var(--grid-unit) * 2);
    margin-top: calc(var(--grid-unit) * 0.5);
    margin-bottom: calc(var(--grid-unit) * 1);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    width: 100%;
  }
  
  .main-navigation .menu-item-has-children.submenu-active > .sub-menu {
    max-height: 1000px;
  }
  
  .main-navigation .menu-item-has-children > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .main-navigation .sub-menu a {
    padding: calc(var(--grid-unit) * 0.8) 0;
    font-size: 0.95rem;
    border-left: 2px solid var(--light-bg);
  }
  
  .main-navigation .sub-menu a:hover {
    background-color: transparent;
    padding-left: calc(var(--grid-unit) * 1.5);
    border-left: 2px solid var(--accent-color);
  }
  
  .main-navigation a:hover {
    border-bottom: 2px solid transparent;
    transform: none;
  }
  
  /* Modifier l'indicateur en version mobile */
  .main-navigation .menu-item-has-children > a::after {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform var(--transition-normal), background-color var(--transition-normal), color var(--transition-normal);
  }
  
  .main-navigation .menu-item-has-children.submenu-active > a::after {
    transform: translateY(-50%) rotate(180deg);
    color: var(--white);
    background-color: var(--accent-color);
  }
}

/* Style du footer */
.site-footer {
    position: relative;
    background: linear-gradient(135deg, #191637 0%, #cb0b13 100%);
    color: #fff;
    overflow: hidden;
    padding: 80px 0 40px;
    margin-top: 60px;
}

.footer-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.footer-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.footer-particle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.footer-particle.fp1 {
    width: 200px;
    height: 200px;
    top: -100px;
    left: -50px;
    animation: rotateFooterParticle 90s infinite linear;
}

.footer-particle.fp2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    right: -100px;
    animation: rotateFooterParticle 120s infinite linear reverse;
}

.footer-particle.fp3 {
    width: 150px;
    height: 150px;
    top: 40%;
    right: 10%;
    animation: rotateFooterParticle 60s infinite linear;
}

.footer-particle.fp4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 15%;
    animation: rotateFooterParticle 45s infinite linear reverse;
}

.footer-particle.fp5 {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 40%;
    animation: rotateFooterParticle 75s infinite linear;
}

.footer-particle.fp6 {
    width: 180px;
    height: 180px;
    bottom: 10%;
    right: 25%;
    animation: rotateFooterParticle 100s infinite linear reverse;
}

@keyframes rotateFooterParticle {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer-container {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 60px;
}

.footer-branding {
    flex: 0 0 100%;
    margin-bottom: 30px;
    text-align: center;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    max-height: 60px;
}

.footer-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    color: #fff;
}

.footer-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    max-width: 400px;
    margin: 0 auto;
}

.footer-middle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.footer-section {
    padding-right: 20px;
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: #fff;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #fde428;
    border-radius: 1.5px;
}

.footer-contact, .footer-nav, .footer-social {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li, .footer-nav li, .footer-social li {
    margin-bottom: 15px;
}

.footer-contact a, .footer-nav a, .footer-social a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-contact a:hover, .footer-nav a:hover, .footer-social a:hover {
    color: #fde428;
}

.footer-contact i, .footer-social i {
    margin-right: 10px;
    font-size: 1.2em;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright, .footer-credits {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 10px 0;
}

@media screen and (max-width: 768px) {
    .footer-middle {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Centrer les titres de page et supprimer le sommaire */
.entry-title, 
.page-title {
    text-align: center;
    margin: 80px auto 40px;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}

.entry-content > p:first-of-type + ul {
    display: none;
}

/* Correction pour l'espace entre le contenu et le footer */
.site-content {
    min-height: 60vh;
    padding-bottom: 40px;
}

/* Style pour les images principales des articles et pages */
.entry-content img.featured-image,
.featured-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.featured-image:hover {
    transform: scale(1.02);
}

/* Amélioration du contenu des articles */
.entry-content {
    position: relative;
    z-index: 2;
    margin-top: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* Animation pour les images et contenus */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.entry-content {
    animation: fadeIn 0.6s ease-out;
}

.featured-image {
    animation: slideInUp 0.8s ease-out;
}

/* Style amélioré pour la navigation entre articles */
.post-navigation-container {
    margin: 3rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-previous, .nav-next {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-previous:hover, .nav-next:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.nav-previous {
    border-left: 4px solid var(--primary-color);
}

.nav-next {
    border-right: 4px solid var(--primary-color);
    text-align: right;
}

.nav-label {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.nav-title {
    font-weight: 600;
    color: var(--primary-color);
}

/* Gestion des vidéos YouTube et autres embeds */
.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content video {
    max-width: 100%;
    width: 100%;
    height: 450px;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* Responsive pour les vidéos et la navigation */
@media (max-width: 768px) {
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .nav-next {
        text-align: left;
        border-right: none;
        border-left: 4px solid var(--primary-color);
    }
    
    .entry-content iframe,
    .entry-content embed,
    .entry-content object,
    .entry-content video {
        height: 300px;
    }
}

/* Styles supplémentaires pour améliorer les posts liés */
.related-post-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.related-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.related-post-image {
    display: block;
    position: relative;
    overflow: hidden;
}

.related-post-image img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.1);
}

.related-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.related-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    border-radius: 1.5px;
}

/* Ajout de décoration pour l'article principal */
.entry-title {
    position: relative;
    padding-bottom: 1.2rem;
    text-align: center;
}

/* Amélioration de la typographie et des espacements */
.entry-content p {
    margin-bottom: 1.8rem;
    font-size: 1.05rem;
    color: var(--text-color);
}

.entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-size: 1.8rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.8rem;
}

.entry-content h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 1.5px;
}

.entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.entry-content ul, 
.entry-content ol {
    margin-bottom: 1.8rem;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.8rem;
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--accent-color);
    background-color: var(--light-bg);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Style des liens dans le contenu */
.entry-content a {
    color: var(--secondary-color);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-color);
    transition: all 0.3s ease;
}

.entry-content a:hover {
    color: var(--accent-color);
    border-bottom-width: 2px;
} 