/* Reset et variables */
:root {
    --primary-color: #333;
    --secondary-color: #666;
    --background-color: #fff;
    --accent-color: #888;
    --spacing-unit: 1rem;
    --max-width: 1200px;
    --nav-height: 70px;
    --footer-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Arial', sans-serif;
    background-color: #fff;
    padding-bottom: calc(var(--footer-height) + 2rem);
    margin: 0;
}

#wrapper {
    flex: 1 0 auto;
    width: 100%;
    min-height: calc(100vh - var(--footer-height));
    position: relative;
}

main {
    width: 100%;
    padding-bottom: 4rem;
    margin-bottom: 2rem;
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--background-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.main-nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent-color);
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1000;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

/* Page d'accueil */
.hero {
    height: 100vh;
    position: relative;
}

.artist-image {
    height: 70vh;
    overflow: hidden;
}

.artist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-intro {
    padding: calc(var(--spacing-unit) * 2);
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Galerie */
.gallery {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-unit);
    background: url('../images/gallery-background.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: calc(100vh - 80px);
    margin-top: 80px;
    position: relative;
}

/* Ajout d'un overlay pour meilleure lisibilité */
.gallery::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: -1;
}

.gallery-filters {
    margin-bottom: calc(var(--spacing-unit) * 2);
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: var(--spacing-unit);
    border-radius: 4px;
}

.filter {
    border: none;
    background: none;
    padding: var(--spacing-unit);
    cursor: pointer;
    color: var(--secondary-color);
}

.filter.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.artwork {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: white;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.artwork:hover {
    transform: translateY(-5px);
}

.artwork img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.artwork-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.artwork:hover .artwork-info {
    transform: translateY(0);
}

.artwork-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.artwork-info p {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Lightbox amélioré */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    padding: 2rem;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    margin: auto;
    display: block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.lightbox .close:hover {
    color: #ccc;
}

.lightbox .caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    padding: 1rem;
    font-size: 1.2rem;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Contact */
.contact {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 2);
}

.contact-info {
    text-align: center;
}

.contact-details {
    margin-top: calc(var(--spacing-unit) * 2);
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Footer */
footer {
    position: fixed;
    bottom: -100px; /* Caché par défaut */
    left: 0;
    width: 100%;
    height: var(--footer-height);
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    z-index: 1000;
    transition: bottom 0.3s ease-in-out;
}

footer.visible {
    bottom: 0;
}

footer p {
    margin: 0;
    text-align: center;
    color: #fff;
}

footer a {
    color: white !important;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
    color: white;
}

/* Page d'erreur 404 */
.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.error-container {
    text-align: center;
    padding: calc(var(--spacing-unit) * 2);
}

.error-container h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-unit);
}

.back-home {
    display: inline-block;
    margin-top: var(--spacing-unit);
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 2);
    background-color: var(--primary-color);
    color: var(--background-color);
    text-decoration: none;
    border-radius: 4px;
}

.back-home:hover {
    background-color: var(--secondary-color);
}

/* Admin Link */
.admin-link {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.admin-link:hover {
    background-color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .artist-image {
        max-width: 80%;
        margin: 0 auto 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }

    .main-nav ul {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--background-color);
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        gap: 1rem;
        text-align: center;
    }

    .main-nav ul.active {
        display: flex;
    }

    .burger-menu.active span:first-child {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:last-child {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .gallery-filters {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .filter {
        width: 100%;
        margin: 0.5rem 0;
    }

    .artwork {
        margin: 1rem 0;
    }

    .contact-info {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .main-nav {
        padding: 1rem;
    }

    .artist-intro h1 {
        font-size: 2rem;
    }

    .artist-image {
        max-width: 100%;
    }

    .gallery {
        padding: 1rem;
    }

    .artwork-info {
        padding: 0.5rem;
    }

    .contact {
        padding: 2rem 1rem;
    }

    .carousel-button {
        padding: 0.5rem;
        font-size: 1.5rem;
    }
}
