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

.header {
  background: linear-gradient(45deg, #d6a6f9, #f9c5b4, #45b7d1, #96c93d);
  background-size: 600% 600%;
  animation: gradient 15s ease infinite;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Logo */
.logo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
}

/* Titre */
.site-title {
  font-weight: bold;
  font-size: 60px;
}

.site-subtitle {
  font-weight: bold;
  font-size: 30px;
}

/* Menu Burger */
.burger-menu {
  font-size: 2rem;
  cursor: pointer;
}

/* Navigation rapide */
.quick-nav {
  background-color: #e7c6ff;
  padding: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.nav-button {
  padding: 0.5rem 1rem;
  background-color: #4ecdc4;
  color: white;
  border: none;
  text-decoration: none;
  display: inline-block;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.nav-button:hover {
  background-color: #45b7d1;
}

.nav-button.is-current,
.side-nav-button.is-current {
  background-color: #45b7d1;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

/* Section héro avec photo + texte */
.hero-section {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin: 1.5rem 0;
  position: relative;
}

.hero-section + .hero-section {
  margin-top: 3rem;
  padding-top: 3rem;
}

.hero-section + .hero-section::before {
  content: "✿ ❁ ✿ ❁ ✿";
  position: absolute;
  top: -1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: #4ecdc4;
  font-size: 1.5rem;
  letter-spacing: 1rem;
}

.hero-section img {
  flex: 1;
  max-width: 50%;
  height: auto;
  border-radius: 5%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-section .text {
  flex: 1;
  font-size: 1.2rem;
  line-height: 1.6;
}

.hero-section h1 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.hero-section .main-layout {
  font-size: 1.2rem;
}

/* Séparateur */
.separator {
  margin: 2.5rem auto;
  text-align: center;
  position: relative;
  max-width: 600px;
  margin-top: 100px;
}

.separator::before,
.separator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background-color: #4ecdc4;
}

.separator::before {
  left: 0;
}

.separator::after {
  right: 0;
}

.separator span {
  background: #e7c6ff;
  padding: 0 20px;
  color: #4ecdc4;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Galerie d'images */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
  grid-auto-flow: dense;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  aspect-ratio: 1;
}

.gallery-item.landscape {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.gallery-item.portrait {
  grid-row: span 2;
  aspect-ratio: 3/4;
}

.gallery-item.big {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Side menu (off-canvas) */
.overlay {
  position: fixed;
  inset: 0;
  background-color: #e7c6ff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 40;
}

.overlay.open {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  right: -360px;
  top: 0;
  height: 100vh;
  width: 320px;
  max-width: 90%;
  background: #fff;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: right 0.3s ease;
  z-index: 50;
}

.side-menu.open {
  right: 0;
}

.side-menu .side-nav-button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 1rem;
  background: #4ecdc4;
  color: white;
  border: none;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

.side-menu .side-text {
  margin-top: auto;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.4;
  text-decoration: none;
}

/* Pied de page */
.footer {
  background-color: #333;
  color: white;
  padding: 2rem;
  text-align: center;
}

/* Contenu principal */
.main-content {
  background-color: #e7c6ff;
  max-width: 100%;
  /* remove external margin so nav/main/footer don't have an unintended gap */
  margin: 0 auto;
  /* use padding to control inner spacing */
  padding: 1.5rem 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Header adjustments */
  .header {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    align-items: center; /* center children (logo + title) */
  }

  .logo {
    width: 100px;
    height: 100px;
  }

  /* ensure logo image is centered */
  .logo img {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .site-title {
    font-size: 2.2rem;
  }

  .site-subtitle {
    font-size: 1.2rem;
  }

  .burger-menu {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
  }

  /* Navigation adjustments: stacked, left-aligned (same side)
     Note: nav kept edge-to-edge per request (only main content items get horizontal margins)
  */
  .quick-nav {
    padding: 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* same side (left) */
    gap: 0.5rem;
    border-radius: 8px;
  }

  .nav-button {
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    width: 100%;
    text-align: left;
    border-radius: 6px;
  }

  /* Main content adjustments: container has no horizontal margin; only its direct children get side margins */
  .main-content {
    padding: 1rem 0;
    margin: 0;
    border-radius: 0;
  }

  .main-content > * {
    margin: 0 1rem; /* horizontal breathing room for items inside main */
  }

  /* Hero section adjustments */
  .hero-section {
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
  }

  .hero-section img {
    max-width: 100%;
    order: -1; /* Always show image first on mobile */
  }

  .hero-section .main-layout {
    font-size: 1rem;
  }

  .hero-section + .hero-section {
    margin-top: 2rem;
    padding-top: 2rem;
  }

  .hero-section + .hero-section::before {
    font-size: 1.2rem;
    letter-spacing: 0.5rem;
  }

  /* Gallery adjustments */
  .gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-item.landscape,
  .gallery-item.big {
    grid-column: auto;
    aspect-ratio: 16/9;
  }

  .gallery-item.portrait {
    grid-row: auto;
    aspect-ratio: 3/4;
  }

  /* Separator adjustments */
  .separator {
    margin: 2rem auto;
    width: auto;
  }

  .separator span {
    font-size: 1rem;
    padding: 0 10px;
  }

  .separator::before,
  .separator::after {
    width: 25%;
  }

  /* Side menu adjustments */
  .side-menu {
    width: 280px;
  }
}
