/* ==========================================================
   PORTFOLIO
   ========================================================== */

.page-title {
    font-family: var(--font-titres);
    font-size: var(--taille-h1);
    font-weight: var(--poids-gras);
    text-align: center;
    padding-bottom: 0.5rem; /* Espace pour la lueur */
    background: rgba(255, 215, 0, 0.9);
    
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow:
            0 0 5px rgba(255, 215, 0, 0.4),
            0 0 10px rgba(255, 165, 0, 0.2);
}

/* --- 1. Disposition générale de la page --- */
main { display: flex; justify-content: center; }
#portfolio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5rem;
    width: 100%;
}

/* --- 2. Styles des cadres de présentation --- */
.cadre-presentation {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    color: white;
}
.glass-effect.cadre-presentation {
    background-color: rgba(38, 49, 64, 0.20);
}
.encadrement { /* S'applique à .encadrement.glass-effect */
    padding: 2rem;
}

/* --- 3. Styles du bloc de description --- */
.oeuvre-description {
    min-width: 0;
}

.oeuvre-description p {
    color: rgba(255, 250, 200, 0.9);
}

/* Style pour la série */
.oeuvre-description p.oeuvre-serie {
    font-style: italic;
    color: #00ffff;
    font-size: 1rem;
}

/* Style pour la disponibilité */
.oeuvre-description p.oeuvre-disponibilite {
    color: white;
}

/* Style pour le format */
.oeuvre-description p.oeuvre-format {
    font-family: var(--font-oceanside);
}

/* Style pour le prix */
.oeuvre-description p.oeuvre-prix {
    font-size: 1.5rem;
}

/* Style pour le titre de l'oeuvre */
.titre-wrapper {
    position: relative; /* Ajout de cette ligne */
}


/* Style pour le titre de l'oeuvre */
.titre-wrapper h3 {
    background: linear-gradient(to right,
        rgba(255, 215, 0, 0.5),
        rgba(255, 215, 0, 0.9) 25%,
        rgba(255, 215, 0, 0.9) 75%,
        rgba(255, 215, 0, 0.5)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow:
         0 0 5px rgba(255, 215, 0, 0.4),
         0 0 10px rgba(255, 165, 0, 0.2);
    font-size: 2.2rem;
    margin: 0;
}

/* --- 4. Styles pour le logo "Vendu" (Desktop) --- */
.logo-vendu-desktop {
    position: absolute;
    top: -40%;
    left: 100%;
    transform: rotate(-25deg);
    height: 3rem;
    width: auto;
    margin-left: 0.75rem;
}

/* --- 5. Styles des images d'oeuvres --- */

.oeuvre-image {
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    position: relative;
}

.image-link-wrapper {
    display: block;
    cursor: pointer;
    text-decoration: none;
    background-image: none;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.artwork-image {
    display: block;
    width: 100%;
    height: auto;
    transition: box-shadow 0.3s ease-in-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.artwork-image:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

/* On applique la rotation DESKTOP via une variable CSS */
.image-link-wrapper[data-rotation-desktop] {
    transform: rotate( calc(var(--rotation-desktop, 0) * 1deg) );
}

/* CORRIGÉ : On augmente la spécificité pour annuler la rotation au survol, sans !important */
.image-link-wrapper[data-rotation-desktop]:hover {
    transform: rotate(0deg);
}


/* --- 6. Dispositions spécifiques G/D/C --- */
.cadre-oeuvre-gauche .oeuvre-image,
.cadre-oeuvre-droite .oeuvre-image {
    flex: 0 1 45%;
    padding: 2rem;
}

.cadre-oeuvre-gauche .oeuvre-description,
.cadre-oeuvre-droite .oeuvre-description {
    flex: 1 1 55%;
    padding: 0;
}

.cadre-oeuvre-gauche {
    flex-direction: row;
    text-align: left;
}

.cadre-oeuvre-droite {
    flex-direction: row-reverse;
    text-align: right;
}

.cadre-oeuvre-centre {
    flex-direction: column;
    text-align: center;
}
.cadre-oeuvre-centre .oeuvre-image {
    padding: 2rem 2rem 0;
}


/* ==========================================================
   SURCHARGE POUR PETITS ÉCRANS (< 768px)
   ========================================================== */
@media (max-width: 768px) {
    
    #portfolio-container {
        gap: 3rem;
    }
    
    .cadre-presentation {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .oeuvre-image {
        width: 90%;
        margin-top: 1rem;
        padding: 0;
    }
    .cadre-oeuvre-gauche .oeuvre-description,
    .cadre-oeuvre-droite .oeuvre-description,
    .cadre-oeuvre-centre .oeuvre-description {
        padding: 0;
        line-height: 1.2;
    }
    
    
    .logo-vendu-desktop { display: none; }

    .oeuvre-image.is-vendu::after {
        content: '';
        display: block;
        position: absolute;
        bottom: -2.5rem;
        right: -15px;
        width: 100px;
        height: 47px;
        background-image: url(/images/logo_vendu.png);
        background-size: contain;
        background-repeat: no-repeat;
        transform: rotate(-15deg);
        pointer-events: none;
        z-index: 5;
    }
    
    .image-link-wrapper { width: 100%; aspect-ratio: 1 / 1; border-radius: 4px; background-size: cover; background-position: center; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); }
    
    /* On applique la rotation MOBILE et on surcharge la version PC */
    .image-link-wrapper[data-rotation-mobile] {
        transform: rotate( calc(var(--rotation-mobile, 0) * 1deg) );
    }
    
    /* On annule la rotation au "toucher" sur mobile */
    .image-link-wrapper[data-rotation-mobile]:active {
        transform: rotate(0deg);
    }
    
    
    .artwork-image { display: none; }
}
