/* style.css - VERSION MOBILE AMÉLIORÉE */

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

body, html {
  font-family: 'Segoe UI', sans-serif;
  height: 100%;
  overflow-x: hidden;
}

/* ============ ALERT POP-UP ============ */
.alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

.alert-modal {
  background: #fdfaf3;
  border-radius: 16px;
  max-width: 420px;
  width: min(420px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.15);
  padding: 1.5rem 1.75rem;
  position: relative;
  border: 1px solid rgba(132, 140, 62, 0.15);
  animation: slideUp 0.22s ease;
}

.alert-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #5a5a50;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.alert-close:hover {
  color: #b12a24;
  transform: scale(1.05);
}

.alert-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
  color: #2f2a1f;
  font-size: 1.15rem;
}

.alert-badge {
  background-color: #848C3E;
  color: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  letter-spacing: 0.4px;
}

.alert-body {
  margin: 0 0 1rem;
  color: #4b4a42;
  line-height: 1.6;
}

.alert-actions {
  display: flex;
  justify-content: flex-end;
}

.alert-primary {
  background-color: #848C3E;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.alert-primary:hover {
  background-color: #b12a24;
  transform: translateY(-1px);
}

.xmas-modal {
  position: relative;
  overflow: hidden;
  background: #fef9f3;
  border: 1px solid rgba(177, 42, 36, 0.18);
}

.xmas-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(177, 42, 36, 0.25)),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.6), transparent 40%),
    url("../img/siteAccueil/nemPorc.png") center/cover no-repeat;
  opacity: 0.35;
  z-index: 0;
}

.xmas-modal > * {
  position: relative;
  z-index: 1;
}

.alert-list {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1rem;
  overflow-y: auto;
  max-height: 42vh;
  padding-right: 0.25rem;
  color: #3a372f;
  font-weight: 600;
}

.alert-list span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(132, 140, 62, 0.08);
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
}

.alert-overlay.is-hidden {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ============ HEADER ============ */
header {
  background-color: #f7f6ec;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo img {
  height: 50px;
  width: auto;
}

/* Navigation Desktop */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  transition: right 0.3s ease;
}

nav a {
  color: #848C3E;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #b12a24;
}

/* Burger Menu - Caché par défaut */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
  transition: transform 0.3s ease;
}

.burger span {
  height: 3px;
  width: 25px;
  background-color: #848C3E;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animation du burger en X */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ============ HERO SECTION ============ */
.hero {
  position: relative;
  min-height: 25vh;
  background-image: url(../img/siteAccueil/accueil.jpeg);
  background-size: cover;
  background-position: center center;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 41, 45, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 90%;
  padding: 1rem;
}

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

.hero-content .highlight {
  color: #ffd54f;
  font-weight: bold;
}

.hero-content h2 {
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

.hero-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.btn {
  background-color: #848C3E;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 20px;
  display: inline-block;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #b12a24;
}

/* ============ SECTION ABOUT ============ */
.about {
  background-color: #faf6ee;
  padding: 4rem 2rem;
}

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

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text h2 {
  font-size: 2rem;
  color: #848C3E;
  margin-bottom: 1rem;
}

.about-text h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #333;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 1.5rem;
}

.about-image {
  flex: 1;
  min-width: 300px;
}

.about-image img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-outline {
  display: inline-block;
  border: 2px solid #848C3E;
  color: #848C3E;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.3s;
}

.btn-outline:hover {
  background-color: #848C3E;
  color: #fff;
}

/* ============ SECTION PRODUITS ============ */
.products {
  background-color: #faf6ee;
  padding: 4rem 2rem;
  text-align: center;
}

.products h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #848C3E;
}

/* Container pour le carrousel */
.carousel-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Dots de navigation mobile */
.carousel-dots {
  display: none;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.dot.active {
  width: 24px;
  border-radius: 4px;
  background: #848C3E;
}

/* Grille produits - Desktop */ 
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem 1rem;
}

/* Carrousel mobile */
@media (max-width: 768px) {
  .carousel-dots {
    display: flex;
  }

  .product-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 1rem;
    padding: 0 1rem;
  }

  .product-grid::-webkit-scrollbar {
    display: none;
  }

  .product-card {
    flex: 0 0 85%;
    min-width: 280px;
    scroll-snap-align: start;
  }
}

.product-card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
  text-align: left;
}

.product-info h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: #222;
}

.product-info p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.product-info strong {
  font-size: 1.3rem;
  color: #848C3E;
}

.product-info span {
  font-size: 0.9rem;
  color: #888;
}

/* ============ WHY US ============ */
.why-us {
  background-color: #FBF6EE;
  color: #848C3E;
  text-align: center;
  padding: 3rem 1rem;
}

.why-us h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.reason {
  width: 100%;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reason img {
  width: 60px;
  margin-bottom: 0.5rem;
}

.reason p {
  font-size: 0.9rem;
  text-align: center;
}

/* ============ CTA MAP ============ */
.cta-map {
  background-color: #faf6e9;
  text-align: center;
  padding: 3rem 1rem;
}

.cta-map h2 {
  font-size: 1.8rem;
  color: #848C3E;
  margin-bottom: 1rem;
}

.cta-map p {
  font-size: 1rem;
  color: #333;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.map-container {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ============ FOOTER ============ */
footer {
  background-color: #F3EFE0;
  padding: 3rem 2rem 1.5rem;
  color: #6b7545;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  margin-bottom: 2rem;
}

.footer-logo img {
  height: 80px;
  width: auto;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #d4cdb8;
}

.footer-nav a {
  color: #6b7545;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: #4a5230;
}

.footer-info {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-info div {
  color: #6b7545;
  font-size: 0.95rem;
}

.footer-info a {
  color: #6b7545;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-info a:hover {
  color: #4a5230;
  text-decoration: underline;
}

/* ============================================
   RESPONSIVE MOBILE & TABLETTE
   ============================================ */

/* Tablette */
@media (max-width: 768px) {
  header {
    padding: 1rem 1.5rem;
  }

  /* Afficher le burger */
  .burger {
    display: flex;
  }

  /* Cacher et repositionner la navigation */
  nav ul {
    position: fixed;
    top: 70px;
    right: -100%;
    background-color: #f7f6ec;
    flex-direction: column;
    width: 70%;
    max-width: 300px;
    height: calc(100vh - 70px);
    padding: 2rem 1rem;
    gap: 1.5rem;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
  }

  nav ul.active {
    right: 0;
  }

  nav li {
    width: 100%;
    text-align: center;
  }

  nav a {
    font-size: 1.1rem;
    padding: 0.5rem;
    display: block;
  }

  /* Hero responsive */
  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content h2 {
    font-size: 1.3rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero {
    min-height: 75vh;
    height: auto;
    padding: 5rem 1.5rem 4rem;
    background-position: center 35%;
  }

  .hero-content {
    max-width: 520px;
  }

  /* About section */
  .about {
    padding: 3rem 1.5rem;
  }

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

  .about-text h2 {
    font-size: 1.6rem;
  }

  /* Produits en grille pour tablette */
  .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
  }

  .product-card {
    min-width: unset;
    scroll-snap-align: unset;
  }

  /* Reasons */
  .reasons {
    gap: 1.5rem;
  }

  /* Footer */
  .footer-logo img {
    height: 60px;
  }

  .footer-nav {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .footer-info {
    flex-direction: column;
    gap: 1rem;
  }

  /* Alerte / popup small devices */
  .alert-modal {
    padding: 1.2rem 1.1rem;
    max-width: 360px;
    max-height: 88vh;
  }

  .alert-header {
    font-size: 1rem;
  }

  .alert-body {
    font-size: 0.95rem;
  }

  .alert-list {
    max-height: 40vh;
  }

}

/* Mobile */
@media (max-width: 640px) {
  header {
    padding: 0.8rem 1rem;
  }

  .logo img {
    height: 40px;
  }

  nav ul {
    width: 85%;
    top: 60px;
    height: calc(100vh - 60px);
  }

  /* Hero très petit écran */
  .hero {
    min-height: 70vh;
    height: auto;
    padding: 4rem 1.25rem 3rem;
    background-position: center 40%;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content h2 {
    font-size: 1.1rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }

  /* About */
  .about {
    padding: 2rem 1rem;
  }

  .about-text h2 {
    font-size: 1.4rem;
  }

  .about-text h3 {
    font-size: 1.2rem;
  }

  .about-text p {
    font-size: 0.95rem;
  }

  /* Produits en 1 colonne */
  .products {
    padding: 3rem 1rem;
  }

  .products h2 {
    font-size: 1.6rem;
  }

  .product-grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 85vw;
    gap: 1rem;
    padding: 0 0.75rem 1.25rem;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
  }

  .product-card {
    min-width: 85vw;
    scroll-snap-align: start;
  }

  .product-card img {
    height: 180px;
  }

  .product-info {
    padding: 1rem;
  }

  /* Why us */
  .why-us {
    padding: 2rem 1rem;
  }

  .why-us h2 {
    font-size: 1.6rem;
  }

  .reasons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reason {
    width: 100%;
    max-width: 200px;
  }

  /* CTA Map */
  .cta-map {
    padding: 2rem 1rem;
  }

  .cta-map h2 {
    font-size: 1.4rem;
  }

  .cta-map p {
    font-size: 0.9rem;
  }

  /* Footer */
  footer {
    padding: 2rem 1rem 1rem;
  }

  .footer-nav {
    gap: 1rem;
  }

  .footer-nav a {
    font-size: 0.9rem;
  }

  .footer-info div {
    font-size: 0.85rem;
  }
}

/* ============ POPUP FLYER ============ */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

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

.popup-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.popup-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.popup-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.popup-close:hover {
  background: #f0f0f0;
}

/* ============ BOUTON COMMANDER ============ */
.cta-order {
  text-align: center;
  padding: 40px 20px;
  background-color: #faf6ee;
}

.cta-order .btn-order {
  display: inline-block;
  padding: 18px 50px;
  background: #848C3E;
  color: #fff;
  font-size: 1.3rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.cta-order .btn-order:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  background: #6b7232;
}
