/* Design system Realisations — cyan / violet (aligne Contact) */
.realisations-page {
  --rx-cyan: #22d3ee;
  --rx-cyan-light: #a5f3fc;
  --rx-cyan-glow: rgba(34, 211, 238, 0.22);
  --rx-violet: #a78bfa;
  --rx-violet-light: #ddd6fe;
  --rx-violet-glow: rgba(167, 139, 250, 0.22);
  --rx-indigo: #6366f1;
  /* Alias legacy orange -> cyan */
  --rx-orange: #22d3ee;
  --rx-orange-light: #a5f3fc;
  --rx-orange-glow: rgba(34, 211, 238, 0.22);

  --rx-glass-bg: linear-gradient(168deg, rgba(10, 18, 32, 0.94) 0%, rgba(15, 23, 42, 0.9) 55%, rgba(18, 32, 52, 0.88) 100%);
  --rx-glass-border: rgba(255, 255, 255, 0.12);
  --rx-text-body: #e2e8f0;
  --rx-text-muted: #94a3b8;
  --rx-text-label: #a5f3fc;

  /* Hero collé sous la nav — pas de --vitrine-section-y au-dessus */
  padding-top: 0.75rem;
  padding-bottom: var(--vitrine-section-y, clamp(8.5rem, 14vw, 17rem));
}

@media (min-width: 640px) {
  .realisations-page {
    padding-top: 1rem;
  }
}

/* Rythme entre blocs (hors hero haut) */
.realisations-page .rx-glass-frame {
  margin-bottom: var(--vitrine-section-y, clamp(8.5rem, 14vw, 17rem));
}

.realisations-page #portfolio {
  margin-bottom: var(--vitrine-section-y, clamp(8.5rem, 14vw, 17rem));
}

@keyframes rx-liquid-drift {
0%, 100% { transform: translate(0, 0) scale(1); }
50%       { transform: translate(6px, -10px) scale(1.04); }
}
@keyframes rx-liquid-shine {
0%   { opacity: 0.35; transform: translateX(-130%) skewX(-12deg); }
100% { opacity: 0;    transform: translateX(230%) skewX(-12deg); }
}
@keyframes rx-border-flow {
0%, 100% { background-position: 0% 50%; }
50%       { background-position: 100% 50%; }
}
@keyframes rx-hud-pulse {
0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(52, 211, 153, 0.55); }
50%       { opacity: 0.65; box-shadow: 0 0 4px rgba(52, 211, 153, 0.3); }
}

/* Labels futuristes — taille lisible (≈ paragraphe sm) */
.rx-label {
font-family: var(--font-title);
font-size: 0.875rem;
font-weight: 500;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--rx-text-label);
line-height: 1.4;
}
.rx-label-accent { color: var(--rx-orange-light); }
.rx-label-muted   { color: #cbd5e1; letter-spacing: 0.1em; }
.rx-label-cyan    { color: var(--rx-cyan-light); }

/* Icônes — contraste renforcé */
.rx-icon {
flex-shrink: 0;
width: 1.125rem;
height: 1.125rem;
stroke-width: 2;
}
.rx-icon-violet { color: var(--rx-violet-light); }
.rx-icon-orange { color: var(--rx-orange-light); }
.rx-icon-cyan   { color: var(--rx-cyan-light); }

/* Cadre liquid glass — bordure triangle chromatique */
.rx-glass-frame {
position: relative;
border-radius: 1.5rem;
padding: 1px;
background: linear-gradient(135deg,
rgba(34,211,238,0.7),
rgba(99,102,241,0.4),
rgba(34,211,238,0.25),
rgba(167,139,250,0.5),
rgba(34,211,238,0.45));
background-size: 280% 280%;
animation: rx-border-flow 14s ease infinite;
box-shadow: 0 32px 80px rgba(0,0,0,0.42), 0 0 48px rgba(34,211,238,0.1);
}
.rx-glass-inner {
border-radius: calc(1.5rem - 1px);
background: var(--rx-glass-bg);
backdrop-filter: blur(36px) saturate(1.55);
-webkit-backdrop-filter: blur(36px) saturate(1.55);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), inset 0 -24px 48px rgba(0, 0, 0, 0.18);
}
.rx-grid-bg {
background-image:
linear-gradient(rgba(167, 139, 250, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
background-size: 28px 28px;
mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 15%, transparent 72%);
}

/* Panneau glass interne (carte guide) */
.rx-glass-panel {
background: linear-gradient(145deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 45%, rgba(99,102,241,0.04) 100%);
backdrop-filter: blur(24px) saturate(1.4);
-webkit-backdrop-filter: blur(24px) saturate(1.4);
border: 1px solid var(--rx-glass-border);
box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 20px 44px rgba(0,0,0,0.22);
}

/* Panneau de filtres — même typo que les paragraphes (Manrope / --fs-body) */
.rx-filters {
  --rx-control-h: clamp(3.35rem, 2.7rem + 0.7vw, 4.25rem);
  --rx-control-pad-y: 0.35rem;
  --rx-control-pad-x: clamp(0.9rem, 0.7rem + 0.35vw, 1.25rem);
  --rx-control-bg: rgba(6, 11, 22, 0.82);
  --rx-control-border: rgba(148, 163, 184, 0.18);
  --rx-active-border: rgba(196, 181, 253, 0.45);
  --rx-icon: clamp(1.1rem, 0.95rem + 0.22vw, 1.35rem);
}

.rx-filters :is(
  .seg-btn,
  .tag-btn,
  .rx-filters-sectors__label,
  .rx-filters-count,
  .rx-filters-reset,
  .glass-input-wrap input,
  .glass-input-wrap select
) {
  font-family: var(--font-body) !important;
  font-size: var(--fs-body) !important;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.45;
}

.rx-filters-panel {
  position: relative;
  border-radius: 1.25rem;
  padding: clamp(1.15rem, 0.9rem + 0.45vw, 1.65rem);
  background:
    linear-gradient(165deg, rgba(18, 24, 48, 0.9) 0%, rgba(12, 18, 36, 0.92) 48%, rgba(14, 20, 42, 0.88) 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.rx-filters-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(12rem, 1fr) minmax(11rem, 0.78fr);
  gap: clamp(0.7rem, 0.55rem + 0.25vw, 1rem);
  align-items: stretch;
}

/* Segmented control */
.seg-track {
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  height: var(--rx-control-h);
  min-height: var(--rx-control-h);
  padding: var(--rx-control-pad-y);
  border-radius: 9999px;
  background: var(--rx-control-bg);
  border: 1px solid var(--rx-control-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.seg-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  padding: 0 var(--rx-control-pad-x);
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  color: #d5dbe8;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.seg-btn:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 22%;
  right: 0;
  width: 1px;
  height: 56%;
  background: rgba(148, 163, 184, 0.16);
  pointer-events: none;
}
.seg-btn[aria-pressed="true"]::after,
.seg-btn[aria-pressed="true"] + .seg-btn::after {
  opacity: 0;
}
.seg-btn__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.seg-btn .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.4rem;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.18);
  color: #d7deea;
  font-family: var(--font-body) !important;
  font-size: var(--fs-body) !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.seg-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(139, 108, 224, 0.78), rgba(99, 78, 178, 0.68));
  border-color: var(--rx-active-border);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.seg-btn[aria-pressed="true"] .count {
  background: rgba(255, 255, 255, 0.2);
  color: #f8fafc;
}
.seg-btn[aria-pressed="false"]:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.seg-btn:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.9);
  outline-offset: 2px;
  z-index: 1;
}

/* Recherche + tri : même hauteur extérieure que le groupe segmenté */
.rx-filters .glass-input-wrap {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: var(--rx-control-h);
  min-height: var(--rx-control-h);
  padding: 0 var(--rx-control-pad-x);
  border-radius: 0.95rem;
  border: 1px solid var(--rx-control-border);
  background: var(--rx-control-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: none;
  gap: 0.65rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.rx-filters .glass-input-wrap:hover {
  border-color: rgba(148, 163, 184, 0.32);
}
.rx-filters .glass-input-wrap:focus-within {
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(8, 12, 24, 0.92);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.16);
}
.rx-filters .glass-input-wrap input,
.rx-filters .glass-input-wrap select {
  box-sizing: border-box;
  align-self: stretch;
  height: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: #f1f5f9;
}
.rx-filters .glass-input-wrap input {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0;
  outline: none;
}
.rx-filters .glass-input-wrap input::-webkit-search-decoration,
.rx-filters .glass-input-wrap input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.rx-filters .glass-input-wrap input::placeholder {
  color: rgb(148 163 184);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  opacity: 1;
}

.rx-filters-search__icon,
.rx-filters-sort__icon {
  width: var(--rx-icon);
  height: var(--rx-icon);
  flex-shrink: 0;
  color: #94a3b8;
}

.rx-filters-sort {
  position: relative;
  min-width: 0;
  z-index: 2;
}
.rx-filters-sort.is-open {
  z-index: 40;
}

.rx-filters-sectors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 0.9rem;
  margin-top: clamp(1.1rem, 0.85rem + 0.35vw, 1.45rem);
  padding-top: clamp(1.1rem, 0.85rem + 0.35vw, 1.45rem);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}
.rx-filters-sectors__head {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.1rem;
  color: #f1f5f9;
}
.rx-filters-sectors__icon {
  width: var(--rx-icon);
  height: var(--rx-icon);
  color: #94a3b8;
}
.rx-filters-sectors__label {
  font-weight: 600;
  color: #f8fafc;
}
.rx-filters-tags {
  display: flex;
  flex: 1 1 14rem;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-width: 0;
}
.rx-filters .tag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(2.65rem, 2.25rem + 0.45vw, 3.25rem);
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(8, 12, 24, 0.58);
  color: #e2e8f0;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.rx-filters .tag-btn:hover {
  border-color: rgba(167, 139, 250, 0.38);
  background: rgba(167, 139, 250, 0.12);
  color: #fff;
}
.rx-filters .tag-btn[aria-pressed="true"] {
  border-color: var(--rx-active-border);
  background: linear-gradient(180deg, rgba(139, 108, 224, 0.78), rgba(99, 78, 178, 0.68));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.rx-filters .tag-btn:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.9);
  outline-offset: 2px;
}

.rx-filters-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(1rem, 0.8rem + 0.3vw, 1.35rem);
  padding-inline: 0.1rem;
}
.rx-filters-count {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-weight: 600;
  color: #eef2f8;
  font-variant-numeric: tabular-nums;
}
.rx-filters-count__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #2dd4bf;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.65);
}
.rx-filters-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  min-height: clamp(2.9rem, 2.45rem + 0.5vw, 3.5rem);
  padding: 0.7rem 1.35rem;
  border-radius: 9999px;
  border: 1px solid rgba(165, 180, 252, 0.28);
  background: linear-gradient(180deg, rgba(49, 58, 99, 0.92), rgba(30, 37, 68, 0.95));
  color: #eef2ff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px rgba(0, 0, 0, 0.22);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.rx-filters-reset svg {
  width: var(--rx-icon);
  height: var(--rx-icon);
  flex-shrink: 0;
}
.rx-filters-reset:hover {
  background: linear-gradient(180deg, rgba(67, 78, 128, 0.96), rgba(39, 48, 86, 0.98));
  border-color: rgba(196, 181, 253, 0.42);
  color: #fff;
}
.rx-filters-reset:active {
  transform: translateY(1px);
}
.rx-filters-reset:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.95);
  outline-offset: 3px;
}

.glass-chip {
font-family: var(--font-title);
font-size: 0.8125rem;
letter-spacing: 0.03em;
color: #e2e8f0;
border: 1px solid rgba(255,255,255,0.1);
background: rgba(255,255,255,0.04);
backdrop-filter: blur(8px);
transition: all 0.2s ease;
}
.glass-chip:hover {
border-color: rgba(167, 139, 250, 0.35);
background: rgba(167, 139, 250, 0.1);
color: #fff;
}
.glass-chip[aria-pressed="true"] {
border-color: rgba(167, 139, 250, 0.45);
background: linear-gradient(180deg, rgba(139, 108, 224, 0.72), rgba(99, 78, 178, 0.62));
color: #fff;
}

.rx-step-num {
font-family: var(--font-title);
font-size: 0.8125rem;
font-weight: 700;
}
.rx-cta {
background: #67e8f9;
color: #0f172a;
box-shadow: 0 0 32px rgba(34,211,238,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
}
.rx-cta:hover {
background: #a5f3fc;
box-shadow: 0 0 40px rgba(34,211,238,0.38), inset 0 1px 0 rgba(255,255,255,0.4);
}
.rx-divider {
height: 2px;
background: linear-gradient(90deg, var(--rx-cyan), var(--rx-violet), transparent);
opacity: 0.85;
}

/* ==========================================================================
   Cards projets — maquette encoche (scope .realisations-page uniquement)
   ========================================================================== */

.rx-card-clip-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.realisations-page .rx-projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 1.75rem;
  row-gap: clamp(3rem, 12vw, 4rem); /* 48–64px mobile */
  align-items: stretch;
}

@media (min-width: 768px) {
  .realisations-page .rx-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    row-gap: clamp(4rem, 8vw, 5rem); /* 64–80px tablette */
  }
}

@media (min-width: 1024px) {
  .realisations-page .rx-projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(1.75rem, 2.2vw, 2.5rem); /* horizontal inchangé */
    row-gap: clamp(5.5rem, 7vw, 7rem); /* 88–112px desktop */
  }
}

.realisations-page .rx-project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}

.realisations-page .rx-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: 1.25rem;
  outline: none;
}

.realisations-page .rx-card-link:focus-visible {
  outline: 2px solid var(--color-accent, #4f46e5);
  outline-offset: 4px;
}

.realisations-page .rx-card-visual {
  position: relative;
  flex-shrink: 0;
  /* Centre flèche = (460,560) / (500,600) — même référentiel que le clip */
  --rx-arrow-cx: 92%;
  --rx-arrow-cy: 93.333%;
  --rx-arrow-size: 9.6%; /* 48/500 de la largeur du visuel */
}

.realisations-page .rx-card-media {
  --rx-notch-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 600' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M20 0H480Q500 0 500 20V504Q500 520 484 520H452Q420 520 420 552V580Q420 600 400 600H20Q0 600 0 580V20Q0 0 20 0Z'/%3E%3C/svg%3E");
  position: relative;
  aspect-ratio: 5 / 6; /* 500×600 — proportion du contour de référence */
  overflow: hidden;
  background: transparent; /* encoche = fond site visible */
  border: none; /* pas de rectangle parasite dans l’encoche */
  /* Masque = contour exact 500×600 (petite encoche coin) ; clip SVG en secours */
  -webkit-mask-image: var(--rx-notch-mask);
  mask-image: var(--rx-notch-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-clip-path: url(#rx-card-notch-clip);
  clip-path: url(#rx-card-notch-clip);
}

/* Filet suivant le contour découpé (pas une bordure rectangulaire) */
.realisations-page .rx-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: var(--rx-notch-mask);
  mask-image: var(--rx-notch-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-clip-path: url(#rx-card-notch-clip);
  clip-path: url(#rx-card-notch-clip);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.realisations-page .rx-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.3s ease;
  will-change: transform;
}

/* Visuels produit (mockups déjà cadrés) : remplir sans rogner ni étirer */
.realisations-page .rx-card-media--product {
  background: #0b1220;
}
.realisations-page .rx-card-img--contain {
  width: 96%;
  height: 96%;
  margin: 2%;
  object-fit: contain;
  object-position: center center;
  background: transparent;
}

.realisations-page .rx-card-cat {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 2;
  max-width: calc(100% - 2.5rem);
  padding: 0.28rem 0.55rem;
  border-radius: 0.35rem;
  font-family: var(--font-title);
  font-size: var(--fs-label, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #f8fafc;
  background: rgba(11, 18, 32, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.realisations-page .rx-card-arrow {
  position: absolute;
  z-index: 3;
  left: var(--rx-arrow-cx);
  top: var(--rx-arrow-cy);
  width: var(--rx-arrow-size);
  aspect-ratio: 1;
  height: auto;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: #0b1220;
  border: 1.5px solid var(--color-accent, #4f46e5);
  color: #e2e8f0;
  pointer-events: none;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.realisations-page .rx-card-arrow__icon {
  width: 48%;
  height: 48%;
  display: block;
  transition: transform 0.3s ease;
}

.realisations-page .rx-card-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  flex: 1;
  gap: 0.55rem;
  padding: 1.5rem 0.15rem 0; /* ~24px sous le visuel */
  background: transparent;
  border: none;
  min-width: 0;
}

.realisations-page .rx-card-sectors {
  margin: 0;
  font-family: var(--font-title) !important;
  font-size: var(--fs-label, .72rem) !important;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.35;
  color: #94a3b8;
}

.realisations-page .rx-project-card .rx-card-title {
  margin: 0;
  font-family: var(--font-title) !important;
  font-size: var(--fs-card-title, clamp(1.15rem, 1.55vw, 1.4rem)) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #ffffff;
}

.realisations-page .rx-project-card .rx-card-desc {
  margin: 0;
  font-family: var(--font-body) !important;
  font-size: var(--fs-small, 0.9375rem) !important;
  font-weight: 400;
  line-height: 1.55;
  color: #cbd5e1;
  display: block;
  overflow: visible;
}

.realisations-page .rx-card-foot {
  margin-top: 0.35rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.realisations-page .rx-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #a5b4fc;
  transition: color 0.3s ease, gap 0.3s ease;
}

.realisations-page .rx-card-cta__icon {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
  transition: transform 0.3s ease;
}

/* Hover / focus — pointeur précis uniquement */
@media (hover: hover) and (pointer: fine) {
  .realisations-page .rx-card-link:hover .rx-card-img,
  .realisations-page .rx-card-link:focus-visible .rx-card-img {
    transform: scale(1.025);
  }

  .realisations-page .rx-card-link:hover .rx-card-arrow,
  .realisations-page .rx-card-link:focus-visible .rx-card-arrow {
    background: var(--color-secondary, #f1894e);
    border-color: var(--color-secondary, #f1894e);
    color: #0b1220;
  }

  .realisations-page .rx-card-link:hover .rx-card-arrow__icon,
  .realisations-page .rx-card-link:focus-visible .rx-card-arrow__icon {
    transform: translateX(2px);
  }

  .realisations-page .rx-card-link:hover .rx-card-cta,
  .realisations-page .rx-card-link:focus-visible .rx-card-cta {
    color: var(--color-secondary, #f1894e);
    gap: 0.55rem;
  }

  .realisations-page .rx-card-link:hover .rx-card-cta__icon,
  .realisations-page .rx-card-link:focus-visible .rx-card-cta__icon {
    transform: translateX(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .realisations-page .rx-card-img,
  .realisations-page .rx-card-arrow,
  .realisations-page .rx-card-arrow__icon,
  .realisations-page .rx-card-cta,
  .realisations-page .rx-card-cta__icon {
    transition: none !important;
  }

  .realisations-page .rx-card-link:hover .rx-card-img,
  .realisations-page .rx-card-link:focus-visible .rx-card-img {
    transform: none;
  }

  .realisations-page .rx-card-link:hover .rx-card-arrow__icon,
  .realisations-page .rx-card-link:focus-visible .rx-card-arrow__icon,
  .realisations-page .rx-card-link:hover .rx-card-cta__icon,
  .realisations-page .rx-card-link:focus-visible .rx-card-cta__icon {
    transform: none;
  }
}

/* Repli : pas de clip-path → arrondi simple, flèche toujours visible */
@supports not (clip-path: url(#rx-card-notch-clip)) {
  .realisations-page .rx-card-media {
    -webkit-clip-path: none;
    clip-path: none;
    border-radius: 1.25rem;
  }
}

@media (max-width: 639px) {
  .realisations-page .rx-card-body {
    padding-top: 1.25rem;
  }
}

/* hidden doit primer sur display:flex des cartes */
.realisations-page .rx-project-card.hidden,
.realisations-page .project-card.hidden {
  display: none !important;
}

.rx-editorial-card {
border-radius: 1.25rem;
padding: 1.5rem;
background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 50%, rgba(99,102,241,0.04) 100%);
backdrop-filter: blur(20px) saturate(1.35);
-webkit-backdrop-filter: blur(20px) saturate(1.35);
border: 1px solid var(--rx-glass-border);
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 16px 40px rgba(0,0,0,0.2);
transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.rx-editorial-card:hover {
border-color: rgba(196, 181, 253, 0.28);
box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 20px 48px rgba(0,0,0,0.26), 0 0 28px var(--rx-violet-glow);
}
.rx-editorial-card h3 {
font-size: 1.0625rem;
font-weight: 700;
color: #fff;
}

/* ── Expertises : grille 2×2 ── */
.rx-xp {
  /* Réglages survol (ajustables) */
  --rx-xp-hover-lift: -5px;
  --rx-xp-hover-scale: 1.015;
  --rx-xp-track-x: 7px;
  --rx-xp-track-y: 5px;
  --rx-xp-shine-duration: 780ms;
  --rx-xp-shine-opacity: 0.22;
  --rx-xp-border: rgba(148, 163, 184, 0.16);
  --rx-xp-border-hover: rgba(186, 198, 214, 0.34);
  --rx-xp-gap: clamp(1.25rem, 2vw, 2rem);
  --rx-xp-pad: clamp(1.35rem, 2vw, 2.15rem);
  --rx-xp-radius: clamp(1rem, 1.2vw, 1.35rem);
  --rx-xp-visual-min: clamp(13rem, 26vw, 20rem);
  width: 100%;
}

.rx-xp__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: clamp(1.6rem, 2.6vw, 2.75rem);
}

.rx-xp__title {
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
}

.rx-xp__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--rx-xp-gap);
  width: 100%;
  align-items: stretch;
}

.rx-xp-card {
  --rx-xp-mx: 0;
  --rx-xp-my: 0;
  --rx-xp-img-x: 50%;
  --rx-xp-img-y: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border-radius: var(--rx-xp-radius);
  border: 1px solid var(--rx-xp-border);
  background:
    linear-gradient(165deg, rgba(22, 30, 46, 0.96) 0%, rgba(12, 18, 32, 0.98) 55%, rgba(10, 14, 26, 0.99) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 220ms ease;
  isolation: isolate;
}

.rx-xp-card__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: var(--rx-xp-pad) var(--rx-xp-pad) 0.85rem;
  min-width: 0;
}

.rx-xp-card__index {
  font-family: var(--font-title);
  font-size: clamp(1.55rem, 1.2rem + 0.7vw, 2.05rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(148, 163, 184, 0.34);
}

.rx-xp-card__title {
  margin: 0;
  font-family: var(--font-subtitle);
  font-size: var(--fs-subtitle);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #f8fafc;
  text-wrap: balance;
}

.rx-xp-card__desc {
  margin: 0;
  max-width: 38ch;
  color: #94a3b8;
  line-height: 1.65;
}

.rx-xp-card__visual {
  position: relative;
  z-index: 1;
  margin-top: auto;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: var(--rx-xp-visual-min);
  /* Réserve pour le lift / scale au survol — sans agrandir la card. */
  padding:
    0.45rem
    clamp(0.85rem, var(--rx-xp-pad), 1.35rem)
    calc(var(--rx-xp-pad) + 0.55rem);
  overflow: hidden;
  pointer-events: none;
}

.rx-xp-card__stage {
  position: relative;
  /* Zone de dimensionnement = tout l’espace restant sous le texte. */
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Lift via --rx-xp-lift ; suivi via --rx-xp-mx/my (JS). */
  --rx-xp-lift: 0px;
  --rx-xp-scale: 1;
  transform:
    translate3d(
      calc(var(--rx-xp-mx) * var(--rx-xp-track-x)),
      calc(var(--rx-xp-lift) + var(--rx-xp-my) * var(--rx-xp-track-y)),
      0
    )
    scale(var(--rx-xp-scale));
  transform-origin: center center;
  transition:
    transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.rx-xp-card__img {
  display: block;
  /* Remplit la zone visuelle (scale-up inclus) sans déformer ni couper. */
  width: var(--rx-xp-img-fit-w, 94%);
  height: var(--rx-xp-img-fit-h, 94%);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: var(--rx-xp-img-x) var(--rx-xp-img-y);
  background: transparent;
  filter: none;
  mix-blend-mode: normal;
  user-select: none;
  -webkit-user-drag: none;
}

.rx-xp-card.is-pending-visual .rx-xp-card__stage {
  width: 100%;
  border-radius: 0.65rem;
  background: transparent;
}

.rx-xp-card__shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    115deg,
    transparent 28%,
    rgba(226, 232, 240, var(--rx-xp-shine-opacity)) 46%,
    rgba(148, 163, 184, 0.08) 52%,
    transparent 68%
  );
  transform: translate3d(-130%, 0, 0) skewX(-12deg);
}

.rx-xp-card.is-shine .rx-xp-card__shine {
  animation: rx-xp-shine var(--rx-xp-shine-duration) cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes rx-xp-shine {
  0% {
    opacity: 0;
    transform: translate3d(-130%, 0, 0) skewX(-12deg);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(130%, 0, 0) skewX(-12deg);
  }
}

/* Cadrages indépendants — occupation ~85–95 % de la zone, contain strict */
.rx-xp-card--01 {
  --rx-xp-img-fit-w: 92%;
  --rx-xp-img-fit-h: 94%;
  --rx-xp-img-x: 50%;
  --rx-xp-img-y: 55%;
}

.rx-xp-card--02 {
  --rx-xp-img-fit-w: 94%;
  --rx-xp-img-fit-h: 92%;
  --rx-xp-img-x: 50%;
  --rx-xp-img-y: 50%;
}

.rx-xp-card--03 {
  --rx-xp-img-fit-w: 93%;
  --rx-xp-img-fit-h: 92%;
  --rx-xp-img-x: 50%;
  --rx-xp-img-y: 50%;
}

.rx-xp-card--04 {
  --rx-xp-img-fit-w: 94%;
  --rx-xp-img-fit-h: 93%;
  --rx-xp-img-x: 50%;
  --rx-xp-img-y: 52%;
}

@media (min-width: 900px) {
  .rx-xp__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .rx-xp {
    --rx-xp-gap: clamp(1.35rem, 1.6vw, 2rem);
    --rx-xp-pad: clamp(1.6rem, 1.7vw, 2.35rem);
    --rx-xp-visual-min: clamp(15.5rem, 20vw, 22rem);
  }
}

@media (min-width: 1920px) {
  .rx-xp {
    --rx-xp-gap: clamp(1.5rem, 1.4vw, 2.25rem);
    --rx-xp-pad: clamp(1.85rem, 1.5vw, 2.6rem);
    --rx-xp-visual-min: clamp(16rem, 16vw, 24rem);
  }

  .rx-xp-card__desc {
    max-width: 42ch;
  }
}

@media (min-width: 2560px) {
  .rx-xp-card--01 {
    --rx-xp-img-fit-w: 93%;
    --rx-xp-img-fit-h: 95%;
  }

  .rx-xp-card--02,
  .rx-xp-card--03,
  .rx-xp-card--04 {
    --rx-xp-img-fit-w: 95%;
    --rx-xp-img-fit-h: 94%;
  }
}

@media (min-width: 3840px) {
  .rx-xp {
    --rx-xp-gap: clamp(1.85rem, 1.1vw, 2.75rem);
    --rx-xp-pad: clamp(2.1rem, 1.15vw, 3rem);
    --rx-xp-visual-min: clamp(20rem, 12vw, 32rem);
    --rx-xp-radius: 1.5rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .rx-xp-card:hover,
  .rx-xp-card.is-hot {
    border-color: var(--rx-xp-border-hover);
  }

  .rx-xp-card:hover .rx-xp-card__stage,
  .rx-xp-card.is-hot .rx-xp-card__stage {
    --rx-xp-lift: var(--rx-xp-hover-lift);
    --rx-xp-scale: var(--rx-xp-hover-scale);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rx-xp-card__stage {
    transition: none !important;
    transform: none !important;
  }

  .rx-xp-card__shine,
  .rx-xp-card.is-shine .rx-xp-card__shine {
    animation: none !important;
    opacity: 0 !important;
  }

  .rx-xp-card:hover,
  .rx-xp-card.is-hot {
    border-color: var(--rx-xp-border-hover);
  }

  .rx-xp-card:hover .rx-xp-card__stage,
  .rx-xp-card.is-hot .rx-xp-card__stage {
    --rx-xp-lift: 0px;
    --rx-xp-scale: 1;
  }
}

@media (max-width: 899px) {
  .rx-xp {
    --rx-xp-pad: clamp(1.15rem, 4vw, 1.45rem);
    --rx-xp-visual-min: clamp(10rem, 42vw, 14rem);
  }

  .rx-xp-card__desc {
    max-width: 48ch;
  }

  /* Sans image : réserve plus courte pour éviter de grands vides sur mobile. */
  .rx-xp-card.is-pending-visual {
    --rx-xp-visual-min: clamp(7.5rem, 32vw, 11rem);
  }
}

.rx-btn-ghost {
font-family: var(--font-title);
font-size: 0.875rem;
font-weight: 500;
letter-spacing: 0.04em;
border-radius: 9999px;
border: 1px solid rgba(255,255,255,0.14);
background: rgba(255,255,255,0.05);
backdrop-filter: blur(10px);
transition: background 0.22s ease, border-color 0.22s ease;
}
.rx-btn-ghost:hover {
background: rgba(255,255,255,0.09);
border-color: rgba(196, 181, 253, 0.35);
}

/* Dropdown tri — menu custom glass (pas de liste native) */
.rx-filters .rx-select-trigger {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin: 0;
  cursor: pointer;
  text-align: left;
  color: #f1f5f9;
  font-family: var(--font-body) !important;
  font-size: var(--fs-body) !important;
  font-weight: 400;
  line-height: 1.45;
}
.rx-filters .rx-select-trigger:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.9);
  outline-offset: 2px;
}
.rx-filters .rx-select.is-open .rx-select-trigger,
.rx-filters .rx-select-trigger[aria-expanded="true"] {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(8, 12, 24, 0.94);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}
.rx-select-value {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rx-select-chevron {
  width: var(--rx-icon, 1.15rem);
  height: var(--rx-icon, 1.15rem);
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.22s ease, color 0.22s ease;
}
.rx-select.is-open .rx-select-chevron {
  transform: rotate(180deg);
  color: #c4b5fd;
}
.rx-select-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  right: 0;
  z-index: 70;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  border-radius: 1rem;
  background:
    linear-gradient(165deg, rgba(22, 28, 52, 0.98) 0%, rgba(12, 16, 34, 0.99) 55%, rgba(16, 20, 42, 0.98) 100%);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(196, 181, 253, 0.28);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.4rem);
  transform-origin: top center;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.rx-select.is-open .rx-select-menu:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.rx-select-menu[hidden] {
  display: none !important;
}
.rx-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem 0.95rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  color: #e8eef8;
  font-family: var(--font-body) !important;
  font-size: var(--fs-body) !important;
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
  outline: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rx-select-option:hover,
.rx-select-option:focus-visible {
  background: rgba(167, 139, 250, 0.16);
  border-color: rgba(196, 181, 253, 0.22);
  color: #fff;
}
.rx-select-option.is-selected {
  background: linear-gradient(180deg, rgba(139, 108, 224, 0.42), rgba(99, 78, 178, 0.36));
  border-color: rgba(196, 181, 253, 0.38);
  color: #fff;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.rx-select-option .rx-select-check {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  opacity: 0;
  color: #ddd6fe;
  transition: opacity 0.15s ease;
}
.rx-select-option.is-selected .rx-select-check { opacity: 1; }

@media (max-width: 1023px) {
  .rx-filters-toolbar {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .seg-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    height: auto;
    min-height: 0;
    padding: 0.4rem;
    border-radius: 1.1rem;
    overflow: visible;
  }
  .seg-btn {
    width: 100%;
    height: auto;
    min-height: clamp(2.75rem, 2.4rem + 1.2vw, 3.15rem);
    padding: 0.55rem 0.7rem;
  }
  .seg-btn:not(:last-child)::after { display: none; }
  .rx-filters-meta {
    flex-wrap: wrap;
    gap: 0.85rem;
  }
  .rx-filters-reset {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 639px) {
  .rx-filters-panel {
    padding: 1rem 0.95rem 1.1rem;
    border-radius: 1.05rem;
  }
  .rx-filters {
    --rx-control-h: 3.15rem;
  }
  .seg-btn {
    padding-inline: 0.45rem;
    gap: 0.3rem;
  }
  .seg-btn .count {
    min-width: 1.2rem;
    height: 1.2rem;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .rx-filters-toolbar {
    grid-template-columns: minmax(0, 1.4fr) minmax(10.5rem, 0.95fr) minmax(10rem, 0.78fr);
    gap: 0.7rem;
  }
  .seg-btn {
    padding-inline: 0.55rem;
    gap: 0.35rem;
  }
}

/* The 500px keyboard is transformed visually; it must not impose a grid min-content width. */
.realisations-page .rx-glass-inner > .grid > div { min-width: 0; }
.realisations-page .rx-tk-slot { min-width: 0; max-width: 100%; }
.realisations-page .rx-filters-toolbar > * { min-width: 0; }

/* Proportions grand écran : cadre et rôles typographiques fluides. */
@media (min-width: 1600px) {
  .rx-project-grid, .rx-grid { gap: var(--vitrine-gap); }
  .rx-project-card .rx-card-desc { display: block; -webkit-line-clamp: unset; }
  .rx-project-card .rx-card-title { overflow-wrap: anywhere; }
  .realisations-page .rx-tk-slot { max-width: clamp(40rem, calc(16rem + 24vw), 75rem); }
  .rx-tag-pill, .rx-card-cta, .results-hud-item { font-size: var(--fs-small); }
  .rx-xp-card__desc { max-width: 48ch; }
}
