/* Variables pour garder une cohérence de design */
:root {
    --bg-color: #fafafa;
    --text-color: #1a1a1a;
    --accent-color: #777;
    --spacing: 2rem;
}

/* Reset de base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Navigation globale */
nav {
    padding: var(--spacing);
    display: flex;
    gap: 2rem;
    justify-content: center;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 3rem;
}

nav a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

nav a.active {
    font-weight: 600;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 2px;
}

/* Layouts */
.home {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    overflow: hidden;
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing) 4rem;
}

/* Page d'accueil */
.home-container h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.home-container h2 {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--accent-color);
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.enter-link {
    position: relative;
}

.enter-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--text-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.5s cubic-bezier(0.86, 0, 0.07, 1);
}

.enter-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Page Présentation */
.text-content p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    text-align: justify;
}

.presentation-image-wrapper {
    margin-top: 3rem;
    text-align: center;
}

.presentation-image {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Page Peintures */
.page-title {
    font-weight: 300;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.gallery-year {
    margin-bottom: 4rem;
}

.gallery-year h2 {
    font-weight: 300;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 0.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem 2rem;
}

/* Vignettes des toiles */
.artwork-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.artwork {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5; /* Donne une uniformité à la grille */
    overflow: hidden;
    background-color: #e5e5e5;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Centre et recadre proprement l'image miniature */
    display: block;
}

.artwork:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Textes sous l'image */
.artwork-info {
    text-align: center;
    color: var(--text-color);
}

.artwork-title {
    font-weight: 500;
    font-size: 0.95rem;
    display: block;
}

.artwork-dim {
    color: var(--accent-color);
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 0.2rem;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

/* La lightbox s'affiche quand elle est ciblée par l'URL (#lightbox-...) */
.lightbox:target {
    opacity: 1;
    visibility: visible;
}

/* Le fond agit comme un bouton géant pour fermer au clic */
.lightbox-close {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: zoom-out;
}

.lightbox-content {
    position: relative;
    z-index: 2; /* Garde l'image au-dessus de la zone de clic de fermeture */
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none; /* Empêche l'image de bloquer le clic vers la fermeture... */
}

.lightbox-content img {
    pointer-events: auto;
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain; /* Assure que l'image complète est visible */
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
}

.lightbox-caption {
    pointer-events: auto;
    color: #fff;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-align: center;
}

.lightbox-caption .artwork-dim {
    color: #bbb;
    margin-left: 8px;
}