/* ========================================
   STYLE.CSS - Portfolio Soulpin Photographie
   ======================================== */

/* === 1. BASE & TYPOGRAPHIE === */
html { 
  scroll-behavior: smooth; 
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: #000;
  background: #fff;
}

/* Container principal avec max-width */
.content-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* === 2. NAVIGATION === */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: #fff;
  z-index: 10;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: #000;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

nav a:hover { 
  color: #888; 
}

/* === 3. LOADER === */
#loader {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  z-index: 100;
  animation: fadeOut 1s ease forwards;
  animation-delay: 1s;
}

@keyframes fadeOut {
  to { 
    opacity: 0; 
    visibility: hidden; 
  }
}

/* === 4. SLIDESHOW HERO === */
.slideshow {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 1s ease;
  transform: scale(1);
}

.slide.active {
  opacity: 1;
  transform: scale(1.02);
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 2;
  animation: fadeIn 1.5s ease-in-out;
}

.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-text h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.hero-text p { 
  font-size: 1.2rem; 
}

.hero-text.blur {
  filter: blur(6px);
  opacity: 0.5;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === 5. SECTIONS PRINCIPALES === */
.gallery,
.blog,
.about,
.contact {
  padding: 4rem 1rem;
  background: #fff;
  font-size: 1.2rem;
  text-align: center;
}

.gallery h1,
.blog h1,
.about h1,
.contact h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  margin-bottom: 2rem;
}

.about,
.contact {
  opacity: 1;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about.visible,
.contact.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === 6. GALERIE PHOTOS === */
.category {
  margin-bottom: 3rem;
}

.category h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.category-stats {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Grille responsive */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Images de la galerie */
.grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0;
  transform: scale(1.05) translateY(20px);
  filter: blur(4px);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.grid img:hover {
  box-shadow: 0 0 20px 10px rgba(0, 0, 0, 0.6);
  transform: scale(1.02);
}

.grid img.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0);
}

/* Bouton "Voir toutes les catégories" */
.category-button {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  width: 100%;
  text-align: center;
  margin: 30px 0;
}

.category-button.visible {
  opacity: 1;
  transform: translateY(0);
}

.category-button button {
  background-color: #222;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.category-button button:hover {
  background-color: #444;
}

/* === 7. BLOG - CARTES (Page d'accueil) === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

.blog-card {
  background: #666;
  padding: 1rem;
  border-radius: 8px;
  cursor: default !important;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.3s ease, opacity 0.8s ease;
}

.blog-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

.blog-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  margin-bottom: 1rem;
  cursor: default !important;
  opacity: 1;
  transition: opacity 1s ease;
}

.blog-card img.fade-out {
  opacity: 0;
}

.blog-card img.fade-in {
  animation: fadeZoom 1s ease;
}

@keyframes fadeZoom {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.blog-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.blog-card p {
  font-size: 1rem;
  color: #ccc;
}

/* Bouton "Voir tous les travaux" */
.blog-button {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  text-align: center;
  margin-top: 2rem;
}

.blog-button.visible {
  opacity: 1;
  transform: translateY(0);
}

.blog-btn {
  display: inline-block;
  background-color: #222;
  color: #fff;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.blog-btn:hover {
  background-color: #444;
}

/* === 8. BLOG - ARTICLES COMPLETS (Pages blog.php et galerieIA.php) === */
.blog-stats {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin: 2rem 0;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  padding: 2rem 0; /* Seulement padding vertical */
}

@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

.article-full {
  background: #666;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.article-header {
  margin-bottom: 1.5rem;
}

.article-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.article-date {
  color: #999;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.article-images {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.article-images img {
  flex: 1;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-images img:hover {
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .article-images {
    flex-direction: column;
  }
  
  .article-images img {
    height: 250px;
  }
}

.article-excerpt {
  color: #ccc;
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid #666;
}

.article-content {
  color: #ddd;
  line-height: 1.8;
  font-size: 1rem;
}

.article-content p {
  margin-bottom: 1rem;
}

/* Grille 2x2 pour galerie IA */
.ia-images-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ia-images-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

/* === 9. À PROPOS === */
.about-content {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.2rem;
  color: #000;
  line-height: 1.6;
}

.profil-photo {
  width: 411px;
  height: 686px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

/* === 10. FORMULAIRE CONTACT === */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

label {
  font-weight: bold;
  color: #000;
  text-align: left;
}

input,
textarea {
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #222;
  color: #fff;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #888;
}

button {
  padding: 0.8rem;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

button:hover { 
  background: #666; 
}

/* === 11. RÉSEAUX SOCIAUX === */
.social-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-links img {
  width: 32px;
  height: 32px;
  filter: brightness(1) invert(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-links img:hover {
  transform: scale(1.2);
  opacity: 0.8;
}

/* === 12. PAGES SECONDAIRES (categories.php, blog.php) === */
.page-header {
  color: #444;
  padding: 8rem 2rem 4rem;
  text-align: center;
  margin-top: 60px;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.back-link {
  text-align: center;
  padding: 2rem;
}

.back-link a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #666;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.back-link a:hover {
  background: #34495e;
}

/* === 13. MODALE UNIVERSELLE === */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.modal img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  cursor: pointer;
  animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
  z-index: 1001;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #888;
}

.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
  z-index: 1001;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: background 0.3s ease;
  line-height: 1;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-arrow:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Flèches GAUCHE */
#galerie-ia-prev,
#modal-prev, 
#blog-modal-prev,
#blog-article-prev {
  left: 30px;
}

/* Flèches DROITE */
#galerie-ia-next,
#modal-next, 
#blog-modal-next,
#blog-article-next {
  right: 30px;
}

.modal-counter {
  position: absolute;
  bottom: 10%;
  right: 50%;
  transform: translateX(50%);
  font-size: 1rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 16px;
  border-radius: 20px;
  z-index: 1001;
  pointer-events: none;
}

/* === 14. FOOTER === */
footer {
  text-align: center;
  padding: 2rem;
  background: #fff;
  color: #333;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
}

/* === 15. ANIMATIONS GLOBALES === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === 16. RESPONSIVE GÉNÉRAL === */
@media (max-width: 768px) {
  nav a {
    font-size: 1.2rem;
  }
  
  nav ul {
    gap: 1rem;
  }
  
  .hero-text h1 {
    font-size: 2rem;
  }
  
  .gallery h1,
  .blog h1,
  .about h1,
  .contact h1 {
    font-size: 3rem;
  }
  
  .page-header h1 {
    font-size: 2.5rem;
  }
  
  .profil-photo {
    width: 300px;
    height: 500px;
  }
  
  .content-container {
    padding: 0 1rem;
  }
}