* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: #f4f6f8;
  color: #1e293b;
}

.top-bar {
  width: 100%;
  padding: 15px 40px;
  background: #0f172a;
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
}

.search {
  flex: 1;
  padding: 10px 14px;
  border-radius: 6px;
  border: none;
  outline: none;
}

nav a {
  color: #e5e7eb;
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.95rem;
}

nav a:hover {
  color: #38bdf8;
}

.hero-slider {
  position: relative;
  height: 80vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
  z-index: 1;
}

.slide-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 2;
   opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-content.show {
  opacity: 1;
  transform: translateY(0,0);
}

/* Directions initiales */
.slide-content[data-direction="top"] {
  transform: translateY(-100px);
}
.slide-content[data-direction="left"] {
  transform: translateX(-500px);
}
.slide-content[data-direction="right"] {
  transform: translateX(100px);
}
.slide-content[data-direction="center"] {
  transform: scale(0.8);
}

.slide-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.slide-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.6);
}

.btn-primary {
  padding: 12px 28px;
  background-color: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s;
}

.btn-primary:hover {
  background-color: #1e4bb8;
}

.services {
  padding: 80px 40px;
  text-align: center;
}

.services h2 {
  font-size: 2rem;
  margin-bottom: 50px;
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.card {
  background: #0f172a;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-6px);
}

.card h3 {
  margin-bottom: 10px;
  color: white;
}

.footer {
  background: #0f172a;
  color: #e5e7eb;
  font-family: "Segoe UI", sans-serif;
  padding: 60px 20px 30px;
  line-height: 1.6;
}

.footer a {
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section {
  flex: 1 1 220px;
}

.footer-section h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #ffffff;
  position: relative;
}

.footer-section h4::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: #38bdf8;
  margin-top: 5px;
  border-radius: 2px;
}

.footer-section p,
.footer-section ul li {
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.socials {
  margin-top: 10px;
}

.socials a {
  margin-right: 10px;
  display: inline-block;
  transition: transform 0.2s;
}

.socials a:hover {
  transform: scale(1.2);
}

.socials img {
  width: 28px;
  height: 28px;
}

.footer-bottom {
  border-top: 1px solid #475569;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

.footer-bottom a {
  margin: 0 5px;
  color: #38bdf8;
}

.footer-bottom a:hover {
  color: #60a5fa;
}

/* ===============================
   MEDIA QUERY GLOBALE - MOBILE
=============================== */
@media screen and (max-width: 768px) {

  /* Top-bar : menu empilé + padding réduit */
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 20px;
  }
  .top-bar nav {
    width: 100%;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .slide-content h1 {
    font-size: 2rem;
  }
  .slide-content p {
    font-size: 1rem;
  }

  /* Catalogue : padding réduit */
  .catalogue { padding: 20px 10px; }

  /* Grille produits : 1 colonne */
  .products { grid-template-columns: 1fr; gap: 15px; }

  /* Product-card : texte plus petit, image auto */
  .product-card img { height: auto; }
  .product-card h3 { font-size: 1rem; }
  .product-card p { font-size: 0.85rem; }
  .product-card .price { font-size: 0.9rem; }

  /* Buttons : padding réduit */
  .add-cart-btn, .cta button, .cart-footer button {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  /* Cart : largeur adaptative, modal sur mobile */
  #cart { width: 90%; right: -100%; }
  #cart.active { right: 5%; }

  /* Toast : réduit taille et padding */
  #toast { padding: 8px 15px; font-size: 0.85rem; top: 10px; right: 10px; }

  /* Modal : largeur réduite */
  .modal-content { width: 90%; padding: 15px; }
  .modal-content input { font-size: 0.9rem; padding: 8px; }

  /* Footer : colonne unique */
  .footer-top { flex-direction: column; gap: 20px; }
}
