/* ================= BASE PAGE PROJET ================= */

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #efe3cf;
    color: #560000;
    line-height: 1.6;
    overflow-x: hidden;
}

.section-content {
    padding: 140px 60px 80px 60px;
    max-width: 1200px;
    margin: auto;
}

/* ================= TITRE ================= */

.section-content h1, .section-content h2 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-content p {
    max-width: 100%; /* texte sur toute la largeur disponible */
    color: black;
    font-size: 1.05rem;
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ================= GALERIE / LOGOS ================= */

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.project-gallery .image-wrapper {
    background: #efe3cf;
    border-radius: 8px; /* contour plus fin */
    padding: 4px;       /* contour réduit */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-gallery .image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.project-gallery img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* ================= IMAGES / VIDEOS GRANDES ================= */

.image-wrapper.large {
    height: 520px;
}

/* Responsive adjustments for projects pages */
@media (max-width: 768px) {
    .project-gallery { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
    .project-gallery .image-wrapper { height: 180px; }
    .image-wrapper.large { height: 380px; }
    .section-content { padding: 80px 24px 60px 24px; }
}

@media (max-width: 480px) {
    .project-gallery { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
    .project-gallery .image-wrapper { height: 140px; }
    .image-wrapper.large { height: 260px; }
    .section-content { padding: 60px 16px; }
}

/* ================= LIGHTBOX ================= */

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* ================= ANIMATION AU SCROLL ================= */

.show-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.show-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================= ANIMATION FADE ================= */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ================= VIDEOS ================= */

.video-section {
    width: 100%;
    margin: 40px 0;
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-wrapper video,
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* ================= VIDEOS CÔTÉ À CÔTÉ ================= */

.video-side-by-side {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.video-side-by-side .video-wrapper {
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.video-side-by-side .video-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* ================= CARROUSEL ================= */

.carousel {
    margin: 60px 0;
    text-align: center;
}

.carousel h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #560000;
}

.carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.carousel-container {
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.carousel-slide {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    flex-shrink: 0;
}

/* boutons */

.carousel-btn {
    background: transparent;
    color: #560000;
    border: 2px solid #560000;
    font-size: 28px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: #560000;
    color: #efe3cf;
}

/* ================= LIENS ================= */

.links-section {
    margin: 40px 0;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.links-section p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.links-section a {
    color: #560000;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s;
}

.links-section a:hover {
    border-bottom: 2px solid #560000;
}