/* Parcours d'accueil : cartes inspirees des acces de la Ville de Remire-Montjoly. */
.home-pathways {
  position: relative;
  isolation: isolate;
  padding: clamp(2.5rem, 5vw, 4.5rem) 1.5rem clamp(3rem, 5.5vw, 5rem);
  background: #fff;
  color: #18271e;
}

.home-pathways::before,
.home-pathways::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
}

.home-pathways::before {
  inset: 0;
  background:
    radial-gradient(ellipse at 10% 75%, #fcf4f4 0, #fcf4f4 29%, transparent 29.2%),
    radial-gradient(ellipse at 92% 100%, #f8fbfa 0, #f8fbfa 28%, transparent 28.2%);
}

.home-pathways::after {
  top: 2.3rem;
  left: calc(50% - 5.5rem);
  width: 11rem;
  height: 7rem;
  border-radius: 50%;
  background-image: radial-gradient(circle, #d9ebe4 2px, transparent 2.5px);
  background-size: 15px 15px;
  opacity: 0.65;
}

.home-pathways__inner {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}

.home-pathways__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.home-pathways__eyebrow {
  margin: 0 0 0.35rem;
  color: #007c8c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.home-pathways__header h2 {
  margin: 0;
  color: #18271e;
  font-family: var(--ds-font-display, inherit);
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.12;
}

.home-pathways__switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0.35rem;
  border: 1px solid #dfe7e4;
  border-radius: 999px;
  background: #f1f6f4;
}

.home-pathways__tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0.7rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4e6058;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.home-pathways__tab:hover {
  background: #e3eeea;
  color: #18271e;
}

.home-pathways__tab[aria-selected="true"] {
  background: #007e8e;
  color: #fff;
  box-shadow: 0 3px 8px rgb(0 83 92 / 0.12);
}

.home-pathways__tab:focus-visible {
  outline-offset: 4px !important;
}

.home-pathways__switch[hidden],
.home-pathways__panel[hidden] {
  display: none !important;
}

.home-pathways__panel-title {
  margin: 0 0 1.25rem;
}

.home-pathways:not(.is-enhanced) .home-pathways__panel + .home-pathways__panel {
  margin-top: 2rem;
}

.home-pathways.is-enhanced .home-pathways__panel-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-pathways__grid {
  display: grid;
  grid-template-columns: repeat(var(--pathways-columns, 4), minmax(0, 1fr));
  gap: 1.1rem;
  align-items: stretch;
}

.home-pathways__card {
  --pathway-color: #0096a7;
  --pathway-soft: #62bec9;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 370px;
  overflow: hidden;
  border: 1px solid rgb(20 50 37 / 0.025);
  border-radius: 28px;
  background: #fff;
  color: #202620;
  text-decoration: none;
  box-shadow: 0 10px 30px rgb(41 55 48 / 0.045);
}

.home-pathways__card--gold {
  --pathway-color: #efb45d;
  --pathway-soft: #ffd294;
}

.home-pathways__card--teal {
  --pathway-color: #0096a7;
  --pathway-soft: #4cb4c0;
}

.home-pathways__card--coral {
  --pathway-color: #ff6f7b;
  --pathway-soft: #ffa5ae;
}

.home-pathways__card--aqua {
  --pathway-color: #49bfcd;
  --pathway-soft: #8ddce5;
}

.home-pathways__card::after {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 64px;
  height: 64px;
  border-bottom: 3px solid var(--pathway-color);
  border-left: 3px solid var(--pathway-color);
  border-bottom-left-radius: 19px;
  content: "";
  pointer-events: none;
  z-index: 1;
  transition: width 0.5s, height 0.5s, border-color 0.5s;
}

.home-pathways__corner {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 133px;
  height: 133px;
  overflow: hidden;
  border-bottom-left-radius: 100%;
  z-index: 0;
  pointer-events: none;
  transition: top 0.5s, right 0.5s, width 0.5s, height 0.5s, border-bottom-left-radius 0.5s;
}

.home-pathways__corner::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(50deg, var(--pathway-color), var(--pathway-soft));
  opacity: 0.85;
  content: "";
}

.home-pathways__icon {
  display: block;
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  background: var(--pathway-color);
  -webkit-mask-image: var(--pathway-icon);
  mask-image: var(--pathway-icon);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: background-color 0.3s;
}

.home-pathways__corner .home-pathways__icon {
  position: absolute;
  top: 19px;
  right: 18px;
  width: 64px;
  height: 64px;
  background: #fff;
}

.home-pathways__vertical {
  position: absolute;
  bottom: 31px;
  left: 23px;
  z-index: 1;
  max-height: calc(100% - 60px);
  color: #202620;
  font-family: var(--ds-font-display, inherit);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.15;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  transition: color 0.3s;
}

.home-pathways__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 93px 22px 65px 74px;
}

.home-pathways__body > .home-pathways__icon {
  margin-bottom: 0.9rem;
}

.home-pathways__title {
  margin: 0 0 0.65rem;
  color: #25352b;
  font-family: var(--ds-font-display, inherit);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.26;
  transition: color 0.3s;
}

.home-pathways__description {
  margin: 0;
  color: #697080;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.55;
  transition: color 0.3s;
}

.home-pathways__cta {
  position: absolute;
  right: 22px;
  bottom: 26px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #007e8e;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  transition: color 0.3s;
}

.home-pathways__cta svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

/* Match the municipal .card-infos hover; keyboard users get the same state. */
.home-pathways__card:is(:hover, :focus-visible) .home-pathways__corner {
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border-bottom-left-radius: 0;
}

.home-pathways__card:is(:hover, :focus-visible)::after {
  width: 80%;
  height: 80%;
  border-color: #fff;
}

.home-pathways__card:is(:hover, :focus-visible) .home-pathways__vertical,
.home-pathways__card:is(:hover, :focus-visible) .home-pathways__title,
.home-pathways__card:is(:hover, :focus-visible) .home-pathways__description,
.home-pathways__card:is(:hover, :focus-visible) .home-pathways__cta {
  color: #fff;
}

.home-pathways__card:is(:hover, :focus-visible) .home-pathways__icon {
  background-color: #fff;
}

.home-pathways__card:focus-visible {
  outline-offset: 5px !important;
}

@media (max-width: 1050px) {
  .home-pathways__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .home-pathways__card {
    min-height: 330px;
  }

  .home-pathways__body {
    padding-top: 88px;
    padding-right: 30px;
  }
}

@media (max-width: 700px) {
  .home-pathways__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.1rem;
  }

  .home-pathways__switch {
    width: 100%;
    max-width: 430px;
  }

  .home-pathways__tab {
    flex: 1;
    padding-inline: 0.75rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 580px) {
  .home-pathways {
    padding-inline: 1rem;
  }

  .home-pathways::after {
    top: 2rem;
    right: 1rem;
    left: auto;
    width: 6rem;
    opacity: 0.45;
  }

  .home-pathways__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .home-pathways__card {
    min-height: 290px;
    border-radius: 25px;
  }

  .home-pathways__corner {
    width: 120px;
    height: 120px;
  }

  .home-pathways__corner .home-pathways__icon {
    top: 18px;
    right: 17px;
    width: 55px;
    height: 55px;
  }

  .home-pathways__body {
    padding: 36px 28px 71px 73px;
  }

  .home-pathways__body > .home-pathways__icon {
    margin-bottom: 0.8rem;
  }

  .home-pathways__title {
    max-width: calc(100% - 42px);
    font-size: 1.1rem;
  }

  .home-pathways__description {
    max-width: 24rem;
    margin-top: 0.25rem;
  }

  .home-pathways__vertical {
    bottom: 29px;
    left: 22px;
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-pathways__card,
  .home-pathways__card::after,
  .home-pathways__corner,
  .home-pathways__icon,
  .home-pathways__vertical,
  .home-pathways__title,
  .home-pathways__description,
  .home-pathways__cta,
  .home-pathways__tab {
    transition: none;
  }
}
