/* =============================================
   TLC Site Helpers — Shortcodes CSS
   Styles externalises depuis tlc-site-helpers.php
   Utilise les tokens de tokens.css
   ============================================= */


/* === Breadcrumbs [tlc_breadcrumbs] === */

#breadcrumbs a { text-decoration: none; }
#breadcrumbs { line-height: 1.4; }


/* === Authority Block [acf_authority_block] === */

.tlc-block-authority {
  background-color: var(--tlc-bg-authority);
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 20px;
  padding: 25px;
  border: 1px solid var(--tlc-border-authority);
  border-radius: 12px;
}

.tlc-block-authority .row {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 12px;
}

.tlc-block-authority .column {
  flex: 1;
  width: 50%;
  font-size: var(--tlc-font-base);
  line-height: 1.4;
}

.tlc-block-authority .column:nth-child(1) {
  flex: 0 0 40px;
  max-width: 40px;
}

.tlc-block-authority .avatar,
.tlc-block-authority .icon {
  width: 32px;
  height: auto;
  max-width: 32px;
  margin-right: 8px;
  box-shadow: none;
}


/* === Category Bottom SEO [tlc_cat_bottom] === */

.tlc-cat-bottom-wrapper {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid #eef1f4;
  border-radius: 12px;
  background: var(--tlc-white);
}

.tlc-cat-bottom-title {
  margin: 0 0 10px;
  font-size: 20px;
}

.tlc-cat-toggle {
  position: absolute;
  left: -9999px;
}

.tlc-cat-bottom {
  position: relative;
}

.tlc-clamped {
  display: -webkit-box;
  -webkit-line-clamp: var(--tlc-lines, 6);
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tlc-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--tlc-white));
  pointer-events: none;
}

.tlc-cat-toggle-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--tlc-border);
  background: #f8fafc;
  cursor: pointer;
  font-size: var(--tlc-font-sm);
}

.tlc-cat-toggle-btn .tlc-less { display: none; }

.tlc-cat-toggle:checked ~ .tlc-cat-bottom {
  -webkit-line-clamp: unset;
  max-height: none;
  overflow: visible;
}

.tlc-cat-toggle:checked ~ .tlc-cat-bottom .tlc-fade { display: none; }
.tlc-cat-toggle:checked ~ .tlc-cat-toggle-btn .tlc-more { display: none; }
.tlc-cat-toggle:checked ~ .tlc-cat-toggle-btn .tlc-less { display: inline; }


/* === Tabs [acf_tabs] (deprecated) === */

.tlc-tabs { margin: 24px 0; }
.tlc-tabs__title { margin: 0 0 12px; font-size: var(--tlc-font-xl); }

.tlc-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tlc-tabs__btn {
  appearance: none;
  border: 1px solid var(--tlc-border);
  background: #f8fafc;
  border-radius: var(--tlc-radius);
  padding: 8px 12px;
  cursor: pointer;
  font-size: var(--tlc-font-sm);
  line-height: 1.2;
}

.tlc-tabs__btn.is-active {
  background: var(--tlc-white);
  color: var(--tlc-black);
  border-color: #ffccb8;
  box-shadow: 0 0 0 2px #ffe8e1 inset;
}

.tlc-tabs__panel {
  border: 1px solid var(--tlc-border);
  border-radius: 12px;
  padding: 12px;
  background: var(--tlc-white);
}

@media (prefers-reduced-motion: no-preference) {
  .tlc-tabs__panel { transition: opacity .18s ease; }
}


/* === Summary Box [acf_summary_box] === */

@keyframes vibrate {
  0%   { transform: translate(0); }
  10%  { transform: translate(-3px, 3px); }
  20%  { transform: translate(3px, -3px); }
  30%  { transform: translate(-4px, 4px); }
  40%  { transform: translate(4px, -4px); }
  50%  { transform: translate(-3px, 3px); }
  60%  { transform: translate(3px, -3px); }
  70%  { transform: translate(-2px, 2px); }
  80%  { transform: translate(2px, -2px); }
  90%  { transform: translate(-1px, 1px); }
  100% { transform: translate(0); }
}

.vibrate { animation: vibrate 0.5s ease-in-out; }


/* === Horloge Icon [horloge_icon] === */

.tlc-horloge-icon {
  margin-bottom: 5px;
}

.tlc-horloge-icon img {
  vertical-align: middle;
  margin-right: 10px;
  box-shadow: none;
}

.tlc-horloge-icon__title {
  font-size: 23px;
  font-weight: bold;
}

.tlc-horloge-icon__disclaimer {
  font-size: 11px;
  color: #000;
  margin-top: 3px;
}


/* === Sticky Product Bar [acf_sticky_product_bar] === */

.product-add-to-cart-container-bottom {
  display: none;
  align-items: center;
  background-color: var(--tlc-blue);
  color: var(--tlc-white);
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  padding: 15px 110px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  box-shadow: var(--tlc-shadow-md);
  z-index: var(--tlc-z-sticky-bar);
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

.product-add-to-cart-container-bottom .product-add-to-cart-inside {
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-add-to-cart-container-bottom .product-inside-left {
  display: flex;
  align-items: center;
}

.product-add-to-cart-container-bottom .product-inside-name {
  font-size: 22px;
  color: var(--tlc-white);
  margin-left: 20px;
}

@media (max-width: 768px) {
  .product-add-to-cart-container-bottom {
    padding: 15px 10px;
  }
  .product-add-to-cart-container-bottom .product-inside-left {
    display: none;
  }
}

@keyframes subtleShake {
  0%   { transform: translate(0); }
  20%  { transform: translate(1px, -1px); }
  40%  { transform: translate(-1px, 1px); }
  60%  { transform: translate(1px, 1px); }
  80%  { transform: translate(-1px, -1px); }
  100% { transform: translate(0); }
}

.subtle-vibration {
  animation: subtleShake 0.4s ease-in-out;
}


/* === Table of Contents (auto-generated) === */

.tlc-toc {
  background: var(--tlc-white);
  color: var(--tlc-orange);
  border: 1px solid #f0f0f0;
  border-radius: var(--tlc-radius);
  padding: 14px 18px;
  margin: 24px 0;
  box-shadow: var(--tlc-shadow-md);
  font-family: inherit;
}

.tlc-toc__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tlc-toc__title {
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  margin: 0;
}

.tlc-toc__toggle {
  font-size: var(--tlc-font-sm);
  color: var(--tlc-orange);
  cursor: pointer;
  text-decoration: none;
}

.tlc-toc__toggle:hover {
  text-decoration: underline;
}

.tlc-toc__list {
  list-style: none;
  margin: 6px 0 0 0;
  padding: 0;
}

.tlc-toc__list li {
  margin: 4px 0;
}

.tlc-toc__list a {
  color: var(--tlc-orange);
  text-decoration: none;
  font-size: var(--tlc-font-base);
  line-height: 1;
  margin: 0;
  padding: 0;
}

.tlc-toc__list a:hover {
  text-decoration: underline;
}

html { scroll-behavior: smooth; }


/* === Related Posts [tlc_related_posts] === */

.posts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.related-post {
  flex: 1 1 calc(33.333% - 20px);
  background: var(--tlc-bg-warm);
}

.related-post h3,
.related-post p {
  text-align: left;
}

@media (max-width: 768px) {
  .related-post { flex-basis: 100%; }
}


/* === Category Article Hiding === */
/* Note: le selecteur dynamique est genere cote PHP,
   mais le concept de masquage est centralise ici */
