/* ===== SOMMAIRE FIXE - Style Anthogyr gauche ===== */

/* Le nav dans le flux est masqué — on utilise le clone fixed */
.sommaire-auto {
  display: none !important;
}

/* Bouton fixe collé à gauche */
#sommaire-fixed {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Onglet cliquable */
/* Onglet plus épais et lisible */
#sommaire-fixed-toggle {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-left: 3px solid var(--enfold-main-color-primary);
  /* trait coloré visible */
  border-radius: 0 12px 12px 0;
  padding: 16px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
  box-shadow: 3px 3px 16px rgba(0, 0, 0, 0.09);
}

#sommaire-fixed-toggle:hover {
  background: white;
  border-left-color: var(--enfold-main-color-heading);
}

/* Icône plus grande */
#sommaire-fixed-toggle .sf-icon {
  color: var(--enfold-main-color-primary);
  line-height: 1;
}

/* Label plus épais */
#sommaire-fixed-toggle .sf-label {
  font-size: 11px;
  font-weight: 700;
  font-family: "barlow condensed", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--enfold-main-color-heading);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
}

/* Titre du panneau — se cache quand ouvert */
#sommaire-fixed-panel .sf-titre {
  font-size: 0.8rem;
  font-family: "barlow condensed", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--enfold-main-color-heading);
  padding: 12px 18px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Bouton fermer × dans le titre */
#sommaire-fixed-panel .sf-close {
  cursor: pointer;
  font-size: 18px;
  color: #aaa;
  line-height: 1;
  padding: 0 0 0 12px;
  transition: color 0.2s ease;
}

#sommaire-fixed-panel .sf-close:hover {
  color: var(--enfold-main-color-primary);
}

/* Panneau déroulant */
#sommaire-fixed-panel {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 998;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-left: none;
  border-radius: 0 16px 16px 0;
  box-shadow: 4px 4px 24px rgba(0, 0, 0, 0.08);
  max-width: 280px;
  width: 280px;

  /* Masqué par défaut */
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  transition:
    clip-path 0.35s ease,
    opacity 0.3s ease;
  pointer-events: none;
}

#sommaire-fixed-panel.is-open {
  clip-path: inset(0 0% 0 0);
  opacity: 1;
  pointer-events: all;
}

#sommaire-fixed-panel .sf-titre {
  font-size: 0.8rem;
  font-family: "barlow condensed", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--enfold-main-color-heading);
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

#sommaire-fixed-panel ul {
  list-style: none;
  margin: 0;
  padding: 8px 0 12px;
}

#sommaire-fixed-panel li {
  padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#sommaire-fixed-panel li:last-child {
  border-bottom: none;
}

#sommaire-fixed-panel li a {
  display: block;
  padding: 7px 18px;
  font-size: 14px;
  font-family: "barlow condensed", Helvetica, Arial, sans-serif;
  color: #666;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition:
    color 0.2s ease,
    padding-left 0.2s ease,
    background 0.2s ease;
}

#sommaire-fixed-panel li a::before {
  font-family: "entypo-fontello";
  content: "\e875";
  font-size: 10px;
  color: var(--enfold-main-color-primary);
  margin-right: 7px;
  opacity: 0.7;
}

#sommaire-fixed-panel li a:hover {
  color: var(--enfold-main-color-primary);
  padding-left: 24px;
  background: rgba(0, 0, 0, 0.02);
}

#sommaire-fixed-panel {
  max-height: 80%;
  display: flex;
  flex-direction: column;
}

#sommaire-fixed-panel ul {
  overflow-y: auto;
}

/* Masqué sur mobile */
@media (max-width: 767px) {

  #sommaire-fixed,
  #sommaire-fixed-panel {
    display: none !important;
  }

  /* Réafficher le sommaire inline sur mobile */
  .sommaire-auto {
    display: block !important;
  }
}

#sommaire-fixed.is-open #sommaire-fixed-toggle {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sommaire-auto {
  display: none !important;
}

@media (max-width: 767px) {

  /* Sommaire inline mobile — sobre et compact */
  .sommaire-auto {
    border-radius: 12px;
    padding: 0;
    margin: 0 0 24px;
    width: 100%;
  }

  .sommaire-auto .sommaire-titre {
    padding: 11px 16px;
    font-size: 0.8rem;
  }

  .sommaire-auto ul {
    grid-template-columns: 1fr !important;
    /* 1 seule colonne */
    padding: 0 16px;
  }

  .sommaire-auto.is-open ul {
    padding: 12px 16px 16px;
  }

  .sommaire-auto li a {
    font-size: 13px;
  }
}