/* Reset et variables globales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #8B2635;
  --secondary-color: #D4B996;
  --accent-color: #2C1810;
  --text-light: #F5F3F0;
  --text-dark: #2C1810;
  --gradient: linear-gradient(135deg, #8B2635 0%, #D4B996 100%);
  --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

body {
  font-family: 'Georgia', serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--text-light);
  overflow-x: hidden;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
  padding: 1rem 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(139, 38, 53, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  position: relative;
  z-index: 10000;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  z-index: 10001;
  position: relative;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  z-index: 10001;
  position: relative;
}

.nav-links li {
  position: relative;
  z-index: 10001;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  z-index: 10001;
  display: block;
  padding: 0.5rem 0;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
  z-index: 10001;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  height: 100vh;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  z-index: 2;
  position: relative;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 300;
  letter-spacing: 2px;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 3rem;
  line-height: 1.8;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: rgba(255,255,255,0.2);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.3s ease;
  font-weight: 600;
  animation: fadeInUp 1s ease-out 0.9s both;
  position: relative;
  z-index: 2;
}

.cta-button:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Particles */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.particles div {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  z-index: 1;
}

/* Sections communes */
.section {
  padding: 5rem 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  position: relative;
  z-index: 10;
}

.section-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--primary-color);
  position: relative;
  z-index: 10;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--secondary-color);
  z-index: 10;
}

/* Biography */
.biography {
  background: #f8f6f3;
  position: relative;
  z-index: 10;
}

.bio-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 10;
}

.bio-photo {
  position: relative;
  z-index: 10;
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--gradient);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.photo-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  animation: shimmer 2s infinite;
  z-index: 11;
}

.bio-text {
  font-size: 1.1rem;
  line-height: 1.8;
  position: relative;
  z-index: 10;
}

.bio-text h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.bio-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  position: relative;
  z-index: 10;
}

.highlight-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 10;
}

.highlight-card:hover {
  transform: translateY(-5px);
}

.highlight-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Œuvres */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  position: relative;
  z-index: 10;
}

.work-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.work-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.work-image {
  height: 300px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: all 0.3s ease;
}

.work-image:hover img {
  transform: scale(1.05);
}

/* Fallback pour les images manquantes */
.work-image img[alt]:after {
  content: attr(alt);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-light);
  background: var(--gradient);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  font-size: 1rem;
  white-space: nowrap;
}

.work-content {
  padding: 2rem;
  position: relative;
  z-index: 10;
}

.work-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.work-year {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.work-description {
  line-height: 1.6;
  color: #666;
}

/* Exposition de livres */
.book-exhibition {
  background: var(--accent-color);
  color: var(--text-light);
  position: relative;
  z-index: 10;
}

.exhibition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  position: relative;
  z-index: 10;
}

.book-display {
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.book-display:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.05);
}

.book-cover {
  width: 150px;
  height: 200px;
  background: var(--gradient);
  margin: 0 auto 1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  position: relative;
  z-index: 10;
}

/* Contact */
.contact {
  background: #f8f6f3;
  position: relative;
  z-index: 10;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  position: relative;
  z-index: 10;
}

.contact-info {
  font-size: 1.1rem;
  line-height: 1.8;
  position: relative;
  z-index: 10;
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 10;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 10;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #eee;
  border-radius: 10px;
  font-family: inherit;
  transition: border-color 0.3s ease;
  position: relative;
  z-index: 10;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.submit-btn {
  background: var(--gradient);
  color: var(--text-light);
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  position: relative;
  z-index: 10;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Footer */
.footer {
  background: var(--accent-color);
  color: var(--text-light);
  text-align: center;
  padding: 2rem 0;
  position: relative;
  z-index: 10;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 10;
}

.social-links a {
  color: var(--text-light);
  font-size: 1.5rem;
  transition: color 0.3s ease;
  position: relative;
  z-index: 10;
}

.social-links a:hover {
  color: var(--secondary-color);
}

/* Section customizable */
.customizable-section {
  background: linear-gradient(135deg, #f8f6f3 0%, #fff 100%);
  border: 2px dashed var(--secondary-color);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  margin: 2rem 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.customizable-section:hover {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, #fff 0%, #f8f6f3 100%);
}

.customizable-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.customizable-section p {
  color: #666;
  font-style: italic;
}

/* Hamburger menu */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
  position: relative;
  z-index: 10002;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); opacity: 0.3; }
  50% { transform: translateY(-20px); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: block !important;
    z-index: 10002 !important;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 80%;
    height: calc(100vh - 70px);
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 10001 !important;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 1rem 0;
    z-index: 10001;
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 1rem;
    z-index: 10001;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

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

  .section-title {
    font-size: 2rem;
  }

  .bio-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .exhibition-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .bio-highlights {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem 0;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .cta-button {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
  }
}

/* --- Carousel --- */
.gallery {
  background: #fff;
}
.carousel {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}

.carousel-track {
  display: flex;
  will-change: transform;
  transition: transform 500ms ease;
  touch-action: pan-y;
}

.carousel-slide {
  min-width: 100%;
  height: clamp(220px, 55vh, 640px);
  position: relative;
  display: flex; /* flex pour centrer facilement */
  align-items: center;
  justify-content: center;
  background: #111; /* fond neutre */
  overflow: hidden;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;       /* image entière visible */
  object-position: center;   /* centrée dans le slide */
  display: block;
  filter: saturate(1.05) contrast(1.02);
}

.carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
          180deg,
          rgba(0,0,0,0.25) 0%,
          rgba(0,0,0,0) 50%,
          rgba(0,0,0,0.35) 100%
  );
  pointer-events: none;
}


.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s, transform 0.2s;
}

.carousel-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-50%) scale(1.05); }
.carousel-btn:active { transform: translateY(-50%) scale(0.98); }

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 6;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: transform .2s, background .2s;
}

.carousel-dot[aria-selected="true"] {
  background: #fff;
  transform: scale(1.3);
}

@media (max-width: 768px) {
  .carousel-btn { width: 38px; height: 38px; }
}


/* responsive */

/* =============================
   ✨ Enhancements: Mobile-first responsive tweaks
   ============================= */

/* Layout helpers */
:root {
  --container-max: 1200px;
  --gutter: 2rem;
  --navH: 72px;
}

.nav {
  padding-block: 0.75rem;
  padding-top: calc(env(safe-area-inset-top, 0px) + 0.5rem);
}

.nav-container {
  max-width: var(--container-max);
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Ensure anchors do not hide under the fixed nav */
.section,
.hero,
.biography,
.gallery,
.book-exhibition,
.contact {
  scroll-margin-top: calc(var(--navH) + 12px);
}

/* Fluid typography */
.hero h1 {
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.1;
}
.hero-subtitle { font-size: clamp(1rem, 3.5vw, 1.5rem); }
.section-title { font-size: clamp(1.6rem, 5.5vw, 3rem); }
.bio-text { font-size: clamp(1rem, 2.8vw, 1.1rem); }

/* Hero sizing on small screens */
.hero {
  min-height: 90svh; /* better on mobile safe areas */
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Images: always shrink to fit */
img, picture, video, canvas {
  max-width: 100%;
  height: auto;
}

/* Work cards: consistent media height */
.work-image { height: clamp(200px, 38vw, 300px); }

/* Contact form/buttons spacing on small screens */
.submit-btn { margin-top: 0.5rem; }

/* Carousel: make sure the track uses full width and images stay visible */
.carousel {
  width: 100%;
  border-radius: clamp(10px, 3vw, 20px);
}
.carousel-slide {
  height: clamp(200px, 60svh, 640px);
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Better grid collapse points */
.bio-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3.5vw, 2rem);
}
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3.5vw, 2rem);
}

/* Tablet and up */
@media (min-width: 769px) {
  .bio-content {
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
  }
  .contact-content {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* Fine-tune small phones */
@media (max-width: 480px) {
  .logo { font-size: 1.4rem; }
  .cta-button { padding: 0.7rem 1.4rem; font-size: 0.95rem; }
  .work-content { padding: 1.25rem; }
  .book-cover { width: 130px; height: 180px; }
}

/* Ultra-small devices */
@media (max-width: 360px) {
  .hero-description { font-size: 0.95rem; }
  .nav-links a { font-size: 1.05rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .carousel-track { transition: none !important; }
}
