<script setup lang="ts">
// <!-- ld-v2 --> Section de l'Observatoire — carte titrée, ton curieux.
defineProps<{ title: string; icon: string; sub?: string }>()
</script>

<template>
  <!-- ld-v2 -->
  <section class="osec ld-card">
    <h2 class="osec__title">
      <UIcon :name="icon" />
      {{ title }}
    </h2>
    <p v-if="sub" class="osec__sub">{{ sub }}</p>
    <slot />
  </section>
</template>

<style scoped>
.osec {
  padding: 1.25rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.osec__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}
.osec__title :deep(svg),
.osec__title :deep(span[class^='i-']) { color: var(--mood-accent); }
.osec__sub {
  margin: -0.5rem 0 0;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--mood-text-muted);
}
</style>
