/* ===== VARIABLES & RESET ===== */
:root {
  /* Couleurs */
  --primary-color: #2a5caa;       /* Bleu principal */
  --primary-dark: #1d428a;        /* Bleu foncé */
  --secondary-color: #f8b400;     /* Jaune/orange */
  --dark-color: #1a1a2e;          /* Noir bleuté */
  --light-color: #f8f9fa;         /* Gris très clair */
  --white: #ffffff;
  --gray-light: #e9ecef;
  --gray-medium: #6c757d;
  --gray-dark: #343a40;
  
  /* Typographie */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  
  /* Espacements */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  /* Bordures */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
  
  /* Ombres */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--gray-dark);
  overflow-x: hidden;
  background-color: var(--light-color);
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-white { color: var(--white); }
.text-white-50 { color: rgba(255, 255, 255, 0.8); }

/* ===== BOUTONS ===== */
.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-primary {
  color: var(--white);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-light {
  color: var(--white);
  border-color: var(--white);
  background-color: transparent;
}

.btn-outline-light:hover {
  color: var(--primary-color);
  background-color: var(--white);
  transform: translateY(-3px);
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.25rem;
}

/* ===== NAVBAR ===== */
.navbar {
  padding: var(--space-sm) 0;
  background-color: var(--primary-color) !important;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  padding: var(--space-xs) 0;
  background-color: rgba(42, 92, 170, 0.95) !important;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}

.navbar-brand i {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-right: var(--space-xs);
}

.nav-link {
  color: var(--white) !important;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm) !important;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--secondary-color) !important;
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-link:hover:after {
  width: 60%;
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/topics/03.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--white);
  position: relative;
}

.hero-section h1 {
  font-size: 3.5rem;
  margin-bottom: var(--space-lg);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section .lead {
  font-size: 1.5rem;
  margin-bottom: var(--space-xl);
  color: var(--secondary-color);
  font-weight: 600;
}

/* ===== SECTIONS COMMUNES ===== */
.section-padding {
  padding: var(--space-xl) 0;
}

.section-title {
  position: relative;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.section-title:after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--secondary-color);
  margin: var(--space-md) auto;
}

.bg-light {
  background-color: var(--light-color) !important;
}

.bg-dark {
  background-color: var(--dark-color) !important;
}

/* ===== BLOCS PERSONNALISÉS ===== */
.custom-block {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  border: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.custom-block:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.custom-block-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.custom-block-overlay {
  position: relative;
  color: var(--white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  height: 100%;
}

.custom-block-overlay-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

/* ===== TIMELINE ===== */
.timeline-section {
  background: linear-gradient(rgba(42, 92, 170, 0.9), rgba(42, 92, 170, 0.9)), url('images/topics/07.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}

.timeline-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  border-left: 4px solid var(--secondary-color);
  transition: all 0.3s ease;
}

.timeline-item:hover {
  transform: translateX(10px);
}

/* ===== ACCORDÉON ===== */
.accordion-button {
  font-weight: 600;
  color: var(--primary-color);
  padding: var(--space-md);
}

.accordion-button:not(.collapsed) {
  background-color: rgba(42, 92, 170, 0.1);
  color: var(--primary-color);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0.125);
}

.accordion-body {
  padding: var(--space-md);
}

/* ===== CARTES ===== */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

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

/* ===== LISTES ===== */
.list-group-item {
  border-left: none;
  border-right: none;
}

.list-group-item:first-child {
  border-top: none;
}

/* ===== BADGES ===== */
.badge {
  font-weight: 600;
  padding: 0.5em 1em;
  border-radius: var(--border-radius-sm);
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

/* ===== ICÔNES ===== */
.bi {
  vertical-align: middle;
}

/* ===== SOCIAL ICONS ===== */
.social-icon {
  list-style: none;
  padding: 0;
  display: flex;
}

.social-icon-item {
  margin-right: var(--space-sm);
}

.social-icon-link {
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.social-icon-link:hover {
  color: var(--secondary-color);
  transform: translateY(-3px);
}

/* ===== FOOTER ===== */
.site-footer {
  background-color: var(--dark-color);
  color: var(--white);
  padding: var(--space-xl) 0;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-link-item {
  margin-bottom: var(--space-xs);
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--secondary-color);
  padding-left: var(--space-xs);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .navbar-collapse {
    background-color: var(--primary-dark);
    padding: var(--space-md);
    border-radius: var(--border-radius-md);
    margin-top: var(--space-sm);
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: var(--space-lg) 0;
  }
  
  .hero-section {
    min-height: 80vh;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section .lead {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  
  .btn-lg {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
  }
}