/*
 * Composants du référentiel PAC (résultat, recherche RGE, autocomplétion).
 * Mobile first : les styles de base ciblent 320 px.
 */
:root {
    --pr-green: #0B5E4B;
    --pr-green-hover: #083F33;
    --pr-ink: #16211D;
    --pr-ok-bg: #E9F3EF;
    --pr-amber: #A36E1A;
    --pr-amber-bg: #FAF3E6;
    --pr-radius-field: 10px;
    --pr-radius-block: 16px;
    --pr-font-title: Archivo, system-ui, sans-serif;
}

.pr-num { font-variant-numeric: tabular-nums; }
.pr-wrap { overflow-wrap: anywhere; }

.pr-mention {
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: rgb(22 33 29 / .5);
    text-wrap: pretty;
}

/* Résultat */
.pr-result {
    margin-top: 20px;
    border: 1px solid rgb(11 94 75 / .32);
    border-radius: var(--pr-radius-block);
    overflow: hidden;
    background: #fff;
    animation: pr-in .24s ease;
}
.pr-result--unknown { border-color: rgb(163 110 26 / .35); }
.pr-result__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 20px clamp(18px, 3.6vw, 30px);
    background: var(--pr-ok-bg);
    border-bottom: 1px solid rgb(11 94 75 / .16);
}
.pr-result--unknown .pr-result__head {
    background: var(--pr-amber-bg);
    border-bottom-color: rgb(163 110 26 / .18);
}
.pr-result__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--pr-green);
    color: #fff;
    font-size: 19px;
    line-height: 1;
}
.pr-result--unknown .pr-result__icon { background: var(--pr-amber); font-size: 20px; font-weight: 700; }
.pr-result__title {
    flex: 1;
    min-width: 210px;
    margin: 0;
    font-family: var(--pr-font-title);
    font-size: clamp(19px, 2.7vw, 25px);
    font-weight: 600;
    letter-spacing: -.012em;
    line-height: 1.18;
    text-wrap: pretty;
}
.pr-result__badge {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--pr-green);
    color: #fff;
    font-family: var(--pr-font-title);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    white-space: nowrap;
}
.pr-result__body {
    padding: clamp(18px, 3.6vw, 30px);
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.pr-result__facts {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px 26px;
}
.pr-result__facts > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pr-result__facts dt {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: rgb(22 33 29 / .5);
}
.pr-result__facts dd { margin: 0; font-size: 16.5px; font-weight: 600; overflow-wrap: anywhere; }
.pr-result__note {
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid rgb(22 33 29 / .1);
    font-size: 15px;
    line-height: 1.6;
    color: rgb(22 33 29 / .75);
    text-wrap: pretty;
}
.pr-result__note--warn {
    padding: 12px 14px;
    border: 0;
    border-radius: var(--pr-radius-field);
    background: var(--pr-amber-bg);
    color: var(--pr-amber);
    font-weight: 600;
}
.pr-result__text {
    margin: 0;
    max-width: 70ch;
    font-size: 15.5px;
    line-height: 1.6;
    color: rgb(22 33 29 / .75);
    text-wrap: pretty;
}
.pr-result__text a { font-weight: 600; color: var(--pr-green); }

/* Autocomplétion */
.pr-suggest {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    max-height: 268px;
    overflow: auto;
    background: #fff;
    border: 1px solid rgb(22 33 29 / .16);
    border-radius: 11px;
    box-shadow: 0 22px 46px -24px rgb(22 33 29 / .55);
}
.pr-suggest[hidden] { display: none; }
.pr-suggest__item {
    display: block;
    padding: 12px 15px;
    min-height: 44px;
    border-bottom: 1px solid rgb(22 33 29 / .07);
    cursor: pointer;
    font-size: 15px;
    line-height: 1.35;
    color: var(--pr-ink);
}
.pr-suggest__item[aria-selected="true"] { background: #EFF5F3; }
@media (hover: hover) { .pr-suggest__item:hover { background: #EFF5F3; } }
.pr-suggest__model { font-weight: 600; }
.pr-suggest__ref { color: rgb(22 33 29 / .55); }
.pr-suggest__brand { display: block; margin-top: 2px; font-size: 12.5px; color: rgb(22 33 29 / .5); }
.pr-suggest__empty { padding: 13px 15px; font-size: 14px; color: rgb(22 33 29 / .6); }

/* Recherche RGE */
.pr-rge { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.pr-rge__summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pr-rge__count { margin: 0; font-size: 13px; font-weight: 600; color: rgb(22 33 29 / .6); }
.pr-rge__range { margin: 0; font-size: 12.5px; color: rgb(22 33 29 / .5); }
.pr-rge__card {
    border: 1px solid rgb(22 33 29 / .13);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pr-rge__card h3 { margin: 0; font-family: var(--pr-font-title); font-size: 16px; font-weight: 600; line-height: 1.3; }
.pr-rge__address { margin: 0; font-size: 14px; line-height: 1.55; color: rgb(22 33 29 / .7); }
.pr-rge__facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 18px; }
.pr-rge__facts > div { min-width: 0; }
.pr-rge__facts dt { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgb(22 33 29 / .45); }
.pr-rge__facts dd { margin: 2px 0 0; font-size: 14px; }
.pr-rge__empty {
    margin: 0;
    padding: 18px;
    border: 1px dashed rgb(22 33 29 / .2);
    border-radius: 12px;
    font-size: 14.5px;
    color: rgb(22 33 29 / .65);
}
.pr-rge__pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.pr-rge__pager-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border: 1px solid rgb(22 33 29 / .2);
    border-radius: 9px;
    background: #fff;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--pr-ink);
    text-decoration: none;
    white-space: nowrap;
}
a.pr-rge__pager-btn:hover { border-color: rgb(11 94 75 / .5); color: var(--pr-green); }
.pr-rge__pager-btn.is-disabled { border-color: rgb(22 33 29 / .1); color: rgb(22 33 29 / .3); }
.pr-rge__pager-label { font-size: 13px; font-weight: 600; color: rgb(22 33 29 / .6); white-space: nowrap; }

@keyframes pr-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pr-result { animation: none; } }
