/* =============================
   Variables et base générale
============================= */
:root {
  --violet-principal: #240046;
  --orange-accent: #eec373;
  --blanc-transp: rgba(255, 255, 255, 0.7);
  --blanc-transp-mobile: rgba(255, 255, 255, 0.6);
  --blanc-transp-sm: rgba(255, 255, 255, 0.55);
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Georgia, serif;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
}

h1 {
  text-align: center;
  margin: 2rem 0;
  color: var(--violet-principal);
}

/* =============================
   Diaporama accueil
============================= */
.slideshow {
  position: relative;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 2s ease-in-out, transform 8s ease-in-out;
}

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

/* =============================
   Titre fixe accueil
============================= */
.titre-fixe {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255,255,255,0.9);
  padding: 0.5rem 1.5rem 1.2rem;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  z-index: 10;
  text-align: center;
  color: var(--violet-principal);
}

.titre-fixe h1 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  margin-bottom: 0.8rem;
}

/* =============================
   Boutons accueil
============================= */
.liens {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.bouton-lien {
  padding: 0.75rem 1.5rem;
  background-color: #5a189a;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.bouton-lien:hover {
  background-color: var(--orange-accent);
  color: var(--violet-principal);
}

/* =============================
   Footer buttons (contact)
============================= */
.footer-button {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;
}

.footer-button.mail { background-color: #3d5b43; }
.footer-button.phone { background-color: #2d7a7a; }
.footer-button.instagram { background-color: #e4405f; }

.footer-button:hover {
  transform: scale(1.2);
}

/* Contact home */
.contact-home {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin: 4rem 0;
}

.contact-home .footer-button {
  width: 70px;
  height: 70px;
  font-size: 32px;
}

/* Fix bas pages */
body.portfolio .contact-home,
body.projets .contact-home,
body.a_propos .contact-home {
  position: fixed;
  bottom: 20px;
  width: 100%;
  justify-content: center;
  gap: 2rem;
  z-index: 101;
  margin: 0;
}

/* =============================
   Pages fond
============================= */
body.a_propos,
body.portfolio,
body.projets {
  background: url('images/Bandeau/bandeau1.jpg') center/cover no-repeat;
  position: relative;
}

/* voile global */
body.portfolio::before,
body.projets::before,
body.a_propos::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
    url('images_accueil/fond_transparent.jpg') center / cover no-repeat;
  z-index: -1;
}

/* =============================
   Portfolio / Projets
============================= */
body.portfolio main,
body.projets main,
body.a_propos main {
  position: relative;
  z-index: 51;
}

/* grille */
.projets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 260px);
  gap: 1.5rem;
  padding: 1rem;
  justify-content: center;
}

.vignette-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vignette-wrapper .vignette {
  width: 260px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background-color: rgba(255,255,255,0.4);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.vignette-wrapper .vignette img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.vignette-wrapper .vignette:hover img {
  transform: scale(1.07);
}

.vignette-title {
  margin-top: 0.8rem;
  font-weight: bold;
  color: var(--violet-principal);
}

/* =============================
   LIGHTBOX PREMIUM
============================= */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
  user-select: none;
}

#lightbox.active {
  opacity: 1;
}

#lightbox-inner {
  display: flex;
  flex-direction: row;
  align-items: center; /* Centre verticalement */
  justify-content: center;
  gap: 1rem;
  width: 100%;
  height: 80vh;
}

#lightbox-inner img {
  max-width: 80vw;
  max-height: 70vh;
  border-radius: 10px;
  transform: scale(0.92);
  transition: transform 0.25s ease;
  cursor: pointer;
  object-fit: contain;
}

#lightbox.active #lightbox-inner img {
  transform: scale(1);
}

#lightbox p {
  color: white;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#lightbox.active p {
  opacity: 1;
}

/* Styles pour TOUS les boutons de la lightbox (y compris la croix) */
#lightbox button {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 1020;
}

/* Styles SPÉCIFIQUES pour les boutons de navigation (précédent/suivant) */
#lightbox-inner #prev-lightbox,
#lightbox-inner #next-lightbox {
  font-size: 2.2rem;
  width: 3.5rem;
  height: 3.5rem;
}

/* Styles pour la croix de fermeture (positionnement absolu) */
#close-lightbox {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 1030;
  font-size: 1.8rem;
  width: 2.8rem;
  height: 2.8rem;
}

/* Effets au survol pour les boutons de navigation */
#lightbox-inner #prev-lightbox:hover,
#lightbox-inner #next-lightbox:hover {
  background: rgba(0, 0, 0, 0.6) !important;
  transform: scale(1.15);
}
/* =============================
   Responsive
============================= */
@media (max-width: 600px) {
  .projets-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .vignette-wrapper .vignette {
    width: 100%;
  }

  /* Lightbox mobile */
  #lightbox-inner {
    flex-direction: row;
    width: 100%;
  }

  #lightbox-inner img {
    max-width: 90vw;
    max-height: 65vh;
  }

  #lightbox-inner #prev-lightbox,
  #lightbox-inner #next-lightbox {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
  }

  #lightbox-inner #prev-lightbox {
    left: 10px;
  }

  #lightbox-inner #next-lightbox {
    right: 10px;
  }
}

/* Style pour le sous-titre "resumeProjet" */
#resumeProjet {
    font-size: 1.2em;
    color: var(--violet-principal);
    font-weight: 300;
    margin: 10px auto 20px auto;
    text-align: center;
    font-style: italic;
    line-height: 1.25;
    width: 80%;
    max-width: 900px;
}
