@font-face {
    font-family: 'Dinot';
    src: url('../Font/Dinot_Font.otf');
}

/* Global Reset */
* {
    font-family: 'Dinot', Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Corps de la page */
body {
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Ajout d'une marge blanche en bas */
    margin-bottom: 40px; /* marge blanche de 40px */
}

/* Si tu veux que ce soit le main qui gère la marge, ajoute aussi : */
main {
    margin-bottom: 40px; /* marge blanche de 40px */
}

/* Header */
/* ------------------------------------------------------------------------------------------------------------ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #800080;
    background-color: #ffffff;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 25%;
    height: 25%;
}

#divContentAllProject {
    width: 90vw;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Deux colonnes */
    grid-template-rows: auto;
    /* Taille des lignes ajustée automatiquement */
    gap: 10px;
    /* Espacement entre les images */
    margin: 0 auto;
    /* Centrer horizontalement */
}

.imgAllProject {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    /* Maintient le ratio */
    object-fit: cover;
}

/* Appliquer une disposition aléatoire */
#divContentAllProject a:nth-child(1) {
    grid-column: span 2;
}

/* Image plus grande */
#divContentAllProject a:nth-child(2) {
    grid-row: span 2;
}

/* Image plus haute */
#divContentAllProject a:nth-child(3) {
    grid-column: span 1;
}

#divContentAllProject a:nth-child(4) {
    grid-column: span 1;
    grid-row: span 1;
}


.site-title a {
    display: flex;
    flex-direction: row;
    text-decoration: none;
}

.site-title h1 {
    font-size: 15px;
    color: #000000;
}

.site-title h2 {
    font-size: 15px;
    color: #000000;
    font-weight: 100;
}

/* Navigation */
/* ------------------------------------------------------------------------------------------------------------ */
nav ul {
    list-style-type: none;
    display: flex;
    gap: 20px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 10px;
    display: block;
}

nav ul li:hover>a {
    color: #800080;
}

/* Menu déroulant */
/* ------------------------------------------------------------------------------------------------------------ */
nav ul li .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 150px;
    z-index: 10;
}

nav ul li:hover .dropdown {
    display: block;
}

.dropdown li a {
    padding: 10px 20px;
    color: #333;
}

.dropdown li a:hover {
    background-color: #f0f0f0;
    color: #800080;
}

/* Carrousel */
/* ------------------------------------------------------------------------------------------------------------ */
.carousel {
    flex: 1;
    width: 100%;
    height: 70vh;
   
    overflow: hidden;
    margin: 0;
 
    padding: 0;

}

.slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.imgSlide {
    min-width: 100%;
    height: 70vh;
    object-fit: cover;
    margin: 0;
    padding: 0;
}



/* Project Detail */
/* ------------------------------------------------------------------------------------------------------------ */
.project-detail {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
}

.project-info {
    flex: 1;
    padding-right: 20px;
}

.project-info h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.project-info p {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}
.carouselDetail {
    flex: 1;
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: relative;
}

.slidesDetail {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
    touch-action: pan-x;
}


.slideImageDetail {
    min-width: 100%;
    height: 60vh;
    object-fit: cover;
    margin: 0;
    padding: 0;
}

/* Enable touch sliding */
.carouselDetail {
    -webkit-overflow-scrolling: touch;
}

.carouselDetail .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
}

.carouselDetail .arrow.left {
    left: 10px;
}

.carouselDetail .arrow.right {
    right: 10px;
}

.carousel-thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.carousel-thumbnails img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    margin: 0 5px;
    cursor: pointer;
    opacity: 0.6;
}

.carousel-thumbnails img.active {
    border: 2px solid #800080;
    opacity: 1;
}

.carousel-thumbnails {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.carousel-thumbnails img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    margin: 0 5px;
    cursor: pointer;
    opacity: 0.6;
}

.carousel-thumbnails img.active {
    border: 2px solid #800080;
    opacity: 1;
}

/* Add drag functionality */
.carousel-thumbnails:active {
    cursor: grabbing;
}


/* image hover */
/* ------------------------------------------------------------------------------------------------------------ */


.image-container:hover img {
    transform: scale(1.1) rotate(1deg);
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-container img {
    object-fit: cover;
    transition: transform 0.5s ease; /* Animation pour zoom */
}

.image-container .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Assombrissement léger */
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease; /* Transition douce */
    pointer-events: none; /* Pour que le clic reste sur le lien */
}

.image-container .overlay span {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.image-container:hover img {
    transform: scale(1.1); /* Zoom léger */
}

.image-container:hover .overlay {
    opacity: 1; /* Apparition du voile noir */
}



/* Responsive Design */
/* ------------------------------------------------------------------------------------------------------------ */
@media (max-width: 768px) {
    body, main {
        margin-bottom: 20px;
    }

    /* Mobile Styles */
    header {
        flex-direction: column;
        padding: 2rem;
        text-align: center;
    }

    nav {
        margin-top: 3rem;
    }

    nav ul li:hover .dropdown {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    nav ul {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }

    .imgAllProject {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    #divContentAllProject {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        grid-template-columns: repeat(2, 1fr);
        /* Deux colonnes */
        grid-template-rows: repeat(4, 1fr);
        /* Plus de lignes */
    }

    nav ul li {
        text-align: center;
        justify-content: center;
        align-items: center;
    }

    .site-title h1 {
        font-size: 20px;
    }

    .carousel {
        height: 50vh;
    }

    .footer-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
    }

    .project-detail {
        flex-direction: column;
    }

    .project-info {
        padding-right: 0;
        margin-bottom: 20px;
    }

    .carousel {
        height: 50vh;
    }

    .carouselDetail {
        width: 100vw;
        max-width: 100vw;
        margin-left: -20px; /* Pour compenser le padding du body/main si besoin */
        margin-right: -20px;
    }

    .slidesDetail {
        width: 100vw;
        max-width: 100vw;
    }

    .slideImageDetail {
        height: 30vh;
        min-width: 100vw;
        width: 100vw;
        object-fit: cover;
    }

    .carousel-thumbnails img {
        width: 60px;
        height: 36px;
    }
}