/* ==========================================
   D2A-B - CSS FINAL AVEC SLIDER
   Design professionnel avec slider intégré
   ========================================== */

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

:root {
  --primary: #9b59b6;
  --primary-dark: #7d3c98;
  --primary-light: #c39bd3;
  --secondary: #3498db;
  --secondary-dark: #2874a6;
  --accent: #27ae60;
  --accent-dark: #1e8449;
  --dark: #1a1a2e;
  --dark-soft: #16213e;
  --light: #f8f9fa;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --gradient-primary: linear-gradient(135deg, #9b59b6 0%, #3498db 100%);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dark);
  background: #ffffff;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--primary);
  color: white;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== HEADER ==================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
  max-width: 100%;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ==================== LOGO ==================== */

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: var(--transition);
  flex-shrink: 0;
}

.logo:hover {
  transform: translateY(-2px);
}

.logo img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.12);
  transition: var(--transition);
  border: 1.5px solid rgba(155, 89, 182, 0.1);
}

.logo:hover img {
  box-shadow: 0 6px 20px rgba(155, 89, 182, 0.2);
  border-color: rgba(155, 89, 182, 0.3);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-text .main-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  background: linear-gradient(135deg, #8b4ab6 0%, #2980b9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text .subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  color: #95a5a6;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ==================== NAVIGATION ==================== */

.main-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.main-nav li {
  position: relative;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #34495e;
  text-decoration: none;
  border-radius: 10px;
  transition: var(--transition);
  white-space: nowrap;
}

.main-nav a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.1) 0%, rgba(52, 152, 219, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
}

.main-nav a:hover::before,
.main-nav a.active::before {
  opacity: 1;
}

.main-nav a:hover,
.main-nav a.active {
  color: #9b59b6;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.12);
  transform: translateY(-2px);
}

.main-nav a.active {
  font-weight: 700;
  border: 1.5px solid rgba(155, 89, 182, 0.15);
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 2.5px;
  background: linear-gradient(90deg, #9b59b6 0%, #3498db 100%);
  border-radius: 999px;
}

/* Menu burger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: rgba(155, 89, 182, 0.08);
  border: 2px solid rgba(155, 89, 182, 0.15);
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  transition: var(--transition);
}

.nav-toggle:hover {
  background: rgba(155, 89, 182, 0.15);
  transform: scale(1.05);
}

.nav-toggle span {
  width: 24px;
  height: 3px;
  background: linear-gradient(90deg, #9b59b6 0%, #3498db 100%);
  border-radius: 999px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Effet au scroll */
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.site-header.scrolled .header-inner {
  padding-top: 10px;
  padding-bottom: 10px;
}

.site-header.scrolled .logo img {
  width: 48px;
  height: 48px;
}

/* ==================== PAGE HEADER AVEC SLIDER ==================== */

.page-header {
  position: relative;
  color: white;
  padding: 140px 0 80px;
  text-align: center;
  overflow: hidden;
  min-height: 500px;
}

/* Slider d'images de fond */
.page-header-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-header-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-header-slide.active {
  opacity: 1;
}

/* Overlay gradient pour rendre le texte lisible */
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(155, 89, 182, 0.85) 0%, 
    rgba(52, 152, 219, 0.85) 100%);
  z-index: 1;
}

/* Alternative: overlay plus sombre */
.page-header.dark-overlay::before {
  background: linear-gradient(135deg, 
    rgba(26, 26, 46, 0.75) 0%, 
    rgba(22, 33, 62, 0.75) 100%);
}

/* Contenu du header (texte) */
.page-header-content {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease-out;
}

.page-header p {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Points de navigation du slider */
.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 3;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.slider-dot.active {
  background: white;
  width: 32px;
  border-radius: 6px;
}

/* Flèches de navigation */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 24px;
  user-select: none;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
  left: 30px;
}

.slider-arrow.next {
  right: 30px;
}

/* ==================== HERO ==================== */

.hero {
  position: relative;
  padding: 140px 0 80px;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

/* ==================== BUTTONS ==================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn.primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 8px 24px rgba(155, 89, 182, 0.3);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(155, 89, 182, 0.4);
}

.btn.secondary {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(52, 152, 219, 0.3);
}

.btn.secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(52, 152, 219, 0.4);
}

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

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

/* ==================== STATS ==================== */

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.stat {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-md);
  min-width: 160px;
  border: 1px solid rgba(155, 89, 182, 0.1);
  transition: var(--transition);
}

.stat:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.875rem;
  color: #7f8c8d;
  font-weight: 500;
}

/* ==================== HERO IMAGE ==================== */

.hero-image img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.hero-image:hover img {
  transform: scale(1.02);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
}

/* ==================== SECTIONS ==================== */

.section {
  padding: 100px 0;
}

.section-alt {
  background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--dark);
}

.section .section-intro {
  max-width: 700px;
  font-size: 1.125rem;
  color: #666;
  margin-bottom: 48px;
  line-height: 1.8;
}

/* ==================== CARDS ==================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: var(--transition);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(155, 89, 182, 0.2);
}

.card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--dark);
}

.card p {
  font-size: 1rem;
  color: #666;
  line-height: 1.7;
}

/* ==================== FOOTER ==================== */

.site-footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #d1d5db;
  padding: 60px 0 30px;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.site-footer h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: white;
  margin-bottom: 20px;
}

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

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary-light);
  transform: translateX(5px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: #9ca3af;
}

/* ==================== ANIMATIONS ==================== */

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

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1400px) {
  .main-nav a {
    padding: 9px 13px;
    font-size: 0.82rem;
  }
}

@media (max-width: 1200px) {
  .main-nav a {
    padding: 8px 11px;
    font-size: 0.8rem;
  }
}

@media (max-width: 1150px) {
  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(155, 89, 182, 0.1);
    display: none;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    display: flex;
    width: 100%;
    padding: 14px 18px;
    font-size: 0.95rem;
    justify-content: flex-start;
  }

  .nav-toggle {
    display: flex;
  }

  .logo img {
    width: 50px;
    height: 50px;
  }

  .slider-arrow {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .slider-arrow.prev {
    left: 15px;
  }

  .slider-arrow.next {
    right: 15px;
  }
}

@media (max-width: 968px) {
  .hero-inner,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 2.8rem;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 120px 0 60px;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header p {
    font-size: 1.1rem;
  }
}

/* --- Slider dans le page-header --- */

.page-header {
  position: relative;
  overflow: hidden;
  /* ne PAS mettre de background ici */
}

.page-header-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.page-header-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.page-header-slide.active {
  opacity: 1;
}

/* contenu au-dessus du slider */
.page-header .container {
  position: relative;
  z-index: 2;
}

/* ==================== BOUTONS "PLUS ACTION" ==================== */

.action-buttons-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 48px 0;
  margin: 40px 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.action-buttons-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
  color: var(--dark);
}

.action-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 24px;
  background: white;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  color: var(--dark);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.action-btn:hover::before {
  opacity: 0.1;
}

.action-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  color: var(--primary);
}

.action-btn span {
  position: relative;
  z-index: 1;
}

.action-btn .icon {
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
}

/* Variante compacte pour Contact */
.action-buttons-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.action-buttons-grid.compact .action-btn {
  padding: 14px 20px;
  font-size: 0.95rem;
}

/* ==================== RÉDUCTION ESPACEMENT SECTIONS NOS ACTIONS ==================== */

.services-list {
  margin-bottom: 30px; /* Réduit l'espace après chaque grille de services */
}

.section {
  padding: 20px 0; /* Au lieu de 100px */
}

.section.section-alt {
  padding: 20px 0; /* Au lieu de 100px */
}

/* Espacement spécifique pour la page Nos actions */
#malades,
#aidants,
#prevention,
#perspectives {
  padding-top: 20px;
  padding-bottom: 20px;
}

/* Boutons de filtre pour actualités */
.filter-btn {
  padding: 10px 20px;
  border: 2px solid #ddd;
  border-radius: 25px;
  background: var(--white);
  color: var(--dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

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

/* Cartes d'actualités */
.news-card {
  transition: all 0.3s ease;
  opacity: 1;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Cartes actualités */
.news-card {
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Boutons de filtre */
.filter-btn {
  padding: 10px 20px;
  border: 2px solid #ddd;
  border-radius: 25px;
  background: var(--white);
  color: var(--dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

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

/* Pagination */
.pagination-btn {
  padding: 10px 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: var(--white);
  color: var(--dark);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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


