@font-face {
  font-family: 'Hiragino Sans';
  src: local('Hiragino Sans');
}

:root{
  --nav-height: 76px;
  --final-scale: 0.22;
  --accent: #1d33ff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:#000;
  font-family:'Hiragino Sans', sans-serif;
  color:var(--accent);
  overflow-x:hidden;
}

nav#main-nav{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:var(--nav-height);
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  padding:12px clamp(16px,4vw,48px);
  z-index:60;
}

.left-nav, .right-nav{
  display:flex;
  gap:28px;
  transition: transform .6s cubic-bezier(.2,.9,.2,1), opacity .6s ease;
  transform: translateY(-20px);
  opacity:0;
  pointer-events:none;
}

.left-nav{ justify-content:flex-start; }
.right-nav{ justify-content:flex-end; }

.nav-visible{
  transform: translateY(0);
  opacity:1;
  pointer-events:auto;
}

nav a{
  color:var(--accent);
  text-decoration:none;
  font-size:clamp(12px,1.6vw,16px);
  position:relative;
}
nav a::after{
  content:"";
  position:absolute;
  bottom:-4px;
  left:0;
  width:0%;
  height:2px;
  background:var(--accent);
  transition: width .28s ease;
}
nav a:hover::after{ width:100%; }


#intro-container{
  display:grid;
  place-items:center;
  height:100vh;
  position:relative;
  z-index:10;
  transition: height 0.9s ease;
}

body.start-projects #intro-container{
  height:45vh; 
}



#big-name{
  display:grid;
  grid-template-rows:auto auto;
  justify-items:center;
  align-items:center;
  gap: 1.2vh; 
  font-weight:900;
  color:var(--accent);
  line-height:0.85;
  transition: transform 0.9s cubic-bezier(.2,.9,.2,1), opacity 0.6s ease;
  will-change: transform, opacity;
  pointer-events:none;
}

.first-name, .last-name{
  display:block;
  font-size: clamp(48px, 12vw, 220px);
  line-height:0.88;
  letter-spacing:-1px;
  white-space:nowrap;
  pointer-events:none;
}


#star{
  width:420px;
  height:420px;
  background-image: url('BIGSTAR3.png'); 
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
  animation: rotate 3.8s linear infinite;
  cursor:pointer;
  transform-origin:center center;
  transition: animation-duration .25s ease, transform .25s ease;
  pointer-events:auto;
  position:relative;
  z-index:10;
  margin-top:-200px;
  margin-bottom:-200px;
  display:block;
}
#star:hover{
  animation-duration:8s;
  transform:scale(1.02);
}
@keyframes rotate{
  from{transform:rotate(0deg)}
  to{transform:rotate(360deg)}
}


#big-name.shrink-to-nav{
  transform: translateY(calc(-10vh + var(--nav-height))) scale(var(--final-scale));
  transition: transform 0.9s cubic-bezier(.2,.9,.2,1);
  transform-origin: center top;
}



#projects-preview {
  min-height:40vh;
  display:grid;
  place-items:start center;
  padding:10px 24px 60px;
  margin-top:5vh; 
  transition: margin-top 0.9s ease;
}


#project-row {
  width:100%;
  display:grid;

  /* 3 colonnes parfaitement égales */
  grid-template-columns: repeat(3, 1fr);

  /* Lignes entre les images => voir section 3 */
  gap: 16px; /* marge entre les images */

  padding: 0 clamp(16px,4vw,48px); /* ALIGNE LA GRILLE AVEC LE MENU */
  
  opacity:0;
  transform:translateY(50px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.2,.9,.2,1);
}


#project-row {
  width:100%;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 8cm;

  gap: 0;       /* ⚠️ Important */
  padding: 0;   /* ⚠️ Important */

  border-top: 2px solid var(--accent);
  /* ✔️ remet la bordure à gauche */
 /* ➜ bordure au lieu d’à gauche */


  opacity:0;
  transform:translateY(50px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.2,.9,.2,1);
}


#project-row > .project-item {
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;  /* centre vertical */
  justify-content: center; /* centre horizontal */
}


 #project-row .project-item:nth-child(3n) {
    border-right: none;   /* dernière colonne */
}

#project-row .project-item:nth-last-child(-n+3) {
    border-bottom: none;  /* dernière ligne */
}



.project-item {
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);

  display: flex;
  align-items: center;
  justify-content: center;

  width: auto !important;
  background:#000;
}



.project-item img {
  width: 85%;
  height: 85%;
  object-fit: contain;

  filter: grayscale(100%);
  transition: filter .20s ease;
}

.project-item:hover img {
  filter: grayscale(0%);
}




body.start-projects #project-row{
  opacity:1;
  transform:translateY(0);
  transition-delay:1s;
}



@media (max-width:900px){
  #star{ width:160px;height:160px; margin-top:-80px; margin-bottom:-80px; }
  .first-name, .last-name{ font-size: clamp(40px, 18vw, 160px); white-space:normal; }
  #project-row{ grid-template-columns: repeat(2,1fr); gap:3vw; }
}
@media (max-width:520px){
  #project-row{ grid-template-columns: repeat(1,1fr); }
  nav{ padding-left:12px; padding-right:12px; }
  .left-nav{ gap:10px; }
  .right-nav{ gap:12px; }
}

/* ▬▬▬ HOVER : ZOOM IMAGE + TEXTE ▬▬▬ */

.project-item {
  position: relative;
  overflow: hidden;
}

.project-item img {
  transition: transform .35s ease, filter .20s ease;
}

.project-item:hover img {
  transform: scale(1.06);
  filter: grayscale(0%);
}

/* ── TEXTE AU SURVOL ── */

.project-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  text-shadow:white;
}

.project-item:hover .project-title {
  opacity: 1;
}


/* ▬▬▬ OVERLAY SOMBRE AU SURVOL ▬▬▬ */

.project-item::after {
  content:"";
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.35); /* intensité du foncé */
  opacity:0;
  transition:opacity .25s ease;
  pointer-events:none;
}

.project-item:hover::after {
  opacity:1;
}


/* ───────────────────────── */
/* HEADER PAGES PROJETS      */
/* ───────────────────────── */

body.project-page {
  background:#000;
  color:var(--accent);
  overflow-x:hidden;
}

/* Réduit la hauteur du header sur les projets */
/* ========================== */
/* LOGO C★A DANS LA NAV       */
/* ========================== */

#project-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  pointer-events:none;
  user-select:none;
  opacity:0;
  transform: translateY(-20px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.9,.2,1);
  margin-top:0;
  position:relative; /* ⭐ ajout important */
}



/* Animation apparition */
body.loaded #project-header {
  opacity:1;
  transform: translateY(0);
}


.initial {
  line-height: 0.8;
  letter-spacing: -4px; /* ⭐ rapproche fort */
  position: relative;
  z-index: 1; /* passe derrière l’étoile */
}



/* ⭐ Petite étoile animée */
/* mini étoile qui tourne */
#mini-star {
  width: 75px;
  height: 75px;
  background-image: url(BIGSTAR3.png);
  background-size: contain;
  background-repeat: no-repeat;

  /* Position absolue pour la placer entre les initiales */
  position: absolute;
  top: 50%;    /* centre vertical du header */
  left: 50%;   /* centre horizontal du header */
  transform: translate(calc(-50% - 5px), -50%) rotate(85deg); /* décale de 5px vers la gauche */
  
  transform-origin: center center;
  z-index: 5; /* devant les initiales */
}








/* ========================== */
/* NAVIGATION SPECIALE PROJET */
/* ========================== */

body.project-page #main-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  border-bottom: 2px solid var(--accent);
  padding: 10px clamp(16px, 4vw, 48px);
  height: var(--nav-height);

  background-color: #000;    /* Fond noir opaque */
  backdrop-filter: none;     /* Désactive toute transparence */
  position: fixed;           /* Il reste visible en scroll */
  top: 0;                    /* collé en haut */
  width: 100%;
  z-index: 1000;
}

body.project-page .left-nav {
  justify-self: start;
  transform:none;
  opacity:1;
  pointer-events:auto;
}

body.project-page .right-nav {
  justify-self: end;
  transform:none;
  opacity:1;
  pointer-events:auto;
}


body.project-page #project-content {
  margin-top: calc(var(--nav-height) + 10px);
}




/* ───────────────────────── */
/* ANIMATION DU CONTENU      */
/* ───────────────────────── */



body.loaded #project-content {
  opacity:1;
  transform: translateY(0);
}


/* ───────────────────────── */
/* LAYOUT HERBIER            */
/* ───────────────────────── */

/* ───────────────────────── */
/* LAYOUT HERBIER AVEC GRID   */
/* ───────────────────────── */

#project-content {
  display: grid;
  grid-template-rows: 1fr 35vh;
 /* bande du bas visible sans scroll */
  min-height: calc(100vh - var(--nav-height));
  padding: 0;
  gap: 0;
  border-bottom: 2px solid var(--accent);
}


/* Grid texte + image principale */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 2px solid var(--accent);
  min-height: 75vh; /* prend l’espace haut */
  padding: 30px clamp(20px,4vw,60px);
}



.project-text {
  padding-right: 20px;
  font-size: clamp(14px,1.3vw,18px);
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-right: 2px solid var(--accent);
 /* centre verticalement */
}


.project-text h1 {
  margin-bottom:16px;
  font-size: clamp(24px,2.4vw,42px);
  font-weight:900;
}

.project-main-image {
  display: grid;
  align-items: center;
  justify-items: center;
  overflow: hidden; /* pour éviter débordement */
}

.project-main-image img {
  width: 90%;
  height: 90%;
  object-fit: cover; /* remplissage complet sans déformation */
  display: block;
}




/* Galerie en bas */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colonnes */
  grid-auto-rows: 1fr;                   /* lignes automatiques */
  gap: 0;
  height: 100%;                          /* ou une hauteur fixe si tu veux */
}

.project-gallery img {
  width: 80%;
  height: 80%;
  object-fit: cover;   /* remplit le conteneur */
  display: block;
}

.project-gallery img {
  width: 80%;
  height: 80%;
  object-fit: cover;
  display: block;
  border-right: 2px solid var(--accent);
}

.project-gallery img:last-child {
  border-right: none;
}


/* Responsive */
@media (max-width:900px){
  #project-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .project-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .project-text {
    padding-right: 0;
    padding-bottom: 20px;
  }
  .project-main-image {
    padding-left: 0;
    margin-top: 20px;
  }
  .project-gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: 150px;
  }
}

/* Cible uniquement la galerie de la page projet */
body.project-page#revue-page .project-gallery img {
  height: 250px;       /* hauteur réduite */
  object-fit: cover;   /* rempli le container sans déformation */
  width: 100%;
  display: block;
}

/* Cible uniquement la galerie de la page Revue */
body#revue-page .project-gallery img {
  margin-top: 10px;      /* décale légèrement les images vers le bas */
  height: 80px;         /* conserve la taille réduite */
  object-fit: cover;     
  width: 100%;
  display: block;
}


/* Cible uniquement la galerie de la page projet */
body.project-page#specimen-page .project-gallery img {
  height: 500px; 
  margin-top: 10px;
  object-fit: cover;   /* rempli le container sans déformation */
  width: 100%;
  display: block;
}

/* Inverser les colonnes pour la section 2 */
.project-grid.reversed {
  display: grid;
  grid-template-columns: 1fr 1fr; /* image | texte */
  min-height: 75vh;
  padding: 30px clamp(20px,4vw,60px); 
  margin-top: 40px; /* espace depuis la section précédente */
  border-bottom: 2px solid var(--accent); /* ligne horizontale */
  align-items: start; /* aligne le haut de la photo et du texte */
}


.project-grid.reversed .project-text {
  padding-left: 20px;
  padding-right: 0;
  padding-top: 150px; /* espace au-dessus du texte */
}


.project-grid.reversed .project-main-image {
  justify-items: start; /* aligne à gauche */
  align-items: start;
  overflow: hidden;
}

.project-grid.reversed .project-main-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Galerie secondaire */
.secondary-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 40px; /* espace après la galerie */
}

.secondary-gallery img {
  width: 80%;
  height: 80%;
  object-fit: cover;
  display: block;
  border-right: 2px solid var(--accent);
}

.secondary-gallery img:last-child {
  border-right: none;
}

.project-gallery {
  /* ligne après la première galerie */
  padding-bottom: 20px; /* un petit espace avant la section suivante */
  margin-bottom: 40px; /* espace supplémentaire si besoin */
}


/* Responsive : section inversée */
@media (max-width:900px){
  .project-grid.reversed {
    grid-template-columns: 1fr;
  }
  .project-grid.reversed .project-text {
    border-left: none;
    padding-left: 0;
    padding-top: 20px;
  }
  .secondary-gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: 150px;
  }
}

body.project-page#photographie-page .project-main-image {
  margin-top: 10px;
  margin-left: 10px;
}

body.project-page#photographie-page .project-main-image img {
  max-height: 55vh;  /* ❗ Ajuste la taille ici */
  width: auto;
  object-fit: cover;
  display: block;
}

/* 🎨 Ajustements spécifiques à la page Affiches */
body.project-page#affiche-page .project-main-image img {
  max-height: 50vh; /* 🔽 image principale plus petite */
  width: auto;
  object-fit: contain;
  display: block;
}

/* 📌 Galerie de 4 affiches : images plus petites */
body.project-page#affiche-page .project-gallery img {
  width: 70%;      /* 🔽 Réduit l’affiche dans sa case */
  height: 70%;     /* 🔽 Ne remplit pas totalement */
  object-fit: contain; /* 🔒 empêche de déborder ou être coupée */
  margin: auto;       /* 🎯 centre l’image dans le container */
  display: block;
}

#project-header-link {
  display: inline-block;  /* garde la taille du header */
  text-decoration: none;  /* pas de soulignement */
  color: inherit;         /* couleur des initiales */
  pointer-events: auto;   /* ⚠️ permet le clic */
  z-index: 1001;          /* au-dessus de l’étoile si nécessaire */
}

#project-header {
  pointer-events: none;   /* ⚠️ conserve les animations sur les éléments internes */
}

#project-header-link #project-header span.initial,
#project-header-link #project-header #mini-star {
  pointer-events: auto;   /* ⚠️ rend les initiales et l’étoile cliquables */
}


/* Page À propos */
.about-page {
  background: #000;
  color: var(--accent);
  font-family: 'Hiragino Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: var(--nav-height);
}

#about-content {
  max-width: 800px;
  text-align: center;
  padding: 40px 20px;
}

#about-content h1 {
  font-size: clamp(32px, 6vw, 48px);
  margin-bottom: 20px;
}

#about-content p {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
}













