/* RÈGLES GLOBALES */
* {
    box-sizing: border-box;
    margin: 0;    
    padding: 0;   
}

body {
    background: white; 
    height: 100%;
    color: rgb(26, 26, 26);
    font-family: "zedou", sans-serif;
    font-optical-sizing: auto;
    line-height: 1.3;
}


h1 {
    background:white; 
    font-size: clamp(16px, 5vw, 32px);
    font-weight: 500;
}


img {
    max-width: 100%;
    height: auto;
    display: block;
}


p {
    font-weight: 300;
}

/* HEADER */
.header {
    background: white;
    width: 100%;
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 70px;
    padding-left: 5vw;   
    padding-right: 5vw;  
    border-bottom: 1px solid black;

}

.header a {
    text-decoration: none;
    color: currentColor;
}

.apropos-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
  width: max-content;
  overflow: hidden; 
  transition: height 0.3s ease;
}

.apropos-text {
  display: block;
  transition: transform 0.5s ease;
  z-index: 2;
  background-color: white;
  padding: 0.2em 0.5em;
  position: relative;
  text-align: right; 
}

.apropos-content {
  padding-top: 0.5em;
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  color: rgb(26,26,26);
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: right; 
}

/* Au clic */
.apropos-container.active {
  height: auto; 
}

.apropos-container.active .apropos-text {
  transform: translateX(-120%); 
}

.apropos-container.active .apropos-content {
  opacity: 1; 
}



/* GRILLE */
.nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    justify-items: stretch;
    padding-left: 5vw;
    padding-right: 5vw;
    gap: 10px;
    font-weight: 300;
}

/* CASES DE LA GRILLE */
.nav a {
    display: flex;
    flex-direction: column;     
    justify-content: space-between; 
    background:  white;
    text-decoration: none;
    color: currentColor;
    transition: background-color 0.3s, filter 0.3s;
    position: relative;
    height: 100%;
}


.nav a img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.3s;
}


.nav a span {
    display: block;
    padding: 0;
    margin-top: 0; 
}


.nav a:hover {
    background-color: rgba(0,0,0,0.7);
}

.nav a:hover img {
    filter: brightness(20%);  
}



/* Tooltip */
.nav a::after {
    content: attr(data-tooltip);
    position: fixed;  
    pointer-events: none;
    color: white;
    background-color: rgba(0,0,0,0.8);
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10000;
    left: var(--mouse-x, 0);
    top: var(--mouse-y, 0);
}

.nav a:hover::after {
    opacity: 1;
}




/* --- PAGE PROJET --- */


.projet h1 {
    color: black;
    font-size: 36px;
    background: none;
    padding-left: 0;
    margin-bottom: 20px;
}

/* Grille sur les projets */
.projet nav {
    color: black;
    background: white;
    display: grid;   
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    justify-items: stretch;
    padding-left: 5vw;
    padding-right: 5vw;
    gap: 10px;
}

.projet nav a {
    display: flex;
    flex-direction: column;     
    height: 100%;
}

/* Le texte reste dans la colonne de gauche */
.sticky {
    background: rgba(255, 255, 255, 0.655);
    grid-column: 1/2; 
    grid-row: span 34;

}



@media (min-width:600px){
    .sticky>div{
        position: sticky;
        top: 140px;
    }
}

.projet nav > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;  
}

.spacer {
    height: 100px; /* ajuster la hauteur comme tu veux */
    width: 100%;
}

.apropos-footer {
    display: flex;
    justify-content: flex-end;
}

.footer-link {
    text-align: right;
    font-style: 16px;
    text-decoration: underline;
    font-weight: 500;
}

/* Colonne texte – ajout du filet vertical */
.projet nav > .sticky {  
    position: sticky;
    border-right: 1px solid rgb(0, 0, 0); /* filet très léger */
    padding-right: 20px; /* espace pour que le texte ne touche pas le filet */
    top: 130px;
}

.footer {
    padding-top: 25px;
    padding-bottom: 10px;
}

.footer p{
    text-align: center;
    font-size: 9px;
    font-weight: 300;
    
}
