/*
  CoreDevPro™ — Homepage styles (refactored)

  Defines the layout and visual treatment for the landing page.  
  The design introduces a large hero section with a subtle network background,
  followed by a responsive grid of module cards using glassmorphism.
*/

/* Hero section */
#home {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 72px);
  padding-top: 6rem;
  padding-bottom: 4rem;
}
#home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* use compressed webp version of the network background for better performance */
  background: url('../assets/acceuil/fond.webp') center/cover no-repeat;
  opacity: 0.15;
  pointer-events: none;
}

.hero {
  max-width: 960px;
  text-align: center;
  margin: 0 auto;
  padding: 0 2rem;
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  position: relative;
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(83, 10, 217, 0.08);
}
.hero h1::before {
  content: '';
  position: absolute;
  top: -1.8rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 1rem;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 8px;
  opacity: 0.9;
}
.hero-tagline {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.8rem;
}
.hero-sub {
  max-width: 700px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-btn.large {
  font-size: 1.1rem;
  padding: 0.9rem 2.4rem;
  border-radius: 40px;
}
.cta-btn.large.secondary {
  border-width: 2px;
}

/* Modules grid */
.modules-grid {
  width: 100%;
  max-width: 1240px;
  margin-top: 4rem;
}
.modules-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 2rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  width: 100%;
  padding: 0 1rem;
}
.module-card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur));
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  box-shadow: 0 8px 24px var(--shadow-color);
  transition: transform 0.3s cubic-bezier(.24,.92,.57,1.32), box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.module-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 34px var(--shadow-color);
}
.module-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  flex-shrink: 0;
}
.module-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.module-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.module-actions {
  margin-top: auto;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.module-link,
.module-demo-btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 3px 10px var(--primary)33;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  position: relative;
  min-width: 140px;
  text-align: center;
}
.module-link {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: #fff;
}
.module-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--primary)55;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
}
.module-demo-btn {
  background: linear-gradient(90deg, var(--secondary), #009f5a);
  color: #fff;
}
.module-demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--secondary)55;
  background: linear-gradient(90deg, #009f5a, var(--secondary));
}
.module-link .arrow {
  margin-left: 0.4rem;
  transition: transform 0.3s ease;
}
.module-link:hover .arrow {
  transform: translateX(4px);
}

/*
 * Dark theme overrides for the "Qui sommes‑nous" (apropos) page. The section
 * uses inline styles with a white background; we override them here using
 * !important to enforce the dark pro look without altering the HTML structure.
 */
section#apropos {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 3px 18px var(--shadow-color) !important;
  border-radius: 18px !important;
  border: 1px solid var(--card-border) !important;
}
section#apropos h1 {
  color: var(--primary) !important;
}
section#apropos a {
  color: var(--primary) !important;
}
section#apropos span,
section#apropos p {
  color: var(--text-primary) !important;
}
@media (max-width: 900px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero-tagline {
    font-size: 1.2rem;
  }
  .hero-sub {
    font-size: 0.95rem;
  }
  .modules-title {
    font-size: 1.6rem;
  }
}
@media (max-width: 600px) {
  #home {
    padding-top: 5rem;
    padding-bottom: 3rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .module-card {
    padding: 1.5rem;
  }
  .module-actions {
    justify-content: stretch;
  }
  .module-link,
  .module-demo-btn {
    width: 100%;
    min-width: 0;
  }
}