/* ------------------------------------------
   1) RESET / GLOBAL ELEMENTS
------------------------------------------- */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* évite la barre blanche latérale */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Panchang", sans-serif;
}

/* ------------------------------------------
   2) VARIABLES / TOKENS
------------------------------------------- */
:root{
  --rose: #F9D4DB;
  --text: #000;
  --shadow-soft: 0 6px 12px rgba(0,0,0,0.15);
  --shadow-strong: 0 12px 24px rgba(0,0,0,0.25);

   /* Tes variables de polices */
  --font-primary: "Panchang", sans-serif;
  --font-secondary: "source-code-pro", monospace;
}

/* ------------------------------------------
   3) TYPOGRAPHIE GLOBALE
------------------------------------------- */
body {
  font-family: var(--font-primary);

}

.code-block,
.caption {
  font-family: var(--font-secondary);

}

/* ------------------------------------------
   4) GLOBAL LINKS
------------------------------------------- */
a {
  text-decoration: none;
  color: inherit;
}

a.apercu-link {
  color: var(--rose);
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
}
a.apercu-link:hover { color: var(--text); }


/* ------------------------------------------
   5) INTRO STRETCH EFFECT 
------------------------------------------- */



nav a.logo {
  cursor: pointer;
}





/* ------------------------------------------
   6) Layout global
------------------------------------------- */
#accueil {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: 'Panchang', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  text-align: center;
  padding: 0;
  color: var(--text);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}


/* =========================
   Menu
   ========================= */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
  flex-wrap: nowrap;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}


nav {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:60px;
  padding:20px 16px;   /* ✅ au lieu de 20px 0 */
  box-sizing:border-box; /* ✅ important */
  font-family: "source-code-pro", monospace;
  font-weight: 300;
  font-size: 0.9em;
}

/* liens CONTACT et À PROPOS */
nav a {
  color: var(--text);
  text-decoration: none;
}

/* hover rose */
nav a:hover {
  color: var(--rose);
}

/* ton logo */
nav a.logo img {
  height: 19px;     /* taille du logo à ajuster */
  width: auto;
  display: block;
}

/* désactiver le hover rose sur le logo */
nav a.logo:hover {
  color: inherit;
}

/* -------- DESKTOP -------- */
@media (min-width: 900px) {
  nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 48px; /* ⬅️ contrôle précis de la distance aux bords */
    gap: 0;
  }

  /* À PROPOS */
  nav a:first-child {
    justify-self: start;
  }

  /* LOGO */
  nav a.logo {
    justify-self: center;
  }

  /* À TESTER */
  nav a:last-child {
    justify-self: end;
  }
}


/* =========================


   Carrousel (Swiper)


   ========================= */


/* Conteneur du carrousel : laisse la hauteur s’adapter */
.swiper {
  width: 100%;
  height: calc(100vh - 32px);        /* plus de calc(100vh - 100px) */
  margin: 0;
  position: relative;
}

/* Une slide = prend juste la place de son image */
.swiper-slide {
  position: relative;
  width: 100%;
  height: calc(100% / 3) !important;   /* plus de 100% / 3 */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .6s ease, opacity .6s ease, filter .6s ease;
  box-sizing: border-box;
}

/* Lien contenant l’image */
.swiper-slide a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Image : couvre sans déformer, centrée */
.swiper-slide img {
  width: 40%;
  height: auto;
  max-height: 70%;
  object-fit: cover;
  object-position: center;
  transform-origin: center center;
  will-change: transform;
  pointer-events: auto;
  cursor: pointer;
  transition: none; /* animé via JS (respiration) */
  margin: 0 auto;
  box-shadow: var(--shadow-soft);
}



/* Légende */
.slide-caption {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 6px);
  font-family: 'Panchang', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #000;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
  pointer-events: none;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Apparition fluide au survol ou focus clavier */
.swiper-slide:hover .slide-caption,
.swiper-slide:focus-within .slide-caption {
  opacity: 1;
  transform: translate(-50%, -10px) scale(1.05);
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.9);
}

/* Pagination (masquée intentionnellement) */
.swiper-pagination { 
  display: none !important; /* ↙︎ la pagination est volontairement cachée */
}

/* Swiper ne gère pas gap => assurer 0 espace */
.swiper-wrapper { 
  gap: 0 !important; 
}





/* ============================================


   PAGE PROJET — AP


============================================ */


.apropos {
  min-height: calc(100vh - 120px); /* prend l’écran (header/footer déduits) */
  display: flex;
  align-items: center;             /* centre verticalement */
  justify-content: center;         /* centre horizontalement */
  text-align: center;
  padding: 0 2rem;                 /* respiration sur petits écrans */
}

.apropos .subtitle {
  font-family: var(--font-secondary);
  font-size: 0.9rem;        /* à ajuster selon ton goût */
  line-height: 1.6;
  font-weight: 400;
  max-width: 680px;         /* largeur élégante */
}

/* ============================================


   PAGE PROJET — AT


============================================ */



/* PAGE PLAYGROUND (A TESTER) */
body#playground {
  background-color: #000;
  color: #e4e4e4;
}

/* Section globale */
#grid_playground_section {
  padding: 6rem 1vw 2rem;      /* espace haut + côtés */
  background-color: #000;
}

/* Grille d’images */
#grid_playground_box {
  max-width: 95vw;
  margin: 0 auto;              /* centre la grille */
  display: grid;
  grid-template-columns: repeat(6, auto);
  justify-content: center;  /* centre la grille */
  gap: 50px 30px;              /* écart vertical / horizontal */
  background-color: #000;
}

/* Chaque case */
.image-box {
  background: white;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background-color: #000;
}

/* Images dans la grille */
.image-box img {
  max-width: 100%;         /* s’adapte à la colonne */
  height: auto;            /* ratio naturel */
  display: block;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: #000;
}

/* Petit hover pour le côté “playground” */
.image-box:hover img {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.8);
  background-color: #000;
}

/* ================================

   HEADER + FOOTER NOIR → A TESTER

================================ */

body#playground header,
body#playground footer {
  background: #000;         /* fond noir */
  border-color: rgba(255,255,255,0.1);
}

body#playground header a,
body#playground footer a,
body#playground footer span {
  color: #fff;              /* texte blanc */
}

body#playground header a:hover,
body#playground footer a:hover {
  color: #f2b0c8;           /* petit rose comme ton style */
}

/* Pour forcer le fond noir sous les images */
body#playground .project-page {
  background: #000;
}


/* ---------- IMAGE MYSTÈRE (A TESTER) ----------- */

/* CASE AVANT RÉVÉLATION = fond noir + bordure blanche */
/* Grille d’images */
#grid_playground_box {
  max-width: 95vw;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, auto);
  justify-content: center;
  gap: 50px 30px;
  background-color: #000;
}

/* CASE MYSTÈRE */
body#playground .image-box {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  display: inline-block;    /* ⬅ la case suit la taille de l’image */
  background: #000;
  border: 1px solid #fff;
}

/* IMAGE cachée au début */
body#playground .image-box img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

/* plus de ? */
body#playground .image-box::after {
  display: none;
}

/* Quand l’image est révélée */
body#playground .image-box.revealed {
  border-color: transparent;
}
body#playground .image-box.revealed img {
  opacity: 1;
}


/* Responsive : 4 colonnes tablette, 2 colonnes mobile */
@media (max-width: 1200px) {
  #grid_playground_box {
    grid-template-columns: repeat(4, auto);
  }
}

@media (max-width: 668px) {
  #grid_playground_box {
    grid-template-columns: repeat(2, auto);
  }
}


/* ============================================


   PAGE PROJET — NT


============================================ */




.project-page {
  background: #fff;

  text-align: center;
  font-family: var(--font-primary);
}

.project-header h1 {
  font-family: 'Panchang', sans-serif;
  font-weight: 900;
  margin-top: 8rem;
  font-style: normal;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;

}

.project-header .subtitle {
  font-family: "source-code-pro", monospace;
  font-weight: 700;
  font-style: normal;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.project-header .description {
  font-family: var(--font-secondary);
  font-size: 0.7rem;
  line-height: 1rem;
  max-width: 480px;
  margin: 0 auto 0rem auto;
  color: #000;
}



.mySwiper2 .swiper-wrapper {
  align-items: center !important;
}




.mySwiper2 {
  width: auto;
  height: auto;   
  margin: 3rem auto 0rem auto; /* espace au-dessus */
  overflow: hidden;

  display: flex;
  align-items: center; /* centre verticalement */
}

.swiper-wrapper2 {
  display: flex !important;
  flex-direction: row !important;
}


/* SLIDES */
.swiper-slide2 {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

/* IMAGES PRO */
.swiper-slide2 img {
  width: auto;
  max-width: 37vw;       /* garde une marge élégante */
  max-height: 37vh;      /* évite les images trop grandes */
  object-fit: contain;   /* jamais rogné */
  border-radius: 3px;    /* option : léger arrondi comme Behance */
  transition: transform 0.4s ease, opacity 0.4s ease;
}







/* LIGHTBOX (image agrandie) */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.lightbox-main {
  max-width: 70vw;
  max-height: 70vh;
  border-radius: 6px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.open .lightbox-main {
  transform: scale(1);
}


.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}


.lightbox-arrow {
  position: absolute;
  top: 50%;
  width: 17px;
  transform: translateY(-50%);
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lightbox-arrow:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-arrow.left {
  left: 8vw;
}

.lightbox-arrow.right {
  right: 8vw;
}

/* flèches cachées tant que la lightbox n'est pas ouverte */
.lightbox:not(.open) .lightbox-arrow {
  display: none;
}







.close-icon {

  display: block;
  width: fit-content;
  margin: 3rem auto 4rem auto; /* 5rem sous le dernier élément */
  text-align: center;
}
.close-icon img {
  width: 20px;
  cursor: pointer;
  opacity: 0.4;                 /* gris */
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.close-icon img:hover {
  opacity: 1;                   /* noir */
  transform: scale(1.1);
}

/* ============================================


   PAGE PROJET — NT


============================================ */

/* ============================================


   PAGE PROJET — NT


============================================ */

/* ============================================


   PAGE PROJET — NT


============================================ */

/* ============================================


   PAGE PROJET — NT


============================================ */

/* ============================================


   PAGE PROJET — PD


============================================ */






/* Conteneur responsive 16/9 pour supprimer les bandes noires */
.video-container {
  position: relative;
  width: 400px;                /* 🔥 taille ajustable */
  height: auto;
  margin: 3rem auto;
  padding-top: 56.25%;    /* ratio 16/9 → 9 / 16 = 0.5625 */
}

/* Iframe Vimeo full-cover */
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;           /* remplit le conteneur → plus de bandes noires */
  border: none;
  border-radius: 10px;
  object-fit: contain;      /* 🔥 enlève les bandes noires */
}





/* --- Conteneur des petites vidéos --- */
.videos-container2 {
  display: flex;
  justify-content: center;     /* centre les trois vidéos */
  gap: 1.5rem;                 /* espace entre elles */
  margin-top: 2rem;
  flex-wrap: wrap;             /* évite le débordement sur mobile */
}

/* --- Style des trois vidéos --- */
.video-loop {
  width: 200px;                /* 🔥 taille ajustable */
  height: auto;
  border-radius: 6px;
  display: block;
}


.project-info .subtitle3 {
  font-family: "source-code-pro", monospace;
  font-weight: 700;
  font-style: normal;
  font-size: 0.8rem;
  margin-top: 4rem;
  margin-bottom: 1rem;
}

.project-info .info {
  font-family: var(--font-secondary);
  font-size: 0.7rem;
  line-height: 1rem;
  max-width: 480px;
  margin: 0 auto 0rem auto;
  color: #000;
}







/* ============================================


   PAGE PROJET — TAF


============================================ */




.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 colonnes */
  gap: 3rem; /* espace horizontal + vertical */
  max-width: 900px;
  margin: 5rem auto; /* centre le bloc */
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 4px;  /* optionnel */
  display: block;

  box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* 🔥 ombre portée */
}


.grid-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  cursor: pointer;
}

.grid-link .subtitle3 {
  position: relative;
  transition: opacity 0.2s ease;
}

.videocss {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4rem auto;
}

.videocss video {
  width: 80%;
  max-width: 1200px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}







/* ============================================


   PAGE PROJET — CG


============================================ */



.video-loop2 {
  display: block;
  width: 70%;          /* 🔥 augmente la taille de la vidéo */
  max-width: 900px;    /* taille max élégante */
  
  margin: 3rem auto;   /* 🔥 centre horizontalement + espace autour */
  
  border-radius: 6px;  /* optionnel : arrondi */
  box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* optionnel : ombre */
  
  object-fit: contain; /* ne coupe jamais la vidéo */
}










/* =========================
   Overlay d’aperçu
   ========================= */
.slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: fadeIn .4s ease;
  backdrop-filter: blur(2px);
}
.slide-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}
.overlay-caption {
  position: absolute;
  bottom: 30px;
  font-family: 'Panchang', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 1.6rem;
  color: #fff;
  text-shadow: 2px 2px 8px #000;
}

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







/* =========================
   Footer
   ========================= */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  padding: 15px 16px;

  font-family: "source-code-pro", monospace;
  font-weight: 300;
  font-size: 0.7rem;

  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
  box-sizing: border-box;
}

@media (min-width: 900px) {
  footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 15px 48px;
    gap: 0;
  }

  footer a:first-child { justify-self: start; }
  footer a:nth-child(2) { justify-self: center; }
  footer a:last-child { justify-self: end; }
}




footer span.footer-link {
  cursor: default;
}

.footer-link {
  position: relative;
  cursor: pointer;
  text-decoration: none;
  color: #000;
  letter-spacing: 0.02em;
}

/* Ligne animée */
.footer-link.underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1.3px;
  background: #000;
  transition: width 0.25s ease-out;
}

/* Hover -> underline visible */
.footer-link.underscore:hover::after,
.footer-link.underline:hover::after {
  width: 100%;
}




/* =========================
   Accessibilité : réduire les animations
   ========================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

#project-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

#project-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#project-content {
  background: white;
  max-width: 900px;
  width: 90%;
  padding: 2rem;
  border-radius: 12px;
  max-height: 90vh;
  overflow-y: auto;
}

.project-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  cursor: pointer;
  color: white;
}



@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
