/* DÉPLOIEMENT TERRITORIAL + PARTENAIRES */
.territoire-section {
  position: relative;
  z-index: 0;
  display: flex;
  padding: 65px 0;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  flex-shrink: 0;
  align-self: stretch;
  background: #F7F7F5;
  overflow: hidden;
}

.territoire-section .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  max-width: 1402px;
  padding: 0 96px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.territoire-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  align-self: stretch;
  gap: 35px;
}

.territoire-map,
.territoire-content {
  position: relative;
  z-index: 1;
}

/* ---- Carte ---- */
.territoire-map {
  display: flex;
  flex: 0 0 calc(46% + 96px);
  max-width: calc(46% + 96px);
  margin-left: -96px;
  align-items: center;
  justify-content: flex-start;
  align-self: stretch;
}

.territoire-map-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
}

.territoire-map-img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  height: auto;
  object-fit: contain;
}

/* ---- Contenu texte ---- */
.territoire-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
}

.territoire-eyebrow {
  color: #4A78BB;
  font-family: var(--font-body);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.territoire-heading {
  align-self: stretch;
  margin-top: 10px;
  color: #0F1A2E;
  font-family: var(--font-heading);
  font-size: 38px;
  font-style: normal;
  font-weight: 700;
  line-height: 45.6px;
}

.territoire-text {
  align-self: stretch;
  margin-top: 12px;
  color: #555;
  font-family: var(--font-body);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 28px;
}

.territoire-text strong {
  font-weight: 700;
}

.territoire-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: stretch;
  margin-top: 24px;
}

.territoire-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 371px;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 8px;
  background: #FFF;
  border: 1px solid rgba(0, 0, 0, .06);
  box-sizing: border-box;
}

.territoire-card--0 {
  height: 79px;
  background: #F0FAF5;
  border-color: rgba(116, 198, 167, .3);
}

.territoire-card--1 {
  height: 80px;
  background: #FFF;
  border-color: rgba(0, 0, 0, .06);
}

.territoire-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
}

.territoire-card-body {
  text-align: left;
}

.territoire-card-title {
  color: #0F1A2E;
  font-family: var(--font-body);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 19px;
  text-align: left;
}

.territoire-card-subtitle {
  color: #777;
  font-family: var(--font-body);
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
  text-align: left;
  white-space: nowrap;
}

/* ---- Partenaires & soutiens ---- */
.partners-block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  text-align: center;
}

.partners-shape {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.partners-shape--yellow {
  width: 350px;
  height: 340px;
  right: -250px;
  top: -200px;
  background: rgba(212, 244, 162, .5);
}

.partners-shape--blue {
  width: 150px;
  height: 180px;
  right: 20px;
  bottom: 15px;
  background: rgba(199, 227, 255, .5);
  transform: rotate(44.574deg);
}

.partners-title {
  align-self: center;
  color: #0F1A2E;
  font-family: var(--font-heading);
  font-size: 28px;
  font-style: normal;
  font-weight: 700;
  line-height: 34px;
  text-align: center;
  white-space: nowrap;
}

.partners-subtitle {
  align-self: center;
  color: #555;
  font-family: var(--font-body);
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 22.5px;
  margin-top: 8px;
  text-align: center;
}

/* ---- Slider Partenaires & Soutiens ---- */
.partners-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 32px;
  gap: 12px;
}

.partners-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFF;
  border: 1px solid rgba(15, 26, 46, 0.12);
  color: #0F1A2E;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

.partners-nav-btn:hover {
  background: #0F1A2E;
  color: #FFF;
  border-color: #0F1A2E;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(15, 26, 46, 0.18);
}

.partners-nav-btn:active {
  transform: scale(0.96);
}

.partners-slider-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 0;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.partners-item-image {
    max-width: 100%;       /* Empêche l'image de déborder de son conteneur */
    height: 80px;          /* Fixe une hauteur uniforme pour tous les logos */
    object-fit: contain;   /* Garantit que le logo ne sera JAMAIS écrasé ou déformé */
    display: block;
    margin-left: auto;
    margin-right: auto;    /* Centre l'image si nécessaire */
}

.partners-marquee-row {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.partners-marquee-row::-webkit-scrollbar {
  display: none;
}

.partners-marquee-row:active {
  cursor: grabbing;
}

.partners-marquee-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  will-change: transform;
  animation: marqueeLeft 32s linear infinite;
}

.partners-marquee-row--1 .partners-marquee-track {
  animation: marqueeRight 36s linear infinite;
}

.partners-marquee-row:hover .partners-marquee-track,
.partners-marquee-row:focus-within .partners-marquee-track,
.partners-marquee-row.is-paused .partners-marquee-track,
.partners-slider-wrapper.is-user-interacting .partners-marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeLeft {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes marqueeRight {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

.partners-item {
  display: flex;
  width: 130px;
  height: 52px;
  padding: 0 14px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFF;
  box-sizing: border-box;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.partners-item:hover {
  transform: translateY(-2px);
  border-color: rgba(74, 120, 187, 0.35);
  box-shadow: 0 4px 12px rgba(15, 26, 46, 0.08);
}

.partners-item-name {
  color: #334155;
  text-align: center;
  font-family: var(--font-body);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .territoire-section .container {
    padding: 0 48px;
  }

  .territoire-map {
    flex: 0 0 calc(46% + 48px);
    max-width: calc(46% + 48px);
    margin-left: -48px;
  }
}

@media (max-width: 900px) {
  .territoire-row {
    flex-direction: column;
  }

  .territoire-content {
    max-width: 100%;
    flex: none;
    width: 100%;
  }

  .territoire-map {
    flex: none;
    width: calc(100% + 48px);
    max-width: calc(100% + 48px);
    margin-left: -48px;
    justify-content: flex-start;
  }

  .territoire-content {
    align-items: center;
    text-align: center;
  }

  .territoire-heading,
  .territoire-text {
    align-self: center;
  }

  .territoire-cards {
    align-self: stretch;
    align-items: center;
  }

  .territoire-card {
    align-self: center;
    max-width: 100%;
  }

  .partners-item {
    width: 110px;
    height: 48px;
    padding: 0 10px;
  }

  .partners-item-name {
    font-size: 10px;
    line-height: 14px;
  }

  .partners-title,
  .partners-subtitle {
    align-self: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .territoire-section .container {
    padding: 0 20px;
  }

  .territoire-card {
    width: 100%;
  }

  .territoire-map {
    width: calc(100% + 20px);
    max-width: calc(100% + 20px);
    margin-left: -20px;
  }

  .territoire-heading {
    font-size: 28px;
    line-height: 32px;
  }

  .partners-title {
    font-size: 22px;
    line-height: 28px;
    white-space: normal;
  }

  .partners-subtitle {
    font-size: 13px;
    line-height: 18px;
    white-space: normal;
  }

  .territoire-text {
    font-size: 14px;
    line-height: 22px;
  }

  .territoire-map-img {
    max-width: 320px;
  }

  .partners-slider-wrapper {
    gap: 6px;
    margin-top: 24px;
  }

  .partners-nav-btn {
    width: 32px;
    height: 32px;
  }

  .partners-item {
    width: 105px;
    height: 44px;
    padding: 0 8px;
    border-radius: 6px;
  }

  .partners-item-name {
    font-size: 9.5px;
    line-height: 13px;
  }
}

@media (max-width: 360px) {
  .territoire-heading {
    font-size: 24px;
    line-height: 28px;
  }

  .partners-title {
    font-size: 18px;
    line-height: 24px;
  }

  .partners-subtitle {
    font-size: 12px;
    line-height: 16px;
  }

  .territoire-text {
    font-size: 13px;
    line-height: 20px;
  }

  .territoire-map-img {
    max-width: 270px;
  }

  .partners-item {
    width: 95px;
    height: 42px;
    padding: 0 6px;
  }

  .partners-item-name {
    font-size: 9px;
    line-height: 12px;
  }
}
