:root {
  --primary: #111;
  --accent: #d4af37;
  --bg: #f5f5f5;
  --text: #1a1a1a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #f5f5f5;
    --accent: #c9a236;
    --bg: #121212;
    --text: #f5f5f5;
  }
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

header {
  background: 
    linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
    url("images/texture-bois-dore.jpg") center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 3px solid #d4af37;
}

header img {
  height: 50px;
  width: auto;
  border-radius: 8px;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 600;
  position: relative;
  background: linear-gradient(90deg, #d4af37, #fff4b1, #d4af37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200%;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  padding: 2rem 3%;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 1s ease forwards;
}

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

.config-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  text-decoration: none;
  color: white;
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 0.7s ease forwards;
}

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

.config-card:nth-child(1) { animation-delay: 0.2s; }
.config-card:nth-child(2) { animation-delay: 0.4s; }
.config-card:nth-child(3) { animation-delay: 0.6s; }
.config-card:nth-child(4) { animation-delay: 0.8s; }
.config-card:nth-child(5) { animation-delay: 1s; }

.config-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.config-card:hover img { transform: scale(1.08); }

.config-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0.05));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 1.2rem;
}

.overlay h3 {
  font-size: 1.4rem;
  color: var(--accent);
}

.overlay p {
  font-size: 0.95rem;
  color: #f1f1f1;
  margin-top: 0.3rem;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  background-color: #fff;
  border-top: 1px solid #eee;
  color: #555;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

/* WhatsApp bubble */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 999;
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Retour à la liste des configurateurs */
.back-home {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--accent);
  color: #111;
  padding: 0.6rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  z-index: 999;
}

.back-home.show {
  opacity: 1;
  transform: translateY(0);
}

.back-home:hover {
  transform: translateY(-3px);
  background: #fff4b1;
}