:root {
  --bg-dark: #0a0e17;
  --bg-lighter: #161e30;
  --bg-glass: rgba(22, 30, 48, 0.6);
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-secondary: #0ea5e9;
  --border-glass: rgba(255, 255, 255, 0.08);
  --font-main: 'Outfit', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
}

li {
  list-style: none;
}

.highlight {
  color: var(--accent);
}

.text-center {
  text-align: center;
}

/* Nav */
.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 1000;
}

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

.logo a {
  font-size: 1.4rem; /* Legerement reduit */
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap; /* Empeche le logo de s'empiler sur 3 lignes ! */
}

.logo span {
  color: var(--accent);
}

nav ul {
  display: flex;
  gap: 1.5rem; /* Reduced from 2rem to prevent squeezing on some screens */
  align-items: center;
}

nav a {
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  white-space: nowrap; /* Prevents the text from being cut in half */
}

nav a:not(.btn-nav):hover {
  color: var(--accent);
}

.btn-nav {
  background: var(--accent);
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
}

.btn-nav:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.menu-toggle:hover {
  color: var(--accent);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  /* Rend le filtre plus transparent pour mieux voir les images */
  background: linear-gradient(to right, rgba(10, 14, 23, 0.8) 0%, rgba(10, 14, 23, 0.4) 100%);
  z-index: 1;
}

.hero-bg-slider {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
  overflow: hidden;
  background: var(--bg-dark); /* fallback */
}

.hero-bg-slider img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.05); /* Adds a nice parallax zoom effect */
  transition: opacity 2s ease-in-out, transform 8s linear;
}

.hero-bg-slider img.active {
  opacity: 0.8; /* Images beaucoup plus visibles */
  transform: scale(1);
}

.hero-content {
  position: relative;
  flex: 1;
  z-index: 2;
  max-width: 650px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 1200px) {
  .hero-content {
    margin: 0 calc(50vw - 600px + 2rem);
  }
}

.hero-content h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-content .subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-content .description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.eco-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.eco-badge .icon {
  margin-right: 8px;
}

.eco-badge strong {
  color: #4ade80;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

/* Sections Global */
.section {
  padding: 6rem 2rem;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 3rem;
}

.glass-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-lighter) 100%);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.dark-section {
  background: var(--bg-dark);
}

/* Split Layout */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.split-layout.reverse {
  grid-template-columns: 1.5fr 1fr;
}

.text-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.text-content strong {
  color: var(--text-main);
}

/* Products Gallery */
.products-grid, .dynamic-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

#lithophanie-gallery, #wine-gallery, #enfant-gallery, #pro-gallery {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-lighter);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-secondary);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-lighter);
  position: relative;
  z-index: 2;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.2rem;
  margin-top: auto;
}

/* Contact Section & Modal */
.contact-actions {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.mail-fallback {
  font-size: 0.95rem !important;
}

.mail-fallback a {
  color: var(--accent);
  text-decoration: underline;
}

/* Modal Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-lighter);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 3rem 2rem;
  max-width: 600px;
  width: 90%;
  position: relative;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--accent);
}

.modal-content h2 {
  margin-bottom: 2rem;
  text-align: center;
  color: var(--accent);
}

.materials-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.material-item h3 {
  color: var(--text-main);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.material-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
footer {
  background: #05080c;
  padding: 4rem 2rem 2rem;
  border-top: 1px solid var(--border-glass);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand h3 {
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: var(--text-muted);
}

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

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

/* Loading state */
.loader {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-style: italic;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* Animations setup */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

.fade-in-delay {
  opacity: 0;
  animation: fadeIn 1s ease 0.2s forwards;
}

.fade-in-delay-2 {
  opacity: 0;
  animation: fadeIn 1s ease 0.4s forwards;
}

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

/* Media Queries */
@media (max-width: 1100px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .hero-section {
    padding: 7rem 1.5rem 3rem;
  }

  .nav-container {
    flex-direction: row;
    position: relative;
    padding: 1.25rem 1.5rem;
  }
  
  .menu-toggle {
    display: block;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
  }
  
  nav ul {
    gap: 1.5rem;
    display: none;
    flex-direction: column;
    width: 100vw;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 2.5rem 1rem 3rem;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  }
  
  nav ul.active {
    display: flex;
  }
  
  nav ul li {
    text-align: center;
  }

  nav a {
    white-space: nowrap;
    font-size: 1.15rem;
  }
  
  .btn-nav {
    display: inline-block;
    padding: 0.7rem 2rem;
    margin-top: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .split-layout, .split-layout.reverse {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .section {
    padding: 4rem 1.5rem;
  }

  .products-grid, .dynamic-gallery, #lithophanie-gallery, #wine-gallery, #enfant-gallery, #pro-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .product-title {
    font-size: 0.95rem;
  }

  .product-price {
    font-size: 1rem;
  }

  .contact-actions {
    width: 100%;
  }

  .btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    width: 100%;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}
