/* Annuaire public des corporations. Couleurs : variables :root de static/v2/ui.css (noms v1 en repli pour l'ancienne interface). */

.dl-page { --dl-text-3: var(--text-3, var(--muted)); --dl-raised: var(--bg-raised, var(--panel)); --dl-hover: var(--bg-hover, var(--panel-2));
  --dl-border: var(--border, var(--line)); --dl-strong: var(--border-strong, var(--line)); --dl-gold: var(--gold, var(--accent));
  --dl-gold-soft: var(--gold-soft, transparent); --dl-sunken: var(--bg-sunken, var(--panel)); }
.dl-page .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dl-page .num { font-variant-numeric: tabular-nums; }
.dl-page svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl-page .sep { margin: 0 .4rem; color: var(--dl-text-3); }

/* Filtres : barre de recherche, panneau replié (origine, Discord, tags), filtres actifs en pastilles */
.dl-filters { margin-bottom: .75rem; }
.dl-filters .brief { margin-bottom: 0; }
.dl-filters-toggle { min-height: 44px; }
.dl-filters-toggle[aria-expanded="true"] { border-color: var(--dl-gold); color: var(--dl-gold); }
.dl-badge-num { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 99px;
  background: var(--dl-gold); color: var(--gold-ink, #000); font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dl-filter-panel { display: grid; gap: 1rem; margin-top: .6rem; padding: 1rem 1.1rem; border: 1px solid var(--dl-border);
  border-radius: var(--r, 12px); background: var(--dl-raised); }
.dl-filter-panel[hidden] { display: none; }
.dl-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.dl-check { display: inline-flex; align-items: center; gap: .5rem; min-height: 36px; color: var(--text, inherit); font-size: .9rem; cursor: pointer; }
.dl-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--dl-gold); }
.dl-seg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin: 0; padding: 0; border: 0; }
.dl-seg label { position: relative; cursor: pointer; }
.dl-seg input { position: absolute; opacity: 0; pointer-events: none; }
.dl-seg label > span { display: inline-flex; align-items: center; min-height: 34px; padding: .2rem .75rem; border: 1px solid var(--dl-strong);
  border-radius: var(--r-sm, 8px); color: var(--muted); font-size: .86rem; transition: border-color .15s ease-out, color .15s ease-out; }
.dl-seg label:hover > span { color: var(--text, inherit); }
.dl-seg input:checked + span { border-color: var(--dl-gold); background: var(--dl-gold-soft); color: var(--dl-gold); }
.dl-seg input:focus-visible + span { outline: 2px solid var(--dl-gold); outline-offset: 2px; }
.dl-taggroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem 1.5rem; }
.dl-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.dl-group legend, .dl-group-label { margin-bottom: .4rem; padding: 0; color: var(--dl-text-3); font-size: .74rem; font-weight: 650;
  letter-spacing: .04em; text-transform: uppercase; }
.dl-group-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip > span { display: inline-flex; align-items: center; gap: .35rem; min-height: 30px; padding: .2rem .65rem; border: 1px solid var(--dl-strong);
  border-radius: 99px; color: var(--muted); font-size: .84rem; font-weight: 500; transition: border-color .15s ease-out, background-color .15s ease-out, color .15s ease-out; }
.chip > span .num { color: var(--dl-text-3); font-size: .76rem; }
.chip:hover > span { border-color: var(--dl-text-3); color: var(--text, inherit); }
.chip input:checked + span { border-color: var(--dl-gold); background: var(--dl-gold-soft); color: var(--dl-gold); }
.chip input:checked + span .num { color: inherit; }
.chip input:focus-visible + span { outline: 2px solid var(--dl-gold); outline-offset: 2px; }
.dl-active { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .75rem; padding: 0; list-style: none; }
.dl-active a { display: inline-flex; align-items: center; gap: .3rem; min-height: 30px; padding: .15rem .45rem .15rem .7rem; border: 1px solid var(--dl-gold);
  border-radius: 99px; background: var(--dl-gold-soft); color: var(--dl-gold); font-size: .84rem; font-weight: 550; }
.dl-active a svg { width: 14px; height: 14px; }
.dl-active a:hover { text-decoration: none; filter: brightness(1.15); }
.dl-active a.dl-clear { border-color: transparent; background: none; color: var(--muted); padding-right: .7rem; }
.dl-count-line { margin: 0 0 .8rem; color: var(--muted); font-size: .88rem; }

/* Grille de cartes (liste principale) : 3 par ligne sur grand écran */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.dl-card { display: flex; flex-direction: column; gap: .55rem; min-width: 0; padding: 1rem 1.1rem; border: 1px solid var(--dl-border);
  border-radius: var(--r, 12px); background: var(--dl-raised); transition: border-color .15s ease-out; }
.dl-card:hover { border-color: var(--dl-strong); }
.dl-card-head { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .75rem; align-items: start; }
.dl-card-head .dl-logo { width: 44px; height: 44px; }
.dl-card .dl-title { margin: 0 0 .15rem; font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl-card .dl-corp { margin: 0; font-size: .84rem; }
.dl-card .dl-summary { margin: 0; font-size: .88rem; color: var(--text-2, var(--muted)); }
.dl-card .dl-tags { margin: 0; }
.dl-card .dl-meta { margin-top: auto; }
.dl-card-foot { display: flex; align-items: center; gap: .5rem; padding-top: .65rem; border-top: 1px solid var(--dl-border); }
.dl-card-foot .dl-vote { margin-left: auto; }
.dl-card-foot .vote { grid-auto-flow: column; min-width: 0; min-height: 30px; gap: .35rem; padding: .25rem .6rem; }
.dl-card-foot .vote svg { width: 15px; height: 15px; }
.dl-discord-btn .dl-count { margin-left: .1rem; color: inherit; opacity: .8; font-weight: 500; }
.tag.more { background: none; border: 1px dashed var(--dl-strong); color: var(--dl-text-3); }

/* Pages */
.dl-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin: 0 0 2rem; }
.dl-pages ol { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.dl-pages ol a, .dl-pages ol span { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 .5rem;
  border-radius: var(--r-sm, 8px); color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-pages ol a:hover { background: var(--dl-hover); color: var(--text, inherit); text-decoration: none; }
.dl-pages .is-current { background: var(--dl-gold-soft); color: var(--dl-gold); font-weight: 700; }
.dl-pages .gap { display: inline-grid; place-items: center; min-width: 20px; color: var(--dl-text-3); }

/* Liste */
.dl-list { margin: 0 0 2rem; padding: 0; list-style: none; border: 1px solid var(--dl-border); border-radius: var(--r, 12px); background: var(--dl-raised); }
.dl-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 1rem; align-items: start; padding: 1.1rem 1.25rem; }
.dl-item + .dl-item { border-top: 1px solid var(--dl-border); }
.dl-list.compact .dl-item { grid-template-columns: minmax(0, 1fr) auto; padding: .9rem 1rem; }
.dl-logo { display: block; width: 48px; height: 48px; border-radius: 10px; background: var(--dl-sunken); object-fit: cover; }
.dl-head .dl-logo { width: 64px; height: 64px; border-radius: 14px; }
.dl-logo-none { display: grid; place-items: center; border: 1px dashed var(--dl-strong); color: var(--dl-text-3); }
.dl-logo-none svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dl-logo.is-portrait { border-radius: 50%; }
.dl-contact p { margin-top: 0; }
.dl-ingame-list { display: grid; gap: .45rem; margin: .2rem 0 .6rem; }
.dl-ingame { margin: 0; }
.dl-ingame button { display: inline-flex; align-items: center; gap: .45rem; width: 100%; justify-content: flex-start; text-align: left; }
.dl-ingame svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dl-declared { list-style: none; margin: .2rem 0 .6rem; padding: 0; display: grid; gap: .3rem; }
.dl-declared a { font-weight: 600; }
.dl-links-form { display: grid; gap: .6rem; }
.dl-links-form input { width: 100%; }
.dl-elsewhere { margin-top: 1.6rem; }
.dl-copy { display: flex; align-items: center; gap: .45rem; width: 100%; text-align: left; }
.dl-copy svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dl-copy-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dl-copy-role { flex: none; color: var(--muted); font-size: .85em; }
.dl-copy-state { flex: none; margin-left: auto; color: var(--muted); font-size: .85em; }
.dl-copy.is-done .dl-copy-state { color: var(--dl-gold); }
.dl-wait::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .45em; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; vertical-align: -.05em; animation: dl-spin .9s linear infinite; }
@keyframes dl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dl-wait::before { animation: none; } }
.dl-main { min-width: 0; }
.dl-title { margin: 0 0 .2rem; font-size: 1.04rem; line-height: 1.35; text-wrap: balance; overflow-wrap: anywhere; }
.dl-title a { color: var(--text, inherit); }
.dl-title a:hover { color: var(--dl-gold); }
.dl-corp { margin: 0 0 .45rem; color: var(--muted); font-size: .88rem; }
.dl-corp a { color: inherit; font-weight: 600; }
.dl-corp a:hover { color: var(--dl-gold); }
.dl-ticker { color: var(--dl-text-3); font-weight: 500; }
.dl-summary { margin: 0 0 .55rem; max-width: 75ch; color: var(--text, inherit); font-size: .92rem; line-height: 1.55; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dl-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 .55rem; padding: 0; list-style: none; }
.tag { padding: .05rem .5rem; border-radius: 6px; background: var(--dl-hover); color: var(--muted); font-size: .76rem; font-weight: 550; }
.tag.g-zone { color: var(--info, var(--muted)); background: var(--info-soft, var(--dl-hover)); }
.tag.g-public { color: var(--ok, var(--good)); background: var(--ok-soft, var(--dl-hover)); }
.dl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; margin: 0; color: var(--dl-text-3); font-size: .8rem; }
.dl-meta .badge svg, .dl-provenance .badge svg { width: 12px; height: 12px; }
.dl-lang { color: var(--muted); }
.dl-discord { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-weight: 550; }
.dl-discord svg { width: 14px; height: 14px; }
a.dl-discord:hover { color: var(--text, inherit); text-decoration: none; }
.dl-discord .dl-count, .btn .dl-count { color: var(--dl-text-3); font-weight: 450; }
.btn.discord .dl-count { color: inherit; opacity: .8; }
.dl-discord.is-dead { color: var(--dl-text-3); text-decoration: line-through; }

/* Vote */
.dl-vote { margin: 0; }
.vote { display: grid; justify-items: center; gap: .1rem; min-width: 52px; min-height: 56px; padding: .4rem .5rem; border-radius: 10px; color: var(--muted); }
.vote svg { width: 18px; height: 18px; }
.vote .num { font-size: .95rem; font-weight: 650; color: var(--text, inherit); }
.vote.is-on { border-color: var(--dl-gold); background: var(--dl-gold-soft); color: var(--dl-gold); }
.vote.is-on .num { color: var(--dl-gold); }
.vote.is-on svg { fill: currentColor; }

/* Annonce, fiche */
.dl-back { display: inline-flex; align-items: center; gap: .3rem; margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.dl-back svg { width: 16px; height: 16px; }
.dl-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.dl-head-main { flex: 1 1 320px; min-width: 0; }
.dl-head h1 { margin: 0 0 .25rem; text-wrap: balance; overflow-wrap: anywhere; }
.dl-head .dl-corp { margin: 0; }
.dl-head-actions { display: flex; align-items: center; gap: .6rem; }
.dl-head-actions .btn.discord { min-height: 44px; }
.dl-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.dl-article { min-width: 0; }
.dl-article h2 { font-size: 1.05rem; }
.dl-provenance, .dl-langbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin-bottom: .75rem; color: var(--muted); font-size: .88rem; }
.dl-langbar { padding: .6rem .8rem; border: 1px solid var(--dl-border); border-radius: var(--r-sm, 8px); background: var(--dl-sunken); }
.dl-inline { margin: 0; }
.dl-resume { margin: 1.25rem 0; }
.dl-resume h2 { margin: 0 0 .3rem; font-size: .95rem; color: var(--muted); }
.dl-resume p { margin: 0; max-width: 72ch; line-height: 1.6; }
.dl-body { max-width: 72ch; margin: 1.25rem 0; white-space: pre-line; line-height: 1.65; overflow-wrap: anywhere; }
.dl-desc { margin-top: 2rem; }
.dl-aside .card h2 { font-size: 1rem; }
.dl-aside .card h3 { margin: 1rem 0 .4rem; font-size: .88rem; color: var(--muted); }
.dl-facts { display: grid; gap: .45rem; margin: 0; }
.dl-facts div { display: flex; justify-content: space-between; gap: 1rem; }
.dl-facts dt { color: var(--muted); }
.dl-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.dl-months { width: 100%; border-collapse: collapse; font-size: .88rem; }
.dl-months th, .dl-months td { padding: .3rem 0; border-bottom: 1px solid var(--dl-border); text-align: left; }
.dl-months .num { text-align: right; }
.dl-months td:first-child { font-variant-numeric: tabular-nums; }
.dl-body a { overflow-wrap: anywhere; }
.dl-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .9rem 0 0; font-size: .88rem; }
.dl-claim p { margin-top: 0; }
.dl-aside .faint { margin: .75rem 0 0; font-size: .8rem; line-height: 1.45; }
.dl-others { margin: 0; padding-left: 1.1rem; }
.dl-others li + li { margin-top: .35rem; }
.dl-moderate { margin-top: .5rem; }

/* Gestion */
.dl-verify .dl-steps { margin: 0 0 1rem; padding-left: 1.2rem; line-height: 1.6; }
.dl-verify .dl-steps li + li { margin-top: .6rem; }
.dl-code { margin: .5rem 0 .2rem; }
.dl-code code { display: inline-block; padding: .45rem .8rem; border: 1px solid var(--dl-gold); border-radius: var(--r-sm, 8px);
  background: var(--dl-sunken); color: var(--dl-gold); font-size: 1.05rem; letter-spacing: .04em; user-select: all; }
.dl-manage-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dl-manage-head h2 { margin: 0 0 .25rem; }
.dl-manage-head p { margin: 0; }
.dl-own-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.dl-own-head h2 { margin: 0 0 .35rem; font-size: 1rem; }
.dl-own-head h2 a { color: var(--text, inherit); }
.dl-form { display: grid; gap: .9rem; margin-top: .75rem; }
.dl-form label { display: grid; gap: .35rem; }
.dl-form textarea { min-height: 220px; resize: vertical; line-height: 1.55; }
.dl-tagpick { display: grid; gap: .5rem; margin: 0; padding: 0; border: 0; }
.dl-tagpick .dl-group { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.dl-tagpick .dl-group-label { min-width: 8.5rem; margin: 0 .2rem 0 0; }
.dl-form-foot { display: flex; justify-content: flex-end; }

@media (max-width: 900px) {
  .dl-detail { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dl-item { grid-template-columns: 40px minmax(0, 1fr); gap: .75rem; padding: 1rem; }
  .dl-logo { width: 40px; height: 40px; }
  .dl-item .dl-vote { grid-column: 2; justify-self: start; }
  .dl-item .vote { grid-auto-flow: column; min-height: 34px; gap: .35rem; }
  .dl-list.compact .dl-item .dl-vote { grid-column: 1; }
  .dl-head-actions { width: 100%; }
  .dl-filters .go { width: 100%; margin-left: 0; }
  .dl-filters .go .primary { flex: 1; }
}
