/*
Theme Name: Lucien Vandecasteele Portfolio
Description: Design clair, minimaliste noir et blanc, style éditorial magazine, avec animations au scroll et split text.
Version: 9.1
*/

html {
  scroll-behavior: smooth;
}

:root {
  /* --- COULEURS BASE NOIR & BLANC --- */
  --bg-main: #f8f9fa; /* Gris très clair / blanc cassé pour le fond */
  --text-main: #1a1a1a; /* Noir profond pour le texte principal */
  --text-muted: #666666; /* Gris moyen pour les descriptions et détails */
  --border: #e0e0e0; /* Gris clair pour les séparateurs */

  /* --- ACCENTS ET CARTES --- */
  --accent: #000000; /* Noir pur pour les éléments importants et survols */
  --card-bg: rgba(255, 255, 255, 0.7); /* Fond translucide pour les pages projets */
  --card-border: rgba(0, 0, 0, 0.1); /* Bordure noire très fine et élégante */

  --mouse-x: 50%;
  --mouse-y: 50%;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- TITRES DE SECTIONS PRINCIPALES (ABOUT ME & MES PROJETS) --- */
.section-title {
  color: var(--text-main);
  font-size: 3rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 40px;
  letter-spacing: -2px;
}

/* --- HEADER & NAVIGATION --- */
.main-header {
  padding: 40px 0;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-main);
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 30px;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

@media (max-width: 768px) {
  .header-flex {
    flex-direction: column;
    gap: 20px;
  }
}

/* --- HERO SPLIT TEXT --- */
.hero-split {
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
  z-index: 1;
}

.hero-split .line {
  width: 100vw;
}

.hero-split .left,
.hero-split .right {
  width: 50vw;
  overflow: hidden;
  display: inline-block;
}

.hero-split .left {
  color: var(--text-main);
  transform: skew(0deg, -15deg);
}

.hero-split .right {
  color: var(--accent);
  transform: skew(0deg, 15deg);
}

.hero-split .left .content {
  width: 100vw;
  text-align: center;
}

.hero-split .right .content {
  width: 100vw;
  text-align: center;
  transform: translate(-50vw);
}

/* LE TEXTE AVEC LE GIF INTÉGRÉ */
.hero-split span {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 8vw;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.9;
  transition: transform ease-out 0.8s;

  /* L'intégration du GIF */
  background-image: url("https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExcWptMnBrM3g3dGNra2wxaHhtdHBzNHJhcHBoODkxcHlydGw4Z201NiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/gNNUVLohrfCVJSQr87/giphy.gif");
  background-size: cover;
  background-position: center;
  color: transparent !important;
  -webkit-background-clip: text;
  background-clip: text;
}

/* La ligne "Portfolio" (inclut le GIF aussi maintenant) */
.hero-split .role-line span {
  font-size: 4vw;
  letter-spacing: 5px;
}

/* --- SECTION ABOUT (STYLE ÉDITORIAL MAGAZINE) --- */
.about-editorial-grid {
  display: grid;
  grid-template-columns: 4fr 5fr;
  gap: 80px;
  align-items: center;
}

.about-image-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.image-wrapper {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 4px;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.15);
  transition: transform 0.8s ease, filter 0.8s ease;
}

.image-wrapper:hover img {
  filter: grayscale(0%) contrast(1);
  transform: scale(1.03);
}

.image-caption {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: right;
}

.about-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.about-description p {
  margin-top: 0;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .about-editorial-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .image-wrapper {
    aspect-ratio: 1 / 1;
  }
  .image-caption {
    text-align: left;
  }
}

/* --- BARRE D'ACTIONS ALIGNÉE (CV + RÉSEAUX) --- */
.about-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: center; /* Centre le bouton et les réseaux */
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 70px; /* On descend un peu plus par rapport au texte */
}

.social-links-about {
  display: flex;
  align-items: center;
  gap: 25px;
}

.btn-cv {
  padding: 12px 30px;
  border: 2px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-cv:hover {
  background: var(--accent);
  color: var(--bg-main);
}

.btn-cv,
.social-links-about a {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
}

.social-links-about a {
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-links-about a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* --- ICÔNES SVG (MASQUES) --- */
.btn-cv::before,
.social-links-about a::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.btn-cv::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/%3E%3C/svg%3E");
}
.social-links-about a:nth-child(1)::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2zm-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.4 5.6 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.6 18.4 4 16.4 4H7.6zm9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8 1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25zM12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5zm0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2zm-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.4 5.6 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.6 18.4 4 16.4 4H7.6zm9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8 1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25zM12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5zm0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z'/%3E%3C/svg%3E");
}
.social-links-about a:nth-child(2):before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z'/%3E%3C/svg%3E");
}
.social-links-about a:nth-child(3):before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E");
}

/* --- ANIMATION D'APPARITION CSS (FADE-UP) --- */
.reveal-text {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-text:nth-child(1) {
  animation-delay: 0.1s;
}
.reveal-text:nth-child(2) {
  animation-delay: 0.3s;
}
.reveal-text:nth-child(3) {
  animation-delay: 0.5s;
}
.reveal-text:nth-child(4) {
  animation-delay: 0.7s;
}

/* --- FILTRES --- */
.portfolio-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 24px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
}

/* --- PETITE GRILLE DE PROJETS (Accueil) --- */
.portfolio-grid-small {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px;
}

.card-small {
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.card-small:hover {
  transform: translateY(-8px);
}

.card-image-wrap {
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.05);
  position: relative;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.card-small:hover .card-image-wrap img {
  transform: scale(1.05);
}

.card-small h3 {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  color: var(--text-main);
  font-weight: 800;
}

.card-tools {
  display: flex;
  gap: 10px;
}

.card-tools img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.project-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-item.hidden {
  display: none;
}

/* --- SINGLE PROJECT CARD --- */
.project-single-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 4px; /* On reste sur des bords droits/éditoriaux */
  padding: 60px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
  max-width: 1000px;
  margin: 0 auto;
}

.project-header-top {
  text-align: center;
  margin-bottom: 50px;
}

.project-header-top h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin: 0 0 20px 0;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
}

.project-description-top {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 800px;
  margin: 30px auto 0 auto;
}

.custom-gallery-layout {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.gallery-hero a {
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.gallery-hero img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-hero a:hover img {
  transform: scale(1.02);
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.gallery-thumbs a {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4/3;
}

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

.gallery-thumbs a:hover img {
  transform: scale(1.08);
}

.secondary-images-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

.secondary-images-grid a {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4/3;
}

.secondary-images-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.secondary-images-grid a:hover img {
  transform: scale(1.05);
}

.gallery-thumbs a.more-photos-wrap {
  position: relative;
  display: block;
}

.more-photos-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  z-index: 2;
  transition: background 0.4s ease;
}

.gallery-thumbs a.more-photos-wrap:hover .more-photos-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.back-link-wrapper {
  margin-bottom: 25px;
  text-align: center;
}

.btn-retour {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-retour:hover {
  color: var(--text-main);
  transform: translateX(-5px);
}

@media (max-width: 768px) {
  .project-single-card {
    padding: 30px;
    border-radius: 12px;
  }
  .gallery-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- NAVIGATION ENTRE PROJETS (SINGLE) --- */
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 40px;
  margin-top: 60px;
  border-top: 1px solid var(--border);
}

.project-nav div {
  flex: 1;
}

.project-nav .nav-next {
  text-align: right;
}

.project-nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
  position: relative;
  transition: color 0.3s ease;
  display: inline-block;
}

.project-nav a::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.project-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

@media (max-width: 768px) {
  .project-nav {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .project-nav .nav-next {
    text-align: center;
  }
}

/* --- FOOTER MINIMALISTE & ÉDITORIAL --- */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  margin-top: 80px;
  background-color: transparent;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-content p {
  margin: 0;
}

.footer-credit a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  position: relative;
  transition: color 0.3s ease;
}

.footer-credit a::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.footer-credit a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}
/* --- CORRECTION DES VIDÉOS (YOUTUBE/VIMEO) SUR LA PAGE SINGLE --- */
.project-single-card iframe,
.project-single-card .wp-block-embed-youtube {
  width: 100%; /* Prend toute la largeur disponible dans la carte */
  max-width: 900px; /* Bloque la largeur pour ne pas être gigantesque sur grand écran */
  aspect-ratio: 16 / 9; /* Magique : garde le format vidéo classique automatiquement */
  height: auto; /* Laisse la hauteur s'adapter au ratio */
  display: block; /* Permet de centrer l'élément */
  margin: 40px auto; /* Crée de l'espace au-dessus/en-dessous et centre horizontalement */
  border-radius: 8px; /* Bords légèrement arrondis pour coller au style éditorial */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05); /* Ombre douce pour la profondeur */
  border: none; /* Enlève la bordure par défaut de l'iframe */
}

/* Si tu utilises l'éditeur de blocs WordPress (Gutenberg) */
figure.wp-block-embed {
  margin: 40px auto;
  text-align: center;
}
