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

html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(6px);
  padding: 12px 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  color: #111;
  text-decoration: none;
  font-weight: 600;
  font-size: 20px;
}

.brand:after {
  content: " ";
  font-weight: 400;
  font-size: 16px;
  margin-left: 8px;
  color: #000;
}

.nav {
  display: flex;
  gap: 16px;
}

.nav a {
  color: #444;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a:focus {
  color: #000;
  outline: none;
}

/* ===== BLOC INTRODUCTIF AVEC IMAGE ===== */
.intro-section {
  padding: 60px 0;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
}



.intro-image:hover {
  transform: translateY(0px);
}

.intro-image img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  display: block;
}

.intro-image {
  position: relative;
  display: inline-block;
}
.intro-image {
  position: relative;
  display: inline-block;
}

.img-tooltip {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 0px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.intro-image:hover .img-tooltip,
.intro-image:focus-within .img-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Pour mobile : désactive le tooltip si l'écran est trop petit */
@media (max-width: 600px) {
  .img-tooltip {
    display: none;
  }
}
.img-tooltip {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.intro-image:hover .img-tooltip,
.intro-image:focus-within .img-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Pour mobile : désactive le tooltip si l'écran est trop petit */
@media (max-width: 600px) {
  .img-tooltip {
    display: none;
  }
}

.intro-content h1 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #222;
  font-weight: 700;
  line-height: 1.2;
}

.intro-content p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 18px;
  color: #444;
}

.intro-content a {
  color: #e67e22;
  text-decoration: none;
  border-bottom: 1px solid rgba(230, 126, 34, 0.3);
  transition: border-color 0.2s ease;
}

.intro-content a:hover {
  border-bottom-color: #e67e22;
}

.intro-content blockquote {
  font-style: italic;
  color: #555;
  margin: 24px auto;
  padding: 0 24px;
  font-size: 19px;
  border-left: 4px solid #e67e22;
  text-align: left;
  max-width: 800px;
}

.intro-content cite {
  font-style: normal;
  font-weight: 500;
  color: #777;
  display: block;
  margin-top: 8px;
  text-align: right;
}

.cta-button {
  display: inline-block;
  background: #e67e22;
  color: white;
  padding: 14px 28px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin: 20px auto;
  border: 2px solid #e67e22;
}

.cta-button:hover {
  background: transparent;
  color: #e67e22;
  transform: translateY(-2px);
}

/* ===== MASONRY (3 colonnes) ===== */
.masonry {
  column-count: 3;
  column-gap: 10px;
  padding: 20px 0;
}

.tile {
  display: inline-block;
  width: 100%;
  margin-bottom: 10px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile img {
  width: 100%;
  height: auto;
  border: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tile img.thumb-visible {
  opacity: 1;
}

.tile:hover,
.tile:focus {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  outline: 2px solid transparent;
}

/* Tooltip pour les descriptions */
.tooltip {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10;
  font-family: Arial, sans-serif;
  pointer-events: none;
}

.tile:hover .tooltip,
.tile:focus .tooltip {
  opacity: 1;
  visibility: visible;
}

/* Responsive: 2 colonnes sur tablette, 1 colonne sur mobile */
@media (max-width: 1024px) {
  .masonry {
    column-count: 2;
  }
}

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

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 40px 16px 60px;
  color: #666;
  font-size: 14px;
  background: #f9f9f9;
  margin-top: 60px;
}

.site-footer h2 {
  color: #111;
  font-size: 24px;
  margin-bottom: 16px;
}

.site-footer p {
  max-width: 800px;
  margin: 0 auto 16px;
  line-height: 1.7;
}

.site-footer a {
  color: #e67e22;
  text-decoration: none;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  touch-action: pan-y;
}

.lightbox-img.visible {
  opacity: 1;
}

/* Boutons lightbox */
.lb-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.1);
  color: #111;
  border: none;
  width: 48px;
  height: 48px;
  font-size: 28px;
  line-height: 48px;
  text-align: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.lb-btn:hover {
  background: rgba(0, 0, 0, 0.2);
  outline: none;
}

.lb-close {
  top: 24px;
  right: 24px;
  transform: none;
  font-size: 32px;
}

.lb-prev {
  left: 24px;
}

.lb-next {
  right: 24px;
}

/* Responsive pour le bloc introductif */
@media (max-width: 768px) {
  .intro-section {
    padding: 30px 0;
  }
  .intro-content h1 {
    font-size: 24px;
  }
  .intro-image img {
    max-height: 300px;
  }
  .cta-button {
    padding: 12px 24px;
    font-size: 15px;
  }
}