/* Admin nav icons for the Palladium menu.
   Same technique as payments-admin.css: TheAdmin renders a reserved icon slot
   <span class="icon icon-none"> inside each menu link (the link carries the
   item class). We paint that slot with mask-image + currentColor (theme-aware,
   matches the grey of the other sidebar icons). */
/* Slots peints ici → pas de puce fallback du thème (palladium-base.css) */
a.palladium-admin-menu > .icon::before,
a.palladium-menu-tables > .icon::before,
a.palladium-menu-roadmap > .icon::before,
a.palladium-menu-version > .icon::before,
#left-nav li:has(a.palladium-menu-api) > a > .icon::before { content: none !important; }

a.palladium-menu-tables > .icon,
a.palladium-menu-roadmap > .icon,
a.palladium-menu-version > .icon {
    aspect-ratio: 1 / 1;
    background-color: currentColor !important;
    -webkit-mask: var(--pli) center / 1.25em no-repeat;
    mask: var(--pli) center / 1.25em no-repeat;
}

/* Palladium logo — greyscale faceted "P" (raster, keeps its shading;
   a mask would flatten it to a solid silhouette) */
a.palladium-admin-menu > .icon {
    aspect-ratio: 1 / 1;
    background: url('../img/logo-admin-grey.png') center / 1.35em no-repeat !important;
}

/* table / grid */
a.palladium-menu-tables > .icon {
    --pli: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h18v4H3V4zm0 6h8v4H3v-4zm10 0h8v4h-8v-4zM3 16h8v4H3v-4zm10 0h8v4h-8v-4z'/%3E%3C/svg%3E");
}

/* map / roadmap */
a.palladium-menu-roadmap > .icon {
    --pli: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 19.6 9 17.5l-4.7 1.8A1 1 0 0 1 3 18.4V6.3a1 1 0 0 1 .65-.94L9 3.4l6 2.1 4.7-1.8a1 1 0 0 1 1.3.94v12.1a1 1 0 0 1-.65.94L15 19.6zM10 5.9v11.2l4 1.4V7.3l-4-1.4z'/%3E%3C/svg%3E");
}

/* Configuration root — fallback when NavigationManager drops the icon-class
   added by Palladium.Api on the duplicate "Configuration" registration.
   Targets the li that contains our API Connector child; .icon-none guards
   against doubling if the icon-class route did work. */
#left-nav li:has(a.palladium-menu-api) > a > .icon.icon-none {
    aspect-ratio: 1 / 1;
    background-color: currentColor !important;
    -webkit-mask: var(--pli) center / 1.25em no-repeat;
    mask: var(--pli) center / 1.25em no-repeat;
    --pli: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm0 2.2a1.8 1.8 0 1 1 0 3.6 1.8 1.8 0 0 1 0-3.6z'/%3E%3Cpath d='M19.4 13c.04-.33.06-.66.06-1s-.02-.67-.06-1l2-1.6-2-3.46-2.36 1a7 7 0 0 0-1.72-1L15 2.4h-4l-.32 2.54a7 7 0 0 0-1.72 1l-2.36-1-2 3.46L4.6 11c-.04.33-.06.66-.06 1s.02.67.06 1l-2 1.6 2 3.46 2.36-1a7 7 0 0 0 1.72 1L11 21.6h4l.32-2.54a7 7 0 0 0 1.72-1l2.36 1 2-3.46L19.4 13z'/%3E%3C/svg%3E");
}

/* version tag */
a.palladium-menu-version > .icon {
    --pli: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.4 11.6 12.4 2.6A2 2 0 0 0 11 2H4a2 2 0 0 0-2 2v7c0 .53.21 1.04.59 1.41l9 9a2 2 0 0 0 2.82 0l7-7a2 2 0 0 0 0-2.83zM6.5 8A1.5 1.5 0 1 1 8 6.5 1.5 1.5 0 0 1 6.5 8z'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════════════════════════════
   Icônes pour les entrées OrchardCore (ticket 11194-7).
   Pas de classe à nous sur ces liens → ciblage par href (insensible à
   la casse, compatible préfixe tenant). Les groupes sans URL propre
   (Requêtes, Déploiements, Référencement) sont repérés via :has() sur
   leurs enfants. .icon-none garde : on ne peint que les slots vides,
   et on annule la puce fallback du thème.
   ═══════════════════════════════════════════════════════════════════ */
#ta-left-sidebar a.item-label[href*="/lucene" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="/indexing" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="/tenants" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="/audittrail" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="/features" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="/graphiql" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="/adminmenu" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="/recipes" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="/queries" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="deployment" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="/sitemaps" i] > .icon.icon-none,
#ta-left-sidebar li:has(a[href*="/queries" i]) > figure > figcaption > .item-label > .icon.icon-none,
#ta-left-sidebar li:has(a[href*="deployment" i]) > figure > figcaption > .item-label > .icon.icon-none,
#ta-left-sidebar li:has(a[href*="/sitemaps" i]) > figure > figcaption > .item-label > .icon.icon-none {
    aspect-ratio: 1 / 1;
    background-color: currentColor !important;
    -webkit-mask: var(--oci) center / 1.25em no-repeat;
    mask: var(--oci) center / 1.25em no-repeat;
}

    #ta-left-sidebar a.item-label[href*="/lucene" i] > .icon.icon-none::before,
    #ta-left-sidebar a.item-label[href*="/indexing" i] > .icon.icon-none::before,
    #ta-left-sidebar a.item-label[href*="/tenants" i] > .icon.icon-none::before,
    #ta-left-sidebar a.item-label[href*="/audittrail" i] > .icon.icon-none::before,
    #ta-left-sidebar a.item-label[href*="/features" i] > .icon.icon-none::before,
    #ta-left-sidebar a.item-label[href*="/graphiql" i] > .icon.icon-none::before,
    #ta-left-sidebar a.item-label[href*="/adminmenu" i] > .icon.icon-none::before,
    #ta-left-sidebar a.item-label[href*="/recipes" i] > .icon.icon-none::before,
    #ta-left-sidebar a.item-label[href*="/queries" i] > .icon.icon-none::before,
    #ta-left-sidebar a.item-label[href*="deployment" i] > .icon.icon-none::before,
    #ta-left-sidebar a.item-label[href*="/sitemaps" i] > .icon.icon-none::before,
    #ta-left-sidebar li:has(a[href*="/queries" i]) > figure > figcaption > .item-label > .icon.icon-none::before,
    #ta-left-sidebar li:has(a[href*="deployment" i]) > figure > figcaption > .item-label > .icon.icon-none::before,
    #ta-left-sidebar li:has(a[href*="/sitemaps" i]) > figure > figcaption > .item-label > .icon.icon-none::before { content: none !important; }

/* index de recherche — fiche/catalogue */
#ta-left-sidebar a.item-label[href*="/lucene" i] > .icon.icon-none,
#ta-left-sidebar a.item-label[href*="/indexing" i] > .icon.icon-none {
    --oci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v3H4V4zm0 5h16v3H4V9zm0 5h9v3H4v-3zm12.5 0a3.5 3.5 0 0 1 2.8 5.6l1.9 1.9-1.4 1.4-1.9-1.9a3.5 3.5 0 1 1-1.4-7zm0 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z'/%3E%3C/svg%3E");
}

/* requêtes — entonnoir (groupe + enfants) */
#ta-left-sidebar a.item-label[href*="/queries" i] > .icon.icon-none,
#ta-left-sidebar li:has(a[href*="/queries" i]) > figure > figcaption > .item-label > .icon.icon-none {
    --oci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h18l-7 8v6l-4 2v-8L3 4z'/%3E%3C/svg%3E");
}

/* tenants — immeuble */
#ta-left-sidebar a.item-label[href*="/tenants" i] > .icon.icon-none {
    --oci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2h12v20H4V2zm2 3h3v3H6V5zm5 0h3v3h-3V5zM6 10h3v3H6v-3zm5 0h3v3h-3v-3zM6 15h3v3H6v-3zm5 0h3v3h-3v-3zM18 8h1a2 2 0 0 1 2 2v12h-3V8z'/%3E%3C/svg%3E");
}

/* audit trail — journal */
#ta-left-sidebar a.item-label[href*="/audittrail" i] > .icon.icon-none {
    --oci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v15H6V2zm8 1.5V8h4.5L14 3.5zM8 11h8v1.5H8V11zm0 3.5h8V16H8v-1.5zm0 3.5h5v1.5H8V18z'/%3E%3C/svg%3E");
}

/* déploiements — nuage envoi (groupe + enfants) */
#ta-left-sidebar a.item-label[href*="deployment" i] > .icon.icon-none,
#ta-left-sidebar li:has(a[href*="deployment" i]) > figure > figcaption > .item-label > .icon.icon-none {
    --oci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4a6 6 0 0 1 5.9 5A4.5 4.5 0 0 1 17.5 18H7a5 5 0 0 1-.9-9.92A6 6 0 0 1 12 4zm0 4-4 4h2.5v4h3v-4H16l-4-4z'/%3E%3C/svg%3E");
}

/* fonctionnalités — puzzle */
#ta-left-sidebar a.item-label[href*="/features" i] > .icon.icon-none {
    --oci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a2 2 0 0 1 2 2v1h4a1 1 0 0 1 1 1v4h1a2 2 0 1 1 0 4h-1v4a1 1 0 0 1-1 1h-4v-1a2 2 0 1 0-4 0v1H4a1 1 0 0 1-1-1v-4h1a2 2 0 1 0 0-4H3V6a1 1 0 0 1 1-1h4V4a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
}

/* graphiql — hexagone graphe */
#ta-left-sidebar a.item-label[href*="/graphiql" i] > .icon.icon-none {
    --oci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 21 7v10l-9 5-9-5V7l9-5zm0 2.3L5 8.2v7.6l7 3.9 7-3.9V8.2l-7-3.9zM12 8a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-4 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm8 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3z'/%3E%3C/svg%3E");
}

/* menus admin — barres */
#ta-left-sidebar a.item-label[href*="/adminmenu" i] > .icon.icon-none {
    --oci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18v2.5H3V5zm0 6h18v2.5H3v-2.5zm0 6h18v2.5H3v-2.5z'/%3E%3C/svg%3E");
}

/* recettes — fiole */
#ta-left-sidebar a.item-label[href*="/recipes" i] > .icon.icon-none {
    --oci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2h6v2h-1v5l5 9a2 2 0 0 1-1.8 3H6.8A2 2 0 0 1 5 18l5-9V4H9V2zm3 8.5L8.6 16h6.8L12 10.5z'/%3E%3C/svg%3E");
}

/* référencement / sitemaps — loupe (groupe + enfants) */
#ta-left-sidebar a.item-label[href*="/sitemaps" i] > .icon.icon-none,
#ta-left-sidebar li:has(a[href*="/sitemaps" i]) > figure > figcaption > .item-label > .icon.icon-none {
    --oci: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 1 0 4.9 14.3l5 5 1.4-1.4-5-5A8 8 0 0 0 10 2zm0 2.5a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11z'/%3E%3C/svg%3E");
}
