/* @layer-wrap:site.reglages */
@layer site.reglages {
/* Version: 18-10-2026-hero-spacing */
/*
 * Espacement autour des titres — fiches œuvres (`.hero-single`), pages
 * principales des catégories (`.hero-listing`) et pages secondaires dont
 * /about (`.hero-secondary`). Thème par défaut uniquement : chargée avec main.css,
 * jamais sous thème personnalisé.
 *
 * Règle unique : sous un titre, ½ line-height de ce titre
 * (--portfolios-heading-primary-line-height pour les h1,
 * --portfolios-heading-secondary-line-height pour les sous-titres et
 * intertitres). L'interligne ajoute déjà un demi-écart au-dessus et en dessous
 * du texte, d'où des marges courtes ; elles suivent la taille et l'interligne
 * choisis dans le setup. Seule exception : ¼ entre un titre et son sous-titre,
 * qui forment un bloc.
 * Valeurs indiquées pour le réglage par défaut (texte 14px) :
 * h1 21px / interligne 23px, h2 14px / interligne 24px.
 *
 * Les templates posent des utilitaires `pf-mb-md` / `pf-mt-md` / `pf-pb-md` sur
 * ces titres pour les thèmes personnalisés : cette feuille est dans la couche
 * « reglages » (après « utilitaires »), sans !important.
 */

/*
 * Hero fiche : pas d'écart fixe entre les blocs (gap de hero-title.css), les
 * titres portent leur marge. Les actions retrouvent l'espace que leur donnait
 * le gap (hero-title.css remet à zéro les marges des enfants).
 */
#portfolio_page #hero.hero-single #title-star #title-about {
    gap: 0;
}

#portfolio_page #hero.hero-single #title-star #title-about > h1 {
    margin-bottom: calc(var(--portfolios-heading-primary-line-height, 1lh) * 0.5); /* ≈ 12px */
}

#portfolio_page #hero.hero-single #title-star #title-about > h1:has(+ h2) {
    margin-bottom: calc(var(--portfolios-heading-primary-line-height, 1lh) * 0.25); /* ≈ 6px */
}

#portfolio_page #hero.hero-single #title-star #title-about > h2 {
    margin-bottom: calc(var(--portfolios-heading-secondary-line-height, 1lh) * 0.5); /* 12px */
    padding-bottom: 0;
}

#portfolio_page #hero.hero-single #title-star #title-about > .title-about-actions {
    margin-top: var(--layout-space-y-sm);
}

/* Hero des pages de catégorie et secondaires : titre → texte d'introduction. */
#portfolio_page main section#hero:is(.hero-listing, .hero-secondary) > div > h1 + .content-article {
    margin-top: calc(var(--portfolios-heading-primary-line-height, 1lh) * 0.5); /* ≈ 12px */
}

/* Hero /about : titre + sous-titre (bloc), puis réseaux. */
#portfolio_page main#about #about-hero h1 + h2 {
    margin-top: calc(var(--portfolios-heading-primary-line-height, 1lh) * 0.25); /* ≈ 6px */
    margin-bottom: calc(var(--portfolios-heading-secondary-line-height, 1lh) * 0.5); /* 12px */
}

/* Intertitres de section, y compris « A propos » / « Autres … » (padding-bottom neutralisé). */
#portfolio_page main:has(> #hero:is(.hero-single, .hero-listing, .hero-secondary)) > section h2.section-title {
    margin-bottom: calc(var(--portfolios-heading-secondary-line-height, 1lh) * 0.5); /* 12px */
    padding-bottom: 0;
}
}
