/* Page index - Classes non présentes dans le CSS de base */

/* Hero Section */
.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.carousel-container {
  position: relative;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 2;
}

.hero-content h2 {
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-hero {
  background: #1a237e;
  color: white;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s;
  display: inline-block;
}

.btn-hero:hover {
  background: #3f51b5;
}

/* Carousel Controls */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 15px;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.3s;
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-arrow.prev {
  left: 20px;
}

.carousel-arrow.next {
  right: 20px;
}

.carousel-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dot.active {
  background: white;
}

/* Sections */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  margin-bottom: 50px;
  color: #1a237e;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: #1a237e;
}

/* Director Message */
.director-message {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.director-text {
  flex: 2;
}

.director-text p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 30px;
  text-align: justify;
}

.director-signature {
  text-align: right;
  font-style: italic;
}

.director-photo {
  flex: 1;
  text-align: center;
}

.director-photo img {
  width: 350px;
  height: 400px;
  border-radius: 8px;
  object-fit: cover;
}

/* Objectives */
.objectives {
  background: #f8f9fa;
}

.objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.objective-card {
  background: white;
  padding: 30px;
  border-radius: 5px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s;
}

.objective-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(26, 35, 126, 0.25);
}

.objective-icon {
  font-size: 48px;
  color: #1a237e;
  margin-bottom: 20px;
}

.objective-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #1a237e;
}

/* History */
.section.history {
  position: relative;
  background-image: url("Image/slide1.jpg");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color: white;
  padding: 80px 0;
}

.history-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.history-content p {
  font-size: 18px;
  line-height: 1.8;
}

/* Activities */
.services-wrapper {
  background: #fff;
  padding: 60px 0;
}

.services-intro {
  max-width: 900px;
  margin: 0 auto 50px;
  text-align: center;
  padding: 0 20px;
}

.services-intro h2 {
  font-size: 46px;
  color: #2c3e50;
  margin-bottom: 20px;
  font-weight: 700;
}

.services-intro p {
  font-size: 19px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 30px;
}

.services-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.service-card {
  position: relative;
  height: 400px;
  background-size: cover;
  background-position: center;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  transition: background 0.3s ease;
  z-index: 1;
}

.service-card:hover::before {
  background: rgba(0, 0, 0, 0.7);
}

.card-content {
  position: relative;
  padding: 40px;
  text-align: center;
  z-index: 2;
}

.icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.icon i {
  color: #e8491d;
}

.card-content h3 {
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.card-content p {
  font-size: 15px;
  color: #ddd;
  line-height: 1.6;
}

.card-footer {
  position: absolute;
  bottom: -100px;
  left: 0;
  right: 0;
  background: #e8491d;
  padding: 25px;
  text-align: center;
  transition: bottom 0.3s ease;
  z-index: 3;
}

.service-card:hover .card-footer {
  bottom: 0;
}

.card-footer .btn {
  background: white;
  color: #e8491d;
  padding: 12px 35px;
  font-weight: bold;
  text-decoration: none;
  border: 2px solid white;
  display: inline-block;
  transition: all 0.3s ease;
  font-size: 14px;
  letter-spacing: 1px;
}

.card-footer .btn:hover {
  background: transparent;
  color: white;
}

.cta-section {
  text-align: center;
  margin-top: 50px;
  padding: 0 20px;
}

.cta-button {
  display: inline-block;
  background: #e8491d;
  color: white;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-button:hover {
  background: #c73d17;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232, 73, 29, 0.3);
  color: white;
}

@media (max-width: 968px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .services-intro h2 {
    font-size: 28px;
  }
}

/* Section Ressources */
.ressources {
  background: #f8f9fa;
  padding: 60px 20px;
}

.ressources h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 50px;
  color: #1a237e;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.ressources h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: #1a237e;
}

.ressources > div:not(.ressources-grid) {
  max-width: 800px;
  margin: 0 auto 30px;
  padding: 0 20px;
  text-align: center;
}

.ressources > div:not(.ressources-grid) p {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  text-align: justify;
  margin-bottom: 20px;
}

.ressources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 50px auto 0;
  max-width: 1200px;
  padding: 0 20px;
}

.resource-card {
  background: white;
  padding: 30px;
  border-radius: 5px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(26, 35, 126, 0.25);
}

.resource-icon {
  font-size: 48px;
  color: #1a237e;
  margin-bottom: 20px;
}

.resource-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #1a237e;
  font-weight: 600;
}

.resource-card p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  text-align: justify;
}

@media (max-width: 768px) {
  .ressources h2 {
    font-size: 28px;
  }

  .ressources > div:not(.ressources-grid) p {
    font-size: 14px;
    text-align: left;
  }

  .ressources-grid {
    grid-template-columns: 1fr;
  }

  .resource-card {
    padding: 20px;
  }

  .resource-card h3 {
    font-size: 18px;
  }

  .resource-card p {
    text-align: left;
  }
}

/* Partners */
.partenaires {
  padding: 60px 0;
  text-align: center;
}

.partenaires h2 {
  font-size: 36px;
  margin-bottom: 40px;
  color: #2c3e50;
}

.logos-partenaires {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.logos-partenaires img {
  height: 80px;
  width: auto;
  filter: grayscale(100%);
  transition: filter 0.3s;
}

.logos-partenaires img:hover {
  filter: grayscale(0%);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive spécifique à la page index */
@media (max-width: 768px) {
  .hero-content h2 {
    font-size: 32px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .btn-hero {
    padding: 12px 20px;
    font-size: 14px;
  }

  .director-message {
    flex-direction: column;
    text-align: center;
  }

  .director-text {
    order: 2;
  }

  .director-photo {
    order: 1;
  }

  .objectives-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-content h2 {
    font-size: 24px;
    padding: 0 15px;
  }

  .hero-content p {
    font-size: 14px;
    padding: 0 15px;
  }

  .btn-hero {
    padding: 10px 16px;
    font-size: 13px;
  }

  .ressources {
    padding: 40px 15px;
  }

  .ressources h2 {
    font-size: 24px;
  }

  .ressources > div:not(.ressources-grid) {
    padding: 0 10px;
  }

  .ressources > div:not(.ressources-grid) p {
    font-size: 14px;
    text-align: left;
  }

  .ressources-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
    gap: 20px;
  }
}