/* ============================================
   INDEX.CSS — Page Accueil
   ============================================ */

/* ========== TYPEWRITER ========== */
.typewriter-wrapper {
  display: inline;
}

.typewriter-cursor {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 300;
  animation: blink 0.7s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ========== HERO ========== */
.hero {
  padding: var(--space-4xl) 0 var(--space-3xl);
  position: relative;
  overflow: hidden;
}

/* Icônes déco scattered */
.hero-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hi {
  position: absolute;
  width: var(--s, 24px);
  height: var(--s, 24px);
  color: var(--color-text-muted);
  opacity: 0.70;
  transform: rotate(var(--r, 0deg));
  animation: float 6s ease-in-out infinite;
}

.hi:nth-child(2n)   { animation-duration: 7s; }
.hi:nth-child(3n)   { animation-duration: 5s; }
.hi:nth-child(1)  { animation-delay: 0s; }
.hi:nth-child(2)  { animation-delay: -1.2s; }
.hi:nth-child(3)  { animation-delay: -3s; }
.hi:nth-child(4)  { animation-delay: -0.6s; }
.hi:nth-child(5)  { animation-delay: -4s; }
.hi:nth-child(6)  { animation-delay: -2s; }
.hi:nth-child(7)  { animation-delay: -5s; }
.hi:nth-child(8)  { animation-delay: -1.5s; }
.hi:nth-child(9)  { animation-delay: -3.5s; }
.hi:nth-child(10) { animation-delay: -0.8s; }
.hi:nth-child(11) { animation-delay: -2.5s; }
.hi:nth-child(12) { animation-delay: -4.5s; }

@keyframes float {
  0%, 100% { transform: rotate(var(--r, 0deg)) translateY(0); }
  50%      { transform: rotate(var(--r, 0deg)) translateY(-15px); }
}

@media (max-width: 768px) {
  .hero-icons { display: none; }
}

.hero-content {
  max-width: 620px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.hero-title .accent {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
}

/* ========== SERVICES ========== */
.services-section {
  padding: var(--space-4xl) 0;
  background: var(--color-bg-alt);
}

.services-header {
  margin-bottom: var(--space-3xl);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.service-card {
  display: block;
  padding: var(--space-xl);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover,
.service-card:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.service-card:hover .service-icon {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.service-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.service-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.services-cta {
  text-align: center;
  margin-top: var(--space-2xl);
}

/* ========== POURQUOI NOUS — Colonnes verticales ========== */
.why-section {
  padding: var(--space-4xl) 0;
}

.why-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: var(--space-2xl);
}

.why-col {
  padding: var(--space-2xl) var(--space-xl);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.why-col:first-child {
  border-left: none;
  padding-left: 0;
}

.why-col:last-child {
  padding-right: 0;
}

.why-col .why-icon {
  width: 40px;
  height: 40px;
  color: var(--color-accent);
  margin-bottom: var(--space-2xl);
}

.why-col .why-icon svg {
  width: 80%;
  height: 80%;
}

.why-col h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  margin-top: auto;
}

.why-col p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ========== CTA FINAL ========== */
.cta-section {
  padding: var(--space-4xl) 0;
  background: var(--color-bg-alt);
}

.cta-box {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.cta-box h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.cta-box p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .why-row {
    grid-template-columns: 1fr;
  }

  .why-col {
    border-left: none;
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-xl) 0;
  }

  .why-col:first-child {
    padding-left: 0;
  }

  .why-col:last-child {
    border-bottom: none;
    padding-right: 0;
  }

  .why-col .why-icon {
    margin-bottom: var(--space-lg);
  }
}

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

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    text-align: center;
  }
}
