*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: #fffefe;
    color:  #0a0a0a;
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.5px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box; 
    padding: 20px 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(248, 241, 241, 0));
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: space-between; 
    align-items: center; 
}
header nav ul {
    display: flex;
    justify-content: center;
    gap: 40px;   
    padding: 0;
    margin: 0;
}

header nav a {
    color: #0a0a0a;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

header nav a:hover {
    color: #0a0a0a;
    border-bottom-color: #0a0a0a;
}

header nav li {
    list-style: none;
}

.social-links {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 0; 
}

.social-icon {
    color: #111111;
    font-size: 1.2rem;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    opacity: 0.5;
    transform: translateY(-2px);
}

body:not(.gallery-page) section {
    min-height: 100vh;
    padding: 120px 40px 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#name {
    font-family: 'Playfair Display', 'Georgia', serif; /* Police élégante */
    font-size: 1.1rem;
    font-weight: 500;
    color: #111111;
    text-decoration: none;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

#name:hover {
    opacity: 0.7;
}

body:not(.gallery-page) section h2 {
    font-size: 32px;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: #0a0a0a;
}

.gallery-grid {
  display: grid;
 grid-template-columns: repeat(2, 1fr);
  column-gap: 3rem; 
  row-gap: 7rem; 
  align-items: start;
}

.gallery-item {
  position: relative;
  background-color: #ffffff; 
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;}
 

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  #gallery{
    padding: 3rem 1rem;
  }
}

.hero-image {
    max-width: 100%;
    height: auto;
    margin-top: 20px;
    border-radius: 8px;
}

#seeMoreBtn {
  display: inline-block;
  border-radius: 0px; 
  background-color: #111111;
  color: #ffffff;
  border: 1px solid #111111;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  padding: 14px 28px;
  font-family: 'Helvetica Neue', 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

#seeMoreBtn:hover {
  background-color: transparent;
  color: #111111;
}

a {
    text-decoration: none;
    color: inherit;
}

body.gallery-page main {
  padding-top: 76px;
}

body.gallery-page #gallery,
body.gallery-page .series-gallery {
  min-height: calc(100vh - 76px);
  padding: 48px clamp(20px, 6vw, 88px) 72px;
}

body.gallery-page #gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 28px;
}

body.gallery-page #gallery > h1 {
  grid-column: 1 / -1;
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

body.gallery-page .series-card {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background: #e9e6e3;
  cursor: pointer;
  isolation: isolate;
}

body.gallery-page .series-card::after {
  position: absolute;
  z-index: 0;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  content: "";
  pointer-events: none;
}

body.gallery-page .series-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

body.gallery-page .series-card:hover img,
body.gallery-page .series-card:focus-visible img {
  transform: scale(1.035);
}

body.gallery-page .series-card:focus-visible,
body.gallery-page .close-button:focus-visible {
  outline: 2px solid #111;
  outline-offset: 4px;
}

body.gallery-page .series-info {
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: 24px;
  left: 24px;
  color: #fff;
  text-align: left;
}

body.gallery-page .series-info h2 {
  margin-bottom: 8px;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-weight: 400;
}

body.gallery-page .series-info p,
body.gallery-page .series-header p {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

body.gallery-page .series-gallery {
  display: block;
}

body.gallery-page .series-header {
  position: relative;
  top: auto;
  left: auto;
  z-index: auto;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 auto 48px;
  padding: 0 100px;
  background: transparent;
  backdrop-filter: none;
  text-align: center;
}

body.gallery-page .series-header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 300;
  letter-spacing: 0.08em;
}

body.gallery-page .series-header p {
  color: #666;
}

body.gallery-page .close-button {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 16px;
  border: 1px solid #111;
  background: transparent;
  color: #111;
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.gallery-page .close-button:hover {
  background: #111;
  color: #fff;
}

body.gallery-page .series-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: clamp(24px, 5vw, 72px);
  row-gap: 64px;
}

body.gallery-page .gallery-item {
  min-width: 0;
  background: transparent;
}

body.gallery-page .image-wrapper {
  overflow: hidden;
  background: #f0eeec;
}

body.gallery-page .gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

body.gallery-page .gallery-item:hover img {
  transform: scale(1.015);
}

body.gallery-page .cartel {
  padding-top: 14px;
  text-align: left;
  line-height: 1.6;
}

body.gallery-page .cartel-title {
  font-size: 0.95rem;
}

body.gallery-page .cartel-details {
  margin-top: 5px;
  color: #666;
  font-size: 0.82rem;
}

body.gallery-page [hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  body.gallery-page main {
    padding-top: 68px;
  }

  body.gallery-page #gallery,
  body.gallery-page .series-gallery {
    min-height: calc(100vh - 68px);
    padding: 36px 20px 48px;
  }

  body.gallery-page #gallery {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  body.gallery-page #gallery > h1 {
    margin-bottom: 8px;
  }

  body.gallery-page .series-card,
  body.gallery-page .series-card img {
    min-height: 260px;
  }

  body.gallery-page .series-images {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  body.gallery-page .series-header {
    margin-bottom: 32px;
    padding: 56px 0 0;
  }

  body.gallery-page .close-button {
    top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.gallery-page *,
  body.gallery-page *::before,
  body.gallery-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
