/* Variables et reset */
:root {
    --color-primary: #2c3e50;
    --color-secondary: #7f8c8d;
    --color-text: #333;
    --color-text-light: #666;
    --color-border: #e0e0e0;
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-overlay: rgba(0, 0, 0, 0.6);
    --font-primary: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: Georgia, 'Times New Roman', serif;
    --transition: 200ms ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --nav-height: 144px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover, a:focus {
    color: var(--color-accent-dark);
    outline: none;
}


button {
    font-family: inherit;
    cursor: pointer;
}

/* Utilitaires */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    /* box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); */
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    height: 50%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    margin: auto;
    font-size: 2.5rem;
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 600;
}

.nav-menu {
    margin: auto;
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    width: 100%;
}

.nav-menu a[aria-current="page"] {
    color: var(--color-accent-dark);
}

.nav-menu a[aria-current="page"]::after {
    width: 100%;
}

.nav-toggle {
    text-align: left;
    display: none;
    background: none;
    border: none;
    padding: 8px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    position: relative;
    transition: background var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    transition: transform var(--transition);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg) translateY(8px);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg) translateY(-8px);
}

/* Main content */
main {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

/* Home section */
.home-section {
    position: relative;
    height: calc(100vh - var(--nav-height));
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.home-overlay {
    position: absolute;
    inset: 0;
}

.home-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 32px;
}

.home-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.home-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 300;
    margin-bottom: 32px;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 4px;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--color-accent-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: white;
}

/* Intro section */

.intro-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding-bottom: 80px;
}

.intro-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.intro-content p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.link-arrow {
    display: inline-block;
    margin-top: 16px;
    font-weight: 600;
    color: var(--color-accent);
}

.link-arrow::after {
    content: ' →';
}

/* Page header */
.page-header {
    padding: 64px 0 48px;
    text-align: center;
    background: var(--color-bg-alt);
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--color-primary);
    margin-bottom: 16px;
}

.page-header .lead {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Galleries grid */
.galleries-grid {
    padding: 64px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.gallery-card {
    background: white;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.gallery-card:hover,
.gallery-card:focus-within {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.gallery-link {
    display: block;
    color: inherit;
}

.gallery-link:focus {
    outline: none;
}

.gallery-link:focus .gallery-card {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

.gallery-thumbnail {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.gallery-card:hover .gallery-thumbnail img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    color: var(--color-text-light);
    font-style: italic;
}

.gallery-info {
    padding: 24px;
}

.gallery-title {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: 8px;
}

.gallery-count {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* Gallery page */
.gallery-page {
    padding: 48px 0 80px;
}

.gallery-header {
    margin-bottom: 48px;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.back-link:hover {
    color: var(--color-accent);
}

.gallery-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
}

.artworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 48px;
}

.artwork-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.artwork-image-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.artwork-image-btn:hover,
.artwork-image-btn:focus {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.artwork-image-btn:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

.artwork-image-btn img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform var(--transition);
}

.artwork-image-btn:hover img {
    transform: scale(1.05);
}

.artwork-placeholder {
    aspect-ratio: 3/4;
    background: var(--color-bg-alt);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-style: italic;
    border: 2px dashed var(--color-border);
}

.artwork-info {
    text-align: center;
}

.artwork-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.artwork-technique-size {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 500;
    margin-bottom: 4px;
}

.artwork-description {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-style: italic;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms ease, visibility 250ms ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-container {
    position: relative;
    display: inline-block;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-caption {
    margin-top: 24px;
    color: white;
    text-align: center;
    max-width: 600px;
}

.lightbox-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.lightbox-technique-size {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 8px;
}

.lightbox-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.lightbox-price {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    backdrop-filter: blur(5px);
}

.lightbox-close:hover,
.lightbox-close:focus,
.lightbox-prev:hover,
.lightbox-prev:focus,
.lightbox-next:hover,
.lightbox-next:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.lightbox-close {
    top: 24px;
    right: 24px;
}

.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

/* Expositions */
.expositions-section {
    padding: 48px 0 80px;
}

.filter-bar {
    margin-bottom: 48px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.filter-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    transition: border-color var(--transition);
}

.filter-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.expositions-list {
    max-width: 800px;
    margin: 0 auto;
}

.exposition-card {
    display: flex;
    gap: 32px;
    padding: 32px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: all var(--transition);
}

.exposition-card:hover {
    box-shadow: var(--shadow-md);
}

.exposition-card.hidden {
    display: none;
}

.expo-date {
    flex-shrink: 0;
    width: 120px;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--color-accent);
}

.expo-content {
    flex: 1;
}

.expo-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.expo-location,
.expo-hours {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.icon {
    flex-shrink: 0;
}

/* About */
.about-section {
    padding: 48px 0 80px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 800px;
    margin: 0 auto;
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.about-text h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-top: 32px;
    margin-bottom: 12px;
}

.about-text .lead {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

.about-text p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-cta {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.about-image img {
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* Contact */
.contact-section {
    padding: 48px 0 80px;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 64px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.honeypot {
    position: absolute;
    left: -9999px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--color-primary);
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-hint {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.alert {
    padding: 20px 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert h2 {
    margin-bottom: 8px;
}

.contact-info h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.contact-info p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: var(--color-text-light);
}

/* Error page */
.error-page {
    padding: 80px 0;
    text-align: center;
}

.error-page h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.error-page p {
    color: var(--color-text-light);
    margin-bottom: 24px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--color-text-light);
}

.text-muted {
    color: var(--color-secondary);
}

/* Footer */
.site-footer {
    background: var(--color-primary);
    color: white;
    padding: 48px 0;
    text-align: center;
}

.site-footer p {
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
}

.footer-links a:hover {
    color: var(--color-accent);
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    .home-section {
        height: calc(50vh - var(--nav-height));
        min-height: 200px;
    }

    .nav-logo {
        font-size: 1.5rem;
    }
    
    .nav-toggle {
        display: block;
    }
    .nav-container {
        height: 100%;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        padding: 24px;
        gap: 0;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 300ms ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--color-border);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        display: block;
        padding: 16px 0;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 24px;
    }
    
    .artworks-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 32px;
    }
    
    .exposition-card {
        flex-direction: column;
        gap: 16px;
    }
    
    .expo-date {
        width: auto;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .about-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .lightbox-prev {
        left: 12px;
    }
    
    .lightbox-next {
        right: 12px;
    }
    
    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-price {
        bottom: 8px;
        right: 8px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .artworks-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-card,
.artwork-card,
.exposition-card {
    animation: fadeIn 400ms ease backwards;
}

.gallery-card:nth-child(1) { animation-delay: 0ms; }
.gallery-card:nth-child(2) { animation-delay: 50ms; }
.gallery-card:nth-child(3) { animation-delay: 100ms; }
.gallery-card:nth-child(4) { animation-delay: 150ms; }
.gallery-card:nth-child(5) { animation-delay: 200ms; }
.gallery-card:nth-child(6) { animation-delay: 250ms; }

/* Print */
@media print {
    .main-nav,
    .site-footer,
    .btn,
    .back-link {
        display: none;
    }
    
    main {
        margin-top: 0;
    }
}
