@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

/* Styles pour Material Symbols */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 1em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  vertical-align: middle;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --architect-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --enterprise-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  --individual-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --architect-light: rgba(102, 126, 234, 0.1);
  --enterprise-light: rgba(6, 182, 212, 0.1);
  --individual-light: rgba(245, 158, 11, 0.1);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: #ffffff;
  min-height: 100vh;
  padding: 0;
  color: #1a1a1a;
  overflow-x: hidden;
  position: relative;
}

/* Fond animé avec formes géométriques */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: #667eea;
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: #06b6d4;
  bottom: -150px;
  right: -150px;
  animation-delay: 5s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: #f59e0b;
  top: 50%;
  right: 10%;
  animation-delay: 10s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-50px, 50px) scale(0.9);
  }
}

/* Grille de points animée */
.grid-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px
  );
  background-size: 50px 50px;
  z-index: 1;
  animation: gridMove 20s linear infinite;
}

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

.container {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out;
}

.header-logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.header-logo {
  width: 80px;
  height: 80px;
  opacity: 0.9;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.3));
}

.header-logo-wrapper:hover .header-logo {
  opacity: 1;
  transform: scale(1.05);
  filter: drop-shadow(0 6px 16px rgba(6, 182, 212, 0.4));
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-badge {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.05);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  margin-bottom: 0rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  background: linear-gradient(
    135deg,
    #1a1a1a 0%,
    rgba(26, 26, 26, 0.8) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.header-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
  font-weight: 400;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

.card {
  position: relative;
  background: #ffffff;
  backdrop-filter: blur(20px);
  border-radius: 32px;
  padding: 3rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.8s ease-out backwards;
}

.card:nth-child(1) {
  animation-delay: 0.1s;
}

.card:nth-child(2) {
  animation-delay: 0.2s;
}

.card:nth-child(3) {
  animation-delay: 0.3s;
}

/* Effet de lumière au hover */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  opacity: 0;
  transition: opacity 0.5s;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
    0 0 40px rgba(102, 126, 234, 0.1);
}

/* Effet de brillance animé */
.card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(102, 126, 234, 0.05) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
  animation: shine 2s infinite;
}

@keyframes shine {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Carte Architecte - effet de couleur au hover */
.card.architect:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(102, 126, 234, 0.3);
  background: rgba(102, 126, 234, 0.05);
}

.card.enterprise:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.05);
}

.card.individual:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.05);
}

.card-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.card-tag::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.card:hover .card-tag::before {
  left: 100%;
}

.card-tag.architect {
  background: var(--architect-gradient);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.card-tag.enterprise {
  background: var(--enterprise-gradient);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.card-tag.individual {
  background: var(--individual-gradient);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.card-title {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.25rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.card-description {
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  flex-grow: 1;
  font-weight: 400;
}

.card-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn-primary {
  color: white;
  position: relative;
}

.btn-primary.architect {
  background: var(--architect-gradient);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-primary.architect:hover {
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

.btn-primary.enterprise {
  background: var(--enterprise-gradient);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.4);
}

.btn-primary.enterprise:hover {
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

.btn-primary.individual {
  background: var(--individual-gradient);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.btn-primary.individual:hover {
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.btn-secondary.architect:hover {
  border-color: rgba(102, 126, 234, 0.6);
  background: rgba(102, 126, 234, 0.1);
}

.btn-secondary.enterprise:hover {
  border-color: rgba(6, 182, 212, 0.6);
  background: rgba(6, 182, 212, 0.1);
}

.btn-secondary.individual:hover {
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.1);
}

/* Icônes décoratives */
.card-icon {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  opacity: 0.1;
  transition: all 0.5s;
}

.card:hover .card-icon {
  opacity: 0.2;
  transform: scale(1.2) rotate(10deg);
}

/* Clients Section */
.clients-section .client-logo:hover {
  opacity: 1 !important;
  transform: scale(1.05);
  filter: grayscale(0%) brightness(1) !important;
}

.clients-section .clients-grid {
  animation: fadeInUp 0.8s ease-out;
}

.clients-section .clients-grid .client-logo {
  animation: fadeInUp 0.8s ease-out backwards;
}

.clients-section .clients-grid .client-logo:nth-child(1) {
  animation-delay: 0.1s;
}

.clients-section .clients-grid .client-logo:nth-child(2) {
  animation-delay: 0.2s;
}

.clients-section .clients-grid .client-logo:nth-child(3) {
  animation-delay: 0.3s;
}

.clients-section .clients-grid .client-logo:nth-child(4) {
  animation-delay: 0.4s;
}

.clients-section .clients-grid .client-logo:nth-child(5) {
  animation-delay: 0.5s;
}

.clients-section .clients-grid .client-logo:nth-child(6) {
  animation-delay: 0.6s;
}

/* CTA générique (base, surchargée dans architecte.css / entreprise.css) */
.cta-section {
  padding: 4rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.01);
}

.cta-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-description {
  font-size: 1.0625rem;
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.cta-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
}

.cta-highlight-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
  .cta-section {
    padding: 3rem 0;
  }

  .cta-highlights {
    gap: 0.75rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 3rem 1.5rem;
  }

  .header {
    margin-bottom: 4rem;
  }

  .cards-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .card {
    padding: 2rem;
  }

  .clients-section .clients-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }
}

/* Animation de scroll */
@media (prefers-reduced-motion: no-preference) {
  .card {
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease-out forwards;
  }
}

/* Navigation unifiée */
.page-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.page-nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-nav .container,
.page-nav .nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Gradient spécifique pour la page entreprise */
body.enterprise-page .nav-logo,
.enterprise-page .nav-logo {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.nav-logo:hover .logo-icon {
  opacity: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

/* Gradient spécifique pour la page entreprise */
body.enterprise-page .nav-links a::after,
.enterprise-page .nav-links a::after {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.nav-links a:hover,
.nav-links a.active {
  color: #1a1a1a;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Project gallery carousel */
.project-carousel {
  position: relative;
}

.project-carousel-inner {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
}

.project-carousel-inner::-webkit-scrollbar {
  display: none;
}

.project-carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.project-carousel-slide.is-active {
  /* Réservé pour d'éventuels styles d'état (par ex. léger zoom) */
}

/* Grande galerie de projets (plein écran) */
.project-gallery-section {
  min-height: 67vh;
  display: flex;
  align-items: center;
}

.project-gallery-scroller {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
  scroll-marker-group: after;
}

.project-gallery-scroller::-webkit-scrollbar {
  display: none;
}

.project-gallery-scroller > * {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

/* Boutons de défilement fournis par le navigateur (Chrome 135+) */
.project-gallery-scroller::scroll-button(left) {
  content: "⟵" / "Image précédente";
}

.project-gallery-scroller::scroll-button(right) {
  content: "⟶" / "Image suivante";
}

.project-gallery-scroller::scroll-button(*) {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}

.project-gallery-scroller::scroll-button(*):focus-visible {
  outline-offset: 4px;
}

/* Marqueurs de défilement (points) – Chrome 135+ */
.project-gallery-scroller > *::scroll-marker {
  content: " ";
}

.project-gallery-scroller > *::scroll-marker:target-current {
  background: #667eea;
}

.nav-back {
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-back:hover {
  color: #1a1a1a;
}

/* Menu mobile */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.8);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: #1a1a1a;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 2rem;
    gap: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: block;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(0, 0, 0, 0.05);
    padding-left: 1.5rem;
  }

  .page-nav .container,
  .page-nav .nav-container {
    padding: 0 1.5rem;
  }
}
/* Galerie 3D d'infographies (page infographies-galerie) */
.gallery-3d {
  margin-top: 3rem;
  padding: 3rem 2rem 3.5rem;
  border-radius: 24px;
  background: #020617;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.gallery-3d-header {
  margin-bottom: 2rem;
}

.gallery-3d-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.gallery-3d-header p {
  font-size: 0.975rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 40rem;
}

.gallery-3d-nav {
  /* paramètres globaux */
  --hover-intensity: 10rem;
  --hover-smoothness: 70ms;
  --fall-smoothness: 250ms;
  --perspective: 2000px;
  --p: 1;
  --z: 1;

  /* région courante */
  --r: calc(var(--max-z) * (var(--p) - 1) + var(--z));

  /* normalisation [0-1] */
  --r-n: calc(
    (var(--r) - 1) / (var(--max-z) * var(--max-p) - 1)
  );

  block-size: min(8rem, 100%);
  inline-size: min(30rem, 100%);

  display: flex;
  align-items: flex-end;
  position: relative;

  perspective: var(--perspective);
  transform-style: preserve-3d;

  --dir: 0deg;
}

@media (max-width: 640px) {
  .gallery-3d-nav {
    writing-mode: sideways-rl;
    --dir: -90deg;
    inline-size: 100%;
  }
}

.gallery-3d-item {
  flex: 1;
  block-size: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  transform-style: preserve-3d;

  --ts: calc(
    var(--hover-smoothness) * var(--falloff) +
      var(--fall-smoothness) * (1 - var(--falloff))
  );

  --fs: calc(
    0.1s * var(--falloff, 0) + 0.8s * (1 - var(--falloff, 0))
  );

  transition:
    scale var(--op, 0.15s),
    filter var(--fs),
    transform var(--ts, var(--fall-smoothness)),
    flex 0.3s;
}

.gallery-3d-item {
  --p-n: calc(var(--i) / (var(--max-p) - 1));
  --diff: calc(var(--p-n) - var(--r-n));
  --u: calc(abs(var(--diff)) / var(--w));

  --w: 0.4;
  --falloff: clamp(
    calc(0.5 * (1 + cos(min(var(--u), 1) * 180deg))),
    0,
    1
  );

  --tilt: calc(
    clamp(-1, var(--diff) * 5, 1) * var(--falloff) * 70deg
  );

  transform:
    translateZ(calc(var(--falloff) * var(--hover-intensity)))
      rotateY(calc(var(--tilt) * cos(var(--dir))))
      rotateX(calc(var(--tilt) * sin(var(--dir))));

  filter:
    brightness(max(0.5, var(--falloff, 0) * 1.2))
      saturate(var(--falloff, 0));
}

.gallery-3d-nav .img {
  background: var(--img);
  background-color: #ffffff33;
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 100%;
  margin-inline: 0.1em;
}

.gallery-3d-nav .hover-zone {
  position: absolute;
  inset: 0;
  inset-inline: -3px;
  display: flex;
  z-index: 10;
}

.gallery-3d-nav .hover-zone > i {
  flex: 1;
  transition: 0.3s;
}

.gallery-3d-nav .hover-zone::after {
  position: absolute;
  inset: 0;
}

.gallery-3d-nav .hover-zone:active::after,
.gallery-3d-nav .hover-zone:hover:not(:has(> i:hover))::after,
.gallery-3d-nav a:focus-visible .hover-zone::after {
  content: "";
  pointer-events: all;
  --o: 1;
}

.gallery-3d-nav:has(.hover-zone:hover):not(:has(i:hover)),
.gallery-3d-nav:has(a:focus-visible) {
  --z: calc((var(--max-z) + 1) / 2);
}

.gallery-3d-nav:has(.hover-zone:hover) .gallery-3d-item:hover,
.gallery-3d-nav:has(a:focus-visible) .gallery-3d-item:focus-visible {
  flex: 4;
}

/* Définition des positions selon l'item et la zone de survol */
.gallery-3d-nav:has(> .gallery-3d-item:nth-child(1):is(:hover, :focus-visible)) {
  --p: 1;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(2):is(:hover, :focus-visible)) {
  --p: 2;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(3):is(:hover, :focus-visible)) {
  --p: 3;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(4):is(:hover, :focus-visible)) {
  --p: 4;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(5):is(:hover, :focus-visible)) {
  --p: 5;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(6):is(:hover, :focus-visible)) {
  --p: 6;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(7):is(:hover, :focus-visible)) {
  --p: 7;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(8):is(:hover, :focus-visible)) {
  --p: 8;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(9):is(:hover, :focus-visible)) {
  --p: 9;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(10):is(:hover, :focus-visible)) {
  --p: 10;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(11):is(:hover, :focus-visible)) {
  --p: 11;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(12):is(:hover, :focus-visible)) {
  --p: 12;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(13):is(:hover, :focus-visible)) {
  --p: 13;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(14):is(:hover, :focus-visible)) {
  --p: 14;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(15):is(:hover, :focus-visible)) {
  --p: 15;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(16):is(:hover, :focus-visible)) {
  --p: 16;
}

.gallery-3d-nav:has(> .gallery-3d-item:nth-child(17):is(:hover, :focus-visible)) {
  --p: 17;
}

.gallery-3d-nav .hover-zone i:nth-child(1):hover {
  --z: 1;
}

.gallery-3d-nav .hover-zone i:nth-child(2):hover {
  --z: 2;
}

.gallery-3d-nav .hover-zone i:nth-child(3):hover {
  --z: 3;
}

.gallery-3d-nav .hover-zone i:nth-child(4):hover {
  --z: 4;
}

.gallery-3d-nav .hover-zone i:nth-child(5):hover {
  --z: 5;
}

.gallery-3d-nav .hover-zone i:nth-child(6):hover {
  --z: 6;
}

.gallery-3d-nav .hover-zone i:nth-child(7):hover {
  --z: 7;
}

.gallery-3d-nav .hover-zone i:nth-child(8):hover {
  --z: 8;
}

.gallery-3d-nav .hover-zone i:nth-child(9):hover {
  --z: 9;
}

.gallery-3d-noscript {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Footer global */
.page-footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-brand:hover .footer-logo {
  opacity: 1;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #1a1a1a;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-bottom p {
  color: rgba(0, 0, 0, 0.5);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
