/*
Theme Name: Photomoi
Description: Thème minimaliste pour galerie photo
Version: 1.0
*/

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

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

header {
  text-align: center;
  margin-bottom: 50px;
  padding: 40px 0;
  border-bottom: 1px solid #eee;
}

header h1 {
  font-size: 2.2em;
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: -1px;
}

header p {
  color: #777;
  font-size: 1em;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #f0f0f0;
  cursor: pointer;
  border-radius: 4px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Overlay au survol */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  text-align: center;
}

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

.gallery-info {
  color: white;
  width: 100%;
}

.gallery-info h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
  font-weight: 600;
}

.exif-data {
  font-size: 0.85em;
  color: #ddd;
  text-align: center;
}

.exif-data p {
  margin: 3px 0;
  line-height: 1.3;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  padding: 40px 20px;
  overflow-y: auto;
}

.lightbox.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.lightbox-close:hover {
  color: #ccc;
}

.lightbox-image {
  max-width: 98%;
  max-height: 85vh;
  object-fit: contain;
  margin-bottom: 20px;
}

.lightbox-info {
  color: white;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 4px;
  max-width: 600px;
}

.lightbox-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  margin-top: 0;
}

.lightbox-exif {
  font-size: 0.95em;
  color: #ddd;
  line-height: 1.6;
}

/* Protéger les images */
.gallery-item img {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-touch-callout: none;
}

@media (max-width: 768px) {
  .container {
    padding: 20px 10px;
  }

  header h1 {
    font-size: 1.8em;
  }

  header {
    padding: 20px 0;
  }
}
