/* Page des marchés publics */
.hero-aside-link {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--kk-jaune);
  font-weight: 700;
}

.marches-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.marche-carte {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  padding: 1.3rem;
  border: 1px solid #c9cce9;
  border-top: 4px solid var(--kk-marine);
  border-radius: 0.7rem;
  background: var(--white);
}

.marche-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.marche-entete .eyebrow {
  margin: 0;
}

.marche-compte {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #fff4d1;
  color: #5c4d00;
  font-size: var(--fs-sm, 0.9375rem);
  font-weight: 700;
}

.marche-carte h3 {
  margin: 0;
  color: var(--kk-marine);
  font-size: 1.15rem;
  line-height: 1.3;
}

.marche-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.6rem;
  margin: 0;
  font-size: var(--fs-sm, 0.9375rem);
}

.marche-meta dt {
  color: var(--muted);
  font-size: var(--fs-xs, 0.875rem);
}

.marche-meta dd {
  margin: 0;
  font-weight: 600;
}

.marche-resume {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm, 0.9375rem);
}

.marche-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.marche-actions a,
#repondre .form-actions a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.marches-vide {
  display: grid;
  justify-items: start;
  gap: 0.5rem;
  padding: 1.3rem;
  border: 1px dashed #9ea2cf;
  border-radius: 0.7rem;
  background: var(--white);
}

.marches-vide p {
  margin: 0;
  color: var(--muted);
}

.marches-closes {
  margin-top: 1rem;
}

.marches-closes summary {
  color: var(--kk-marine);
  font-weight: 700;
  cursor: pointer;
}

.marches-closes ul {
  display: grid;
  gap: 0.5rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.marches-closes li {
  display: grid;
}

.marches-closes small,
.marches-source,
.marches-astuce {
  color: var(--muted);
}

.marches-astuce {
  margin: 1rem 0 0;
  font-size: var(--fs-sm, 0.9375rem);
}

.marches-filtres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.marches-filtres button {
  min-height: 2.6rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid #c9cce9;
  border-radius: 999px;
  background: var(--white);
  color: var(--kk-marine);
  font: inherit;
  font-size: var(--fs-sm, 0.9375rem);
  cursor: pointer;
}

.marches-filtres button[aria-pressed="true"] {
  border-color: var(--kk-marine);
  background: var(--kk-marine);
  color: var(--white);
}

.avis-liste {
  display: grid;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid #e3e5f3;
}

.avis {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid #e3e5f3;
}

.avis-date {
  display: grid;
  gap: 0.3rem;
  font-size: var(--fs-sm, 0.9375rem);
}

.avis-nature {
  justify-self: start;
  padding: 0.15rem 0.5rem;
  border-radius: 0.3rem;
  background: #eaebf5;
  color: var(--kk-marine);
  font-size: var(--fs-xs, 0.875rem);
  font-weight: 700;
}

.avis--appel_offre .avis-nature {
  background: #e7f0ff;
  color: var(--kk-lagon);
}

.avis--attribution .avis-nature {
  background: rgba(80, 90, 63, 0.14);
  color: var(--kk-baobab);
}

.avis-corps {
  display: grid;
  gap: 0.2rem;
}

.avis-corps small {
  color: var(--muted);
}

.avis-titulaire {
  font-weight: 600;
}

.avis-lien {
  color: var(--kk-marine);
  font-weight: 700;
  white-space: nowrap;
}

.marches-etapes {
  display: grid;
  gap: 0.8rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}

.marches-etapes li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  column-gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid #c9cce9;
  border-radius: 0.7rem;
  background: var(--white);
  counter-increment: etape;
}

.marches-etapes li::before {
  content: counter(etape);
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--kk-marine);
  color: var(--white);
  font-weight: 700;
}

.marches-etapes span {
  color: var(--muted);
  font-size: 0.95rem;
}

.marches-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.marches-contact .primary-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

@media (max-width: 760px) {
  .avis {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .avis-date {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }
}
