/* =====================================
   IMPORT DES POLICES
===================================== */
@font-face {
    font-family: 'Viksjoe';
    src: url('../font/Viksjoe-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ViksjoeItralic';
    src: url('../font/Viksjoe-RegularItalic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
  font-family: 'Pangea';
  src: url('../font/Pangea-Regular.woff') format('woff');
}

@font-face {
  font-family: 'Pangea-Italic';
  src: url('../font/Pangea-Italic.woff') format('woff');
  font-style: italic;
}

@font-face {
  font-family: 'Pangea-Bold';
  src: url('../font/Pangea-Bold.woff') format('woff');
  font-weight: bold;
}

/* =====================================
   RÉINITIALISATION GLOBALE
===================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: 'Pangea', sans-serif;
  color: rgb(0, 0, 0);
}

/* =====================================
   NAVIGATION GÉNÉRALE
===================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem;
  position: fixed;
  top: 0;
  width: 100%;
  background: white;
  z-index: 10;
}

.navbar a {
  text-decoration: none;
  color: black;
  font-size: 18pt;
  font-family: 'Pangea';
  text-transform: uppercase;
  letter-spacing: 1pt;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-left img.logo {
  height: 30px;
  margin: 0 2rem;
}

/* =====================================
   PAGE ACCUEIL (index.html)
===================================== */
.home {
  background-image: url('img/fond.png');
  background-size: cover;
  background-position: center;
}

body.homepage {
  background-image: url('img/fond.png');
  background-size: cover;
  background-position: center;
}

main.home {
  padding-top: 100px;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

.project-grid {
  position: relative;
  width: 100%;
  height: 100%;
}

.project-title {
  position: absolute;
  color: black;
  text-decoration: none;
  font-family: 'Viksjoe', sans-serif;
  font-size: 30pt;
  cursor: pointer;
  transition: transform 0.2s;
}

.project-title:hover {
  transform: scale(1.1);
  text-decoration: none;
  color: black;
}

.refresh-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.refresh-button:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}

.refresh-button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.refresh-button:focus,
.refresh-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 6px rgba(0,0,0,0.06), 0 6px 20px rgba(0,0,0,0.12);
  border: none;
}

/* Ensure SVG icons or <img class="button"> inside refresh-style buttons are centered and scaled */
.refresh-button svg,
.refresh-button img.button {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  color: #111;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.28s cubic-bezier(.2,.9,.3,1), color 0.18s ease, opacity 0.18s ease;
}

.refresh-button:hover svg {
  transform: rotate(10deg) scale(1.05);
}

.refresh-button:active svg {
  transform: rotate(0deg) scale(0.96);
  opacity: 0.9;
}

#apercu-flottant {
  position: fixed;
  width: 400px;
  z-index: 999;
  pointer-events: none;
  display: none;
  border-radius: 8px;
}

/* =====================================
   PAGE PROJETS (projets.html)
===================================== */
body.projets-page {
  background-color: white;
  margin: 0;
  padding: 0;
  font-family: 'Pangea', sans-serif;
}

/* ----- Filtres par tags ----- */
.filtre-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  margin: 8rem 1rem 2rem 1rem;
  padding: 0 2rem;
}

.filtre-tags button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #eee;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12 pt;
  transition: background-color 0.2s;
}

.filtres-tri {
  display: flex;
  gap: 1rem;
  margin: 2rem 3rem;
}

.tri-btn, #filtre-tags button {
  padding: 0.4rem 0.9rem;
  border: 1px solid black;
  border-radius: 999px;
  background: white;
  font-size: 0.9rem;
  cursor: pointer;
}

.tri-btn.active, #filtre-tags button.active {
  background: black;
  color: white;
}

.tag-button {
  border-radius: 20px;
  border: 1px solid black;
  padding: 5px 15px;
  margin-right: 10px;
  cursor: pointer;
}

.tag-button.active {
  background-color: black;
  color: white;
}

/* ----- Vue Liste (défaut) ----- */
.liste-projets {
  display: flex;
  flex-direction: column;
  padding-top: 0rem;
}

.ligne-projet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1 rem;
  cursor: pointer;
}

.separator {
  border-top: 1px solid black;
  margin: 8px 0;
}

.titre-projet {
  font-family: 'Viksjoe';
  font-size: 1rem;
}

.tags {
  box-align: center;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: left;
  margin-left: 0rem;
}

.tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: #f0f0f0;
  border-radius: 999px;
}

/* ----- Bouton Toggle Vue ----- */
.toggle-view-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: white;
  box-shadow: 0 2px 15px rgba(0,0,0,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100;
}

.toggle-view-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 25px rgba(0,0,0,0.3);
}

.toggle-view-btn svg {
  width: 24px;
  height: 24px;
}

/* ----- Vue Immersive (img) ----- */

body.view-immersive .filtre-tags {
  margin: 8rem 1rem 2rem 1rem;
}

body.view-immersive .liste-projets {
  padding: 0;
  gap: 0;
}

body.view-immersive .ligne-projet {
  position: relative;
  height: 175px;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem 3rem;
  align-items: flex-start;
}



/* Image de fond */
body.view-immersive .ligne-projet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform-origin: center center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  z-index: 1;
}

body.view-immersive .ligne-projet:hover::before {
  transform: scale(1.05); /* 10% zoom on hover (use 1.05 for 5%) */
}

/* Overlay sombre */
body.view-immersive .ligne-projet::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.29), rgba(0, 0, 0, 0.07) 33.61%, rgba(0, 0, 0, 0) 50%);
  z-index: 1;  
  z-index: 2;
  transition: opacity 0.3s ease;
}

body.view-immersive .ligne-projet:hover::after {
  opacity: 0.8;
}

/* Contenu par-dessus */
body.view-immersive .titre-projet,
body.view-immersive .tags {
  position: relative;
  z-index: 3;
}

body.view-immersive .titre-projet {
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  font-family: 'Viksjoe';
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

body.view-immersive .tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: 0;
}

body.view-immersive .tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  color: black;
}

body.view-immersive .separator {
  display: none;
}

body.view-immersive #apercu-flottant {
  display: none !important;
}

/* ----- Styles Vue Liste (spécifiques) ----- */
body.view-list .liste-projets {
  display: flex;
  flex-direction: column;
  padding-top: 0rem;
}

body.view-list .ligne-projet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 3rem;
  cursor: pointer;
  height: auto;
  padding: 1rem 0;
  position: static;
  background: none !important;
}

body.view-list .separator {
  display: block;
  border-top: 1px solid black;
  margin: 0;
}

body.view-list .titre-projet {
  font-family: 'Viksjoe';
  font-size: 1.2rem;
  color: black;
  text-shadow: none;
}

body.view-list .tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: left;
  margin-left: 0;
}

body.view-list .tag {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  background: #f0f0f0;
  border-radius: 999px;
  color: black;
}

/* =====================================
   PAGE PROJET INDIVIDUEL
===================================== */
body.projet {
  background: white;
  padding-top: 100px;
}

main.projet-container {
  padding: 2rem;
}

h1.projet-titre {
  font-family: 'Viksjoe';
  font-size: 2rem;
  margin-bottom: 1rem;
  padding-left: 2rem;
  stroke: none;
}

.encart-gris {
  background-color: #E1E1E1;
  padding: 1rem;
  margin: 0 auto 1rem; /* centré et espacement bas */
  max-width: min(92vw);
  font-size: 12pt;
  border-radius: 8px;
}

.encart-gris .ligne {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.encart-gris .ligne span {
  flex: 1;
  min-width: 150px;
}

.encart-gris .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.encart-gris .tag {
  padding: 0.3rem 0.6rem;
  border-radius: 9999px;
  background-color: white;
  border: 1px solid black;
  font-size: 0.75rem;
}

.description {
  width: 50vw;
  padding: 30px;
  font-size: 1rem;
  line-height: 1.6;
}

.galerie-pleine {
  padding-left: 2rem;
  padding-right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.galerie-pleine img {
  width: calc(100vw - 4rem);
  max-width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  box-sizing: border-box;
  object-fit: cover;
  cursor: pointer;
}

/* =====================================
   LIGHTBOX (zoom image)
===================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.lightbox.hidden {
  display: none;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox .prev {
  left: 20px;
}

.lightbox .next {
  right: 20px;
}

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

/* =====================================
   PAGE À PROPOS (about.html)
===================================== */
body.apropos-page {
  background-image: url(img/fond.png);
  background-size:  cover;
  background-position: center;
}

main.about-content {
  background-color: white;
  padding: 2rem;
  border-radius: 16px;
  max-width: 95%;
  width: 95%;
  box-shadow: 0 0 40px rgba(0,0,0,0.05);
  margin: 8rem auto;
}

.cv h1, .cv h2, .cv h3 {
  font-family: 'Viksjoe', normal;
  font-weight: normal;
}

.cv p, .cv li, .cv span, .cv a {
  font-family: 'Pangea', sans-serif;
}

.title-with-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  cursor: pointer;
  text-decoration: none;
}

.social-button img {
  width: 50%;
  height: auto;
}

/* =====================================
   RESPONSIVE (Mobile)
===================================== */
@media screen and (max-width: 600px) {
  /* Navbar */
  .navbar {
    padding: 0.5rem 0.5rem;
  }

  .navbar a {
    font-size: 14pt;
    display: block;
    padding: 0.5rem 0;
  }

  .nav-left img.logo {
    height: 28px;
    margin: 1rem 0.5rem;
  }

  .project-title {
    font-size: 20pt;
  }

  /* Page projets - Vue liste */
  .filtre-tags {
    font-size: 7pt;
  }

  .filtre-tags button {
    margin: 0.2rem;
  }

  .titre-projet {
    font-size: 1rem;
    display: block;
    margin-bottom: 0.3rem;
  }

  .tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    margin: 0.2rem;
  }

  .ligne-projet {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  /* Vue immersive mobile */
  body.view-immersive .ligne-projet {
    height: 280px;
    padding: 1rem 1.5rem;
  }

  body.view-immersive .titre-projet {
    font-size: 1rem;
  }

  body.view-immersive .tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }

  /* Bouton toggle */
  .toggle-view-btn {
    width: 40px;
    height: 40px;
    bottom: 20px;
    left: 20px;
  }

  .toggle-view-btn svg {
    width: 20px;
    height: 20px;
  }

  /* Page projet individuel */
  .description {
    width: 100vw;
    padding-left: 10px;
    padding-right: 10px;
  }
}