/* ==== VARIABLES ==== */
:root {
  --color-primary: #4e342e; /* Marron Chocolat */
  --color-secondary: #d4a373; /* Doré Biscuit */
  --color-bg: #faf9f6; /* Crème */
  --color-bg-alt: #ffffff;
  --color-text: #3e2723;
  --color-text-light: #8d6e63;

  --font-heading: "Playfair Display", serif;
  --font-body: "Lato", sans-serif;

  --radius: 12px;
  --shadow: 0 10px 30px rgba(62, 39, 35, 0.08);
  --transition: all 0.3s ease;
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
}
img {
  max-width: 100%;
  display: block;
  height: auto;
}
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
ul {
  list-style: none;
}

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

/* ==== HEADER ==== */
.header {
  background: var(--color-bg-alt);
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  z-index: 1002;
  position: relative;
}
.logo span {
  color: var(--color-secondary);
}

.nav__list {
  display: flex;
  gap: 2rem;
}
.nav__link {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}
.nav__link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: var(--transition);
}
.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

/* Bouton Burger (Caché par défaut sur PC) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  z-index: 1002;
}
.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: 0.3s;
}

/* ==== HERO SECTION ==== */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  background: url("./assets/images/gateau.webp") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 0 1rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: 1rem;
}
.hero span {
  color: var(--color-secondary);
  font-style: italic;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* ==== PAGE HEADER (Pages internes) ==== */
.page-header {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("./assets/images/gateau.jpg") center/cover;
  padding: 6rem 0 4rem;
  text-align: center;
  color: white;
  margin-bottom: 3rem;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-secondary);
}

/* ==== SPLIT LAYOUT (Texte + Image) ==== */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% - 50% sur Desktop */
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}

/* ==== SERVICES ==== */
.services {
  margin-top: -50px;
  position: relative;
  z-index: 2;
  padding-bottom: 4rem;
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.service-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-10px);
}
.service-card__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ==== PRODUITS ==== */
.products {
  padding: 4rem 0;
}
.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--color-secondary);
  font-style: italic;
  margin-bottom: 3rem;
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: stretch;
}
.product-card {
  display: flex;
  flex-direction: column; /* Empile image, contenu, bouton */
  height: 100%;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}
.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}
.product-card__image {
  height: 250px;
  overflow: hidden;
  flex-shrink: 0;
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card__image img {
  transform: scale(1.1);
}
.product-card__content {
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.product-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}
.product-card p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.product-card__content .btn,
.product-card__content button {
  margin-top: auto; /* Pousse le bouton tout en bas de la carte */
  width: 100%;
}
/* ==== NEWSLETTER ==== */
.newsletter {
  background-color: var(--color-primary); /* Fond Chocolat */
  padding: 4rem 0;
  margin-top: 4rem; /* Espace avec la section précédente */
  color: white;
}

.newsletter__container {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Texte à gauche, Form à droite */
  gap: 3rem;
  background-image: radial-gradient(
    circle at right,
    rgba(212, 163, 115, 0.1),
    transparent 40%
  ); /* Petit effet de lumière subtil */
}

/* Le Texte */
.newsletter__text {
  flex: 1;
  max-width: 500px;
}

.newsletter h2 {
  color: var(--color-secondary); /* Titre Doré */
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.newsletter p {
  opacity: 0.9;
  font-size: 1.1rem;
}

/* Le Formulaire */
.newsletter__form {
  flex: 1;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1); /* Fond vitré léger */
  padding: 8px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter__form input {
  flex-grow: 1;
  padding: 12px 20px;
  border-radius: 30px;
  border: none;
  background: transparent;
  color: white;
  font-family: var(--font-body);
  outline: none;
}

.newsletter__form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter__form .btn {
  padding: 10px 25px;
  border-radius: 30px;
  border: none;
}

/* ==== BOUTONS ==== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--color-secondary);
  color: white;
}
.btn--primary:hover {
  background: white;
  color: var(--color-secondary);
}
.btn--outline {
  background: transparent;
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  padding: 8px 20px;
  margin-top: auto;
}
.btn--outline:hover {
  background: var(--color-secondary);
  color: white;
}

/* ==== FOOTER ==== */
.footer {
  background: #2d1b18;
  color: rgba(255, 255, 255, 0.7);
  padding-top: 4rem;
}
.footer__content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 3rem;
}
.footer__bottom {
  background: rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */

@media (max-width: 992px) {
  /* Tablette */
  .split-layout {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  /* MOBILE */

  /* 1. Header & Menu */
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 6rem 2rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
  }

  .nav.active {
    transform: translateX(0);
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .nav__link {
    font-size: 1.2rem;
    color: var(--color-primary);
  }

  /* Animation Burger */
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  /* 2. Layouts */
  .split-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .text-content h2,
  .text-content p {
    text-align: center !important;
  }

  .services {
    margin-top: 2rem;
  }

  /* 3. Newsletter Mobile */
  .newsletter__container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .newsletter__text {
    width: 100%;
  }

  .newsletter__form {
    width: 100%;
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
    gap: 1rem;
  }
  .newsletter__form input {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 100%;
    text-align: center;
  }
  .newsletter__form .btn {
    width: 100%;
  }

  /* 4. Footer Mobile */
  .footer__content {
    flex-direction: column;
    text-align: center;
  }
} /* <--- C'est cette accolade qui ferme le Responsive Mobile */
