html:lang(fr) #content ul.recent-posts li article , 
html:lang(en) #content ul.recent-posts li article , 
html:lang(tzm) #content ul.recent-posts li article { display: flex; flex-direction: row-reverse; text-align: left; }

body.single-post div#main {padding-top:45px;}


.post-thumbnail img.preload-me { 
  aspect-ratio: 16 / 5;
  object-fit: cover;
  width: 100%;
  border-radius: 13px;
  object-position: center -170px;
  border-radius: 30px;
}

.under-hr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  flex-direction: row-reverse;
}

/* Left Button */
.back-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 223px;
    height: 58px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    color: #090909;
    background: #fff;
    border: 1px solid #000;
    border-radius: 121px;
}
section#a2a_follow_widget-2 {
    background-color: white;
    display: contents;
}
.addtoany_list a, .widget .addtoany_list a {
    border: 0;
    box-shadow: none;
    display: inline-block;
    font-size: 16px;
    padding: 0px 0px;
}
/* Right Share Block */
html:lang(ar) .member-share { text-align: right; }
html:lang(fr) ..member-share { text-align: left; }

.member-share .share-text {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
  	color: #000000;
}

.member-share-icons a {
    margin-left: 10px;
    font-size: 20px;
    color: #000;
}

section#a2a_follow_widget-2 .addtoany_list {
    display: flex !important;
    flex-direction: row-reverse !important; /* right → left */
    direction: rtl !important;
}
span.publicationdate { display: inline-flex; align-items: flex-end; grid-gap: 11px; } 
.publicationdate { font-weight: 600; font-size: 16px; line-height: 20px; color: #BB1A25; }

/* ===== Member Single Container ===== */


.member-single {
    /*max-width: 800px; 
    margin: 20px auto;*/
    padding: 10px;
    border-radius: 12px;
    background-color: #fff;
    box-sizing: border-box;
}

/* ===== Header (Image + Info) ===== */
.member-header {
    display: flex;
    align-items: center; /* vertical centering */
    /* gap: 20px; */
    flex-wrap: wrap; /* allows wrapping on small screens */
}

/* Image on the left */
.member-image {
    order: 1; /* image first */
    flex: 0 0 250px;
    text-align: left;
}

/*.member-image img {
    width: 100%;
    border-radius: 0;
    object-fit: cover;
    display: block;
} */
.member-image {
    width: 364px;
    height: 327px;
    overflow: hidden; /* crop anything that exceeds */
    border-radius: 60px !important;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* keeps the image proportional and fills the box */
    display: block;
}

/* Text on the right */
.member-info {
    order: 2; /* text second */
    /* flex: 1; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 37px;
    text-align: right;
    gap: 15px;
}


.member-meta {
    display: flex;
    align-items: center;
    gap: 10px; 
   
}


/* ===== Biography ===== */
.member-description {
  margin-top: 40px;
    margin-bottom: 40px;
    font-size: 17px;
    line-height: 1.6;
    color: #000000;
   /* text-align: right; */
    font-weight: 400;
    text-align: justify;
}

/* ===== Back Button and Share Section on same line ===== */
.under-hr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  flex-direction: row-reverse;
}


section#a2a_follow_widget-2 {
    background-color: white;
    display: contents;
}
.addtoany_list a, .widget .addtoany_list a {
    border: 0;
    box-shadow: none;
    display: inline-block;
    font-size: 16px;
    padding: 0px 0px;
}
/* Right Share Block */

.member-share .share-text {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
  	color: #000000;
}

.member-share-icons a {
    margin-left: 10px;
    font-size: 20px;
    color: #000;
}

section#a2a_follow_widget-2 .addtoany_list {
    display: flex !important;
    flex-direction: row-reverse !important; /* right → left */
    direction: rtl !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  
   .member-header {
        flex-direction: column; 
        align-items: center;
        text-align: center;
    }

    .member-info {
        width: 100%;
        justify-content: center;
        margin-bottom: 15px;
    }
   .member-image {
        width: 100%;
        margin-bottom: 15px;
        text-align: center;
    }
}
  @media (max-width: 768px) {
    .member-title {
        text-align: center;
        font-size: 27px;
    }
    .member-header {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
   }
    .member-info {
     margin-right: 0px;
   }
    .under-hr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
  }
    .post-thumbnail img.preload-me {
      object-position: center -57px;
      height: 150px;
    }
}
.row {
    width: 100%;
}

.member-share {display: inline-flex; justify-content: space-between; width: 100%; flex-direction: row-reverse;align-items: center;}


span.publicationdate {
    display: flex !important;
    justify-content: center !important;
    color:black !important;
}
.recent-posts li article {
        grid-gap: 10px;
}
html:lang(ar) .widget-title {
    text-align: right;
    direction: rtl;
}
ul.recent-posts {
    text-align: right;
    direction: rtl;
    margin-right: 0 !important;
}
.post-content {
    display: flex;
    flex-direction: column; /* empile verticalement */
}
.post-content time {
    order: 1; /* en haut */
    margin-bottom: 5px;
}

.post-content a {
    order: 2; /* après le time */
}

.post-content br {
    display: none;
}

.col-8.rtlcst p {
    text-align: justify !important;
}
section#a2a_share_save_widget-2 {
    background-color: transparent;
	padding: 10px 0px;
}
section#a2a_share_save_widget-2 a {
    filter: grayscale(1);
}

/* Swiper pour les gallery */
div#page div.wf-container-main div.swiper {margin:initial;}
div#page div.wf-container-main div.dt-gallery-container br { display: none; }
div#page div.wf-container-main div.swiper div.swiper-wrapper { padding-top: initial; }
dt.gallery-icon.landscape a, dt.gallery-icon.landscape a img { width: 100%; }

#page div.dt-gallery-container {
    display: grid;
}
.dt-gallery-container > div img {
    aspect-ratio: 16 / 5;
    object-fit: cover;
    object-position: center -170px;
    border-radius: 30px;
}
dt.gallery-icon.landscape { border-radius: 30px; overflow: hidden; }

div#gallery-nav-0 { position: relative; min-height: 56px; display: grid; align-content: center; align-items: center;}
#page .swiper-button-prev, #page .swiper-button-next { margin-top: auto; }
.swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal {
    display: flex;align-items: center;
    height: 70px;
    margin: auto;
}

div#popup {
  	display:flex;
	position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#popupImage {
    max-width: 90%;
    max-height: 90%;
}

.popup-overlay .next-btn {
    right: 10px;
}
.popup-overlay .prev-btn {
    left: 10px;
}
.popup-overlay .prev-btn, .popup-overlay .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #fff;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.popup-overlay .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}
.close:hover {
    color: #000;
    text-decoration: none;
}
.close {
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
}
