/* =====================================================================
 * Fichier : assets/css/pages/agb.css
 * Projet  : Brennholz Shop24
 * Rôle    : Styles propres à la page AGB (agb.php) : champ de recherche
 *           dans le sommaire, barre de résultats, surlignage des
 *           occurrences, sections sans résultat estompées, numérotation
 *           « § » des titres et listes numérotées des articles.
 *           Mise en page commune : assets/css/components/legal.css
 * ===================================================================== */

/* Recherche (dans le sommaire) */
.ag-search { padding: .2rem 1rem .8rem; border-bottom: 1px solid var(--hfk-border); }
.ag-search-field { position: relative; }
.ag-search-field > i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--hfk-flame); font-size: .9rem; pointer-events: none; }
.ag-search-field input {
    width: 100%; height: 44px; padding: 0 2.4rem 0 2.3rem; border: 2px solid var(--hfk-border); border-radius: 0; outline: 0;
    background: var(--hfk-cream); color: var(--hfk-charcoal); font-size: .92rem; font-weight: 500; transition: border-color .25s, background .25s, box-shadow .25s;
}
.ag-search-field input::-webkit-search-cancel-button { display: none; }
.ag-search-field input:focus { border-color: var(--hfk-flame); background: #fff; box-shadow: 0 0 0 4px rgba(34, 166, 75, .14); }
.ag-search-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; background: transparent; color: var(--hfk-muted); transition: color .2s, transform .25s var(--hfk-ease-bounce); }
.ag-search-clear:hover { color: var(--hfk-ember); transform: translateY(-50%) rotate(90deg); }
.ag-search-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; padding: .35rem .35rem .35rem .7rem; background: var(--hfk-charcoal); color: #fff; font-size: .82rem; font-weight: 600; animation: hfk-fade-up .3s var(--hfk-ease) both; }
.ag-search-bar.is-empty { background: var(--hfk-ember); }
.ag-search-bar.is-empty .ag-search-nav { display: none; }
.ag-search-nav { display: inline-flex; gap: .25rem; }
.ag-search-nav button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; transition: background .2s; }
.ag-search-nav button:hover { background: var(--hfk-flame); }
.ag-search-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .6rem; font-size: .78rem; }
.ag-search-tags span { color: var(--hfk-muted); margin-right: .1rem; }
.ag-search-tags button { padding: .2rem .5rem; border: 1px solid var(--hfk-border); background: #fff; color: var(--hfk-text); font-size: .78rem; transition: background .2s, color .2s, border-color .2s, transform .2s var(--hfk-ease); }
.ag-search-tags button:hover { background: var(--hfk-flame); border-color: var(--hfk-flame); color: #fff; transform: translateY(-1px); }

/* Occurrences */
mark.ag-hit { padding: 0 .1em; background: var(--hfk-amber-light); color: inherit; box-shadow: inset 0 -2px 0 var(--hfk-amber); transition: background .2s; }
mark.ag-hit.is-current { background: var(--hfk-amber); color: var(--hfk-charcoal); box-shadow: 0 0 0 3px rgba(255, 227, 43, .35); animation: hfk-pulse-soft 1.2s ease 1; }
.lx-section.ag-no-hit { opacity: .38; transition: opacity .3s; }
.lx-section.ag-no-hit:hover { opacity: .8; }
.lx-section.ag-has-hit .lx-num { background: var(--hfk-grad-fire); }
.ag-toc-hits { margin-left: auto; padding: 0 .4rem; min-width: 22px; height: 20px; font-size: .72rem; line-height: 20px; text-align: center; color: #fff; background: var(--hfk-flame); }

/* Numérotation « § » et listes des articles */
.page-agb .lx-num { min-width: 52px; }
.page-agb .lx-section-body > ol { counter-reset: ag; list-style: none; padding-left: 0; }
.page-agb .lx-section-body > ol > li { position: relative; counter-increment: ag; padding-left: 2.6rem; margin-bottom: .8rem; }
.page-agb .lx-section-body > ol > li::before {
    content: '(' counter(ag) ')'; position: absolute; left: 0; top: 0; min-width: 2.1rem; font-family: var(--hfk-font-head);
    font-weight: 700; color: var(--hfk-flame-dark);
}
.page-agb .lx-section-body > ol > li > ul { margin-top: .5rem; }

@media (max-width: 575.98px) {
    .page-agb .lx-num { min-width: 44px; }
    .page-agb .lx-section-body > ol > li { padding-left: 2.2rem; }
}
@media print {
    .ag-search { display: none !important; }
    mark.ag-hit { background: none; box-shadow: none; }
    .lx-section.ag-no-hit { opacity: 1; }
}