/* DECIPOD Studio — V3 / Light-spectrum art direction */
:root {
  --v3-green: #57e0a0;
  --v3-violet: #bc78ed;
  --v3-white: #f7f8ff;
  --v3-ease: cubic-bezier(.22, 1, .36, 1);
  --v3-scroll: 0;
}

/* Header: logo exactly 45% larger, without increasing the navigation bar. */
header a[aria-label="DECIPOD Studio, Accueil"] img {
  height: 46.4px !important;
  max-width: 190.6px !important;
}

/* Bring the hero message closer to the header for a tighter opening rhythm. */
#accueil {
  padding-top: 6rem !important;
}

@media (min-width: 640px) {
  header a[aria-label="DECIPOD Studio, Accueil"] img {
    height: 52.2px !important;
    max-width: 214.6px !important;
  }
}

/* Keep every colour expression inside the green-to-violet spectrum. */
.prism-text,
.section-kicker,
.scroll-progress {
  background-image: linear-gradient(100deg, var(--v3-green) 0%, #7dcfbd 44%, var(--v3-violet) 100%) !important;
}

/* The highlighted words behave like moving light inside glass. */
.prism-text {
  background-size: 240% 100% !important;
  animation: v3-gradient-flow 5.2s ease-in-out infinite;
  will-change: background-position;
}

@keyframes v3-gradient-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Make Decipod's openness to every type of client explicit and highly visible. */
.v3-audiences {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 8vw, 7.5rem) 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
  background:
    radial-gradient(circle at 18% 35%, rgb(87 224 160 / .08), transparent 30%),
    radial-gradient(circle at 82% 70%, rgb(188 120 237 / .09), transparent 34%),
    hsl(var(--background));
}

.v3-audiences__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, .95fr);
  gap: clamp(2rem, 6vw, 6.5rem);
  align-items: end;
  width: min(100%, 80rem);
  margin: 0 auto;
}

.v3-audiences__heading h2 {
  max-width: 11ch;
  margin-top: 1rem;
  color: var(--v3-white);
  font-family: Archivo Black, sans-serif;
  font-size: clamp(2.6rem, 5.2vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.v3-audiences__content > p {
  max-width: 42rem;
  color: hsl(240 6% 72%);
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.75;
}

.v3-audiences__profiles {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 2rem;
}

.v3-audiences__profiles span {
  padding: .7rem 1rem;
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: 999px;
  background: rgb(255 255 255 / .035);
  color: var(--v3-white);
  font-size: .78rem;
  letter-spacing: .04em;
}

/* V4: expertises and studio approach become one continuous, compact block. */
.v4-spectrum {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 9vw, 8.5rem) 1.5rem;
  border-block: 1px solid hsl(var(--border));
  background:
    radial-gradient(circle at 8% 18%, rgb(87 224 160 / .075), transparent 25%),
    radial-gradient(circle at 92% 74%, rgb(188 120 237 / .085), transparent 28%),
    hsl(var(--card) / .18);
}

.v4-spectrum__inner {
  width: min(100%, 86rem);
  margin: 0 auto;
}

.v4-spectrum__header {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, .7fr);
  gap: 1.5rem clamp(2rem, 7vw, 7rem);
  align-items: end;
}

.v4-spectrum__header .section-kicker { grid-column: 1 / -1; }

.v4-spectrum__header h2 {
  max-width: 13ch;
  color: var(--v3-white);
  font-family: Archivo Black, sans-serif;
  font-size: clamp(2.7rem, 5.5vw, 5.8rem);
  line-height: .96;
  letter-spacing: -.05em;
}

.v4-spectrum__header > p:last-child {
  max-width: 38rem;
  padding-bottom: .35rem;
  color: hsl(240 6% 72%);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.75;
}

.v4-spectrum__expertises {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(3rem, 6vw, 5.5rem);
}

.v4-spectrum__expertise {
  position: relative;
  min-height: 23rem;
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid rgb(255 255 255 / .12);
  border-radius: 1.25rem;
  background: rgb(8 8 14 / .72);
  transition: transform .45s var(--v3-ease), border-color .35s ease, background .35s ease;
}

.v4-spectrum__expertise::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(to top, rgb(5 5 9 / .96), transparent);
  pointer-events: none;
}

.v4-spectrum__expertise:hover {
  z-index: 1;
  border-color: rgb(125 207 189 / .38);
  background: rgb(12 12 20 / .9);
  transform: translateY(-8px);
}

.v4-spectrum__expertise img {
  position: absolute;
  top: 1rem;
  left: 50%;
  width: 54%;
  max-height: 10.5rem;
  object-fit: contain;
  filter: saturate(.9);
  transform: translateX(-50%);
  transition: transform .65s var(--v3-ease), filter .4s ease;
}

.v4-spectrum__expertise:hover img { filter: saturate(1.05); transform: translateX(-50%) rotate(2deg) scale(1.04); }

.v4-spectrum__expertise > div {
  position: absolute;
  z-index: 1;
  right: 1.35rem;
  bottom: 1.4rem;
  left: 1.35rem;
}

.v4-spectrum__expertise span {
  display: block;
  margin-bottom: .6rem;
  color: var(--v3-green);
  font-size: .67rem;
  letter-spacing: .22em;
}

.v4-spectrum__expertise h3 {
  color: var(--v3-white);
  font-family: Archivo Black, sans-serif;
  font-size: clamp(1.2rem, 1.7vw, 1.65rem);
  line-height: 1.05;
}

.v4-spectrum__expertise p {
  margin-top: .7rem;
  color: hsl(240 6% 70%);
  font-size: .85rem;
  line-height: 1.55;
}

.v4-spectrum__approach {
  display: grid;
  grid-template-columns: minmax(16rem, .72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  margin-top: clamp(3rem, 7vw, 6.5rem);
  padding: clamp(1rem, 2.5vw, 2rem);
  border: 1px solid rgb(255 255 255 / .12);
  border-radius: 1.5rem;
  background: linear-gradient(125deg, rgb(255 255 255 / .045), rgb(255 255 255 / .015));
  scroll-margin-top: 7rem;
}

.v4-spectrum__portrait {
  position: relative;
  aspect-ratio: 4 / 4.6;
  overflow: hidden;
  border-radius: 1rem;
  background: #08080d;
}

.v4-spectrum__portrait::after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to top, rgb(5 5 9 / .94), transparent);
}

.v4-spectrum__portrait > img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }

.v4-spectrum__portrait figcaption {
  position: absolute;
  z-index: 1;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  color: hsl(240 6% 72%);
  font-size: .8rem;
}

.v4-spectrum__portrait figcaption strong { color: #fff; font-family: Archivo Black, sans-serif; font-size: 1rem; }

.v4-spectrum__studio { padding: clamp(.25rem, 2vw, 1.5rem) clamp(.25rem, 2vw, 1rem); }

.v4-spectrum__studio h3 {
  max-width: 14ch;
  margin-top: 1.1rem;
  color: var(--v3-white);
  font-family: Archivo Black, sans-serif;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: -.045em;
}

.v4-spectrum__studio > p:not(.section-kicker) {
  max-width: 43rem;
  margin-top: 1.5rem;
  color: hsl(240 6% 72%);
  line-height: 1.75;
}

.v4-spectrum__promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin-top: 2rem;
}

.v4-spectrum__promises li {
  padding: 1rem;
  border-top: 1px solid rgb(125 207 189 / .35);
  background: rgb(255 255 255 / .025);
}

.v4-spectrum__promises strong,
.v4-spectrum__promises span { display: block; }
.v4-spectrum__promises strong { color: #fff; font-size: .86rem; }
.v4-spectrum__promises span { margin-top: .35rem; color: hsl(240 6% 64%); font-size: .75rem; line-height: 1.45; }

/* Shared title language, matching the portfolio heading; the hero is excluded. */
#profils h2,
#expertises h2,
.v4-spectrum__studio h3,
#projets h2,
#processus h2,
#ia h2,
#contact h2 {
  font-family: Urbanist, sans-serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 4.7vw, 3.75rem);
  line-height: 1;
  letter-spacing: normal;
  overflow: visible !important;
}

.v3-audiences__heading h2,
.v4-spectrum__header h2 { max-width: none; }

.v4-spectrum__studio h3 { max-width: 21ch; }

/* Give italic display letters enough optical room so G, J and descenders never clip. */
#profils h2 .prism-text,
#expertises h2 .prism-text,
.v4-spectrum__studio h3 .prism-text,
#projets h2 .prism-text,
#ia h2 .prism-text,
#contact h2 .prism-text {
  display: inline-block;
  padding: .035em .14em .14em .08em;
  margin-right: -.14em;
  margin-bottom: -.14em;
  margin-left: -.08em;
  line-height: 1.06;
}

#v3-audiences-title > .prism-text,
#v4-spectrum-title > .prism-text,
#ia h2 > .prism-text { display: block; }

.v4-title-continuation { white-space: nowrap; }

/* A tighter contact section that keeps the complete form and legal notice. */
#contact > .relative.mx-auto {
  padding-top: clamp(3.75rem, 5vw, 4.5rem) !important;
  padding-bottom: clamp(3.75rem, 5vw, 4.5rem) !important;
}

#contact > .relative.mx-auto > .grid { gap: clamp(2.5rem, 5vw, 4rem) !important; }
#contact h2 { margin-top: 1rem !important; font-size: clamp(2.35rem, 4.2vw, 3.5rem); }
#contact h2 + p { margin-top: 1.1rem !important; }
#contact a[href^="mailto:"] { margin-top: 1.5rem !important; }
#contact form { padding: clamp(1.15rem, 1.7vw, 1.4rem) !important; }
#contact form > .grid { gap: .75rem !important; }
#contact form input,
#contact form textarea { padding-top: .65rem !important; padding-bottom: .65rem !important; }
#contact form textarea { min-height: 5.75rem; }
#contact form button[type="submit"] { min-height: 44px !important; margin-top: 1rem !important; }
#contact form button[type="submit"] + p { margin-top: .75rem !important; }
#contact .v3-privacy-notice { margin-top: .55rem; line-height: 1.5; }
#contact .v3-form-status:empty { display: none; }

/* IA details: a compact secondary action and an accessible, self-contained dialog. */
.v4-ia-more {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .65rem;
  margin-top: 1.5rem;
  padding: .65rem 1rem;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 999px;
  background: rgb(255 255 255 / .025);
  color: hsl(var(--foreground));
  font-size: .82rem;
  letter-spacing: .025em;
  transition: border-color .25s ease, background .25s ease, color .25s ease, transform .25s ease;
}

.v4-ia-more span { color: var(--v3-green); transition: transform .25s ease; }
.v4-ia-more:hover {
  border-color: rgb(87 224 160 / .5);
  background: rgb(87 224 160 / .055);
  color: #fff;
  transform: translateY(-2px);
}
.v4-ia-more:hover span { transform: translate(2px, -2px); }
.v4-ia-more:focus-visible,
.v4-ia-modal__close:focus-visible { outline: 2px solid var(--v3-green); outline-offset: 3px; }

.v4-ia-modal[hidden] { display: none; }
.v4-ia-modal { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 1rem; }
.v4-ia-modal__backdrop { position: absolute; inset: 0; background: rgb(2 2 6 / .82); backdrop-filter: blur(10px); }
.v4-ia-modal__dialog {
  position: relative;
  width: min(100%, 46rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 0 0, rgb(87 224 160 / .09), transparent 32%),
    radial-gradient(circle at 100% 100%, rgb(188 120 237 / .09), transparent 34%),
    #0a0a10;
  box-shadow: 0 35px 110px rgb(0 0 0 / .68);
  color: hsl(var(--foreground));
}
.v4-ia-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 50%;
  background: rgb(255 255 255 / .035);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  transition: border-color .25s ease, background .25s ease;
}
.v4-ia-modal__close:hover { border-color: rgb(188 120 237 / .55); background: rgb(188 120 237 / .08); }
.v4-ia-modal__dialog > .section-kicker { padding-right: 3.5rem; }
.v4-ia-modal__dialog > h2 {
  max-width: 18ch;
  margin-top: .85rem;
  font-family: Urbanist, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.05;
}
.v4-ia-modal__intro { max-width: 40rem; margin-top: 1rem; color: hsl(var(--muted-foreground)); line-height: 1.65; }
.v4-ia-modal__steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.5rem; margin-top: 1.75rem; }
.v4-ia-modal__steps li { display: grid; grid-template-columns: 2rem 1fr; gap: .7rem; padding-top: 1rem; border-top: 1px solid rgb(255 255 255 / .12); }
.v4-ia-modal__steps li > span { color: var(--v3-green); font-size: .68rem; letter-spacing: .14em; }
.v4-ia-modal__steps h3 { color: #fff; font-family: Urbanist, sans-serif; font-size: 1rem; font-weight: 600; }
.v4-ia-modal__steps p { margin-top: .35rem; color: hsl(var(--muted-foreground)); font-size: .83rem; line-height: 1.55; }
.v4-ia-modal-open { overflow: hidden; }

/* True seamless expertise marquee: two identical groups, no gap between loops. */
.v3-infinite-marquee {
  display: flex !important;
  width: max-content !important;
  gap: 0 !important;
  white-space: nowrap;
  animation: v3-marquee-loop var(--v3-marquee-duration, 34s) linear infinite !important;
  will-change: transform;
}

.v3-marquee-group {
  display: flex;
  flex: none;
  align-items: center;
}

.v3-marquee-item {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2.5rem;
  margin-right: 2.5rem;
  font-family: Urbanist, sans-serif;
  font-size: .875rem;
  text-transform: uppercase;
  letter-spacing: .3em;
  color: hsl(240 6% 72%);
}

.v3-marquee-dot {
  width: .375rem;
  height: .375rem;
  flex: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--v3-green), var(--v3-violet));
  box-shadow: 0 0 12px rgb(87 224 160 / .32);
}

@keyframes v3-marquee-loop {
  to { transform: translate3d(-50%, 0, 0); }
}

.v3-light-thread {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  opacity: .68;
  mix-blend-mode: screen;
}

.v3-light-thread svg {
  display: block;
  width: 100%;
  height: 100%;
}

.v3-thread-base,
.v3-thread-energy {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.v3-thread-base {
  stroke: url(#v3-thread-gradient);
  stroke-width: .65;
  opacity: .16;
}

.v3-thread-energy {
  stroke: url(#v3-thread-gradient);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: .06 .94;
  stroke-dashoffset: calc(var(--v3-scroll) * -1);
  filter: url(#v3-thread-glow);
  opacity: .72;
}

/* Light-scan reveal: text remains readable even before the effect begins. */
.v3-title-reveal {
  position: relative;
  overflow: hidden;
}

.v3-title-reveal::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: -18% auto -18% -38%;
  width: 28%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / .3), rgb(87 224 160 / .26), rgb(188 120 237 / .2), transparent);
  filter: blur(9px);
  transform: skewX(-16deg);
  opacity: 0;
}

.v3-title-reveal.v2-visible::after {
  animation: v3-title-scan 1.05s .15s var(--v3-ease) both;
}

@keyframes v3-title-scan {
  0% { left: -38%; opacity: 0; }
  18% { opacity: .92; }
  100% { left: 118%; opacity: 0; }
}

/* Optical reflection on the main interactive blocks. */
.v3-optic-card {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
}

.v3-optic-card::before {
  content: "";
  position: absolute;
  z-index: 5;
  top: -35%;
  bottom: -35%;
  left: -52%;
  width: 36%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / .14), rgb(87 224 160 / .11), rgb(188 120 237 / .09), transparent);
  filter: blur(5px);
  transform: skewX(-18deg);
  opacity: 0;
  transition: left .9s var(--v3-ease), opacity .3s ease;
}

.v3-optic-card:hover::before,
.v3-optic-card:focus-within::before {
  left: 122%;
  opacity: 1;
}

/* Four generated optical-glass prisms replace the generic expertise icons. */
.v3-expertise-prism {
  display: block;
  width: clamp(68px, 5.8vw, 92px);
  height: clamp(68px, 5.8vw, 92px);
  margin: -8px 0 -4px -6px;
  object-fit: contain;
  object-position: center;
  filter:
    drop-shadow(0 12px 18px rgb(0 0 0 / .32))
    drop-shadow(0 0 18px rgb(87 224 160 / .11))
    drop-shadow(0 0 22px rgb(188 120 237 / .11));
  transform-origin: 50% 58%;
  animation: v3-prism-float 6.4s ease-in-out infinite;
  transition: filter .45s ease, transform .55s var(--v3-ease);
}

#expertises .v3-optic-card:hover .v3-expertise-prism {
  animation-play-state: paused;
  transform: translateY(-5px) rotate(2.5deg) scale(1.07);
  filter:
    drop-shadow(0 18px 24px rgb(0 0 0 / .38))
    drop-shadow(0 0 22px rgb(87 224 160 / .2))
    drop-shadow(0 0 28px rgb(188 120 237 / .2));
}

@keyframes v3-prism-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(0, -7px, 0) rotate(1.3deg); }
}

/* IA diffraction: one white signal becomes four useful creative outputs. */
.v3-diffraction {
  position: absolute;
  z-index: 0;
  right: clamp(-8rem, -3vw, 1rem);
  top: 50%;
  width: clamp(320px, 38vw, 560px);
  aspect-ratio: 1.35;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: .48;
}

.v3-diffraction-prism {
  position: absolute;
  left: 42%;
  top: 31%;
  width: 25%;
  aspect-ratio: 1;
  clip-path: polygon(50% 5%, 96% 88%, 4% 88%);
  border: 1px solid rgb(255 255 255 / .4);
  background: linear-gradient(140deg, rgb(255 255 255 / .18), rgb(87 224 160 / .08) 48%, rgb(188 120 237 / .14));
  filter: drop-shadow(0 0 25px rgb(188 120 237 / .16));
}

.v3-ia-ray {
  position: absolute;
  left: 0;
  top: 48%;
  height: 1px;
  transform-origin: left center;
}

.v3-ia-ray-in {
  width: 46%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .9));
  box-shadow: 0 0 8px rgb(255 255 255 / .5);
}

.v3-ia-ray-out {
  left: 57%;
  width: 46%;
  background: linear-gradient(90deg, var(--v3-green), var(--v3-violet), transparent);
  box-shadow: 0 0 9px rgb(188 120 237 / .25);
  transform: rotate(var(--ia-angle));
}

.v3-ia-ray-out:nth-child(3) { --ia-angle: -18deg; }
.v3-ia-ray-out:nth-child(4) { --ia-angle: -6deg; }
.v3-ia-ray-out:nth-child(5) { --ia-angle: 7deg; }
.v3-ia-ray-out:nth-child(6) { --ia-angle: 19deg; }

/* A restrained desktop-only halo keeps interaction connected to light. */
.v3-cursor-halo {
  position: fixed;
  z-index: 70;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgb(255 255 255 / .13), rgb(87 224 160 / .08) 34%, rgb(188 120 237 / .06) 52%, transparent 70%);
  border: 1px solid rgb(255 255 255 / .08);
  opacity: 0;
  transform: translate3d(var(--v3-x, -100px), var(--v3-y, -100px), 0) scale(.65);
  transition: opacity .2s ease, transform .18s var(--v3-ease);
  mix-blend-mode: screen;
}

.v3-cursor-halo.is-visible { opacity: 1; transform: translate3d(var(--v3-x), var(--v3-y), 0) scale(1); }
.v3-cursor-halo.is-active { transform: translate3d(var(--v3-x), var(--v3-y), 0) scale(1.55); }

@media (max-width: 1023px) {
  .v3-light-thread { opacity: .4; }
  .v3-diffraction { right: -13rem; opacity: .3; }
}

@media (max-width: 767px) {
  #accueil { padding-top: 5.5rem !important; }
  .v3-light-thread { display: none; }
  .v3-diffraction { right: -15rem; width: 430px; opacity: .2; }
  .v3-cursor-halo { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-title-reveal::after { animation: none !important; }
  .v3-cursor-halo { display: none; }
  .prism-text,
  .v3-expertise-prism { animation: none !important; }
  .v3-infinite-marquee { animation-play-state: paused !important; }
}

/* Final interaction and accessibility pass. */
.project-card[role="button"] {
  isolation: isolate;
  cursor: pointer;
}

/* Duotone prism treatment on homepage project cards only. */
#projets .project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(128deg, rgb(87 224 160 / .88) 0%, rgb(104 203 177 / .78) 38%, rgb(188 120 237 / .9) 100%);
  mix-blend-mode: color;
  opacity: .9;
  transition: opacity .65s var(--v3-ease);
}

#projets .project-card img {
  filter: grayscale(1) contrast(1.08) brightness(.84);
  transition: filter .75s var(--v3-ease), transform 1.4s ease-out !important;
}

#projets .project-card > div:last-child { z-index: 2; }

#projets .project-card:hover::before,
#projets .project-card:focus-visible::before {
  opacity: 0;
}

#projets .project-card:hover img,
#projets .project-card:focus-visible img {
  filter: none;
}

.project-card:focus-visible,
header a:focus-visible,
header button:focus-visible,
.v3-gallery button:focus-visible,
#contact input:focus-visible,
#contact textarea:focus-visible {
  outline: 2px solid var(--v3-green) !important;
  outline-offset: 4px;
}

.v3-gallery[hidden] { display: none; }

/* Le portfolio détaillé sera ajouté dans une phase ultérieure. */
#projets a[href="https://decipod.be"] {
  display: none !important;
}

.v3-gallery {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  color: #fff;
}
.v3-gallery__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(2 2 7 / .9);
  backdrop-filter: blur(18px);
}
.v3-gallery__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, .55fr);
  width: min(1320px, 100%);
  height: min(84dvh, 820px);
  max-height: calc(100dvh - 3rem);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: 1.5rem;
  background: #08080d;
  box-shadow: 0 30px 100px rgb(0 0 0 / .65);
}
.v3-gallery__visual {
  position: relative;
  min-height: 0;
  height: 100%;
  background: #050509;
}
.v3-gallery__visual > img,
.v3-gallery__visual > video {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}
.v3-gallery__visual > img { position: absolute; inset: 0; }
.v3-gallery__visual > img.is-tall-board { padding: clamp(.75rem, 2vw, 1.5rem); }
.v3-gallery__visual > video { background: #000; }
.v3-gallery__visual > [hidden] { display: none !important; }
.v3-gallery__photo-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 50%;
  background: rgb(7 7 11 / .72);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: border-color .2s ease, background .2s ease;
}
.v3-gallery__photo-arrow:hover { border-color: var(--v3-green); background: rgb(7 7 11 / .92); }
.v3-gallery__photo-arrow.is-previous { left: 1rem; }
.v3-gallery__photo-arrow.is-next { right: 1rem; }
.v3-gallery__content { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(1.5rem, 3vw, 2.5rem); }
.v3-gallery__tag { color: var(--v3-green); text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; }
.v3-gallery__content h2 { margin-top: .75rem; font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1; }
.v3-gallery__caption { margin-top: 1rem; color: hsl(240 6% 82%); font-size: .9rem; }
.v3-gallery__counter { margin-top: .35rem; color: hsl(240 6% 62%); font-size: .8rem; }
.v3-gallery__thumbnails {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .5rem;
  margin-top: 1.25rem;
}
.v3-gallery__thumbnail {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgb(255 255 255 / .14);
  border-radius: .65rem;
  background: #050509;
  opacity: .52;
  transition: opacity .2s ease, border-color .2s ease, transform .2s ease;
}
.v3-gallery__thumbnail:hover { opacity: .82; transform: translateY(-2px); }
.v3-gallery__thumbnail[aria-current="true"] { opacity: 1; border-color: var(--v3-green); box-shadow: 0 0 0 1px rgb(87 224 160 / .22); }
.v3-gallery__thumbnail img { width: 100%; height: 100%; transform: none !important; }
.v3-gallery__thumbnail.is-video span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / .45);
  border-radius: 50%;
  background: rgb(5 5 9 / .72);
  color: #fff;
  font-size: .7rem;
  transform: translate(-50%, -50%);
}
.v3-gallery__next-project {
  align-self: flex-start;
  min-height: 44px;
  margin-top: 1.25rem;
  padding: .65rem 1rem;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 999px;
  background: rgb(255 255 255 / .04);
  color: #fff;
  font-size: .85rem;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.v3-gallery__next-project:hover { border-color: var(--v3-green); color: var(--v3-green); background: rgb(87 224 160 / .05); }
.v3-gallery__controls { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.v3-gallery__controls button,
.v3-gallery__close { border: 1px solid rgb(255 255 255 / .18); color: #fff; background: rgb(255 255 255 / .04); }
.v3-gallery__controls button { min-height: 44px; padding: .65rem 1rem; border-radius: 999px; }
.v3-gallery__close { position: absolute; z-index: 2; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; font-size: 1.7rem; line-height: 1; }
.v3-gallery-open { overflow: hidden; }

.v3-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.v3-form-status { min-height: 1.5rem; margin-top: 1rem; color: hsl(240 6% 72%); }
.v3-form-status.is-success { color: var(--v3-green); }
.v3-form-status.is-error { color: #ff9eaa; }
#contact button:disabled { cursor: wait; opacity: .55; }
.v3-privacy-notice {
  margin-top: 1rem;
  max-width: 44rem;
  color: hsl(var(--muted-foreground));
  font-size: .75rem;
  line-height: 1.65;
}
.v3-privacy-notice a,
.v3-legal-links a {
  color: hsl(var(--foreground));
  text-decoration: underline;
  text-decoration-color: hsl(var(--border));
  text-underline-offset: .25rem;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.v3-privacy-notice a:hover,
.v3-legal-links a:hover {
  color: var(--v3-green);
  text-decoration-color: var(--v3-green);
}
.v3-legal-links {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid hsl(var(--border));
  font-size: .75rem;
}
footer > div { flex-wrap: wrap; }

/* Lighter and more content-led studio cards. */
#approche .self-start {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  gap: 1rem !important;
}
#approche .self-start > div {
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--card) / .52);
}

@media (max-width: 767px) {
  section[id] h2 { font-size: 2.05rem !important; line-height: 1.08 !important; }
  .v3-audiences { padding: 4rem 1.25rem; }
  .v3-audiences__inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .v3-audiences__heading h2 { max-width: 13ch; }
  .v3-audiences__profiles { margin-top: 1.5rem; }
  .v3-audiences__profiles span { width: 100%; }
  .v4-spectrum { padding: 4.5rem 1.25rem; }
  .v4-spectrum__header { grid-template-columns: 1fr; }
  .v4-spectrum__header h2 { max-width: 12ch; }
  .v4-spectrum__expertises { grid-template-columns: 1fr; margin-top: 2.75rem; }
  .v4-spectrum__expertise { min-height: 19rem; }
  .v4-spectrum__expertise img { width: 48%; max-height: 9rem; }
  .v4-spectrum__approach { grid-template-columns: 1fr; padding: .75rem; }
  .v4-spectrum__portrait { aspect-ratio: 4 / 4.1; }
  .v4-spectrum__studio { padding: 1rem .5rem .5rem; }
  .v4-spectrum__studio h3 { font-size: 2.05rem; line-height: 1.08; }
  .v4-title-continuation { white-space: normal; }
  #contact > .relative.mx-auto { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
  .v4-ia-modal { align-items: end; padding: .6rem; }
  .v4-ia-modal__dialog { max-height: calc(100dvh - 1.2rem); padding: 1.35rem; border-radius: 1.15rem; }
  .v4-ia-modal__dialog > h2 { padding-right: 2.5rem; }
  .v4-ia-modal__steps { grid-template-columns: 1fr; gap: .5rem; margin-top: 1.25rem; }
  .v4-ia-modal__steps li { padding-top: .8rem; }
  .v4-spectrum__promises { grid-template-columns: 1fr; }
  #processus [class*="grid-cols-4"] > div > div { min-height: 0 !important; }
  .v3-gallery { padding: .75rem; }
  .v3-gallery__dialog { grid-template-columns: 1fr; grid-template-rows: minmax(52dvh, 1fr) auto; width: 100%; height: auto; max-height: calc(100dvh - 1.5rem); overflow-y: auto; }
  .v3-gallery__visual { min-height: 52dvh; height: 52dvh; }
  .v3-gallery__photo-arrow { width: 38px; height: 38px; }
  .v3-gallery__photo-arrow.is-previous { left: .65rem; }
  .v3-gallery__photo-arrow.is-next { right: .65rem; }
  .v3-gallery__content { padding: 1.25rem; }
  .v3-gallery__thumbnails { gap: .35rem; }
  .v3-gallery__thumbnail { border-radius: .45rem; }
  .v3-gallery__controls button { flex: 1; }
  .v3-legal-links { justify-content: flex-start; }
}
