
/* ==========================================================
   ELECTROJUL — SERVICES ET PRESTATIONS
   ========================================================== */

.ej-services {
  padding: 48px 24px;
  color: var(--ej-text);
  background: var(--ej-white);
}

.ej-services-heading {
  margin: 0 auto 36px;
  text-align: center;
}

.ej-services-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.2;
  color: var(--ej-blue-dark);
}

.ej-services-heading > p {
  margin: 0;
  color: #68809a;
  font-size: 1rem;
}

/* GRILLE DES SERVICES */

.ej-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
}

/* VIGNETTES */

.ej-service-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ej-border);
  border-radius: 11px;
  background: var(--ej-white);
  box-shadow: 0 1px 2px rgb(16 43 70 / 4%);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ej-service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgb(16 43 70 / 12%);
}

/* IMAGES */

.ej-service-card > img {
  display: block;
  width: 100%;
  height: 175px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ej-service-card:hover > img {
  transform: scale(1.04);
}

/* CONTENU */

.ej-service-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
}

/* TITRES ET ICÔNES */

.ej-service-title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}

.ej-service-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: #e8f1fb;
  color: var(--ej-blue-dark);
  font-size: 1.4rem;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.ej-service-icon svg {
  display: block;
  width: 23px;
  height: 23px;
}

.ej-service-card:hover .ej-service-icon {
  background-color: var(--ej-blue);
  color: var(--ej-white);
}

.ej-service-title h3 {
  margin: 0 0 5px;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--ej-blue-dark);
}

.ej-service-title p {
  margin: 0;
  color: #68809a;
  font-size: 0.8rem;
}

/* DESCRIPTIONS */

.ej-service-content > p {
  margin: 0 0 15px;
  color: #61768c;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* LIEN — TOUTE LA VIGNETTE EST CLIQUABLE */

.ej-service-content > a {
  position: static;
  margin-top: auto;
  color: var(--ej-blue);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.ej-service-content > a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ej-service-content > a:hover {
  text-decoration: underline;
}

.ej-service-content > a:focus-visible {
  outline: 3px solid var(--ej-blue);
  outline-offset: 4px;
}

/* TABLETTES */

@media (max-width: 900px) {
  .ej-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

/* MOBILES */

@media (max-width: 600px) {
  .ej-services {
    padding: 34px 16px;
  }

  .ej-services-heading {
    margin-bottom: 24px;
  }

  .ej-services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ej-service-card > img {
    height: 200px;
  }

  .ej-service-content {
    padding: 16px;
  }
}

/* ACCESSIBILITÉ — RÉDUCTION DES ANIMATIONS */

@media (prefers-reduced-motion: reduce) {
  .ej-service-card,
  .ej-service-card > img,
  .ej-service-icon {
    transition: none;
  }

  .ej-service-card:hover {
    transform: none;
  }

  .ej-service-card:hover > img {
    transform: none;
  }
}
