/* Cabinet 2ST Consulting : page Secteurs d'intervention (s'appuie sur site.css) */

.sx-page {
  background: var(--paper);
}
.sx-page .footer-wave {
  background: var(--paper);
}
.sx-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
}
.sx-eyebrow span {
  flex: none;
  width: 38px;
  height: 3px;
  border-radius: 3px;
  background: var(--gold);
}
.s-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Haut de page : fond bleu, lumières, roue des secteurs ---------- */
.sx-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, var(--navy-deep) 0%, var(--navy) 62%, #0d3f78 100%);
  color: var(--white);
}
.sx-aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.sx-aurora span {
  position: absolute;
  width: min(60vw, 820px);
  aspect-ratio: 1;
  border-radius: 50%;
  will-change: transform;
  animation: sx-aurora 18s ease-in-out infinite alternate;
}
.sx-aurora span:nth-child(1) {
  top: -45%;
  right: -8%;
  background: radial-gradient(circle, rgba(58, 130, 210, 0.5) 0, transparent 68%);
}
.sx-aurora span:nth-child(2) {
  right: 22%;
  bottom: -60%;
  background: radial-gradient(circle, rgba(242, 196, 19, 0.2) 0, transparent 68%);
  animation-duration: 23s;
  animation-direction: alternate-reverse;
}
.sx-aurora span:nth-child(3) {
  top: -30%;
  left: -18%;
  background: radial-gradient(circle, rgba(200, 16, 46, 0.2) 0, transparent 68%);
  animation-duration: 27s;
}
@keyframes sx-aurora {
  to {
    transform: translate3d(-9vw, 7vw, 0) scale(1.2);
  }
}
.sx-hero-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  padding: clamp(40px, 5vw, 64px) var(--gutter) clamp(32px, 4vw, 48px);
}
.sx-hero .sx-eyebrow {
  color: var(--white);
}
.sx-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(36px, 4.2vw, 58px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--white);
}
.sx-hero h1 em {
  color: var(--gold);
}
.sx-word {
  display: inline-block;
  overflow: hidden;
  margin-bottom: -0.14em;
  padding-bottom: 0.14em;
  vertical-align: top;
}
.sx-word > span {
  display: inline-block;
  animation: sx-rise 1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: calc(0.1s + var(--w) * 0.08s);
}
@keyframes sx-rise {
  from {
    transform: translateY(110%) rotate(5deg);
  }
}
.sx-lead {
  max-width: 520px;
  margin: 0;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.88);
}
.sx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.sx-hero .button-line {
  border-color: rgba(255, 255, 255, 0.75);
  color: var(--white);
}
.sx-hero .button-line:hover {
  background: var(--white);
  color: var(--navy-deep);
}

/* Roue : les secteurs défilent, celui du centre s'allume */
.sx-wheel {
  --h: 76px;
  position: relative;
  height: calc(var(--h) * 5);
}
.sx-wheel::before {
  content: "";
  position: absolute;
  top: calc(var(--h) * 2);
  right: 0;
  left: 0;
  height: var(--h);
  border: 1px solid rgba(242, 196, 19, 0.55);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sx-wheel-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 70%, transparent 100%);
}
.sx-wheel-track {
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}
.sx-wheel-track a {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--h);
  padding: 0 20px;
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.72);
  transform: scale(0.76);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.64, 1), color 0.5s;
}
.sx-wheel-track svg {
  flex: none;
  width: 42px;
  height: 42px;
  stroke-width: 1.8;
}
.sx-wheel-track .is-current a,
.sx-wheel-track a:hover,
.sx-wheel-track a:focus-visible {
  color: var(--gold);
}
.sx-wheel-track .is-current a {
  transform: none;
}
.sx-wheel-track a:focus-visible {
  outline-color: var(--gold);
  outline-offset: -3px;
}
.sx-hero-wave {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(32px, 4.5vw, 64px);
  margin-bottom: -1px;
}
.sx-hero-wave path {
  fill: var(--paper);
}

/* ---------- Explorateur ---------- */
.xp {
  padding: clamp(48px, 6vw, 80px) var(--gutter);
}
.xp-head {
  max-width: 720px;
  margin-bottom: 28px;
}
.xp-head h2 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.xp-head h2 em {
  color: var(--red);
}
.xp-head p:last-child {
  margin: 0;
  color: var(--muted);
}
.xp-body {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(20px, 3vw, 40px);
}
/* Grille de tuiles par famille, chacune avec sa couleur */
.xp-list {
  display: grid;
  align-content: space-between;
  gap: 16px;
}
.xp-group:nth-child(1) {
  --tone: var(--navy);
}
.xp-group:nth-child(2) {
  --tone: #9e1b2f;
}
.xp-group:nth-child(3) {
  --tone: #006b40;
}
.xp-group-name {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tone);
}
.xp-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.xp-tab {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 66px;
  padding: 8px 12px 8px 8px;
  overflow: hidden;
  border: 1px solid rgba(8, 47, 91, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--navy-deep);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s, color 0.3s, border-color 0.3s;
}
/* Le fond dégradé balaie la tuile au survol et sur le secteur actif */
.xp-tab::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(100deg, var(--navy) 0%, #0d3f78 55%, #c8102e 130%);
  transform: translateX(-101%);
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.15, 1);
}
.xp-tab:hover,
.xp-tab.is-active {
  border-color: transparent;
  box-shadow: 0 16px 30px -18px rgba(6, 31, 62, 0.6);
  color: var(--white);
  transform: translateY(-3px);
}
.xp-tab:hover::before,
.xp-tab.is-active::before {
  transform: none;
}
.xp-tab-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #c8102e, #f26a21);
  color: var(--white);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.xp-tab-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 3;
}
.xp-tab:hover .xp-tab-icon,
.xp-tab.is-active .xp-tab-icon {
  transform: rotate(-8deg) scale(1.08);
}
.xp-tab:focus-visible {
  outline-offset: 2px;
}
/* Barre de temps avant le secteur suivant */
.xp.is-running .xp-tab.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--gold);
  transform-origin: left;
  animation: xp-time 4s linear both;
}
@keyframes xp-time {
  from {
    transform: scaleX(0);
  }
}

/* Scène : photos qui se poussent, texte par-dessus */
.xp-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 600px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--navy-deep);
  color: var(--white);
}
.xp-photos {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
}
.xp-photo {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  visibility: hidden;
}
.xp-photo.is-active,
.xp-photo.is-leaving,
.xp-photo.is-growing,
.xp-photo.is-thumb {
  visibility: visible;
}
.xp-photo.is-active,
.xp-photo.is-leaving {
  z-index: 1;
}
.xp-photo.is-growing {
  z-index: 2;
}
/* Vignettes en attente, au-dessus du voile de la scène */
.xp-photo.is-thumb {
  z-index: 4;
  right: auto;
  bottom: auto;
  box-shadow: 0 0 0 2px var(--white), 0 16px 30px -12px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: box-shadow 0.25s;
}
.xp-photo.is-thumb:hover {
  box-shadow: 0 0 0 3px var(--gold), 0 16px 30px -12px rgba(0, 0, 0, 0.7);
}
.xp-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xp-photo.is-active img {
  animation: xp-zoom 7s linear both;
}
@keyframes xp-zoom {
  to {
    transform: scale(1.07);
  }
}
.xp-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(6, 31, 62, 0.96) 0%, rgba(6, 31, 62, 0.82) 26%, rgba(6, 31, 62, 0.1) 58%, rgba(6, 31, 62, 0) 100%);
  pointer-events: none;
}
.xp-text {
  pointer-events: auto;
}
.xp-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(22px, 3vw, 36px);
  pointer-events: none;
}
.js .xp-panel:not(.is-active) {
  display: none;
}
.xp-text > * {
  animation: xp-text-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.xp-text > p {
  animation-delay: 0.12s;
}
.xp-text > ul {
  animation-delay: 0.24s;
}
@keyframes xp-text-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
.xp-text h3 {
  margin-bottom: 6px;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--white);
}
.xp-text p {
  max-width: 560px;
  margin: 0 0 14px;
  font-size: 16.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}
.xp-text ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.xp-text li {
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 500;
}

/* ---------- Écrans plus petits ---------- */
@media (max-width: 900px) {
  .sx-hero-in,
  .xp-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .sx-wheel {
    --h: 62px;
  }
  .sx-wheel-track svg {
    width: 34px;
    height: 34px;
  }
  /* Liste des secteurs : rangée à faire glisser */
  .xp-list {
    display: flex;
    gap: 6px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .xp-group,
  .xp-group + .xp-group {
    margin: 0;
  }
  .xp-group-name {
    display: none;
  }
  .xp-tabs {
    display: flex;
    gap: 6px;
  }
  .xp-tab {
    width: max-content;
    min-height: 54px;
    padding: 6px 16px 6px 6px;
    white-space: nowrap;
  }
  .xp-tab:hover,
  .xp-tab.is-active {
    transform: none;
  }
  .xp-stage {
    min-height: 620px;
  }
}
@media (max-width: 900px) {
  /* Texte plus haut sur téléphone : le voile monte avec lui */
  .xp-stage::after {
    background: linear-gradient(0deg, rgba(6, 31, 62, 0.96) 0%, rgba(6, 31, 62, 0.86) 42%, rgba(6, 31, 62, 0.45) 62%, rgba(6, 31, 62, 0) 82%);
  }
}
@media (min-width: 901px) and (max-width: 1320px) {
  /* Écrans moyens : grille et photo à parts égales, pour que les mots longs tiennent */
  .xp-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
  }
  .xp-tab {
    gap: 8px;
    padding: 8px 10px 8px 8px;
    font-size: 13.5px;
  }
  .xp-tab-icon {
    width: 36px;
    height: 36px;
  }
  .xp-tab-icon svg {
    width: 24px;
    height: 24px;
  }
}
