/* ============================================
   PPSSP - Programme de Promotion des Soins de Santé Primaires
   Bootstrap 5 Custom Styles
   ============================================ */

/* Variables CSS */
:root {
  --primary-color: #38bdf8;
  --primary-dark: #0ea5e9;
  --secondary-color: #1e40af;
  --accent-color: #0d9488;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --success-color: #22c55e;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --footer-bg: #111827;
  --border-color: #e5e7eb;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

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

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  padding: 0.75rem 0;
  background: var(--bg-white) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar-brand img {
  height: 50px;
  width: auto;
}

.nav-link {
  font-weight: 500;
  color: var(--text-dark) !important;
  padding: 0.5rem 1rem !important;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.dropdown-menu {
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.dropdown-item {
  padding: 0.6rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
}

.dropdown-item:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

/* Language Switcher */
.lang-switcher {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  text-transform: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
}

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

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

.btn-blue {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

.btn-blue:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: white;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 2rem;
  max-width: 900px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  line-height: 1.8;
}

.hero-buttons .btn {
  margin: 0.5rem;
  min-width: 180px;
}

/* Page Hero (smaller) */
.page-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 2rem;
}

.page-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 3rem;
}

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

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

/* ============================================
   AXES CARDS
   ============================================ */
.axes-section {
  padding: 5rem 0;
  background: var(--bg-light);
}

.axis-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  height: 100%;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.axis-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: white;
}

.axis-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.axis-description {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.axis-link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.axis-link:hover {
  gap: 0.75rem;
}

/* ============================================
   IMPACT SECTION
   ============================================ */
.impact-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  color: white;
}

.impact-item {
  text-align: center;
  padding: 2rem;
}

.impact-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.impact-label {
  font-size: 1rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   PROJECT CARDS
   ============================================ */
.project-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
}

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

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

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

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

.project-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-en-cours {
  background: var(--success-color);
  color: white;
}

.status-termine {
  background: var(--text-light);
  color: white;
}

.status-planifie {
  background: var(--warning-color);
  color: white;
}

.project-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--primary-color);
  color: white;
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.project-description {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.project-meta i {
  color: var(--primary-color);
  width: 20px;
}

.progress {
  height: 8px;
  background: var(--bg-light);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.progress-bar {
  background: var(--primary-color);
  border-radius: 4px;
}

/* ============================================
   NEWS CARDS
   ============================================ */
.news-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
}

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

.news-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

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

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

.news-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.7);
  color: white;
}

.news-featured {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--warning-color);
  color: white;
}

.news-content {
  padding: 1.5rem;
}

.news-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  line-height: 1.4;
}

.news-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.news-tag {
  padding: 0.25rem 0.75rem;
  background: var(--bg-light);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ============================================
   OPPORTUNITY CARDS
   ============================================ */
.opportunity-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid var(--border-color);
}

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

.opportunity-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.opportunity-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.type-icon {
  width: 40px;
  height: 40px;
  background: #dbeafe;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.type-label {
  font-size: 0.875rem;
  color: #2563eb;
  font-weight: 500;
}

.opportunity-status {
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-ouvert {
  background: #dcfce7;
  color: #16a34a;
}

.opportunity-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.opportunity-description {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.opportunity-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.filter-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
  margin-left: -5px;
}

.timeline-year {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-description {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ============================================
   STATS BOX
   ============================================ */
.stats-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-number {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.25rem;
}

.stats-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   PARTNERS
   ============================================ */
.partners-section {
  padding: 4rem 0;
  background: var(--bg-light);
}

.partner-logo {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.partner-logo:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.partner-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.partner-type {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.newsletter-form .form-control {
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
}

.newsletter-form .btn {
  background: var(--text-dark);
  color: white;
  border: none;
  padding: 1rem 2rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--footer-bg);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-logo {
  height: 60px;
  margin-bottom: 1rem;
}

.footer-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

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

.footer-contact li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
  color: var(--primary-color);
  margin-top: 0.25rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 3rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-control {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form-label {
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-text {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* ============================================
   MESSAGE CARD
   ============================================ */
.message-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.message-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-dark);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.message-author {
  font-weight: 600;
  color: var(--text-dark);
}

.message-role {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .navbar-collapse {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .impact-number {
    font-size: 2.5rem;
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
