
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Times New Roman;
  background: #f8f8f8;
  color: #222;
  text-align: center;
  overflow-x: hidden; 
}

section {
  padding: 40px 15px;
  max-width: 1200px;
  margin: auto;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

button {
  background: #000;
  color: #fff;
  border: none;
  padding: 12px 25px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  width: auto;
}

button:hover {
  background: #444;
}

header {
  background: #856526;
  color: white;
  padding: 10px 3%; 


  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;

  gap: 10px;        
  flex-wrap: nowrap; 
  width: 100%;

}

header img.logo {

  width: 20vw;
  max-width: 450px;
  min-width: 80px;  
  height: auto;
  flex-shrink: 0;  

  animation: fadeInZoom 1.2s ease-out, breathe 3s ease-in-out 1.2s infinite;
  transition: transform 0.3s ease;

}

header img.logo:hover {
  transform: scale(1.05);
}

.texte-header {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  text-align: left;
  padding-left: 8px;
  min-width: 0; 
}


.texte-header h1 {
  font-size: clamp(0.9rem, 4vw, 2.5rem);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.texte-header h2 {
  font-size: clamp(0.75rem, 2.5vw, 1.4rem);
  margin: 3px 0;
  font-weight: normal;
  white-space: nowrap;
}

.texte-header p {
  font-size: clamp(0.65rem, 2vw, 1rem);
  font-style: italic;
  margin-top: 3px;
  margin-bottom: 0;
  white-space: nowrap;
}


.texte-header h1,
.texte-header h2,
.texte-header p {
  opacity: 0;
  animation: popIn 1s ease-out forwards;
}

.texte-header h1 { animation-delay: 0.2s; }
.texte-header h2 { animation-delay: 0.5s; }
.texte-header p  { animation-delay: 0.8s; }

.menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px; 
  margin: 0;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 248, 248, 0.95); 
  backdrop-filter: blur(5px); 
  padding: 20px 0;
  border-bottom: 1px solid rgba(133, 101, 38, 0.15); 
}

.menu a {
  text-decoration: none;
  color: #222;
  padding: 6px 0; 
  font-family: "Georgia", serif;
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: uppercase; 
  letter-spacing: 2px; 
  position: relative; 

  opacity: 0;
  transform: translateX(40px);
  animation: slideRight 0.6s ease forwards;
  will-change: transform, opacity;
  transition: color 0.3s ease;
}

.menu a:nth-child(1) { animation-delay: 0.1s; }
.menu a:nth-child(2) { animation-delay: 0.2s; }
.menu a:nth-child(3) { animation-delay: 0.3s; }


.menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px; 
  background-color: #856526;
  transform: scaleX(0); 
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}


.menu a:hover {
  color: #856526;
}

.menu a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.gallery,
.categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.card,
.category {
  width: 100%;
  max-width: 340px;
  text-decoration: none;
  color: #000;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  background: #fff;

  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.6s ease forwards;
}

.category {
  color: #856526;
}


.card:nth-child(1), .category:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2), .category:nth-child(2) { animation-delay: 0.3s; }
.card:nth-child(3), .category:nth-child(3) { animation-delay: 0.5s; }
.card:nth-child(4), .category:nth-child(4) { animation-delay: 0.7s; }

.card:hover,
.category:hover {
  transform: translateY(-5px);
}

.card img,
.category img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category img:hover {
  transform: scale(1.03);
}

.card h2 {
  padding: 15px;
  margin: 0;
  font-size: 1.4rem;
  background: #fff;
}


.gallery figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 340px;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery figcaption {
  text-align: center;
  font-weight: bold;
  padding: 10px;
  background: #fff;
}


#portrait-gallery-container {
  position: relative;
  width: 100%;
  max-width: 1200px; 
  margin: 30px auto;
  overflow: visible;
  aspect-ratio: auto; 
  
  
}


#portrait-gallery-container figure {
  display: none; 
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 0;
  width: 100%;
  position: static; 
  opacity: 1; 
  transition: none;
}


#portrait-gallery-container img {
  width: 100%;
  height: 100%;         

  object-fit: cover;    
  object-position: top;  

  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#portrait-gallery-container img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

#lightbox span#lightbox-close {
  user-select: none;
  z-index: 1010;
  transition: color 0.2s;
}
#lightbox span#lightbox-close:hover {
  color: #856526;
}

#lightbox .nav {
  z-index: 1010;
}

.caption {
  margin-top: 10px;
  font-weight: bold;
  font-size: 1.1rem;
  min-height: 24px;
}


.thumbnails {
  margin-top: 15px;
  gap: 10px;
}

.thumbnails img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: all 0.3s;
}

.thumbnails img.active,
.thumbnails img:hover {
  opacity: 1;
  border-color: #000;
}

#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: pointer;
}

#lightbox img {
  max-width: 90%;
  max-height: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 20px #000;
  transition: transform 0.3s ease;
}

#lightbox:active img {
  transform: scale(1.02);
}

#lightbox span#lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
}

#lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 10px 15px;
  background: rgba(0,0,0,0.5);
  border-radius: 5px;
  transition: background 0.3s;
}

#lightbox .nav:hover { background: rgba(0,0,0,0.8); }
#lightbox .prev { left: 10px; }
#lightbox .next { right: 10px; }

.main-footer {
  background: #856526;
  color: #ffffff;
  padding: 3vh 4vw 2vh 4vw;
  margin-top: 5vh;
  text-align: left;

  /* Animation globale */
  opacity: 0;
  transform: translateY(20px);
  animation: footerFade 0.8s ease forwards;
}

.footer-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;

  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: calc(15px + 2vw);
}

.footer-column.contact-info {
  flex: 1;
  max-width: 45%;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.3s;
}

.footer-column.social-media {
  flex: 1;
  max-width: 45%;
  margin-left: 4vw;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.5s;
}

.footer-column h3 {
  color: #ffffff;
  font-size: calc(0.8rem + 0.3vw);
  margin-top: 0;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 4px;
  display: inline-block;
}

.footer-column p {
  font-size: calc(0.75rem + 0.15vw);
  line-height: 1.4;
  margin-bottom: 10px;
  color: #f5f5f5;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: calc(0.75rem + 0.15vw);
  transition: opacity 0.3s ease;
  word-break: break-word;
}

.contact-link i {
  color: #ffffff;
  font-size: 1rem;
  width: 16px;
}

.contact-link:hover {
  opacity: 0.85;
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: #ffffff;
  color: #856526;
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: 1000px;
  margin: 2vh auto 0 auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;

  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.7s;
}

.footer-bottom p {
  font-size: calc(0.65rem + 0.15vw);
  color: #e0e0e0;
  margin: 0;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInZoom {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes footerFade {
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 600px) {
  header {
    padding: 20px 5%;
  }

  header img.logo {
    max-width: 320px;
  }

  .menu {
    justify-content: flex-end; 
  }

  #lightbox .nav {
    font-size: 3rem;
    padding: 10px 20px;
  }
  #lightbox .prev { left: 20px; }
  #lightbox .next { right: 20px; }
}


@media (min-width: 992px) {
  section {
    padding: 60px 20px;
  }

  .gallery,
  .categories {
    gap: 30px;
  }
}


@media (max-width: 576px) {
  .categories {
    gap: 12px;
    padding: 0 10px;
  }

 
  .category {
    max-width: 160px;
    border-radius: 10px;
  }

  .category img {
    height: 180px;
  }

  .category h2 {
    font-size: 1.1rem;
    padding: 8px;
    margin: 0;
    background: #fff;
  }
}

#pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 30px auto;
  flex-wrap: wrap;
}


.page-num-btn {
  background: #fff;
  color: #222;
  border: 1px solid #ccc;
  padding: 8px 14px;
  font-size: 0.95rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-num-btn:hover {
  background: #f0f0f0;
  border-color: #856526;
}


.page-num-btn.active {
  background: #856526;
  color: #fff;
  border-color: #856526;
  font-weight: bold;
}


.page-nav-btn {
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-size: 0.95rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.page-nav-btn:hover:not(:disabled) {
  background: #856526;
}


.page-nav-btn:disabled {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
}


#portrait-gallery-container figure {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 0;
  width: 100%;
  position: static;
  opacity: 1;
}


#portrait-view {
  margin-top: -50px;
  animation: fadeIn 0.5s ease-out forwards;
}


#portrait-title {
  font-family: "Georgia", serif;
  font-size: calc(1.6rem + 1vw);
  font-weight: 300;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 5px;
  position: relative;
  display: inline-block;
}

#portrait-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: #856526;
  margin: 5px auto 0 auto;
}


.back-btn {
  background: transparent !important;
  color: #856526 !important;
  border: 1px solid #856526 !important;
  padding: 10px 24px !important;
  font-size: 0.8rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 0px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;

  margin: 5px auto 15px auto; 

  transition: all 0.3s ease;
}

.back-btn i {
  transition: transform 0.3s ease;
}

.back-btn:hover {
  background: #856526 !important;
  color: #fff !important;
}

.back-btn:hover i {
  transform: translateX(-4px);
}


#portrait-gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

#portrait-gallery-container figure {
  display: none; 
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin: 0;
  width: 100%;
  position: static !important; 
  opacity: 1 !important;
}



.img-wrapper {
  display: block;
  position: relative;
  overflow: hidden;
  background: #000;
  width: 100%; 
  aspect-ratio: 3 / 2;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.img-wrapper img {
  width: 100%;
  height: 100%;

  object-fit: cover;    

  display: block;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.img-wrapper:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.12);
}

.img-wrapper:hover img {
  transform: scale(1.05);
  opacity: 0.85;
}

#pagination-container {
  display: flex !important; 
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 40px auto;
  padding: 10px 0;
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 90;
  clear: both;
}


.page-num-btn {
  background: #fff !important;
  color: #222 !important;
  border: 1px solid #ddd !important;
  padding: 8px 15px !important;
  font-size: 0.9rem !important;
  font-weight: 500;
  border-radius: 4px !important;
  cursor: pointer;
  transition: all 0.2s ease;
  width: auto !important;
}

.page-num-btn:hover {
  border-color: #856526 !important;
  background: #fcfbf9 !important;
}

.page-num-btn.active {
  background: #856526 !important;
  color: #fff !important;
  border-color: #856526 !important;
  font-weight: 700;
}


.page-nav-btn {
  background: #111 !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 16px !important;
  font-size: 0.9rem !important;
  border-radius: 4px !important;
  cursor: pointer;
  transition: background 0.2s ease;
  width: auto !important;
}

.page-nav-btn:hover:not(:disabled) {
  background: #856526 !important;
}

.page-nav-btn:disabled {
  background: #e5e5e5 !important;
  color: #aaaaaa !important;
  cursor: not-allowed !important;
}


@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}


.titre-galerie.anime {
  color: #856526;
  font-family: "Georgia", serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin: 40px auto 15px auto; 

  opacity: 0;
  transform: translateY(25px);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.contact-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85); 
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000; 
  animation: fadeIn 0.3s ease-out;
}

.contact-lightbox-content {
  background: #ffffff;
  color: #222222;
  padding: 40px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  border: 1px solid rgba(133, 101, 38, 0.2);
}

#contact-lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
}

#contact-lightbox-close:hover {
  color: #856526;
}

.contact-lightbox-content h2 {
  font-family: "Georgia", serif;
  color: #856526;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.contact-lightbox-content h3 {
  font-family: "Georgia", serif;
  color: #856526;
  font-size: 1.1rem;
  margin-top: 30px;
  margin-bottom: 15px;
}

.contact-links-container {
  display: flex;
  flex-direction: column;   
  align-items: flex-start;  
  width: max-content;      
  margin: 20px auto;       
  gap: 15px;               
}

.contact-modal-link {
  display: flex;
  align-items: center;      
  gap: 10px;                
  text-decoration: none;
  color: #222222;
  font-weight: 600;
  font-size: 1rem;
}
.contact-modal-link i {
  color: #856526;
  font-size: 1.2rem;
}

.contact-modal-link:hover {
  color: #856526;
}

.contact-modal-socials {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.contact-modal-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(133, 101, 38, 0.1);
  color: #856526;
  border-radius: 50%;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-modal-socials a:hover {
  background: #856526;
  color: #ffffff;
  transform: translateY(-3px);
}

.contact-volet-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); 
  z-index: 2000;
  display: none; 
  align-items: flex-end; 
}
.contact-volet-container h3 {
 border-top: 2px solid rgba(54, 54, 54, 0.25);
  display: inline-block;
  color: #856526;
}
/* L'animation d'apparition du volet blanc */
.contact-volet-content {
  width: 100%;
  background: #ffffff;
  color: #222222;
  padding: 40px 20px;
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  border-top: 2px solid #856526;
  text-align: center;
  position: relative;
  
  /* Animation de remontée */
  animation: slideUpVolet 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.contact-volet-container h2 {
  border-bottom: 2px solid rgba(54, 54, 54, 0.25);
  display: inline-block;

}

@keyframes slideUpVolet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

#contact-volet-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 1.6rem;
  color: #999;
  cursor: pointer;
}
#contact-volet-close:hover { color: #856526; }
.contact-volet-content h2 { font-family: "Georgia", serif; color: #856526; text-transform: uppercase; margin-bottom: 10px; }

.volet-anime-1, 
.volet-anime-2, 
.volet-anime-3 {
  opacity: 0;
  transform: translateY(20px);
}

/* Étape 2 : Quand le volet passe en "display: flex", le JS ajoute une classe .show-items */
.contact-volet-container.show-items .volet-anime-1 {
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 0.1s; 
}

.contact-volet-container.show-items .volet-anime-2 {
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 0.3s; 
}

.contact-volet-container.show-items .volet-anime-3 {
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 0.5s; 
}