/* ============================================
   ARCHIVE / BLOG / SINGLE POST
   Chargé conditionnellement sur les pages archive, blog, single, search
   ============================================ */

/* ============================================
   Font-face - Roboto (Archive/Blog)
   ============================================ */
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/roboto/Roboto-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/roboto/Roboto-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   Archive & Blog grid
   ============================================ */
.category .articles,
.home-section-blog .articles,
.blog .articles,
.single-post .articles,
.search .articles {
  font-family: "Roboto";
  font-weight: normal;
  font-size: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.category .btn-all-posts,
.home-section-blog .btn-all-posts,
.blog .btn-all-posts,
.single-post .btn-all-posts,
.search .btn-all-posts {
  display: block;
  background-color: #3858e9;
  width: max-content;
  height: 40px;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: 600;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  border: 2px solid #3858e9;
  transition: all 0.2s ease-in;
  border-radius: 5px;
}

.category .btn-all-posts:hover,
.home-section-blog .btn-all-posts:hover,
.blog .btn-all-posts:hover,
.single-post .btn-all-posts:hover,
.search .btn-all-posts:hover {
  background-color: transparent;
  color: #54d393;
  border: 2px solid #54d393;
}

@media screen and (max-width: 798px) {
  .category .articles,
  .home-section-blog .articles,
  .blog .articles,
  .single-post .articles,
  .search .articles {
    grid-template-columns: 1fr;
  }
}

@media screen and (min-width: 799px) and (max-width: 1199px) {
  .category .articles,
  .home-section-blog .articles,
  .blog .articles,
  .single-post .articles,
  .search .articles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 1200px) {
  .category .articles,
  .home-section-blog .articles,
  .blog .articles,
  .single-post .articles,
  .search .articles {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   Search
   ============================================ */
.search h1.entry-title {
  text-align: center;
  color: #54d393;
}

.search h1.entry-title span {
  text-decoration: underline;
  text-decoration-color: #3858e9;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  margin-bottom: 30px;
}

.pagination .nav-previous a,
.pagination .nav-next a {
  text-decoration: none;
  color: #54d393;
  font-weight: 600;
}

/* ============================================
   Single Post
   ============================================ */
.single-post {
  font-family: "Roboto";
  font-weight: normal;
  font-size: 16px;
}

.single-post .header-content {
  max-width: 1000px;
  margin-inline: auto;
}

.single-post .header-content .post-thumbnail {
  position: relative;
}

.single-post .header-content .post-thumbnail img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}

.single-post .header-content .post-thumbnail .categories-links {
  position: absolute;
  bottom: 10px;
  left: 10px;
}

.single-post .header-content .post-informations {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.single-post .header-content .post-informations .title {
  color: #54d393;
  font-size: 50px;
  margin-top: 30px;
}

.single-post .header-content .post-informations .post-details-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: 10px;
  margin-top: 10px;
  margin-bottom: 30px;
  opacity: 0.4;
}

/* Single post content */
.single-post .page-content {
  font-size: 16px;
  line-height: 1.8em;
  font-family: "Roboto";
  font-weight: normal;
}

.single-post .page-content > h1 {
  font-size: 50px;
  line-height: 1.7;
}
.single-post .page-content > h2 {
  font-size: 36px;
  line-height: 1.7;
}
.single-post .page-content > h3 {
  font-size: 22px;
  line-height: 1.7;
}

.single-post .page-content > ul,
.single-post .page-content > ol {
  padding-left: 30px;
  list-style-position: outside;
}

.single-post .page-content > ul li,
.single-post .page-content > ol li {
  margin-bottom: 10px;
}

.single-post .page-content > a {
  cursor: pointer;
  text-decoration: none;
  color: #54d393;
  font-family: "Roboto";
  font-weight: normal;
}

.single-post .page-content > strong {
  color: #54d393;
  font-family: "Roboto";
  font-weight: normal;
}

.single-post .page-content .wp-block-quote {
  border-left: 5px solid #54d393;
  padding-left: 10px;
}

.single-post .page-content .wp-block-image {
  margin-top: 30px;
  margin-bottom: 30px;
}

/* Share article block */
.single-post .block-share-article {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  border-radius: 5px;
  border: 1px solid #ebebeb;
  box-shadow: 0 0 15px -3px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.single-post .block-share-article .share-article-wrapper {
  display: flex;
  align-items: center;
  column-gap: 20px;
}

.single-post .block-share-article .share-article-wrapper .links {
  display: flex;
  column-gap: 10px;
}

.single-post .block-share-article .share-article-wrapper .links a {
  width: 30px;
  height: 30px;
}

.single-post
  .block-share-article
  .share-article-wrapper
  .links
  .announce-share-link {
  display: block;
  width: 100%;
  height: 100%;
  isolation: isolate;
  transition: transform 0.3s ease-in-out;
}

.single-post
  .block-share-article
  .share-article-wrapper
  .links
  .announce-share-link
  img {
  cursor: pointer;
  filter: invert(88%) sepia(6%) saturate(3206%) hue-rotate(88deg)
    brightness(79%) contrast(112%);
  position: relative;
  z-index: -1;
}

.single-post
  .block-share-article
  .share-article-wrapper
  .links
  .announce-share-link:hover {
  transform: translateY(-3px);
}

.single-post
  .block-share-article
  .share-article-wrapper
  .links
  .announce-share-link:hover
  img {
  filter: invert(28%) sepia(89%) saturate(1640%) hue-rotate(218deg)
    brightness(91%) contrast(101%);
}

.single-post .block-share-article .more-announces,
.single-post .block-share-article .more-articles {
  display: flex;
  align-items: center;
  column-gap: 5px;
  text-decoration: none;
  color: #54d393;
}

.single-post .block-share-article .more-announces:hover,
.single-post .block-share-article .more-articles:hover {
  color: #3858e9;
}

/* Author block */
.single-post .block-author-article {
  display: flex;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #ebebeb;
  box-shadow: 0 0 15px -3px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.single-post .block-author-article .author-card {
  display: flex;
  flex-direction: row;
  padding: 20px;
}

.single-post .block-author-article .author-card .image img {
  display: block;
  width: auto;
  height: 100px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  margin-right: 20px;
}

.single-post .block-author-article .author-card .content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.single-post .block-author-article .author-card .content .nickname {
  font-size: 32px;
  margin-bottom: 0;
  text-align: left;
}

.single-post .block-author-article .author-card .content .social-links {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-bottom: 10px;
}

.single-post .block-author-article .author-card .content .social-links a {
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}

.single-post .block-author-article .author-card .content .social-links a img {
  width: 20px;
  height: 20px;
  filter: invert(88%) sepia(6%) saturate(3206%) hue-rotate(88deg)
    brightness(79%) contrast(112%);
  position: relative;
  z-index: -1;
}

.single-post .block-author-article .author-card .content .social-links a:hover {
  transform: translateY(-5px);
}

.single-post
  .block-author-article
  .author-card
  .content
  .social-links
  a:hover
  img {
  filter: invert(28%) sepia(89%) saturate(1640%) hue-rotate(218deg)
    brightness(91%) contrast(101%);
}

.single-post .block-author-article .author-card .content .description {
  text-align: justify;
}

/* Table of contents */
.single-post .table-of-contents {
  margin-top: 50px;
  width: 100%;
  padding-inline: 20px;
  z-index: 1;
}

.single-post .table-of-contents .toc-container {
  position: relative;
}

.single-post .table-of-contents .toc-container .toc-title {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
}

.single-post .table-of-contents .toc-container ul {
  display: block;
  width: 100%;
  max-width: 700px;
  height: auto;
  position: absolute;
  top: 35px;
  left: 50%;
  padding-top: 10px;
  padding-bottom: 10px;
  transform: translateX(-50%);
  border-radius: 10px;
  border: 1px solid #e4e4e4;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(3px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-in;
  box-shadow: 0 0 15px -3px rgba(0, 0, 0, 0.1);
}

.single-post .table-of-contents .toc-container ul li {
  list-style: none;
  font-size: 14px;
  padding: 10px 15px;
}

.single-post .table-of-contents .toc-container ul li a {
  color: white;
  text-decoration: none;
  transition: transform 0.3s ease-in;
}

.single-post .table-of-contents .toc-container ul li a:hover {
  transform: translateX(2px);
}

.single-post .table-of-contents .toc-container ul li:hover {
  border-left: 2px solid #54d393;
}

.single-post .table-of-contents .toc-container ul.toc-fade-in {
  opacity: 1;
  visibility: visible;
}

@media screen and (min-width: 1000px) {
  .single-post .table-of-contents.toc-fixed .toc-container {
    position: fixed;
    animation: slide-to-top-left 0.3s forwards;
  }

  .single-post .table-of-contents.toc-fixed .toc-container .toc-title {
    margin: unset;
  }

  .single-post
    .table-of-contents.toc-fixed
    .toc-container
    .toc-title
    .toc-icon {
    background-color: #54d393;
    padding: 4px;
    border-radius: 50%;
  }

  .single-post .table-of-contents.toc-fixed .toc-container .toc-title p {
    display: none;
  }

  .single-post .table-of-contents.toc-fixed .toc-container ul {
    top: 45px;
    left: 0;
    width: max-content;
    transform: translateX(0);
  }

  @keyframes slide-to-top-left {
    from {
      top: 0;
      left: 50%;
    }
    to {
      top: 10px;
      left: 10px;
    }
  }
}

@media screen and (max-width: 999px) {
  .single-post .table-of-contents.toc-fixed {
    position: fixed;
    bottom: 0;
  }

  .single-post .table-of-contents.toc-fixed .toc-container .toc-title {
    left: 20px;
    position: fixed;
    bottom: 20px;
  }

  .single-post
    .table-of-contents.toc-fixed
    .toc-container
    .toc-title
    .toc-icon {
    background-color: #54d393;
    padding: 4px;
    border-radius: 50%;
  }

  .single-post .table-of-contents.toc-fixed .toc-container .toc-title p {
    display: none;
  }

  .single-post .table-of-contents.toc-fixed .toc-container ul {
    max-width: 100%;
    top: unset;
    bottom: 65px;
  }
}

/* CTA article block */
.single-post .cta-article-block {
  margin-top: 50px;
  margin-bottom: 50px;
  padding: 30px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.single-post .cta-article-block .title {
  font-size: 24px;
  font-weight: bold;
  color: #343a40;
  margin-bottom: 15px;
}

.single-post .cta-article-block .texte {
  font-size: 16px;
  color: #495057;
  margin-bottom: 20px;
  line-height: 1.5;
}

.single-post .cta-article-block .btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  color: #ffffff;
  background-color: #54d393;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.single-post .cta-article-block .btn:hover {
  background-color: #3858e9;
}

/* Popup article */
.single-post .popup-article-block {
  visibility: hidden;
  opacity: 0;
  transition:
    visibility 0.3s,
    opacity 0.3s linear;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-post .popup-article-block.is-visible {
  visibility: visible;
  opacity: 1;
}

.single-post .popup-article-block .popup-content {
  position: relative;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 30px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  max-width: 500px;
}

.single-post .popup-article-block .popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

.single-post .popup-article-block .popup-close img {
  display: block;
  width: 30px;
  height: auto;
  filter: invert(88%) sepia(6%) saturate(3206%) hue-rotate(88deg)
    brightness(79%) contrast(112%);
}

.single-post .popup-article-block .title {
  text-align: center;
  margin-bottom: 20px;
}

.single-post .popup-article-block .text {
  margin-bottom: 30px;
  text-align: justify;
  line-height: 1.5;
}

.single-post .popup-article-block .btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  text-align: center;
  color: #ffffff;
  background-color: #54d393;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.single-post .popup-article-block .btn:hover {
  background-color: #3858e9;
}

/* Comments */
.single-post .comments-area {
  max-width: 830px;
  margin-inline: auto;
  padding-left: 30px;
  padding-right: 30px;
}

.single-post .comments-area h2 {
  font-size: 36px;
}
.single-post .comments-area h3 {
  font-size: 36px;
}

.single-post .comments-area a {
  text-decoration: none;
  color: #666666;
}

.single-post .comments-area .post-count-comments-container {
  text-align: center;
  margin-bottom: 4rem;
}

.single-post .comments-area .comment-list {
  list-style-type: none;
}

.single-post .comments-area .comment-list .comment {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.single-post .comments-area .comment-list .comment .comment-body {
  margin-top: 20px;
  margin-bottom: 20px;
}

.single-post .comments-area .comment-list .comment .comment-body p {
  margin-top: 10px;
  margin-bottom: 10px;
}

.single-post
  .comments-area
  .comment-list
  .comment
  .comment-body
  .comment-author
  .fn {
  font-size: 2rem;
  font-style: normal;
  color: #54d393;
}

.single-post
  .comments-area
  .comment-list
  .comment
  .comment-body
  .comment-author
  .says {
  display: none;
}

.single-post
  .comments-area
  .comment-list
  .comment
  .comment-body
  .comment-author
  img {
  display: none;
}

.single-post .comments-area .comment-list .comment .comment-body .comment-meta {
  margin-left: 10px;
}

.single-post
  .comments-area
  .comment-list
  .comment
  .comment-body
  .comment-meta
  .comment-edit-link {
  color: #54d393;
}

.single-post .comments-area .comment-list .comment .comment-body .reply {
  margin-left: 10px;
}

.single-post .comments-area .comment-list .comment .comment-body .reply a {
  margin-left: 5px;
}

.single-post
  .comments-area
  .comment-list
  .comment
  .comment-body
  .reply::before {
  content: "";
  display: inline-block;
  background-image: url("./assets/images/reply.svg");
  background-position: center;
  background-size: cover;
  filter: invert(88%) sepia(6%) saturate(3206%) hue-rotate(88deg)
    brightness(79%) contrast(112%);
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.single-post
  .comments-area
  .comment-list
  .comment
  .comment-body
  .comment-awaiting-moderation {
  font-size: 14px;
  color: #54d393;
}

.single-post .comments-area .comment-list .comment .children {
  margin-left: 30px;
}

.single-post .comments-area .comment-list .comment .children .comment.byuser {
  border: none;
}

.single-post .comments-area .comment-list .comment::marker {
  content: "";
}

.single-post .comments-area .comment-respond {
  margin-top: 20px;
}

.single-post
  .comments-area
  .comment-respond
  .comment-reply-title
  #cancel-comment-reply-link {
  font-size: 14px;
  color: #54d393;
  margin-left: 20px;
}

.single-post .comments-area .comment-respond .logged-in-as {
  display: flex;
  margin-bottom: 20px;
  column-gap: 20px;
  row-gap: 10px;
}

.single-post .comments-area .comment-respond .comment-form-comment {
  display: flex;
  flex-direction: column;
}

.single-post .comments-area .comment-respond .comment-form-comment label {
  display: none;
}

.single-post .comments-area .comment-respond .comment-form-comment textarea {
  font-family: "Roboto";
  font-weight: normal;
  border: 1.5px solid #666666;
  outline: none;
  padding: 10px;
  resize: vertical;
  height: 150px;
  border-radius: 5px;
}

.single-post .comments-area .comment-respond .user_inputs {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.single-post .comments-area .comment-respond .user_inputs .comment-form-author,
.single-post .comments-area .comment-respond .user_inputs .comment-form-email,
.single-post .comments-area .comment-respond .user_inputs .comment-form-url {
  flex: 1;
}

.single-post
  .comments-area
  .comment-respond
  .user_inputs
  .comment-form-author
  input,
.single-post
  .comments-area
  .comment-respond
  .user_inputs
  .comment-form-email
  input,
.single-post
  .comments-area
  .comment-respond
  .user_inputs
  .comment-form-url
  input {
  width: 100%;
  font-family: "Roboto";
  font-weight: normal;
  border: none;
  border-bottom: 1.5px solid #666666;
  outline: none;
  padding-left: 10px;
  padding-right: 10px;
}

.single-post .comments-area .comment-respond .form-submit {
  margin-top: 20px;
  margin-bottom: 20px;
}

.single-post .comments-area .comment-respond .form-submit input {
  border: none;
  background-color: #54d393;
  height: 40px;
  padding: 0.6rem 2.5rem;
  border-radius: 0.5rem;
  color: #fff;
}

/* Single post responsive */
@media screen and (min-width: 1024px) {
  .single-post .header-content .post-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  .single-post .header-content .post-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
}

@media screen and (max-width: 768px) {
  .single-post .header-content .post-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 9;
    object-fit: cover;
  }

  .single-post .block-share-article {
    flex-direction: column;
    align-items: center;
    row-gap: 20px;
  }

  .single-post .block-share-article .share-article-wrapper {
    flex-direction: column;
    row-gap: 20px;
  }

  .single-post .comments-area .logged-in-as {
    flex-direction: column;
    gap: 0;
  }

  .single-post .comments-area .form-submit {
    text-align: center;
  }
}

@media screen and (max-width: 500px) {
  .single-post .popup-article-block {
    padding: 0 20px;
  }

  .single-post .popup-article-block .popup-content {
    padding: 20px;
  }

  .single-post .popup-article-block .popup-close img {
    font-size: 20px;
  }
}
