/* Styles de la galerie (inchangés) */
.wp-galerie-categorie {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.wp-galerie-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
    aspect-ratio: 1 / 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
}

.wp-galerie-item:hover {
    transform: translateY(-5px);
}

.wp-galerie-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.comment-count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    z-index: 10;
}

/* Styles pour le bouton de like sur la vignette (inchangés) */
.likes-button {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.likes-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.likes-button .dashicons-heart {
    font-size: 0.9em;
    height: 0.9em;
    width: 0.9em;
    color: #fff;
    transition: color 0.3s ease;
}

.likes-button.liked {
    background-color: #e0245e;
}

.likes-button.liked .dashicons-heart {
    color: white;
}


/* Styles de la lightbox (inchangés pour le conteneur principal) */
.galerie-categorie-lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.galerie-categorie-lightbox .lightbox-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    gap: 20px;
    overflow: hidden;
}

.galerie-categorie-lightbox .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.galerie-categorie-lightbox .close-btn:hover,
.galerie-categorie-lightbox .close-btn:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.galerie-categorie-lightbox .lightbox-image-wrapper {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    /* padding-right: 20px; -- ENLEVÉ car ça décalait l'image par rapport au chevron */
    min-width: 400px;
}

.galerie-categorie-lightbox .lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

/* NOUVEAUX STYLES POUR LES BOUTONS DE NAVIGATION (CHEFRONS) */
.galerie-categorie-lightbox .nav-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto 0;
    background-color: transparent;
    color: white; /* Couleur par défaut du chevron */
    border: none;
    cursor: pointer;
    z-index: 11; /* Z-index plus élevé pour s'assurer qu'il est au-dessus de l'image */
    transition: color 0.3s ease, text-shadow 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px; /* Zone cliquable */
    padding: 0;
}

.galerie-categorie-lightbox .nav-btn:hover {
    background-color: transparent;
    color: #f0f0f0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}


.galerie-categorie-lightbox .nav-btn .dashicons {
    font-size: 6em;
    height: auto;
    width: auto;
    line-height: 1;
}

.galerie-categorie-lightbox .prev-btn {
    left: 0; /* Collé au bord gauche de l'image-wrapper */
}

.galerie-categorie-lightbox .next-btn {
    right: 0; /* Collé au bord droit de l'image-wrapper */
}

/* Styles pour le bouton de like dans la lightbox (juste un coeur) (inchangés) */
.lightbox-actions {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#like-button {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    line-height: 1;
}

#like-button .dashicons-heart {
    font-size: 1em;
    height: 1em;
    width: 1em;
    color: #888; /* Cœur gris par défaut (non liké) */
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

#like-button.liked .dashicons-heart {
    color: #e0245e; /* Cœur rouge quand liké */
    text-shadow: 0 0 5px rgba(224, 36, 94, 0.5);
}

#like-button:hover:not(.liked) .dashicons-heart {
    color: #b0b0b0;
}

.likes-count-lightbox {
    font-size: 1.1em;
    font-weight: bold;
    color: #555;
}


.galerie-categorie-lightbox .lightbox-comments-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    padding-left: 20px; /* Garder ce padding pour l'espace entre image et commentaires */
    border-left: 1px solid #eee;
}

.galerie-categorie-lightbox .lightbox-comments-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.4em;
}

#comments-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.comment-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.comment-author {
    margin: 0;
    font-size: 0.9em;
    color: #555;
}

.comment-author strong {
    color: #333;
}

.comment-author .comment-date {
    font-size: 0.8em;
    color: #999;
    font-weight: normal;
    margin-left: 5px;
}

.comment-text {
    margin: 5px 0 0;
    font-size: 0.95em;
    line-height: 1.4;
    color: #444;
}

#comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#comment-form input[type="text"],
#comment-form input[type="email"],
#comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 0.9em;
}

#comment-form textarea {
    min-height: 80px;
    resize: vertical;
}

#comment-form button[type="submit"] {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

#comment-form button[type="submit"]:hover:not(:disabled) {
    background-color: #005177;
}

#comment-form button[type="submit"]:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

/* NOUVEAU: Styles pour le conteneur des boutons de partage */
.social-share-buttons {
    display: flex; /* Utilise flexbox pour aligner les boutons */
    gap: 10px; /* Espace entre les boutons */
    margin-top: 15px; /* Espace au-dessus des boutons */
    justify-content: center; /* Centrer les boutons si vous les mettez sur une ligne */
    align-items: center;
    flex-wrap: wrap; /* Permet aux boutons de passer à la ligne si l'espace est insuffisant */
}

.social-share-buttons .share-button {
    display: inline-flex; /* Pour centrer l'icône et le texte (si ajouté) */
    align-items: center;
    justify-content: center;
    width: 40px; /* Taille fixe pour les boutons */
    height: 40px;
    border-radius: 50%; /* Boutons ronds */
    background-color: #eee; /* Couleur de fond par défaut */
    color: #333; /* Couleur de l'icône par défaut */
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.social-share-buttons .share-button:hover {
    transform: translateY(-2px); /* Petit effet au survol */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.social-share-buttons .share-button .dashicons {
    font-size: 20px; /* Taille de l'icône Dashicon */
    width: 20px; /* Assurer que l'icône prend bien l'espace */
    height: 20px;
    line-height: 1; /* Aligner verticalement l'icône */
}

/* Couleurs spécifiques pour les réseaux sociaux (optionnel, mais joli) */
.social-share-buttons .share-facebook { background-color: #3b5998; color: #fff; }
.social-share-buttons .share-twitter { background-color: #00acee; color: #fff; }
.social-share-buttons .share-pinterest { background-color: #E60023; color: #fff; }
.social-share-buttons .share-linkedin { background-color: #0077b5; color: #fff; }
.social-share-buttons .share-email { background-color: #7d7d7d; color: #fff; }
.social-share-buttons .share-whatsapp { background-color: #25D366; color: #fff; }


/* Styles pour les Dashicons (si non déjà inclus, ce qui devrait être le cas) */
.dashicons {
    /* Style par défaut pour les dashicons */
    font-family: 'Dashicons';
    vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
    .galerie-categorie-lightbox .lightbox-content {
        flex-direction: column;
        max-width: 95%;
        max-height: 95%; /* Utilisé max-height pour éviter que ça ne prenne 95vh sur des écrans très hauts où le contenu n'est pas si grand */
        padding: 15px;
        overflow-y: auto;
    }

    .galerie-categorie-lightbox .lightbox-image-wrapper {
        flex: none;
        width: 100%;
        padding-right: 0;
        margin-bottom: 20px;
        min-height: unset;
        min-width: unset;
    }

    .galerie-categorie-lightbox .lightbox-comments-section {
        flex: none;
        width: 100%;
        min-width: unset;
        max-width: unset;
        padding-left: 0;
        border-left: none;
    }

    #comments-list {
        height: 150px;
        max-height: 200px;
        margin-bottom: 10px;
    }

    /* Ajustement des boutons de navigation sur mobile */
    .galerie-categorie-lightbox .nav-btn {
        width: 40px;
    }
    .galerie-categorie-lightbox .nav-btn .dashicons {
        font-size: 4em;
    }
    .galerie-categorie-lightbox .prev-btn {
        left: 0;
    }
    .galerie-categorie-lightbox .next-btn {
        right: 0;
    }

    /* Ajustement du bouton like sur mobile */
    .lightbox-actions {
        justify-content: center;
    }
    #like-button {
        font-size: 2em;
    }
}