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

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-light: #777777;
  --color-border: #f0f0f0;
  --font-primary: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  --mobile-header-height: 56px;
}

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

.container {
  display: flex;
  min-height: 100vh;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--mobile-header-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.mobile-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger → X quand ouvert */
.sidebar-open .hamburger span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.sidebar-open .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.sidebar-open .hamburger span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ===== OVERLAY (fond sombre) ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 900;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 280px;
  background: var(--color-bg);
  padding: 60px 40px;
  border-right: 1px solid var(--color-border);
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 950;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  margin-bottom: 60px;
}

.site-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  line-height: 1;
}

.site-subtitle {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.nav-item {
  background: none;
  border: none;
  padding: 14px 0;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  position: relative;
  border-bottom: 1px solid transparent;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: width 0.4s ease;
}

.nav-item:hover {
  color: var(--color-text);
}
.nav-item:hover::after {
  width: 30%;
}
.nav-item.active {
  color: var(--color-text);
}
.nav-item.active::after {
  width: 30%;
  background: var(--color-text);
}

.sidebar-footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.social-link {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.social-link:hover {
  color: var(--color-text);
}

.social-link svg {
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.social-link:hover svg {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* ===== MAIN CONTENT ===== */

.main-content {
  margin-left: 280px;
  flex: 1;
  width: calc(100% - 280px);
}

.section {
  display: none;
  padding: 40px 60px;
}

.section.active {
  display: block;
  animation: fadeInSection 0.45s ease forwards;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  line-height: 1.2;
}

.section-header p {
  font-size: 12px;
  color: var(--color-text-light);
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* ===== GALERIE MASONRY ===== */

.gallery-grid {
  columns: 3;
  column-gap: 50px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 50px;
  width: 100%;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.6s ease;
}

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

/* ===== MARIAGE ===== */

.video-item {
  position: relative;
}

.video-item a {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  color: #e74c3c;
  transition: all 0.3s ease;
}

.video-item:hover .video-play-button {
  background: rgba(255, 255, 255, 1);
  transform: translate(-50%, -50%) scale(1.1);
}

#mariage .video-portfolio {
  max-width: 1200px;
  margin: 60px auto 0;
  padding-left: 40px;
}

#mariage .video-item {
  position: relative;
  margin-bottom: 80px;
}

#mariage .video-link {
  display: flex;
  align-items: center;
  gap: 50px;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 2;
}

#mariage .video-thumb {
  flex: 0 0 480px;
  height: 270px;
  overflow: hidden;
  position: relative;
}

#mariage .video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

#mariage .video-link:hover img {
  transform: scale(1.05);
}

#mariage .video-play-button {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

#mariage .video-text {
  max-width: 420px;
}

#mariage .video-text h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

#mariage .video-text p {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
}

#mariage .background-band {
  position: absolute;
  top: 50%;
  left: 260px;
  transform: translateY(-50%);
  width: calc(100vw - 260px);
  height: 320px;
  background: #f6e7d8;
  z-index: 1;
}
#mariage .video-item--reverse .video-link {
  flex-direction: row;
}

#mariage .video-item--reverse .background-band {
  background: #ede7f6;
  left: -9.3%;
  right: auto;
  width: 80%;
}

#mariage .video-item--reverse .video-text {
  order: 1;
  text-align: left;
  padding-left: 0;
  padding-right: 50px;
}

#mariage .video-item--reverse .video-thumb {
  order: 2;
}

#mariage .video-item {
  margin-bottom: 120px;
}

/* ===== LIGHTBOX ===== */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.lightbox.active {
  display: flex;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  color: var(--color-text);
  font-size: 32px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 300;
  line-height: 1;
}

.lightbox-close {
  position: fixed;
  top: 15px;
  right: 25px;
  z-index: 2100;
  background: transparent;
  border: none;
  color: #000000;
  font-size: 60px;
  font-weight: 100;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: block;
  outline: none;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 0.5;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* ===== RESPONSIVE 1200px ===== */

@media (max-width: 1200px) {
  .sidebar {
    width: 240px;
    padding: 40px 30px;
  }

  .main-content {
    margin-left: 240px;
    width: calc(100% - 240px);
    height: 100vh;
    overflow-y: auto;
  }

  .section {
    padding: 40px 50px;
  }
  .gallery-grid {
    columns: 2;
    column-gap: 16px;
  }
  .section-header h2 {
    font-size: 28px;
  }
}

@media (max-width: 900px) {
  #mariage .video-link {
    flex-direction: column;
    align-items: flex-start;
  }

  #mariage .background-band {
    width: 100%;
    left: 0;
    height: 100%;
  }

  #mariage .video-thumb {
    width: 100%;
    height: 220px;
  }
}

/* ===== RESPONSIVE MOBILE (≤ 768px) ===== */

@media (max-width: 768px) {
  /* Affiche le header mobile */
  .mobile-header {
    display: flex;
  }

  /* La sidebar se transforme en tiroir latéral */
  .sidebar {
    width: 260px;
    padding: 80px 30px 40px;
    transform: translateX(-100%);
    /* masquée par défaut */
    border-right: 1px solid var(--color-border);
    box-shadow: none;
  }

  /* Sidebar visible */
  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
  }

  /* Overlay visible */
  body.sidebar-open .sidebar-overlay {
    display: block;
    opacity: 1;
  }

  /* Le contenu principal commence sous le header fixe */
  .main-content {
    margin-left: 0;
    width: 100%;
    padding-top: var(--mobile-header-height);
  }

  .section {
    padding: 24px 16px 40px;
  }

  .gallery-grid {
    columns: 2;
    column-gap: 10px;
  }
  .gallery-item {
    margin-bottom: 10px;
  }

  .section-header {
    margin-bottom: 20px;
  }
  .section-header h2 {
    font-size: 24px;
  }
  .section-header p {
    font-size: 12px;
  }

  /* Vidéos mariage */
  #mariage .video-portfolio {
    padding-left: 0;
    margin-top: 20px;
  }
  #mariage .video-item {
    margin-bottom: 50px;
  }
  #mariage .video-thumb {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  #mariage .video-link {
    flex-direction: column;
    gap: 16px;
  }
  #mariage .video-item--reverse .video-link {
    flex-direction: column;
  }
  #mariage .video-item--reverse .video-text {
    order: 0;
    padding-right: 0;
  }
  #mariage .video-item--reverse .video-thumb {
    order: 0;
  }
  #mariage .background-band {
    display: none;
  }
  #mariage .video-text {
    max-width: 100%;
  }
  #mariage .video-text h3 {
    font-size: 1.4rem;
  }

  /* Lightbox mobile */
  .lightbox {
    padding: 10px;
  }
  .lightbox-prev {
    left: 6px;
  }
  .lightbox-next {
    right: 6px;
  }
  .lightbox-close {
    right: 10px;
    top: 10px;
    font-size: 44px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    columns: 1;
  }
}

/* ===== SWIPE HINT (indicateur discret) ===== */
@media (max-width: 768px) {
  .main-content {
    touch-action: pan-y;
  }
}

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