/* ================================
   1. VARIABLES & RESET
================================= */
:root {
  --font-body: 'Helvetica Neue', sans-serif;
  --font-heading: 'Montserrat', sans-serif;

  --color-bg: #f9f9f6; /* Off-white */
  --color-text: #222;
  --color-accent: #0077ff;
  --color-accent-hover: #005dcc;
  --color-muted: #f5f5f5;
  --color-border: #ddd;

  --color-bg-dark: #1c1c1c;
  --color-text-dark: #f0f0f0;
  --color-muted-dark: #1e1e1e;
  --color-border-dark: #333;

  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Lato', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: var(--transition);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* ================================
   2. STRUCTURE GÉNÉRALE
================================= */

.container {
  max-width: 1200px;
  margin: auto;
  padding: 2rem;
}

section {
  padding: 4rem 0;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}


/* Style par défaut des liens dans le texte */
a {
  color: #0066cc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}

/* Au survol : couleur renforcée + soulignement discret */
a:hover {
  color: #003366;
  border-bottom: 1px solid #003366;
}

/* Mode sombre */
body.dark-mode a {
  color: #66ccff;
}

body.dark-mode a:hover {
  color: #ffffff;
  border-bottom: 1px solid #66ccff;
}


/* TYPOGRAPHIE */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #333;
}

.highlight {
  color: #b89f85;
  font-weight: bold;
}

/* NAVIGATION */
.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background-color: var(--color-bg);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
}

.navbar,
.nav-links a,
.logo,
.hamburger span {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: bold;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  font-weight: 500;
  color: #333;
}
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background-color: #333;
  border-radius: 3px;
}

/* HERO */
.hero {
  background: url('img/The-Evangelist-Saint-Luke-seated-in-a-landscape-and-other-studies-2.jpeg') center/cover no-repeat;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.hero-text {
  background-color: rgba(255, 255, 255, 0.7);
  padding: 2rem;
  border-radius: 10px;
}
.hero h1 {
  font-size: 3rem;
  font-family: 'Playfair Display', serif;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.2rem;
}

/* GALERIE */

.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-caption {
  position: absolute;
  bottom: 10px;
  left: 0;
  /*transform: translateY(-50%);*/
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
  max-width: 70%;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.gallery-item:hover .gallery-caption {
  opacity: 0.8;
  transform: translateY(0);
}

.gallery-masonry {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: auto;
}

.masonry {
  column-count: 2;
  column-gap: 0.2rem;
}

.masonry img {
  width: 100%;
  margin-bottom: 0.2rem;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
  break-inside: avoid;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.masonry img:hover {
  /*transform: scale(1.02);*/
}

@media (min-width: 900px) {
  .masonry {
    column-count: 3;
  }
}

@media (max-width: 600px) {
  .masonry {
    column-count: 1;
  }
}


/* MODALE */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  /*display: none;*/
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  z-index: 1000;
  flex-direction: column;
  padding: 2rem;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
  visibility: hidden;
  pointer-events: none;
}
.modal.show {
  /*display: flex;*/
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transform: scale(1);
}
.modal-img {
  max-width: 80%;
  max-height: 60vh;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.modal-content {
  background: var(--color-bg);
  padding: 1rem 2rem;
  border-radius: 8px;
  max-width: 600px;
  text-align: center;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.modal-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
  white-space: pre-line;
  position: relative;
  padding: 0.8rem 1.5rem 1.5rem 1.5rem;
  max-height: 200px; /* Limite de hauteur visible */
  overflow-y: auto; /* Scroll vertical si dépasse */
  margin-bottom: 1rem;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #b89f85 transparent;
}
/* Style scrollbar pour Chrome, Edge */
.modal-description::-webkit-scrollbar {
  width: 6px;
}
.modal-description::-webkit-scrollbar-track {
  background: transparent;
}
.modal-description::-webkit-scrollbar-thumb {
  background-color: #b89f85;
  border-radius: 10px;
}

.modal-description .commentaire {
  text-align: justify;
}

.modal-description .highlight {
  color: #aa947c;
  font-weight: 500;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #f0f0f0;
  cursor: pointer;
}

@media (max-width: 600px) {
  .modal-content {
    padding: 1rem;
    max-width: 90vw;
  }
  .modal-img {
    max-width: 100%;
    max-height: 40vh;
  }
}


/* A PROPOS */
.about-section {
  padding: 2rem;
  background-color: var(--color-bg);
}

.about-wrapper {
  display: flex;
  gap: 4rem;
  max-width: 1000px;
  margin: auto;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.about-image {
  flex: 1 1 280px;
  max-width: 360px;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.about-text {
  flex: 2 1 400px;
  font-size: 1.1rem;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .about-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  .about-text {
    text-align: left;
  }
}

/* Formulaire de filtrage */
.filter-form {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
}

.search-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.search-row input[type="text"] {
  flex: 1;
  max-width: 400px;
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: 2rem;
  font-size: 1rem;
}

.filter-button {
  background-color: #222;
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.filter-button:hover {
  background-color: #555;
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  justify-items: center;
}

.filters-row select {
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 200px;
}


/* Spinner de chargement */
.loading-spinner {
    display: none;
    text-align: center;
    margin: 20px auto;
    font-size: 1em;
    color: #666;
}

.loading-spinner i {
    font-size: 1.3em;
    margin-right: 8px;
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.pagination a {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 2rem;
  background-color: #f2f2f2;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination a:hover {
  background-color: #333;
  color: #fff;
}

.pagination a.active {
  background-color: #222;
  color: #fff;
  font-weight: bold;
}

.btn-catalog {
  background: none;
  border: none;
  color: #333;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  border-bottom: 1px solid transparent;
}
.btn-catalog:hover {
  color: #000;
  border-bottom: 1px solid #000;
}

.btn-catalog:focus {
  outline: none;
  border-bottom: 1px solid #0099ff;
}

.icn-catalog {
  background: none;
  border: none;
  color: #333;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
}
.icn-catalog:hover {
  color: #000;
  transform: translateY(2px);
}

.icn-catalog:focus {
  outline: none;
  color: #0077cc;
}

/* CONTACT */
.contact-section {
  padding: 6rem 2rem 2rem;
  max-width: 600px;
  margin: auto;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.contact-form label {
  font-weight: 600;
  font-size: 1rem;
  color: #333;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: 'Lato', sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #b89f85;
  box-shadow: 0 0 0 2px rgba(184, 159, 133, 0.3);
}
.contact-form .btn {
  align-self: flex-start;
  font-size: 1rem;
  background-color: #333;
  color: var(--color-text-dark);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.contact-form .btn:hover {
  background-color: #555;
}

.alert-blue {
  background-color: #e0f2fe; /* bleu très pâle */
  border: 1px solid #90cdf4; /* bordure bleue douce */
  color: #1e40af; /* texte bleu foncé */
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-alert {
  font-size: 1.4rem;
}

/* FOOTER */
.footer {
  margin-top: 4rem;
  background-color: var(--color-bg-dark);
  color: var(--color-text-dark);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 1rem 0;
}

.footer-socials a {
  color: #e1e1d8;
  font-size: 1.25rem;
  transition: color 0.3s ease;
}

.footer-socials a:hover {
  color: #0077cc;
}


/* PARALLAX */
.parallax-section {
  background-image: url('img/The-Archduke-Leopold-William-in-his-Picture-Gallery-in-Brussels-1.jpeg');
  background-size: cover;
  background-position: center;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  text-align: center;
  padding: 2rem;
  background-attachment: fixed;
}

/* Thème sombre */
body.dark-mode {
  background-color: var(--color-bg-dark);
  color: #e1e1d8;
}

body.dark-mode header,
body.dark-mode .navbar,
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background-color: #2a2a2a;
  color: #e1e1d8;
  border-color: #444;
}

body.dark-mode .modal-content {
  background-color: var(--color-bg-dark);
}

body.dark-mode .btn-catalog {
  color: #ccc;
  border-bottom: 1px solid transparent;
}

body.dark-mode .btn-catalog:hover {
  color: #fff;
  border-bottom: 1px solid #fff;
}

body.dark-mode .btn-catalog:focus {
  outline: none;
  border-bottom: 1px solid #3399ff;
}

body.dark-mode .icn-catalog {
  color: #ccc;
}

body.dark-mode .icn-catalog:hover {
  color: #fff;
  transform: translateY(2px);
}

body.dark-mode .icn-catalog:focus {
  outline: none;
  color: #3399ff;
}

body.dark-mode .gallery-item img {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .modal-description {
  color: #e1e1d8;
}

body.dark-mode .section-title {
  color: #e1e1d8;
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  color: inherit;
  padding: 0.5rem;
  transition: color 0.3s;
}

#theme-toggle:hover {
  color: #ffcc00;
}

body.dark-mode .theme-toggle {
  color: #e1e1d8;
}

body.dark-mode .navbar {
  background-color: #1e1e1e; /* fond sombre */
}

body.dark-mode .nav-links a {
  color: #eee;
}

body.dark-mode .logo {
  color: #eee;
}

body.dark-mode .hamburger span {
  background-color: #eee;
}

body.dark-mode .hero-text {
  background-color: rgba(5, 5, 5, 0.7);
}

body.dark-mode .about-section {
  background-color: var(--color-bg-dark);
}

body.dark-mode .pagination a {
  background-color: #333;
  color: #ddd;
}

body.dark-mode .pagination a:hover {
  background-color: #555;
  color: #fff;
}

body.dark-mode .pagination a.active {
  background-color: #e1e1d8;
  color: #1e1e1e;
}

body.dark-mode .filter-form input,
body.dark-mode .filter-form select {
  background-color: #2a2a2a;
  color: #e1e1d8;
  border: 1px solid #444;
}

body.dark-mode .filter-form input::placeholder {
  color: #aaa;
}

body.dark-mode .filter-button {
  background-color: #444;
  color: #e1e1d8;
}

body.dark-mode .filter-button:hover {
  background-color: #666;
  color: #fff;
}

body.dark-mode .footer-socials a:hover {
  border-style: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
  position: absolute;
  top: 70px;
  right: 0;
  background: #fff;
  flex-direction: column;
  width: 220px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  padding: 1rem;
  text-align: left;
}

body.dark-mode .nav-links {
  background: #222;
}

.nav-links li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.nav-links li:last-child {
  border-bottom: none;
}

.nav-links a {
  font-weight: 500;
  color: #333;
  display: block;
}
  .nav-links.open {
    transform: translateX(0);
  }
  .hamburger {
    display: flex;
  }
  .about-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .parallax-section {
  background-attachment: scroll; /* important pour mobiles */
  }
  .filter-form {
        flex-direction: column;
        align-items: stretch;
  }

    .loading-spinner {
        font-size: 1em;
    }
}