/*
===================================================
STYLES SPÉCIFIQUES AUX PROJETS
===================================================
*/

/* Header fixe blanc */
header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: white;
    z-index: 10000;
    text-align: center;
    padding: 0;
}

/* H2 avec espace au-dessus pour alignement avec les autres pages */
header h2 {
    margin-top: 15px;       
    margin-bottom: 20px !important;
    font-weight: bold !important;
    font-size: 12px !important;
    line-height: 1 !important;
}

/* Nav au-dessus des images */
.main-nav {
    position: relative;
    z-index: 10001;
}

/* Décalage du contenu pour qu’il ne soit pas caché par le header */
body.page-projet {
    margin-top: 80px;       
}

/* Images et vidéos pleine largeur */
.project-image,
.project-media {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 20px;
}

.project-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.project-media iframe,
.project-media video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* --- Menu mobile --- */
@media (max-width: 768px) {
    header, nav.main-nav {
        background-color: #fff !important;
        border: none !important;
        box-shadow: none !important;
    }

    .menu-toggle {
        display: block !important;
        width: 100%;
        text-align: center !important;
        padding: 10px 0;
        margin: 0 auto 5px auto;
        cursor: pointer;
        font-size: 24px;
        border-bottom: none !important;
        box-sizing: border-box;
        position: relative;
        z-index: 1000;
        background-color: #fff;
    }

    .menu-links {
        display: none !important;
        width: 100%;
        margin: 0;
        padding: 0;
        border-bottom: none;
    }

    .menu-links.menu-active {
        font-size: 11px !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 0;
        padding: 0 0 15px 0;
        border-bottom: none;
    }

    .menu-links.menu-active a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 8px 0;
        margin: 0 auto !important;
    }

    .lang-switcher, .instagram-link {
        margin: 8px auto !important;
        display: block;
        width: fit-content;
        text-align: center;
        border: none;
        padding: 0;
    }

    /* --- Captions mobile --- */


    .image-caption {
       
        bottom: 30px;
        left: 5px;      /* commence juste à l'intérieur de l'image */
        right: 5px;     /* limite la caption à l'intérieur de l'image */
        max-height: 25%;       /* jamais plus d'un quart de l'image */
		max-width: auto; 
	    display: block;
        white-space: normal;
        word-break: break-word;
        font-size: 0.65rem;
        line-height: 1.1rem;
        background: rgba(0,0,0,0.2);
        padding: 4px 6px;
        border-radius: 2px;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        text-align: left; /* ou center si tu veux centrer le texte */
		overflow: hidden; 
    }
}
	

    .image-container:hover .image-caption,
    .image-container:active .image-caption {
        opacity: 1;
    }
}

/* --- Contenu projet (desktop) --- */
body {
    margin-top: 80px;
    font-family: Verdana, sans-serif;
}

/* images pleines empilées sans crop */
.project-image {
    display: block;        
    margin: 0 auto 5px auto; 
    width: 100%;            
    height: auto;
}

/* conteneur commun pour images et médias (videos) */
.project-media,
.project-image {
  display: block;
  width: 100%;
  max-width: 100%; 
  margin: 0 auto 20px;
  box-sizing: border-box;
}

/* pour les images existantes */
.project-image img,
.project-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* pour les iframes : occuper toute la largeur et conserver le ratio 16/9 */
.project-media {
  aspect-ratio: 16 / 9;       
  overflow: hidden;
}

.project-media iframe,
.project-media video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

#project-text {
    scroll-margin-top: 100px; 
}

/* bouton flottant + d'infos */
.info-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10001;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 12px 18px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.info-btn:hover {
    background: rgba(0,0,0,0.9);
}

/* texte en bas */
.project-content {
    max-width: 900px;
    margin: 40px auto 80px auto;
    padding: 20px;
}

.project-content h1 {
    text-align: left;
    margin-bottom: 40px;
    color: #333;
    font-size: 20px; 
    font-weight: normal;
}

.project-content p {
    margin-bottom: 40px;
    line-height: 1.6;
    color: #555;
    text-align: justify;
}

.project-content a {
    color: #FDC29B; 
    text-decoration: none; 
}

.project-content a:hover {
    color: #666666;      
    border-bottom: none; 
    text-decoration: none;
}

/* conteneur image + captions desktop */
.image-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.image-caption {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: auto;         
    color: white;
    font-size: 0.75rem;
    line-height: 1.2;
    background: rgba(0,0,0,0.5);
    padding: 6px 8px;
    border-radius: 2px; 
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    display: inline-block; 
    max-width: 95%;        
}

.image-container:hover .image-caption {
    opacity: 1;
}

/* back to top button */
.back-top-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 10001;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 10px 14px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.back-top-btn:hover {
    background: rgba(0,0,0,0.9);
}

.back-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}
