/* V1 interactions, rendered in the accepted glass-and-navy visual language. */
:root {
  --motion-smooth: cubic-bezier(.16, 1, .3, 1);
  --motion-gentle: cubic-bezier(.22, .61, .36, 1);
}

.hero, #integrateurs { position: relative; isolation: isolate; }
.hero::before, #integrateurs::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 65% at var(--ambient-x, 65%) var(--ambient-y, 45%), rgba(140, 218, 233, .045), rgba(140, 218, 233, .012) 47%, transparent 74%);
}
.hero > .shell, #integrateurs > .shell { position: relative; z-index: 1; }

.hero__visual.hero__journey {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 460px;
  margin: 0;
  padding: 0;
}
.hero__journey > .visual-card { width: 100%; min-width: 0; background: none; border: 0; box-shadow: none; }
.interactive-diagram { display: block; width: 100%; height: auto; overflow: visible; }
.interactive-diagram text, .service-art text { font-family: var(--font-title); }
.hero__journey .journey-diagram { width: 100%; max-width: 580px; margin-inline: auto; }
.diagram-node {
  transform-box: fill-box;
  transform-origin: center !important;
  transition: transform .9s var(--motion-smooth), filter .7s ease, opacity .6s ease;
}
.diagram-node.is-selected { transform: scale(1.065); filter: brightness(1.12); }
.diagram-node:focus { outline: none; }
.diagram-node:focus-visible {
  outline: none;
  filter: brightness(1.3) drop-shadow(0 0 3px rgba(255, 255, 255, .96)) drop-shadow(0 0 9px rgba(74, 187, 239, .88));
}
.diagram-orbits { transform-box: view-box; transform-origin: center; animation: iap-diagram-orbit 42s linear infinite; }
.journey-diagram > circle, .network-diagram > circle { pointer-events: none; }

.journey-controls { position: relative; z-index: 2; width: 100%; max-width: 540px; padding-top: 6px; }
.journey-choices { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.journey-choices button {
  position: relative;
  overflow: hidden;
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid rgba(91, 133, 165, .29);
  border-radius: 100px;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255, 255, 255, .7), rgba(215, 233, 247, .1) 48%, rgba(236, 246, 253, .3));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -1px 0 rgba(74, 119, 150, .07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: 500 11px/1.35 var(--font-title);
  transition: color .4s ease, background .5s ease, border-color .4s ease, transform .5s var(--motion-smooth), box-shadow .5s ease;
}
.journey-choices button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 16%, rgba(239, 253, 255, .19) 50%, transparent 84%);
  translate: -135% 0;
  transition: translate 1s var(--motion-gentle);
  pointer-events: none;
}
.journey-choices button:hover::before { translate: 135% 0; }
.journey-choices button:hover { transform: translateY(-2px); border-color: #75a5c2; }
.journey-choices button[aria-pressed="true"] {
  color: #113656;
  border-color: rgba(57, 118, 156, .7);
  background: linear-gradient(145deg, rgba(250, 254, 255, .88), rgba(199, 226, 244, .42));
  box-shadow: inset 0 1px 0 white, 0 5px 17px rgba(29, 75, 111, .09);
}
.hero .journey-choices button, .section--blue .journey-choices button {
  color: #c4d8e8;
  border-color: rgba(172, 211, 237, .29);
  background: linear-gradient(145deg, rgba(213, 238, 255, .12), rgba(204, 231, 251, .015) 51%, rgba(181, 216, 244, .06));
  box-shadow: inset 0 1px 0 rgba(243, 253, 255, .17), inset 0 -1px 0 rgba(8, 23, 42, .35);
}
.hero .journey-choices button:hover, .section--blue .journey-choices button:hover { color: #f5fbff; border-color: rgba(180, 225, 249, .65); }
.hero .journey-choices button[aria-pressed="true"], .section--blue .journey-choices button[aria-pressed="true"] {
  color: #f3fbff;
  border-color: rgba(194, 233, 255, .73);
  background: linear-gradient(140deg, rgba(226, 245, 255, .23), rgba(146, 196, 229, .065) 52%, rgba(193, 223, 246, .11));
  box-shadow: inset 0 1px 0 rgba(252, 255, 255, .34), inset 0 -1px 0 rgba(148, 202, 236, .13), 0 4px 22px rgba(0, 12, 30, .16);
}
.journey-choices button:focus-visible { outline: 2px solid #85d2e5; outline-offset: 4px; }
.journey-controls p { max-width: 430px; min-height: 66px; margin: 17px auto 0; color: var(--copy); text-align: center; font-size: 16px; line-height: 1.55; }
.hero .journey-controls p, .section--blue .journey-controls p { color: #afc8dd; }
#integrateurs .journey-controls { margin: 15px auto 0; }

/* A clear display lets each glass object sit naturally in the page. */
.expertise-core {
  position: relative;
  display: block;
  justify-self: center;
  align-content: normal;
  width: min(100%, 510px);
  min-height: 0;
  aspect-ratio: 1;
  overflow: hidden;
  perspective: 1100px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.expertise-core::before { content: none; }
#iap-core-canvas[hidden] { display: none; }
#iap-core-canvas {
  background: url('assets/fallbacks/expertise-processus.png') center 44% / contain no-repeat;
}
#iap-core-glass { position: absolute; inset: 0; transform: none; }
.expertise-core canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  transform: translateY(var(--core-shift, 0px)) rotateX(var(--core-tilt-x, 0deg)) rotateY(var(--core-tilt-y, 0deg));
  transform-origin: center;
  transition: transform .55s var(--motion-smooth);
}
.expertise-core__caption {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(155, 194, 221, .22);
  background: transparent;
  pointer-events: none;
}
.expertise-core__caption p { margin: 0; color: #b6cbdf; font-size: 14px; line-height: 1.45; }
.expertise-core__signal { width: 5px; height: 5px; background: #a5d5e7; box-shadow: 0 0 8px rgba(145, 201, 225, .16); animation: iap-signal-breathe 3s ease-in-out infinite; }
.expertise-lens { min-height: 100px; }
.expertise-lens:focus-visible { outline-offset: -4px; }

.service-art { width: 100%; margin: 0 0 24px; pointer-events: none; }
.service-art svg { display: block; width: 100%; height: auto; border-radius: 16px; }
.art-float { animation: iap-document-drift 7s ease-in-out infinite; }
.case:nth-child(2) .art-float { animation-delay: -2s; }
.case:nth-child(3) .art-float { animation-delay: -4s; }
.art-route { animation: iap-data-travel 4s linear infinite; }
.art-signal { animation: iap-signal-breathe 3s ease-in-out infinite; }
.case:hover .service-art svg { filter: brightness(1.06); }
.service-art svg { transition: filter .5s ease; }

.scroll-progress { position: fixed; z-index: 80; top: 0; left: 0; width: 100%; height: 2px; pointer-events: none; }
.scroll-progress > span { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, #4b7aa0, #9ddcea); box-shadow: 0 0 9px rgba(123, 212, 237, .33); }
.site-header { transition: box-shadow .4s ease, background .4s ease; }
.site-header.is-scrolled { background: rgba(4, 21, 44, .97); box-shadow: 0 8px 24px rgba(0, 12, 27, .12); }
.nav a.is-active { color: #e4f8ff; }
.nav a.is-active::after { transform: scaleX(1); }
.depth-card { transform: perspective(1000px) rotateX(var(--depth-x, 0deg)) rotateY(var(--depth-y, 0deg)); transition: transform .55s var(--motion-smooth), box-shadow .55s ease; }
.process-card.depth-card:hover, .audience-card.depth-card:hover { box-shadow: 0 16px 32px rgba(17, 52, 81, .07); }
.hero__journey .visual-card.depth-card:hover { box-shadow: none; }
.reveal-ready { opacity: 1; translate: 0 22px; filter: none; transition: translate .9s var(--motion-smooth), transform .55s var(--motion-smooth), box-shadow .55s ease; transition-delay: var(--reveal-delay, 0ms); }
.reveal-ready.revealed { translate: 0 0; }

@keyframes iap-diagram-orbit { to { transform: rotate(360deg); } }
@keyframes iap-document-drift { 50% { translate: 0 -5px; } }
@keyframes iap-data-travel { to { stroke-dashoffset: -45; } }
@keyframes iap-signal-breathe { 50% { opacity: .48; } }

.v1-visual-paused .diagram-orbits,
.v1-visual-paused .diagram-flux,
.v1-motion-paused .diagram-orbits,
.v1-motion-paused .diagram-flux,
.v1-motion-paused .art-float,
.v1-motion-paused .art-route,
.v1-motion-paused .art-signal,
.v1-motion-paused .expertise-core__signal { animation-play-state: paused !important; }

@media (max-width: 1100px) {
  .journey-choices { gap: 6px; }
  .journey-choices button { padding-inline: 10px; font-size: 10px; }
  .journey-controls p { font-size: 15px; }
}
@media (max-width: 900px) {
  .hero__visual.hero__journey { min-height: 0; width: min(580px, 100%); margin: 5px auto 0; }
  .journey-controls { max-width: 500px; }
  .journey-choices button { padding-inline: 14px; font-size: 11px; }
  .expertise-core { width: min(490px, 100%); min-height: 0; }
}
@media (max-width: 520px) {
  .hero__visual.hero__journey { margin-top: 9px; }
  .hero__journey .journey-diagram { width: 100%; }
  .journey-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .journey-choices button { min-width: 0; min-height: 46px; padding: 9px 6px; border-radius: 16px; font-size: 10px; line-height: 1.5; }
  .journey-controls p { min-height: 70px; margin-top: 15px; font-size: 14px; }
  .diagram-node.is-selected { transform: scale(1.045); }
  .expertise-core { min-height: 340px; }
  .expertise-core__caption { left: 18px; right: 18px; bottom: 13px; gap: 10px; min-height: 62px; padding-top: 10px; }
  .expertise-core__caption p { font-size: 12px; }
  .service-art { margin-bottom: 21px; }
}
/* Shared rows keep both sets of actions level, including during step changes. */
.diagram-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  color: #a9c8e0;
  font: 600 11px/1.5 var(--font-title);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.diagram-heading > span:last-child { text-align: right; color: #91b8d5; }
.hero__journey .journey-diagram { overflow: hidden; mask-image: linear-gradient(to bottom, transparent, #000 12%); }
.network-diagram > text[y="45"] { font-size: 11px; font-weight: 600; letter-spacing: 1.7px; }
@media (min-width: 851px) {
  .hero__inner { grid-template-rows: auto auto auto; gap: 24px 44px; align-items: stretch; }
  .hero__content,
  .hero__visual.hero__journey {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: 1 / 4;
    align-items: stretch;
    min-height: 0;
    width: 100%;
    margin: 0;
  }
  .hero__content { grid-column: 1; }
  .hero__visual.hero__journey { grid-column: 2; justify-content: normal; }
  .hero__heading { grid-row: 1; }
  .hero__actions { grid-row: 2; align-self: center; margin: 0; }
  .hero__note { grid-row: 3; margin: 0; align-self: start; }
  .hero__journey > .visual-card { display: grid; grid-template-rows: auto 1fr; gap: 28px; grid-row: 1; align-self: stretch; }
  .hero__journey .journey-diagram { align-self: center; }
  .hero__journey .journey-controls { display: grid; grid-template-rows: subgrid; grid-row: 2 / 4; max-width: none; padding: 0; }
  .hero__journey .journey-choices { grid-row: 1; align-self: center; }
  .hero__journey .journey-choices button { min-height: 48px; }
  .hero__journey .journey-caption { grid-row: 2; align-self: start; width: 100%; min-height: 50px; margin: 0 auto; font-size: 14px; }
}
/* Keep the introduction and its diagram together on compact desktop windows. */
@media (min-width: 851px) and (max-width: 1050px) {
  .hero__inner { gap: 24px 28px; padding-block: 64px 58px; }
  .hero h1 { font-size: clamp(38px, 4.45vw, 46px); }
  .hero__copy { font-size: 17px; }
  .hero__journey > .visual-card { gap: 22px; }
  .hero__journey .diagram-heading { gap: 14px; font-size: 9px; letter-spacing: .08em; }
  .hero__journey .journey-choices { gap: 6px; }
  .hero__journey .journey-choices button { min-height: 44px; padding-inline: 9px; font-size: 10px; }
  .hero__journey .interactive-diagram > g[text-anchor="middle"] text { font-size: 21px; }
  .hero__journey .interactive-diagram > g[font-size="12"] text { font-size: 16px; }
  .hero__journey .journey-diagram > text[y="390"] { font-size: 16px; }
}
@media (max-width: 850px) {
  .hero__inner { grid-template-columns: 1fr; gap: 42px; padding-block: 58px 48px; }
  .hero__content { width: 100%; max-width: 690px; margin-inline: auto; }
  .hero h1 { max-width: 690px; font-size: clamp(39px, 6.4vw, 53px); }
  .hero__visual.hero__journey { width: min(590px, 100%); min-height: 0; margin: 0 auto; }
  .hero__journey .journey-controls { padding-top: 12px; }
  .hero__journey .diagram-heading { margin-bottom: 24px; }
}
@media (max-width: 520px) {
  .diagram-heading { gap: 14px; font-size: 9px; letter-spacing: .09em; }
  .hero__inner { gap: 38px; padding-block: 44px 38px; }
  .hero__actions { display: grid; grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .hero__journey .journey-controls { padding-top: 8px; }
  .interactive-diagram > g[text-anchor="middle"] text { font-size: 19px; }
  .interactive-diagram > g[font-size="12"] text { font-size: 16px; }
  .journey-diagram > text[y="390"] { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, #integrateurs::before { background: radial-gradient(ellipse 60% 65% at 65% 45%, rgba(140, 218, 233, .045), rgba(140, 218, 233, .012) 47%, transparent 74%); }
  .diagram-orbits, .diagram-flux, .art-float, .art-route, .art-signal, .expertise-core__signal { animation: none !important; }
  .reveal-ready { opacity: 1; translate: none; filter: none; transition: none; }
  .diagram-node, .journey-choices button, .journey-choices button::before, .expertise-core canvas, .depth-card { transition: none; }
  .depth-card, .expertise-core canvas { transform: none; }
}
