/**
 * Filtre par catégorie des pages d'archives.
 *
 * Compilé depuis assets/sass/filtre-categories.scss.
 * Toute modification doit être portée dans le fichier SCSS.
 */

.archive-filtre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: 0 0 2rem;
}

.archive-filtre__label {
  font-family: 'omnes';
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(38, 38, 52, 0.6);
  margin: 0;
}

.archive-filtre__champ {
  position: relative;
  display: inline-block;
}

.archive-filtre__champ:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 10px;
  height: 6px;
  margin-top: -3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230071B9' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none;
}

.archive-filtre__select {
  font-family: 'omnes';
  font-size: 0.95rem;
  color: #262634;
  background-color: #ffffff;
  border: 1px solid rgba(38, 38, 52, 0.25);
  border-radius: 6px;
  padding: 0.5rem 2.75rem 0.5rem 1rem;
  min-width: 240px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.archive-filtre__select:hover {
  border-color: rgba(38, 38, 52, 0.5);
}

.archive-filtre__select:focus {
  outline: none;
  border-color: #7AB929;
  box-shadow: 0 0 0 0.2rem rgba(122, 185, 41, 0.4);
}

.archive-filtre__submit {
  font-family: 'omnes';
  font-weight: 600;
  color: #ffffff;
  background-color: #0071B9;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
}

.archive-filtre__submit:hover {
  background-color: #004079;
}

@media (max-width: 575px) {
  .archive-filtre {
    justify-content: flex-start;
  }
  .archive-filtre__champ,
  .archive-filtre__select {
    width: 100%;
  }
}

.archive-resultats {
  position: relative;
  transition: opacity 0.2s ease;
}

.archive-resultats--chargement {
  opacity: 0.35;
  pointer-events: none;
}

.archive-resultats--chargement:after {
  content: "";
  position: absolute;
  top: 3rem;
  left: 50%;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  border: 3px solid rgba(38, 38, 52, 0.15);
  border-top-color: #7AB929;
  border-radius: 50%;
  animation: archive-filtre-rotation 0.8s linear infinite;
}

@keyframes archive-filtre-rotation {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .archive-resultats--chargement:after {
    animation-duration: 3s;
  }
}
