/* EM Service — page body (filiale) */
.em-service-body {
  --em-red: #b70202;
  --em-blue: #181aa3;
  --em-light: #f7f8fc;
  --em-border: #e8eaf2;
  color: #1d2b40;
}

.em-section {
  padding: 70px 0;
}

.em-section--alt {
  background: var(--em-light);
}

.em-section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.em-section-head h2 {
  font-family: "Recoleta", serif;
  font-weight: 500;
  color: var(--em-red);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 12px;
}

.em-section-head p {
  color: #5a6478;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

/* Hero */
.em-hero {
  position: relative;
  padding: clamp(120px, 18vw, 220px) 0 clamp(60px, 10vw, 100px);
  color: #fff;
  overflow: hidden;
}

.em-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(../images/assets/bg-em-service-header.svg) no-repeat center bottom;
  background-size: cover;
  filter: brightness(0.45);
  z-index: 0;
}

.em-hero .container {
  position: relative;
  z-index: 1;
}

.em-hero-logo {
  width: min(140px, 35vw);
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.em-hero h1 {
  font-family: "Recoleta", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  margin-bottom: 16px;
}

.em-hero-lead {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.65;
  max-width: 560px;
  opacity: 0.95;
  margin-bottom: 0;
}

.em-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.em-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.88rem;
  font-weight: 500;
}

.em-hero-badge i {
  color: #fff;
}

/* Cartes services existants */
.em-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.em-service-card {
  height: 100%;
  padding: 28px 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--em-border);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.em-service-card:hover {
  box-shadow: 0 12px 32px rgba(183, 2, 2, 0.08);
  transform: translateY(-3px);
}

.em-service-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(183, 2, 2, 0.1);
  color: var(--em-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.em-service-card h3 {
  font-family: "Recoleta", serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--em-red);
  margin-bottom: 12px;
  line-height: 1.35;
}

.em-service-card p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #4a5568;
  margin: 0;
}

/* Présentation */
.em-presentation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.em-presentation-text p {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #4a5568;
  margin-bottom: 18px;
}

.em-presentation-text p:last-child {
  margin-bottom: 0;
}

.em-presentation-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.em-presentation-visual .em-visual-card {
  min-height: 180px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--em-border);
}

.em-visual-card--1 {
  background-image: url(../images/assets/em1.svg);
  grid-row: span 2;
  min-height: 100%;
}

.em-visual-card--2 {
  background-image: url(../images/assets/em2.svg);
}

.em-visual-card--3 {
  background-color: var(--em-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.em-visual-card--3 img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}

/* Activités */
.em-activities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.em-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--em-border);
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1d2b40;
}

.em-activity-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--em-red);
  flex-shrink: 0;
  margin-top: 7px;
}

/* BTCS avantages */
.em-btcs-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px 56px;
  align-items: start;
}

.em-btcs-intro h2 {
  font-family: "Recoleta", serif;
  font-weight: 500;
  color: var(--em-red);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 16px;
  line-height: 1.25;
}

.em-btcs-intro p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.8;
  color: #4a5568;
  max-width: 36ch;
}

.em-btcs-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.em-btcs-benefit {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--em-border);
}

.em-btcs-benefit i {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(24, 26, 163, 0.08);
  color: var(--em-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin-top: 1px;
}

.em-btcs-benefit span {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #1d2b40;
  padding-top: 6px;
}

/* Galerie */
.em-gallery {
  padding-bottom: 80px;
}

.em-gallery-toolbar {
  margin-bottom: 28px;
}

.em-gallery-filters-scroll {
  position: relative;
}

.em-gallery-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.em-gallery-filters li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 18px;
  border: 2px solid var(--em-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.em-gallery-filters li:hover {
  border-color: var(--em-blue);
  box-shadow: 0 8px 24px rgba(24, 26, 163, 0.08);
}

.em-gallery-filters li.is-checked {
  border-color: var(--em-red);
  background: #fffafa;
  box-shadow: 0 8px 24px rgba(183, 2, 2, 0.1);
}

.em-filter-label {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--em-dark, #1d2b40);
  line-height: 1.3;
}

.em-gallery-filters li.is-checked .em-filter-label {
  color: var(--em-red);
}

.em-filter-count {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--em-blue);
  background: rgba(24, 26, 163, 0.08);
  padding: 2px 8px;
  border-radius: 999px;
}

.em-filter-sub {
  font-size: 0.82rem;
  color: #718096;
  line-height: 1.4;
}

.em-gallery .portfolio-gallery-six {
  background: var(--em-light);
  padding: 40px 0 20px;
  border-radius: 20px;
}

.em-gallery-grid .em-gallery-item {
  margin-bottom: 24px;
}

.em-gallery-link {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--em-border);
  background: #fff;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.em-gallery-link:hover {
  box-shadow: 0 12px 32px rgba(24, 26, 163, 0.12);
  transform: translateY(-2px);
}

.em-gallery-link img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

@media (max-width: 991px) {
  .em-gallery-filters-scroll {
    margin: 0 -12px 14px;
    padding: 4px 12px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .em-gallery-filters-scroll::-webkit-scrollbar {
    display: none;
  }

  .em-gallery-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 0;
    width: max-content;
    min-width: 100%;
  }

  .em-gallery-filters li {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .em-gallery-filters li:hover {
    box-shadow: none;
  }

  .em-gallery-filters li.is-checked {
    box-shadow: 0 4px 14px rgba(183, 2, 2, 0.14);
  }

  .em-filter-label {
    font-size: 0.88rem;
  }

  .em-filter-count {
    font-size: 0.72rem;
    padding: 2px 7px;
  }

  .em-filter-sub {
    display: none;
  }

  .em-services-grid {
    grid-template-columns: 1fr;
  }

  .em-presentation-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .em-presentation-visual {
    order: -1;
  }

  .em-activities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .em-btcs-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .em-btcs-intro p {
    max-width: none;
  }
}

@media (max-width: 575px) {
  .em-section {
    padding: 48px 0;
  }

  .em-gallery-filters-scroll {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .em-gallery-filters li {
    padding: 9px 14px;
  }

  .em-filter-label {
    font-size: 0.84rem;
  }

  .em-activities-grid {
    grid-template-columns: 1fr;
  }

  .em-presentation-visual {
    grid-template-columns: 1fr;
  }

  .em-visual-card--1 {
    grid-row: auto;
    min-height: 200px;
  }
}
