/* Variables globales */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #3498DB;
  --accent-color: #E74C3C;
  --gradient-primary: linear-gradient(135deg, #2C3E50 0%, #3498DB 100%);
  --text-color: #2C3E50;
  --text-light: #6C7A89;
  --background-light: #F5F6FA;
  --spacing-unit: 1rem;
  --border-radius: 12px;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Styles généraux améliorés */
body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-light);
}

/* Hero Section Améliorée */
.hero-section {
  position: relative;
  min-height: 80vh;
  background: var(--gradient-primary);
  padding: 6rem 0;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  color: white;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease 0.2s;
}

/* Sections avec effet de profondeur */
.section-modern {
  padding: 5rem 0;
  position: relative;
  background: white;
  margin: 2rem 0;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

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

/* Cartes projets améliorées */
.project-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--box-shadow);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
  position: relative;
  padding-top: 66%;
  overflow: hidden;
}

.project-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

/* Boutons modernes */
.btn-modern {
  padding: 1rem 2rem;
  border-radius: 50px;
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Grille de statistiques */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.stat-item {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-light);
  font-size: 1rem;
}

/* Témoignages améliorés */
.testimonial-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin: 1rem;
  position: relative;
}

.testimonial-quote {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Footer moderne */
.footer-modern {
  background: var(--primary-color);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Media Queries */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section-modern {
    padding: 3rem 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* Styles pour la section des projets */
.projects-section {
    padding: 5rem 0;
    background: var(--background-light);
}

.section-header {
    margin-bottom: 4rem;
}

.section-subheading {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto;
}

/* Filtres de projets */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Cartes de projets */
.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
    position: relative;
    padding-top: 66%;
    overflow: hidden;
}

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

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

/* Overlay du projet */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* Tags de catégories */
.project-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-tag {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Contenu du projet */
.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

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

/* Métriques du projet */
.project-metrics {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.metric i {
    color: var(--primary-color);
}

/* Barre de progression */
.project-progress {
    margin-bottom: 1.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.progress-bar {
    height: 6px;
    background: var(--background-light);
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 1s ease;
}

/* Actions du projet */
.project-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

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

.btn-modern.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Animation au défilement */
.project-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.project-item.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .projects-filter {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .project-card {
        margin-bottom: 2rem;
    }
    
    .project-metrics {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Animation de chargement */
.loading-projects {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--background-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Section Témoignages */
.testimonials-section {
    background: var(--background-light);
    padding: 5rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.testimonial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-meta {
    flex-grow: 1;
}

.testimonial-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.testimonial-role {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

.testimonial-quote-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.testimonial-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0 0 1.5rem 0;
    font-style: italic;
}

.testimonial-rating {
    color: #FFD700;
    font-size: 1.1rem;
}

.testimonial-rating i {
    margin-right: 0.2rem;
}

/* Animation des témoignages */
.testimonial-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.4s;
}

/* Modal de partage de témoignage */
.testimonial-modal {
    max-width: 600px;
    background: white;
    border-radius: 20px;
    padding: 2rem;
}

.testimonial-form {
    margin-top: 1.5rem;
}

.testimonial-form-group {
    margin-bottom: 1.5rem;
}

.testimonial-form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.testimonial-form-input,
.testimonial-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--background-light);
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

.testimonial-form-input:focus,
.testimonial-form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }
}

/* Section Impact */
.impact-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--background-light) 0%, #ffffff 100%);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.impact-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.impact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.impact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.impact-icon i {
    font-size: 1.5rem;
    color: white;
}

.impact-stats {
    text-align: center;
    margin-bottom: 1.5rem;
}

.counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.impact-label {
    font-size: 1.1rem;
    color: var(--text-light);
}

.impact-details {
    margin-bottom: 1.5rem;
}

.impact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.impact-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.impact-list i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

/* Progress Ring */
.impact-progress {
    text-align: center;
}

.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
}

.progress-ring-circle {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.progress-ring-circle-bg,
.progress-ring-circle-progress {
    fill: none;
    stroke-width: 8;
}

.progress-ring-circle-bg {
    stroke: var(--background-light);
}

.progress-ring-circle-progress {
    stroke: var(--primary-color);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Impact Chart */
.impact-chart {
    margin-top: 4rem;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.chart-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Impact CTA */
.impact-cta {
    margin-top: 4rem;
    padding: 3rem;
    background: var(--primary-color);
    border-radius: 20px;
    color: white;
}

.impact-cta h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.impact-cta p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.impact-cta .btn-modern {
    background: white;
    color: var(--primary-color);
}

.impact-cta .btn-modern:hover {
    background: var(--background-light);
    transform: translateY(-2px);
}

/* Animations */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter {
    animation: countUp 1s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 992px) {
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .impact-grid {
        grid-template-columns: 1fr;
    }

    .impact-card {
        padding: 1.5rem;
    }

    .counter {
        font-size: 2rem;
    }

    .impact-cta {
        padding: 2rem;
    }
}