/* ===== BASE ===== */

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f4f7fa;
  margin: 0;
  color: #222;
  transition: background 0.3s, color 0.3s;
}

header {
  background: #3b5998;
  color: white;
  padding: 15px;
  text-align: center;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.site-logo {
  height: 50px;
}

nav {
  margin-top: 10px;
}

nav a {
  margin: 0 10px;
  color: white;
  text-decoration: none;
  font-weight: bold;
}

nav .theme-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.2em;
  cursor: pointer;
  margin-left: 10px;
}

main {
  padding: 20px;
  max-width: 900px;
  margin: auto;
}

label {
  display: block;
  margin: 15px 0 5px;
  font-weight: bold;
}

input, select, button {
  padding: 10px;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  margin-bottom: 15px;
}

button {
  background: #38ada9;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #079992;
}

footer {
  background: #3b5998;
  color: white;
  text-align: center;
  padding: 10px;
  margin-top: 40px;
}

/* ===== DARK MODE ===== */

body.dark {
  background: #1e1e1e;
  color: #f0f0f0;
}

body.dark header,
body.dark footer {
  background: #121212;
}

body.dark nav a {
  color: #f0f0f0;
}

body.dark input,
body.dark select,
body.dark button {
  background: #333;
  color: #fff;
  border: 1px solid #555;
}

/* ===== GALERIE PHOTO (style carré comme ton autre site) ===== */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  padding: 10px 0;
}

.photo-grid img {
  width: 100%;
  height: 140px;          /* miniatures carrées */
  object-fit: cover;      /* découpe propre */
  border-radius: 12px;    /* arrondis comme ton autre site */
  background: #f6f6f6;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

h2 {
  margin-top: 30px;
  margin-bottom: 10px;
}

/* ===== LIGHTBOX ===== */

#lightboxOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#lightboxContainer {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  max-width: 80%;
  max-height: 80%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

#lightboxContainer img {
  max-width: 100%;
  max-height: 50vh;  /* TAILLE D’IMAGE RÉDUITE */
  border-radius: 8px;
}

#directLink {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 15px;
  background: #3b5998;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
}

#directLink:hover {
  background: #2e4270;
}

#closeLightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  user-select: none;
}

/* ===== DARK MODE LIGHTBOX ===== */

body.dark #lightboxContainer {
  background: #1e1e1e;
  color: #fff;
}

body.dark #directLink {
  background: #555;
}

body.dark #directLink:hover {
  background: #444;
}
