/** Shopify CDN: Minification failed

Line 16:0 Unexpected "{"
Line 16:1 Unexpected "{"
Line 16:3 Expected identifier but found "'section-kc-collection-seo.css'"
Line 18:0 Unexpected "<"
Line 21:7 Expected identifier but found "%"
Line 22:8 Unexpected "<"
Line 22:46 Unexpected "{"
Line 22:55 Expected ":"
Line 22:73 Unexpected "<"
Line 23:7 Expected identifier but found "%"
... and 28 more hidden warnings

**/
{{ 'section-kc-collection-seo.css' | asset_url | stylesheet_tag }}

<section id="kc-collection-seo" class="kc-collection-seo color-{{ section.settings.color_scheme }} gradient">
  <div class="page-width">
    <div class="kc-collection-seo__wrap">
      {%- if section.settings.title != blank -%}
        <h2 class="kc-collection-seo__title">{{ section.settings.title }}</h2>
      {%- endif -%}

      {%- if section.settings.intro != blank -%}
        <div class="kc-collection-seo__intro rte">
          <p>{{ section.settings.intro }}</p>
        </div>
      {%- endif -%}

      {%- if section.settings.show_description and collection.description != blank -%}
        <div class="kc-collection-seo__content{% if section.settings.show_read_more %} kc-collection-seo__content--collapsible{% endif %}" {% if section.settings.show_read_more %}style="--collapsed-rows: {{ section.settings.collapsed_rows }};"{% endif %}>
          <div class="kc-collection-seo__rte rte">
            {{ collection.description }}
          </div>
        </div>

        {%- if section.settings.show_read_more -%}
          <button type="button" class="kc-collection-seo__toggle button button--tertiary" aria-expanded="false">
            Lire plus
          </button>

          <script>
            document.addEventListener('DOMContentLoaded', function() {
              var sectionEl = document.getElementById('shopify-section-{{ section.id }}');
              if (!sectionEl) return;

              var btn = sectionEl.querySelector('.kc-collection-seo__toggle');
              var content = sectionEl.querySelector('.kc-collection-seo__content');

              if (!btn || !content) return;

              btn.addEventListener('click', function() {
                var expanded = btn.getAttribute('aria-expanded') === 'true';
                btn.setAttribute('aria-expanded', expanded ? 'false' : 'true');
                content.classList.toggle('is-expanded');
                btn.textContent = expanded ? 'Lire plus' : 'Lire moins';
              });
            });
          </script>
        {%- endif -%}
      {%- endif -%}
    </div>
  </div>
</section>

{% schema %}
{
  "name": "Collection SEO",
  "settings": [
    {
      "type": "checkbox",
      "id": "show_description",
      "default": true,
      "label": "Afficher la description de collection"
    },
    {
      "type": "text",
      "id": "title",
      "default": "À propos de cette collection",
      "label": "Titre"
    },
    {
      "type": "textarea",
      "id": "intro",
      "default": "Découvrez une sélection pensée pour conjuguer design, originalité et univers de marque.",
      "label": "Introduction"
    },
    {
      "type": "checkbox",
      "id": "show_read_more",
      "default": true,
      "label": "Activer le bouton lire plus"
    },
    {
      "type": "range",
      "id": "collapsed_rows",
      "min": 3,
      "max": 12,
      "step": 1,
      "default": 5,
      "label": "Hauteur repliée"
    },
    {
      "type": "color_scheme",
      "id": "color_scheme",
      "label": "Palette",
      "default": "scheme-1"
    }
  ],
  "presets": [
    {
      "name": "Collection SEO"
    }
  ]
}
{% endschema %}