/* style.css - Version corrigée */
:root {
    --bg: #242424;
    --fg: #000;
    --muted: #555;
    --accent: #828282;
}

body {
    margin: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    font-family: "Space Mono", monospace;
    color: var(--accent);
}

/* Menu commun - style original conservé */
.links-container {
    position: fixed;
    top: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
    background: var(--bg);
    padding: 20px 0;
    opacity: 0.9;
}

.links-container a {
    color: var(--accent);
    text-decoration: none;
    font-size: 18px;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.links-container a.active {
    color: white !important;
    font-weight: bold;
}

.links-container a:hover {
    color: rgb(197, 197, 197);
}

/* Galerie classique */
.gallery-container {
    width: 80%;
    max-width: 1200px;
    margin-top: 80px;
}

.gallery {
    column-count: 4;
    column-gap: 10px;
    width: 100%;
}

.gallery img {
    width: 100%;
    display: block;
    margin-bottom: 10px;
    object-fit: contain;
    break-inside: avoid;
    cursor: pointer;
    border: 1px solid #3b3b3b;
}

.gallery img:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Galerie horizontale (expo.php) */
.gallery5-container {
    width: 100%;
    margin-top: 60px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    touch-action: pan-y;
    height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    padding: 0 0 20px 0;
}

.gallery5-container::-webkit-scrollbar {
    display: none;
}

.gallery5 {
    display: flex;
    flex-direction: row;
    gap: 30px;
    padding: 0 50px;
    height: 100%;
    align-items: center;
    flex-wrap: nowrap;
}

.gallery5 img {
    max-height: 70vh;
    object-fit: cover;
    flex-shrink: 0;
    pointer-events: auto;
    border: none;
    cursor: pointer;
}

.gallery5 img:hover {
    transform: none;
    box-shadow: none;
}

/* Galerie diptyque */
.gallery2 {
    display: flex;
    gap: 40px;
    max-width: 80vw;
    margin-top: 80px;
    justify-content: center;
    align-items: center;
    min-height: calc(80vh - 80px);
}

.gallery2 img {
    max-width: calc(40vw - 20px);
    max-height: 70vh;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.5s ease, transform 0.3s;
    cursor: pointer;
    border: none;
}

.gallery2 img:hover {
    transform: scale(1.01);
}

/* Galerie triptyque */
.gallery3 {
    display: flex;
    gap: 20px;
    max-width: 90vw;
    margin-top: 80px;
    justify-content: center;
    align-items: center;
    min-height: calc(80vh - 80px);
}

.gallery3 img {
    max-width: 30vw;
    max-height: 70vh;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease, transform 0.3s;
    cursor: pointer;
    border: none;
}

.gallery3 img:hover {
    transform: scale(1.01);
}

/* Page "savoir" (infos.php) */
.wrap {
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - 60px);
    width: 100%;
    margin-top: 60px;
}

.text {
    flex: 1;
    padding: 50px;
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    position: relative;
    padding: 40px;
}

.floating-image {
    width: 80%;
    max-height: 80vh;
    object-fit: contain;
    animation: float 12s ease-in-out infinite;
    transform-origin: center;
    border: none !important;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(2deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(-2deg); }
}

/* Styles texte */
h1, .quote, .source, p, .contact {
    color: #d6d6d6;
    margin: 0 0 16px 0;
    line-height: 1.6;
}

h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 20px;
}

.quote {
    font-size: clamp(16px, 2.2vw, 20px);
    margin-bottom: 8px;
}

.source {
    font-style: italic;
    color: #747474;
    margin-bottom: 32px;
    font-size: clamp(14px, 1.8vw, 18px);
}

.contact {
    margin-top: 28px;
    font-style: italic;
}

a {
    color: #d6d6d6;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: white;
    text-decoration: underline;
}

.btn {
    display: inline-block;
    margin-top: 24px;
    padding: 10px 16px;
    border: 2px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn:hover {
    color: white;
    background: rgba(130, 130, 130, 0.2);
}

/* Styles corrigés pour la lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(24, 24, 24, 0.97);
    overflow: hidden;
    justify-content: center;
    align-items: center;
}

.lightbox-slider {
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
    position: relative;
    justify-content: center;
    align-items: center;
}

.lightbox-slider-inner {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.lightbox-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    min-width: 100%;
}

.lightbox-slide img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border: none;
}

/* Pour les flèches de navigation */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(192, 192, 192, 0.8);
    border: none;
    font-size: 4vh;
    cursor: pointer;
    z-index: 10;
    user-select: none;
    background: none;
    padding: 0 30px;
}

#prev-lightbox {
    left: 20px;
}

#next-lightbox {
    right: 20px;
}

/* Pour le bouton de fermeture */
.close-lightbox {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
}


/* Flèches de navigation */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(192, 192, 192, 0.8);
    border: none;
    font-size: 4vh;
    cursor: pointer;
    z-index: 10;
    user-select: none;
    background: none;
    padding: 0 30px;
}

#prev-lightbox {
    left: 20px;
}

#next-lightbox {
    right: 20px;
}




/* Responsive */
@media (max-width: 768px) {

    /* Masquer les flèches sur mobile */
    #prev-lightbox, #next-lightbox {
        display: none !important;
    }

    .gallery { column-count: 2; }
    .gallery5 { gap: 15px; padding: 0 20px; }
    .gallery5 img { max-height: 50vh; }

    .gallery2, .gallery3 {
        flex-direction: column;
        gap: 10px;
        margin-top: 100px;
    }

    .wrap { flex-direction: column; }
    .floating-image { width: 90%; }
}
