/* Sommaire Block Styles */
.single-post .container .post .sommaire {
  position: relative;
  padding: 14px 31px;
  background: #17191d;
  margin: 17px 0;
  text-align: left;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Sommaire Header avec toggle */
.sommaire-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.sommaire-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.sommaire-toggle-icon svg {
  width: 20px;
  height: 20px;
  stroke: #fd8e02;
  transition: all 0.3s ease;
}

/* États des icônes */
.sommaire-collapsed .sommaire-toggle-icon .icon-minus {
  display: none;
}

.sommaire-collapsed .sommaire-toggle-icon .icon-plus {
  display: block;
}

.sommaire-expanded .sommaire-toggle-icon .icon-plus {
  display: none;
}

.sommaire-expanded .sommaire-toggle-icon .icon-minus {
  display: block;
}

/* Animation du contenu */
.sommaire-content {
  display: none; /* Fermé par défaut */
  margin-top: 10px;
}

.sommaire-expanded .sommaire-content {
  display: block;
}

/* Hover effect sur l'en-tête */
.sommaire-header:hover {
  opacity: 0.8;
}

.sommaire-header:hover .sommaire-toggle-icon svg {
  stroke: #fdb003;
}

.single-post .container .post .sommaire a {
  text-transform: none !important;
}

.light-mode .container .post .sommaire {
  background: #f4f4f4;
}

.container .post .sommaire h2 {
  font-size: 18px;
  line-height: 23px;
  text-transform: uppercase;
  margin: 0; /* Pas de margin car maintenant dans header */
}

.container .post .sommaire .trait {
  width: 71px;
  height: 2px;
  position: relative;
  margin: 10px 0;
  background: transparent linear-gradient(88deg, #fd8f02 0%, #fdb003 100%);
  display: block;
}

.container .post .sommaire ul {
  list-style: none;
  padding: 0;
}

.container .post .sommaire ul li {
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
}

.container .post .sommaire ul li span {
  color: #fd8e02;
  font-weight: bold;
}

/* toc: sommaire styles */
.toc-container {
  margin-bottom: 20px;
}

.toc-title {
  font-size: 1.5em;
  margin-bottom: 10px;
}

.toc-nav {
  font-size: 1em;
}

.toc-list {
  list-style-type: none;
  padding-left: 0;
}

.toc-item {
  margin: 5px 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
  border-radius: 4px;
}

.toc-item a {
  padding: 5px;
}

.toc-link {
  text-decoration: none !important;
  color: #fff;
  display: block;
}

.toc-item.active {
  background-color: #fac011;
}

.toc-item:hover {
  background-color: #fac011;
  color: #000;
}

.toc-link:hover {
  text-decoration: underline;
  color: #000 !important;
}

.toc-item:hover .toc-link {
  text-decoration: underline;
  color: #000 !important;
}

.light-mode.single-post .sommaire a {
  color: #000000;
}

/* Light mode styles pour les icônes */
.light-mode .sommaire-toggle-icon svg {
  stroke: #fd8e02;
}

.light-mode .sommaire-header:hover .sommaire-toggle-icon svg {
  stroke: #fdb003;
}

/* Full Width Template specific styles */
.post-template-full-width-template article .post .sommaire {
  width: 85%;
  margin: 17px auto;
}
