/* Pignans – Objets trouvés : page publique.
   Tout est rangé sous .pot-app pour ne pas dépendre du thème (Gantry Helium aujourd'hui,
   thème Pignans 2026 demain : les couleurs reprennent ses variables si elles existent). */

.pot-app {
	--pot-ink: var(--maures, #162D4C);
	--pot-txt: var(--gris, #2A2A2A);
	--pot-accent: var(--azur-deep, #15609C);
	--pot-accent-tint: var(--azur-tint, #EFF6FF);
	--pot-bg: #F5F6F8;
	--pot-surface: #FFFFFF;
	--pot-line: var(--line, #E1E4EA);
	--pot-muted: var(--muted, #5B6270);
	--pot-photo: #E9EDF3;
	--pot-ok-bg: #E3F0DA;
	--pot-ok-fg: #2F5512;
	--pot-focus: var(--or, #FAD700);
	--pot-r: var(--r, 8px);
	container-type: inline-size;
	container-name: pot;
	color: var(--pot-txt);
	font-size: 17px;
	line-height: 1.5;
	margin: 0 0 40px;
}
.pot-app *, .pot-app *::before, .pot-app *::after { box-sizing: border-box; }
.pot-app :focus-visible { outline: 3px solid var(--pot-focus); outline-offset: 2px; }
.pot-app .pot-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pot-app .pot-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pot-app [hidden] { display: none !important; }

/* Encadré « Comment récupérer un objet » */
.pot-app .pot-infos { background: var(--pot-surface); border: 1px solid var(--pot-line); border-radius: var(--pot-r); padding: 18px 20px; margin: 0 0 24px; }
.pot-app .pot-infos-titre { font-size: 20px; line-height: 1.25; margin: 0 0 4px; color: var(--pot-ink); font-weight: 700; }
.pot-app .pot-infos-intro { margin: 0 0 16px; color: var(--pot-muted); font-size: 16px; }
.pot-app .pot-infos-grille { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pot-app .pot-info { display: flex; gap: 12px; min-width: 0; }
.pot-app .pot-info-ico { width: 40px; height: 40px; border-radius: 50%; background: var(--pot-accent-tint); color: var(--pot-accent); display: flex; align-items: center; justify-content: center; flex: none; }
.pot-app .pot-info h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--pot-muted); font-weight: 700; margin: 2px 0 2px; line-height: 1.3; }
.pot-app .pot-info p { margin: 0; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.pot-app .pot-info strong { color: var(--pot-ink); }
.pot-app .pot-info a { color: var(--pot-accent); font-weight: 600; }

/* Barre d'outils (visible seulement si le script tourne) */
.pot-app .pot-outils { display: none; }
.pot-app.pot-js .pot-outils { display: block; position: sticky; top: 0; z-index: 5; background: var(--pot-bg); padding: 12px; border-radius: var(--pot-r); margin: 0 0 4px; }
.pot-app .pot-outils-ligne { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pot-app .pot-recherche { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: var(--pot-surface); border: 1.5px solid var(--pot-line); border-radius: var(--pot-r); padding: 0 12px; min-height: 48px; color: var(--pot-muted); margin: 0; cursor: text; }
.pot-app .pot-recherche:focus-within { border-color: var(--pot-accent); }
.pot-app input.pot-q { flex: 1; min-width: 0; height: 44px; border: 0 !important; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 16px; color: var(--pot-txt); padding: 0; margin: 0; outline: none; }
.pot-app select.pot-tri { font: inherit; font-size: 15px; color: var(--pot-txt); background-color: var(--pot-surface); border: 1.5px solid var(--pot-line); border-radius: var(--pot-r); height: 48px; padding: 0 10px; margin: 0; width: auto; }
.pot-app .pot-vues { display: flex; border: 1.5px solid var(--pot-line); border-radius: var(--pot-r); overflow: hidden; background: var(--pot-surface); }
.pot-app button.pot-vue { display: flex; align-items: center; gap: 6px; border: 0; border-radius: 0; background: transparent; color: var(--pot-muted); height: 45px; padding: 0 12px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; box-shadow: none; }
.pot-app button.pot-vue[aria-pressed="true"] { background: var(--pot-ink); color: #fff; }
.pot-app .pot-filtres { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pot-app button.pot-filtre { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--pot-line); background: var(--pot-surface); color: var(--pot-txt); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; box-shadow: none; }
.pot-app button.pot-filtre .pot-n { color: var(--pot-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.pot-app button.pot-filtre[aria-pressed="true"] { background: var(--pot-ink); border-color: var(--pot-ink); color: #fff; }
.pot-app button.pot-filtre[aria-pressed="true"] .pot-n { color: inherit; opacity: .8; }
.pot-app .pot-compte { font-size: 15px; color: var(--pot-muted); margin: 14px 0 12px; }
.pot-app .pot-compte strong { color: var(--pot-ink); }

/* Fiches */
.pot-app ul.pot-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pot-app li.pot-carte { margin: 0; padding: 0; background: var(--pot-surface); border: 1px solid var(--pot-line); border-radius: var(--pot-r); overflow: hidden; min-width: 0; list-style: none; }
.pot-app li.pot-carte::before { content: none; }
.pot-app li.pot-carte:hover { border-color: var(--pot-muted); }
.pot-app button.pot-ouvrir { display: flex; flex-direction: column; width: 100%; height: 100%; text-align: left; background: transparent; border: 0; border-radius: 0; padding: 0; margin: 0; color: inherit; font: inherit; cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none; }
.pot-app button.pot-ouvrir:focus-visible { outline-offset: -3px; }
.pot-app .pot-photo { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; max-width: 100%; background: var(--pot-photo); color: #7A8496; overflow: hidden; }
.pot-app .pot-photo img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; max-width: none; border-radius: 0; }
.pot-app .pot-photo-ico { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pot-app .pot-badge-rendu { position: absolute; left: 8px; top: 8px; background: var(--pot-ok-bg); color: var(--pot-ok-fg); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; line-height: 1.3; }
.pot-app .pot-rendu .pot-photo img, .pot-app .pot-rendu .pot-photo-ico { opacity: .55; }
.pot-app .pot-corps { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; min-width: 0; }
.pot-app .pot-type { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--pot-accent); line-height: 1.3; }
.pot-app .pot-titre { font-size: 18px; font-weight: 700; color: var(--pot-ink); line-height: 1.25; overflow-wrap: anywhere; }
.pot-app .pot-meta { display: flex; flex-direction: column; gap: 2px; font-size: 15px; color: var(--pot-muted); }
.pot-app .pot-meta > span { display: flex; gap: 6px; align-items: flex-start; }
.pot-app .pot-meta .pot-i { width: 16px; height: 16px; margin-top: 3px; }
.pot-app .pot-ref { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--pot-muted); font-variant-numeric: tabular-nums; }

/* Vue liste */
.pot-app ul.pot-liste[data-vue="liste"] { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--pot-line); border-radius: var(--pot-r); overflow: hidden; background: var(--pot-surface); }
.pot-app [data-vue="liste"] li.pot-carte { border: 0; border-bottom: 1px solid var(--pot-line); border-radius: 0; }
.pot-app [data-vue="liste"] li.pot-carte:last-child { border-bottom: 0; }
.pot-app [data-vue="liste"] button.pot-ouvrir { flex-direction: row; align-items: center; gap: 14px; padding: 10px 14px; }
.pot-app [data-vue="liste"] .pot-photo { width: 88px; flex: none; border-radius: 6px; }
.pot-app [data-vue="liste"] .pot-photo-ico { width: 28px; height: 28px; }
.pot-app [data-vue="liste"] .pot-badge-rendu { position: static; display: none; }
.pot-app [data-vue="liste"] .pot-rendu .pot-corps .pot-type::after { content: " · Rendu à son propriétaire"; color: var(--pot-ok-fg); }
.pot-app [data-vue="liste"] .pot-corps { padding: 0; }
.pot-app [data-vue="liste"] .pot-meta { flex-direction: row; flex-wrap: wrap; gap: 2px 16px; }
.pot-app [data-vue="liste"] .pot-ref { padding-top: 2px; }

.pot-app .pot-vide, .pot-app .pot-vide-total { background: var(--pot-surface); border: 1px dashed var(--pot-line); border-radius: var(--pot-r); padding: 24px; text-align: center; color: var(--pot-muted); margin: 0; }
.pot-app .pot-vide p { margin: 0 0 6px; }
.pot-app button.pot-reset { background: none; border: 0; padding: 4px; color: var(--pot-accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; text-transform: none; box-shadow: none; }

/* Fiche détaillée */
.pot-app dialog.pot-dialog { border: 0; border-radius: 12px; padding: 0; width: 100%; max-width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--pot-surface); color: var(--pot-txt); box-shadow: 0 20px 60px rgba(14, 30, 52, .3); overflow: auto; }
.pot-app dialog.pot-dialog::backdrop { background: rgba(14, 30, 52, .55); }
.pot-app .pot-d-photo { background: var(--pot-photo); color: #7A8496; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; max-width: 100%; position: relative; }
.pot-app .pot-d-photo img { width: 100%; height: 100%; object-fit: contain; display: block; max-width: none; margin: 0; }
.pot-app .pot-d-photo .pot-photo-ico { width: 64px; height: 64px; }
.pot-app .pot-d-vignettes { display: flex; gap: 8px; padding: 8px 20px 0; flex-wrap: wrap; }
.pot-app button.pot-d-vignette { width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: var(--pot-photo); cursor: pointer; margin: 0; box-shadow: none; }
.pot-app button.pot-d-vignette[aria-current="true"] { border-color: var(--pot-ink); }
.pot-app button.pot-d-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.pot-app button.pot-d-fermer { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--pot-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; margin: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.pot-app .pot-d-corps { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.pot-app h2.pot-d-titre { font-size: 24px; line-height: 1.2; margin: 0; color: var(--pot-ink); font-weight: 700; }
.pot-app .pot-d-desc { margin: 0; }
.pot-app dl.pot-d-infos { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 16px; }
.pot-app dl.pot-d-infos dt { color: var(--pot-muted); margin: 0; font-weight: 400; }
.pot-app dl.pot-d-infos dd { margin: 0; color: var(--pot-ink); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.pot-app .pot-d-cond { margin: 0; background: var(--pot-accent-tint); border-radius: var(--pot-r); padding: 12px 14px; font-size: 15px; }
.pot-app .pot-d-rendu { display: inline-block; background: var(--pot-ok-bg); color: var(--pot-ok-fg); font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }

/* Compteur ailleurs sur le site */
a.pot-compteur { font-weight: 600; }

/* Mise en page selon la largeur réelle de la zone de contenu du thème (et non de l'écran). */
@container pot (min-width: 560px) {
	.pot-app .pot-infos-grille { grid-template-columns: repeat(2, 1fr); }
}
@container pot (min-width: 980px) {
	.pot-app .pot-infos-grille { grid-template-columns: repeat(4, 1fr); }
}
@container pot (max-width: 520px) {
	.pot-app.pot-js .pot-outils { position: static; }
	.pot-app select.pot-tri { flex: 1 1 110px; min-width: 0; }
	.pot-app [data-vue="liste"] .pot-photo { width: 64px; }
	.pot-app [data-vue="liste"] .pot-meta { flex-direction: column; }
	.pot-app .pot-vue { padding: 0 10px; }
}
@media (prefers-reduced-motion: no-preference) {
	.pot-app li.pot-carte { transition: border-color .15s; }
}
