/* assets/css/pages.css */

/* Hero Section */
#hero {
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("../images/hero.png");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-light);
  text-align: center;
  padding-top: 60px; /* Space for the fixed header */
}

#hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: var(--color-light); /* Forced light color */
}

#hero p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* About Page Specifics */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.legal-box {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: #f4f7fa;
  border-radius: 8px;
  border-left: 4px solid var(--color-accent);
}

.legal-item small {
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  font-size: 0.75rem;
  font-weight: 600;
}

.legal-item strong {
  display: block;
  color: var(--color-primary);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

/* Domaines d'intervention */
.domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.domain-card {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.domain-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--color-accent);
}

.domain-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: #f4f7fa;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.domain-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.domain-card ul {
  padding-left: 0;
  list-style: none;
}

.domain-card ul li {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.2rem;
}

.domain-card ul li::before {
  content: "•";
  color: var(--color-accent);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Horizontal Scroll Section (Desktop Only) */
@media (min-width: 1024px) {
  .horizontal-scroll-container {
    height: 300vh; /* Adjust length of scroll */
    position: relative;
  }

  .sticky-viewport {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column; /* Stack title and track */
    justify-content: center;
    align-items: flex-start; /* Start track at the left edge */
    background: transparent;
  }

  .sticky-viewport .section-title {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
  }

  .horizontal-track {
    display: flex;
    gap: 4rem;
    padding: 0 5vw; /* Start with some padding */
    padding-right: 15vw; /* Huge padding to ensure last card clears */
    width: max-content;
    will-change: transform;
    margin-top: 0;
  }

  .horizontal-track .domain-card {
    flex: 0 0 400px; /* Fixed width for cards in horizontal mode */
    height: 500px; /* Fixed height for consistency */
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Hide default grid logic if wrapper class changes */
  .domains-grid {
    display: none;
  }
}

@media (max-width: 1023px) {
  /* Fallback to simple grid on mobile */
  .horizontal-scroll-container,
  .sticky-viewport {
    height: auto;
    position: static;
    display: block;
    background: transparent;
  }

  .horizontal-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0;
    width: 100%;
    transform: none !important; /* Force reset JS transform */
  }
}

/* Pourquoi nous choisir */
.why-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.why-card {
  text-align: center;
  padding: 1rem;
}

.why-card h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 0.8rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.why-card h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  margin: 0.8rem auto 0;
}

.why-card p {
  font-size: 0.95rem;
  color: #666;
}

/* Méthodologie */
#methodology {
  background-color: var(--color-primary);
  padding: 8rem 0;
}

#methodology .section-title h2 {
  color: var(--color-light);
}

#methodology .section-title::after {
  background: var(--color-accent);
}

.process-steps {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  margin-top: 3rem;
}

.process-steps::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 50px;
  right: 50px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 0;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--color-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  border: 4px solid #1b365d;
}

.step h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-light);
}

.step p {
  font-size: 0.9rem;
  opacity: 0.9;
  color: var(--color-light);
}

/* Realisations Page */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 !important;
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.project-card .project-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-category {
  display: inline-block;
  align-self: flex-start;
  padding: 0.3rem 0.8rem;
  background: #f4f7fa;
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  line-height: 1.3;
}

.project-details-list {
  display: none;
}

.project-card p {
  display: none;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-accent);
}

.project-card::after {
  content: "Cliquer pour voir les détails →";
  display: block;
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  padding: 1.5rem 2rem;
  border-top: 1px solid #f0f0f0;
  background: #fcfdfe;
  transition: var(--transition);
}

.project-card:hover::after {
  background: var(--color-accent);
  color: white;
}

/* Contact Page Specifics */
.contact-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 3rem;
}

.contact-info h3,
.contact-cta h3 {
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.contact-details {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
}

.contact-item strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.contact-item p {
  margin: 0;
  color: #555;
}

.contact-cta {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-accent) 100%
  );
  padding: 2.5rem;
  border-radius: 12px;
  color: white;
  text-align: center;
}

.contact-cta h3 {
  color: white;
  margin-bottom: 1rem;
}

.contact-cta p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

.contact-cta .btn {
  background: white !important;
  color: var(--color-primary) !important;
  font-weight: 600;
  border-color: white !important;
}

.contact-cta .btn:hover {
  background: #f0f0f0 !important;
  color: var(--color-primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Hero responsive */
  #hero h1 {
    font-size: 2.5rem;
  }

  #hero p {
    font-size: 1rem;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
    padding: 0 1rem;
  }

  .hero-btns .btn {
    width: 100%;
    max-width: 300px;
  }

  /* About grid responsive */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Contact container responsive */
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-content: center;
    align-items: center;
  }

  .contact-cta {
    padding: 2rem;
  }

  .contact-cta .btn {
    display: block;
    width: 100%;
  }

  .legal-box {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  /* Process steps responsive */
  .process-steps {
    flex-direction: column;
    gap: 3rem;
  }

  .process-steps::before {
    display: none;
  }

  .step-number {
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  #hero h1 {
    font-size: 2rem;
  }

  #hero p {
    font-size: 0.95rem;
  }

  .about-grid,
  .contact-container {
    gap: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
  }
}
