/* NAH Site — Version 2 enhancements */

[data-version="v1"] .v2-only { display: none !important; }
[data-version="v2"] .v1-only { display: none !important; }

[data-version="v1"] .news-card__body { display: contents; }

/* Version panel — right side, stacked with theme */
.version-panel {
  position: static;
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.5rem 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-warm-gray-200);
  border-right: none;
  border-radius: 0.75rem 0 0 0.75rem;
  box-shadow: var(--shadow-md);
}

.version-panel__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0 0.35rem 0.25rem;
}

.version-panel__btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}

.version-panel__btn:hover {
  background: var(--color-warm-gray-100);
  color: var(--color-charcoal);
}

.version-panel__btn.is-active {
  background: var(--color-accent-muted);
  color: var(--color-charcoal);
  box-shadow: inset 0 0 0 1.5px var(--color-accent);
}

.version-panel__badge {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  font-size: 0.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.version-panel__badge--v1 { background: var(--color-warm-gray-400); }
.version-panel__badge--v2 { background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); }

/* Logo v2 — deux chapes qui se touchent */
.logo__variant { display: flex; align-items: center; }

[data-version="v1"] .logo__variant--v2 { display: none; }
[data-version="v2"] .logo__variant--v1 { display: none; }

.logo__emblem--v2 .logo-chape--top {
  transform-origin: 82px 84px;
  animation: chapeTop 4s var(--ease-out) infinite;
}

.logo__emblem--v2 .logo-chape--bottom {
  transform-origin: 82px 84px;
  animation: chapeBottom 4s var(--ease-out) infinite;
}

.logo__emblem--v2 .logo-chape__touch {
  animation: chapeGlow 4s var(--ease-out) infinite;
}

@keyframes chapeTop {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(1px, 2px); }
}

@keyframes chapeBottom {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-1px, -2px); }
}

@keyframes chapeGlow {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

.logo-chape__touch {
  fill: var(--color-primary-light);
  transform-origin: 82px 84px;
}

.logo:hover .logo__emblem--v2 .logo-chape--top,
.logo:hover .logo__emblem--v2 .logo-chape--bottom {
  animation-duration: 2s;
}

/* Hero v2 marquee */
.product-marquee {
  padding: 1.25rem 0;
  background: var(--color-charcoal);
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}

.product-marquee__track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.product-marquee__track:hover { animation-play-state: paused; }

.product-marquee__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.product-marquee__item img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
}

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

[data-version="v2"] .product-card {
  padding: 0 2rem 2rem;
}

.product-card__media {
  position: relative;
  height: 10rem;
  overflow: hidden;
  margin: 0 -2rem 1.25rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.4s;
}

.product-card:hover .product-card__media img {
  transform: scale(1.06);
  filter: saturate(1.1);
}

.product-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45, 45, 45, 0.35), transparent 55%);
  pointer-events: none;
}

/* About / science visuals v2 */
.media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.media-frame img,
.media-frame svg {
  width: 100%;
  height: auto;
  display: block;
}

.media-frame__float {
  animation: floatIllus 7s var(--ease-out) infinite;
}

@keyframes floatIllus {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.media-frame__badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-charcoal);
  box-shadow: var(--shadow-sm);
}

/* News thumbnails v2 */
[data-version="v2"] .news-card {
  padding: 0;
  overflow: hidden;
}

.news-card__media {
  height: 9rem;
  overflow: hidden;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.news-card:hover .news-card__media img { transform: scale(1.05); }

.news-card__body { padding: 1.5rem; }

/* Footer v2 — BHW-inspired */
.footer--v2 {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #1a1a1a;
}

.footer--v2__noise {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(232, 90, 26, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(54, 184, 232, 0.12), transparent 50%);
  animation: footerPulse 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes footerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.footer--v2__inner {
  position: relative;
  padding: 4rem 0 2rem;
}

.footer--v2__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer--v2__brand p {
  font-size: 0.875rem;
  line-height: 1.65;
  max-width: 20rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer--v2__domains {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.footer--v2__domains a {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-primary-light);
  transition: background 0.25s;
}

.footer--v2__domains a:hover { background: rgba(255, 255, 255, 0.14); }

.footer--v2__col h3 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1rem;
}

.footer--v2__links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  list-style: none;
}

.footer--v2__links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.25s, transform 0.25s;
  display: inline-block;
}

.footer--v2__links a:hover {
  color: var(--color-primary-light);
  transform: translateX(4px);
}

.footer--v2__contact p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.75rem;
}

.footer--v2__contact strong {
  display: block;
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.footer--v2__contact a {
  color: var(--color-accent);
  transition: color 0.25s;
}

.footer--v2__contact a:hover { color: var(--color-primary-light); }

.footer--v2__divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(232, 90, 26, 0.5) 20%,
    rgba(54, 184, 232, 0.4) 80%,
    transparent
  );
  margin-bottom: 2rem;
  animation: dividerShimmer 4s linear infinite;
  background-size: 200% 100%;
}

@keyframes dividerShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.footer--v2__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer--v2__awards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer--v2__award {
  font-size: 0.7rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.35rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Hero v2 emblem */
[data-version="v2"] .hero__emblem--v2 {
  width: min(100%, 18rem);
  animation: emblemFloat 6s var(--ease-out) infinite, chapeHero 6s var(--ease-out) infinite;
}

@keyframes chapeHero {
  0%, 100% { filter: drop-shadow(0 12px 32px rgba(232, 90, 26, 0.15)); }
  50% { filter: drop-shadow(0 16px 40px rgba(54, 184, 232, 0.2)); }
}

[data-version="v2"] .hero__visual .hero__emblem--v1 { display: none; }

/* Business cards v2 icons */
[data-version="v2"] .business-card {
  position: relative;
  overflow: hidden;
}

[data-version="v2"] .business-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -30%;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-primary-muted), transparent 70%);
  animation: cardOrb 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cardOrb {
  0%, 100% { transform: translate(0, 0); opacity: 0.6; }
  50% { transform: translate(-10px, 10px); opacity: 1; }
}

@media (max-width: 768px) {
  .side-panels {
    top: auto;
    bottom: 1rem;
    transform: none;
    flex-direction: row;
    right: 1rem;
    gap: 0.35rem;
  }

  .version-panel {
    flex-direction: row;
    border-radius: 2rem;
    border-right: 1px solid var(--color-warm-gray-200);
    padding: 0.35rem 0.5rem;
  }

  .version-panel__label { display: none; }
  .version-panel__btn span:last-child { display: none; }

  .footer--v2__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer--v2__bottom { flex-direction: column; align-items: flex-start; }
}
