/* BlogLight V4 - Styles de base */

.bl-trigger {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
	pointer-events: auto;
}

.bl-trigger:hover {
    background: #005a87;
}

.zone_pelagique a.bl-trigger {
	padding:0; background:transparent; border-radius:0;
}

.zone_pelagique a.bl-trigger .photo {
	background: red;
    display: flex;
    justify-content: center;
    align-items: center;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    height: 22dvw;
    width: 22dvw;
    border-radius: 50%;
    border: .6dvw solid rgb(255, 255, 255);
}

/* Overlay de la lightbox */
.backLightBox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
}

.backLightBox .bl-lightbox h1, .backLightBox .bl-lightbox h2, .backLightBox .bl-lightbox h3 {
	font-family: 'comfortaaregular';
}

.backLightBox.active {
    display: flex;
}

/* Contenu de la lightbox */
.bl-lightbox {
    background: rgb(255,255,255);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 92dvw;
    height: 90dvh;
    overflow: hidden;
    position: relative;
    animation: bl-fadeIn 0.3s ease;
}

@keyframes bl-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Header de la lightbox */
.bl-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bl-title {
    margin: 0 0 0 50%;
    translate: -50% 0;
    font-size:1.2rem;
    color:rgb(177,177,177);
}

.bl-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius:4px;
} 
	.bl-close .closeModal {
		stroke:#b0b0bb;
	}

.bl-close:hover {
    background: #e30000;
}
	.bl-close:hover .closeModal {
		stroke:#ffffff;
	}

/* Contenu principal */
.bl-content {
    padding: 1rem 1rem 0rem 1rem;
    height:calc(90dvh - 9.8rem);
    overflow-y: auto;
}

.bl-content hr {
	display: block;
    margin: 2.5rem auto;
    width: 60%;
    height: 2px;
    border: none;
    background: linear-gradient(45deg, rgb(200, 0, 0, 0), rgb(235 235 235), rgb(200, 0, 0, 0));
}

/* Pagination */
.bl-pagination {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.bl-pagination button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
}

.bl-pagination button:hover {
    background: #005a87;
}

.bl-pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Posts dans la lightbox */
.bl-post {
    padding:.5rem 0;
	display: flex;
    flex-flow: row wrap;
    justify-content: center;
}

.bl-post:last-child {
    border-bottom: none;
}

.bl-post-title {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: #333;
	width: fit-content;
}

.bl-post-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.bl-post-excerpt {
    color: #555;
}

.bl-post-excerpt p {
	padding: 0 3rem 0 1.5rem;
    text-align: justify;
    margin: -3rem 0 0 0;
}

.bl-post-thumbnail {
    /* margin: 0 15px 15px 0;
	width: 30%; */
    box-sizing: border-box;
	width: 28dvw;
    height: 28dvw;
    max-width: 300px;
    max-height: 300px;
	background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
	border: .5rem solid rgba(210, 210, 210, 1);
}

.bl-post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.bl-post-block {
	position:relative;
	padding: 0 1rem;
	width: 65%;
    box-sizing: border-box;
	display: flex;
    flex-wrap: wrap;
    align-content: space-between;
}

p.btnReadMore {
	border: solid #90a2af54;
    border-width: 0 0 1px 1px;
    padding: .3rem;	
}

/* Info posts */
.bl-posts-info {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* Loading state */
.bl-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.bl-loading:after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Améliorations pour les galeries */
.bl-gallery-thumbnails {
    text-align: center;
    margin-bottom: 20px;
    max-height: 120px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
}

.bl-thumb {
    display: inline-block;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.bl-thumb.active,
.bl-thumb:hover {
    border-color: #0073aa;
    opacity: 1;
}

.bl-thumb:not(.active) {
    opacity: 0.7;
}

.bl-gallery-main {
    text-align: center;
}

	.bl-gallery-main .bl-prev, .bl-gallery-main .bl-next {
		position: absolute; z-index: 3; font-size:3rem; border:none; background:transparent; color:rgb(177, 177, 177, .5);
		transition:all 250ms linear; cursor:pointer;
	} 
		.bl-gallery-main .bl-prev {left:1rem;}
			.bl-gallery-main .bl-prev:hover {scale:1.3;}
		.bl-gallery-main .bl-next {right:1rem;}
			.bl-gallery-main .bl-next:hover {scale:1.3;}
/*
.bl-main-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	transition: opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
} */

.bl-gallery-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.bl-gallery-main button {
	opacity:1;
}


.bl-gallery-main button:disabled {
    opacity:0;
    cursor: not-allowed;
}

.bl-counter {
    font-weight: bold;
    color: #333;
    min-width: 60px;
}

/* Navigation dans les articles */
.bl-post-title:hover {
    text-decoration: underline;
}

.bl-read-more {
    text-decoration: none;
    font-weight: bold;
	pointer-events: all;
	color: #90a2af;
}

.bl-read-more:hover {
    text-decoration: underline;
}

.bl-back-btn:hover {
    background: #005a87 !important;
}

/* Toast notifications */
.bl-toast {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Navigation dans les articles */
.bl-article-nav-top {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.bl-article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.bl-nav-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
}

.bl-nav-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.bl-nav-btn small {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-top: 5px;
    font-weight: normal;
}

.bl-nav-placeholder {
    /* Espace vide pour maintenir la grille */
}

.bl-back-to-list {
    background: #666;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.bl-back-to-list:hover {
    background: #444;
}

/* Single post dans lightbox */
.bl-single-post-title {
    margin: 20px 0;
    color: #333;
    font-size: 28px;
    line-height: 1.3;
}

.bl-post-content {
    margin: 25px 0;
    line-height: 1.7;
}

.bl-post-content h2,
.bl-post-content h3,
.bl-post-content h4 {
    margin: 25px 0 15px 0;
    color: #333;
}

.bl-post-content p {
    margin-bottom: 15px;
}

.bl-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 15px 0;
}

/* Conteneur de pagination dédié */
.bl-pagination-container {
    border-top: 1px solid #eee;
    background: #fafafa;
}

/* Pagination existante */
.bl-pagination {
    padding: 1.2rem 1.5rem;
    text-align: center;
    margin: 0; /* Retirer les marges car c'est maintenant dans un conteneur dédié */
	box-sizing: border-box;
	position: absolute;
	bottom: 0;
	width: 100%;
	background: rgb(255,255,255);
}

/* Pagination pour articles individuels */
.bl-pagination[data-type="article"] {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 20px;
}

.bl-nav-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
}

.bl-nav-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.bl-nav-btn small {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-top: 5px;
    font-weight: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-nav-placeholder {
    /* Espace vide pour maintenir la grille */
}

.bl-back-to-list {
    background: #666;
}

.bl-back-to-list:hover {
    background: #444;
}

/* ///////////////////////////////////////////////////////////////// */

/* Supprimer les bordures de focus sur les boutons de galerie */
.bl-gallery-main .bl-prev,
.bl-gallery-main .bl-next,
.bl-gallery-nav,
.bl-gallery-nav *,
.bl-counter {
    outline: none !important;
    border: none !important;
}

.bl-gallery-main .bl-prev:focus,
.bl-gallery-main .bl-next:focus,
.bl-gallery-nav:focus,
.bl-counter:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}


/* ///////////////////////////////////////////////////////////////// */
/* Styles pour les titres dans les descriptions de galerie */
.bl-gallery-texte h1,
.bl-gallery-texte h2,
.bl-gallery-texte h3,
.bl-gallery-texte h4,
.bl-gallery-texte h5,
.bl-gallery-texte h6 {
    margin-top: 0;
    margin-bottom: 15px;
    font-family: 'comfortaaregular', inherit;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.bl-gallery-texte h1 { font-size: 2.2em; }
.bl-gallery-texte h2 { font-size: 1.8em; }
.bl-gallery-texte h3 { font-size: 1.5em; }
.bl-gallery-texte h4 { font-size: 1.3em; }
.bl-gallery-texte h5 { font-size: 1.1em; }
.bl-gallery-texte h6 { font-size: 1em; }

/* Espacement entre les titres et le contenu suivant */
.bl-gallery-texte h1 + p,
.bl-gallery-texte h2 + p,
.bl-gallery-texte h3 + p,
.bl-gallery-texte h4 + p,
.bl-gallery-texte h5 + p,
.bl-gallery-texte h6 + p {
    margin-top: 0;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .bl-gallery-texte h1 { font-size: 1.8em; }
    .bl-gallery-texte h2 { font-size: 1.5em; }
    .bl-gallery-texte h3 { font-size: 1.3em; }
    .bl-gallery-texte h4 { font-size: 1.2em; }
    .bl-gallery-texte h5,
    .bl-gallery-texte h6 { font-size: 1em; }
}
/* ///////////////////////////////////////////////////////////////// */

/* Styles pour les erreurs d'images */
.bl-image-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 8px;
}

.bl-error-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.bl-error-message h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 18px;
}

.bl-error-message p {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 14px;
}

.bl-error-message small {
    color: #adb5bd;
    font-size: 12px;
}

/* Animation pour les erreurs */
.bl-image-error {
    animation: fadeInError 0.5s ease-in-out;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ///////////////////////////////////////////////////////////////// */

/* === GESTION DES IMAGES DANS L'ADMIN === */
.bl-image-item {
    position: relative;
    display: inline-block;
    margin: 5px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: move;
}

.bl-image-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
}

.bl-image-item:hover {
    border-color: #0073aa;
}

.bl-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3232;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-image-remove:hover {
    background: #a00;
}

.bl-images-container {
    min-height: 100px;
    border: 1px dashed #ddd;
    padding: 10px;
    border-radius: 4px;
    background: #f9f9f9;
}

.bl-images-container.drag-over {
    border-color: #0073aa;
    background: #e6f3ff;
}

.bl-drag-placeholder {
    width: 80px;
    height: 80px;
    margin: 5px;
    border: 2px dashed #0073aa;
    background: rgba(0, 115, 170, 0.1);
    display: inline-block;
}

/* ///////////////////////////////////////////////////////////////// */

/* Styles pour les conteneurs de texte dans les galeries */
.bl-gallery-texte {
    /* Pour le moment, aucun style spécifique comme demandé */
    /* La div hérite des styles de .bl-image-container */
}

/* Styles pour le background des textes */
.bl-gallery-texte-back {
    height: 100%;
    z-index: 1;
    width: 100%;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95);
    background-blend-mode: overlay;
    filter: grayscale(100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    top: 0;
    left: 0;
    border-radius: inherit;
}

.bl-image-container .bl-gallery-texte {
    z-index: 2;
    position: relative;
	width: 80%;
    padding: 1rem 2rem;
    text-align: left;
    max-width: 600px;
}

/* Assurer que le conteneur parent est bien positionné */
.bl-image-container {
    position: relative;
}

/* S'assurer que les paragraphes dans le texte s'affichent correctement */
.bl-gallery-texte p {
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.bl-gallery-texte p:last-child {
    margin-bottom: 0;
}

/* ///////////////////////////////////////////////////////////////// */
/* Contraintes de taille pour les galeries */
.bl-gallery-content {
    height:87dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.bl-lightbox.bl-gallery .bl-gallery-content {
	height: 73dvh;
}
/*/////////////////////////////////////////////////////////////////////////// */

.bl-lightbox.bl-fullscreen-gallery .bl-gallery-content {
    height:87dvh;	
}

.bl-gallery-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.bl-main-image {
    max-width: 90%;
    max-height: 98%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* transition: opacity 0.3s ease; */
	transition: opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
	z-index:2;
}

.bl-gallery-nav {
    flex-shrink: 0; /* Empêche la navigation de se réduire */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 15px;
    color: white;
}

.bl-gallery-nav button {
    background:rgb(50, 70, 170);
    color:#fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.bl-gallery-nav button:hover:not(:disabled) {
    background: #f0f0f0;
    transform: scale(1.05);
}

.bl-gallery-nav button:disabled {
    background: #666;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.bl-counter {
    font-weight: bold;
    color:rgb(177, 177, 177);
    min-width: 60px;
    text-align: center;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .bl-gallery-nav {
        padding: 10px;
        gap: 15px;
    }
    
    .bl-gallery-nav button {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* /////////////////////////////////////////// */
/* Mode plein écran pour galeries */
.bl-lightbox.bl-fullscreen-gallery {
    width: 100dvw !important;
    height: 100dvh !important;
    border-radius: 0 !important;
	background:transparent;
}

.bl-lightbox.bl-fullscreen-gallery .bl-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: transparent;
    color: white;
}

.bl-lightbox.bl-fullscreen-gallery .bl-content {
    height: 100vh;
    padding: 60px 0 0 0; /* Espace pour le header */
}

.bl-lightbox.bl-fullscreen-gallery .bl-gallery-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
	margin: 0 0 1.5rem 0;
}

/* Mode normal (par défaut) */
.bl-lightbox:not(.bl-fullscreen-gallery) {
    width: 92dvw;
    height: 90dvh;
	max-width: 1000px;
}
/* /////////////////////////////////////////// */

.bl-lightbox.bl-page-mode .bl-content {
	height:calc(90dvh - 7rem);
}
	.bl-lightbox.bl-page-mode .bl-content .bl-page-content {
		width:100%;
		max-width:750px;
		margin:0 auto;
		padding: 0 0 1rem 0;
	}
	
	.bl-lightbox.bl-page-mode .bl-content .bl-page-content h2:first-child {
		margin:0 0 1rem 0;
	}
	.bl-lightbox.bl-page-mode .bl-content .bl-page-content h2 {
		margin:0 0 1rem 0;
	}
	
	.bl-lightbox.bl-page-mode .bl-content .bl-page-content h3 {
		margin:1.5rem 0 .5rem 0;
	}
	
	.bl-lightbox.bl-page-mode .bl-content .bl-page-content p {
		padding:0rem 2rem 1rem 2rem; text-align:justify;
	}
		.bl-lightbox.bl-page-mode .bl-content .bl-page-content p.en-exergue {
			text-align:center; line-height:calc(130% - .25rem); font-size:130%; font-family:'comfortaaregular'; font-style:italic;
		}
	.bl-lightbox.bl-page-mode .bl-content .bl-page-content .wp-block-group.quatreQuart {
		display:flex; justify-content:space-between; flex-flow:row wrap; margin:0 0 1rem 0;
	}
	
	.bl-lightbox.bl-page-mode .bl-content .bl-page-content .wp-block-group.quatreQuart figure {
		width:48%;
	}
	
	.bl-lightbox.bl-page-mode.bl-page-framed-mode .bl-content {
		overflow:hidden; height:calc(90dvh - 6rem);
	}
	
/* /////////////////////////////////////////// */
@media (max-width: 960px) {
	.bl-post-excerpt p {
		padding: 0 0rem 0 .5rem;
		margin: 0rem 0 0 0;
	}
}

/* //////////////////////////////// */
	.bl-open-full-page {
		transition: background 0.2s ease;
	}

	.bl-open-full-page:hover {
		background: #ccc !important;
	}

	.bl-open-full-page:active {
		transform: scale(0.98);
	}


/* Responsive pour articles */
@media (max-width: 768px) {
    .bl-pagination[data-type="article"] {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bl-nav-btn {
        padding: 12px 15px;
    }
}

/* Amélioration responsive */
@media (max-width: 768px) {
    .bl-pagination-container {
        border-top: 1px solid #ddd;
    }
    
    .bl-pagination {
        padding: 12px 15px;
    }
    
    .bl-pagination button {
        padding: 6px 12px;
        font-size: 14px;
    }

    .bl-article-navigation {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bl-nav-btn {
        padding: 12px 15px;
    }
    
    .bl-single-post-title {
        font-size: 22px;
    }

    .bl-lightbox {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .bl-header {
        padding: 1.2rem;
    }
    
    .bl-content {
        padding: 1.2rem;
    }
    
    .bl-post-thumbnail {
        margin: 0 0 15px 0;
        max-width: 100%;
		width: 100%;
        max-width: none;
    }
	
	.bl-post-block {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.bl-title {
		margin: 0;
		translate: 0 0;
	}
}

/* =====================================================
   AJOUTS AU FICHIER bloglight.css
   ===================================================== */

/* ========================================
   STYLES POUR LES DESCRIPTIONS DE GALERIE
   ======================================== */

.bl-gallery-description {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #0073aa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: 'Georgia', serif;
    line-height: 1.6;
    position: relative;
}

.bl-gallery-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0073aa 0%, #005a87 100%);
    border-radius: 8px 8px 0 0;
}

.bl-gallery-description-before {
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.bl-gallery-description-after {
    margin-top: 30px;
    border-top: 2px solid #e9ecef;
}

.bl-gallery-description h1,
.bl-gallery-description h2,
.bl-gallery-description h3,
.bl-gallery-description h4,
.bl-gallery-description h5,
.bl-gallery-description h6 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.bl-gallery-description h1 { font-size: 1.8em; }
.bl-gallery-description h2 { font-size: 1.6em; }
.bl-gallery-description h3 { font-size: 1.4em; }
.bl-gallery-description h4 { font-size: 1.2em; }

.bl-gallery-description p {
    margin-bottom: 15px;
    color: #495057;
    text-align: justify;
}

.bl-gallery-description p:last-child {
    margin-bottom: 0;
}

.bl-gallery-description ul,
.bl-gallery-description ol {
    margin: 15px 0;
    padding-left: 30px;
}

.bl-gallery-description li {
    margin-bottom: 8px;
    color: #495057;
}

.bl-gallery-description a {
    color: #0073aa;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.bl-gallery-description a:hover {
    color: #005a87;
    border-bottom-color: #005a87;
}

.bl-gallery-description blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    border-left: 4px solid #6c757d;
    background: rgba(108, 117, 125, 0.1);
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

.bl-gallery-description img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Ancres pour navigation rapide */
.bl-description-anchor {
    position: absolute;
    top: -20px;
    visibility: hidden;
}

/* ==============================
============================== */

.loader, .loader:before, .loader:after {
	border-radius: 50%;
	width: 2.5em;
	height: 2.5em;
	animation-fill-mode: both;
	animation: bblFadInOut 1.8s infinite ease-in-out;
}
.loader {
	color: #d8d8d8;
	font-size: 5px;
	position: absolute;
	text-indent: -9999em;
	transform: translateZ(0);
	animation-delay: -0.16s;
	z-index:1;
}
.loader:before,
.loader:after {
	content: '';
	position: absolute;
	top: 0;
}
.loader:before {
	left: -3.5em;
	animation-delay: -0.32s;
}
.loader:after {
	left: 3.5em;
}

@keyframes bblFadInOut {
	0%, 80%, 100% { box-shadow: 0 2.5em 0 -1.3em }
	40% { box-shadow: 0 2.5em 0 0 }
}
    

/* ==============================
   STYLES POUR LES FIGCAPTIONS
   ============================== */

.bl-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
	z-index:2;
}

.bl-image-caption {
    padding:.1rem .5rem .5rem .5rem;
    font-size: 14px;
    color:rgb(150, 160, 180);
    /* font-style: italic;
    line-height: 1.5;
    background: rgba(255,255,255,0.95);
    border-radius: 6px;
    border-top: 3px solid #0073aa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 90%;
    margin-left: auto;
    margin-right: auto; */
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.bl-image-caption:hover {
    background: rgba(255,255,255,1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Animation d'entrée pour les figcaptions */
@keyframes fadeInCaption {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bl-image-caption {
    animation: fadeInCaption 0.6s ease-out;
}

/* Mode sans figcaptions
.bl-gallery-content:not(.bl-show-figcaptions) .bl-image-caption {
    display: none;
}
 */
/* =======================================
   CLASSES UTILITAIRES POUR LES GALERIES
   ======================================= */

/* Galerie avec descriptions */
.bl-has-descriptions {
    padding: 10px 0;
}

.bl-has-descriptions .bl-gallery-main {
    margin: 20px 0;
}

/* Différentes positions de descriptions */
.bl-descriptions-before .bl-gallery-description-before {
    border-bottom: 3px solid #0073aa;
    margin-bottom: 35px;
}

.bl-descriptions-after .bl-gallery-description-after {
    border-top: 3px solid #0073aa;
    margin-top: 35px;
}

.bl-descriptions-both .bl-gallery-description-before {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 25px;
}

.bl-descriptions-both .bl-gallery-description-after {
    border-top: 2px solid #e9ecef;
    margin-top: 25px;
}

/* ===========================
   AMÉLIORATIONS RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .bl-gallery-description {
        margin: 15px 0;
        padding: 15px;
        font-size: 14px;
    }
    
    .bl-gallery-description h1 { font-size: 1.6em; }
    .bl-gallery-description h2 { font-size: 1.4em; }
    .bl-gallery-description h3 { font-size: 1.3em; }
    .bl-gallery-description h4 { font-size: 1.2em; }
    
    .bl-image-caption {
        font-size: 13px;
        padding: 10px 15px;
        margin-top: 12px;
        max-width: 95%;
    }
    
    .bl-descriptions-before .bl-gallery-description-before,
    .bl-descriptions-both .bl-gallery-description-before {
        margin-bottom: 20px;
    }
    
    .bl-descriptions-after .bl-gallery-description-after,
    .bl-descriptions-both .bl-gallery-description-after {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .bl-gallery-description {
        margin: 10px -5px;
        padding: 12px;
        border-radius: 6px;
        font-size: 13px;
    }
    
    .bl-image-caption {
        font-size: 12px;
        padding: 8px 12px;
        margin-top: 10px;
        max-width: 100%;
    }
}

/* ===============================
   ACCESSIBILITÉ ET NAVIGATION
   =============================== */

/* Focus visible pour navigation clavier */
.bl-gallery-content:focus-within .bl-gallery-nav {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Indicateurs visuels pour les raccourcis clavier */
.bl-gallery-content::after {
    content: "Raccourcis: ← → pour naviguer, D pour description, C pour légendes, Échap pour fermer";
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(151, 151, 151, 0.7);
    background: rgba(0, 0, 0, 0.02)
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    /* opacity: 0; */
    transition: opacity 0.3s ease;
}

/* .bl-gallery-content:hover::after {
    opacity: 1;
} */

/* Masquer l'aide sur mobile */
@media (max-width: 768px) {
    .bl-gallery-content::after {
        display: none;
    }
}

/* ===============================
   MODE PLEIN ÉCRAN AVEC DESCRIPTIONS
   =============================== */

.bl-lightbox.bl-fullscreen-gallery .bl-gallery-description {
    margin: 25px auto;
    max-width: 800px;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
}

.bl-lightbox.bl-fullscreen-gallery .bl-image-caption {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
}

/* ===============================
   ANIMATIONS ET TRANSITIONS
   =============================== */

/* Animation pour l'apparition des descriptions */
@keyframes slideInDescription {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bl-gallery-description {
    animation: slideInDescription 0.8s ease-out;
}

/* Transition smooth pour le scroll vers descriptions */
.bl-content {
    scroll-behavior: smooth;
}

/* Effet hover pour les liens dans les descriptions */
.bl-gallery-description a {
    position: relative;
    overflow: hidden;
}

.bl-gallery-description a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0073aa, transparent);
    transition: left 0.3s ease;
}

.bl-gallery-description a:hover::before {
    left: 100%;
}

/* ===============================
   ÉTATS SPÉCIAUX
   =============================== */

/* Mode sombre pour les descriptions (optionnel) */
.bl-gallery-content.dark-mode .bl-gallery-description {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    border-left-color: #3498db;
}

.bl-gallery-content.dark-mode .bl-gallery-description::before {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
}

.bl-gallery-content.dark-mode .bl-image-caption {
    background: rgba(44, 62, 80, 0.95);
    color: #ecf0f1;
    border-top-color: #3498db;
}

/* Mode haute lisibilité */
.bl-gallery-content.high-contrast .bl-gallery-description {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

.bl-gallery-content.high-contrast .bl-image-caption {
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}

/* ===============================
   AMÉLIORATIONS POUR L'IMPRESSION
   =============================== */

@media print {
    .bl-gallery-description {
        background: transparent;
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .bl-image-caption {
        background: transparent;
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .bl-gallery-content::after {
        display: none;
    }
}

/* ===============================
   SUPPORT RTL (Right-to-Left)
   =============================== */

[dir="rtl"] .bl-gallery-description {
    border-left: none;
    border-right: 5px solid #0073aa;
}

[dir="rtl"] .bl-gallery-description blockquote {
    border-left: none;
    border-right: 4px solid #6c757d;
    border-radius: 4px 0 0 4px;
}

/* ===============================
   PRÉCHARGEMENT ET OPTIMISATIONS
   =============================== */

/* Optimisation des transitions */
.bl-gallery-description,
.bl-image-caption {
    will-change: transform, opacity;
}

/* Réduction des animations pour les utilisateurs qui les préfèrent réduites */
@media (prefers-reduced-motion: reduce) {
    .bl-gallery-description,
    .bl-image-caption {
        animation: none;
        transition: none;
    }
    
    .bl-content {
        scroll-behavior: auto;
    }
    
    .bl-gallery-description a::before {
        display: none;
    }
}

/* ===============================
   CORRECTIONS SPÉCIFIQUES
   =============================== */

/* Correction pour éviter le débordement en mode plein écran */
.bl-lightbox.bl-fullscreen-gallery .bl-content {
    padding-bottom: 80px; /* Espace pour la navigation */
}

/* Assurer la visibilité du texte sur tous les backgrounds */
.bl-gallery-description,
.bl-image-caption {
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

/* Correction pour les images très larges */
.bl-lightbox .bl-gallery-description img {
    max-width: calc(100% - 40px);
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Espacement cohérent pour les listes dans les descriptions */
.bl-gallery-description ul ul,
.bl-gallery-description ol ol,
.bl-gallery-description ul ol,
.bl-gallery-description ol ul {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Style pour les codes dans les descriptions */
.bl-gallery-description code {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.bl-gallery-description pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    border-left: 4px solid #0073aa;
}

.bl-gallery-description pre code {
    background: none;
    padding: 0;
}

/* === AMÉLIORATION RÉORGANISATION IMAGES === */
.bl-image-item {
    position: relative;
    display: inline-block;
    margin: 5px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: move;
}

.bl-image-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
}

.bl-image-number {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #0073aa;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.bl-image-controls {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bl-image-remove {
    background: #dc3232;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-image-move {
    background: #46b450;
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 16px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-image-move:hover,
.bl-image-remove:hover {
    opacity: 0.8;
}

.bl-reorder-controls {
    margin: 10px 0;
    padding: 10px;
    background: #f0f8ff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bl-reorder-controls button {
    margin: 0 5px;
    padding: 5px 10px;
    font-size: 12px;
}

/* Styles pour les pages liées dans la lightbox */
.bl-lightbox.bl-linked-page {
    width: 85vw;
    height: 92vh;
    max-width: 1300px;
    max-height: none;
}

.bl-lightbox.bl-linked-page .bl-header {
	box-shadow:0 20px 5px -20px rgba(100,100,100, .5);
}

.bl-lightbox.bl-linked-page .bl-content {
    padding: 0;
	height:80dvh;
	box-shadow:inset 0 -20px 10px -24px rgb(67, 67, 67, .33);
}

.bl-linked-page .bl-linked-page-content {
    padding: 20px; max-width: 1200px; margin: 0 auto;
}

.bl-lightbox.bl-linked-page .bl-content .internave {
	position: absolute;
    top: 45px;
    left: 50%;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 10px;
    border-radius: 4px;
    translate: -50% 0%;
    z-index: 1000;
}
	.bl-lightbox.bl-linked-page .bl-content .internave button.blGalerieOtab {
		background: none;
		border: none;
		color: white;
		cursor: pointer;
		margin-right: 10px;
		font-size: 12px;
	}
	.bl-lightbox.bl-linked-page .bl-content .internave button.blGalerieBack {
		background: none; 
        border: none; 
        color: white; 
        cursor: pointer;
        font-size: 12px;
	}

@media (max-width: 768px) {
	.bl-lightbox.bl-linked-page {
		width: 100dvw;
		height: 100dvh;
	}
	.bl-lightbox.bl-linked-page .bl-content {
		height: 88dvh;
	}
	.bl-lightbox.bl-linked-page .bl-content .internave {
		left:1rem;
		translate:0 0;
		top: 50px;
		padding: 3px 7px;
	}
	
	.bl-lightbox.bl-linked-page .bl-content h1.entry-title {
		font-size:2.3rem;
	}
	
}


.bl-lightbox.bl-page-mode .bl-content iframe body#milesDavis #theFooter {
	display:none;
}

/* ========================================
   ICONS SVG - Styles de base
   ======================================== */

.bl-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    stroke: currentColor;
    flex-shrink: 0; /* Empêche l'icône de rétrécir dans flexbox */
}

/* Tailles prédéfinies */
.bl-icon-sm {
    width: 16px;
    height: 16px;
}

.bl-icon-md {
    width: 24px;
    height: 24px;
}

.bl-icon-lg {
    width: 32px;
    height: 32px;
}

/* Icône de fermeture spécifique */
.bl-icon-close {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bl-icon-close:hover {
    opacity: 0.7;
}

/* ========================================
   BOUTON FERMETURE LIGHTBOX
   ======================================== */

.bl-close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10001;
    
    /* Style du bouton */
    width: 50px;
    height: 50px;
    padding: 5px;
    
    /* Couleur par défaut */
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    
    /* Transition douce */
    transition: all 0.3s ease;
    
    /* Centrer l'icône */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icône SVG à l'intérieur */
.bl-icon-close-lightbox {
    width: 40px;
    height: 40px;
    stroke: white; /* Couleur par défaut : blanc */
    transition: stroke 0.3s ease;
}

/* ⭐ HOVER : Fond rouge + icône blanche */
.bl-close-lightbox:hover {
    background: #dc3545; /* Rouge */
    transform: scale(1.05); /* Légère augmentation */
}

.bl-close-lightbox:hover .bl-icon-close-lightbox {
    stroke: white; /* Reste blanc au survol */
}

/* État actif (clic) */
.bl-close-lightbox:active {
    transform: scale(0.95);
}

/* Focus pour accessibilité clavier */
.bl-close-lightbox:focus {
    outline: 3px solid rgba(220, 53, 69, 0.5);
    outline-offset: 2px;
}

/* Responsive : plus petit sur mobile */
@media (max-width: 768px) {
    .bl-close-lightbox {
        width: 44px;
        height: 44px;
        top: 10px;
        right: 10px;
    }
    
    .bl-icon-close-lightbox {
        width: 32px;
        height: 32px;
    }
}
