/* ============================================
   APPSM - PAGE ARCHIVES PREMIUM
   Fichier: css/archives.css
============================================ */

/* ============================================
   1. SECTIONS
============================================ */
.arch-section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 120px;
}

.arch-section-white {
  background: var(--white);
}

.arch-section-gray {
  background: linear-gradient(135deg, #ede7f2 0%, #e4daee 100%);
}

.arch-section::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(232, 103, 42, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.arch-section-gray::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(91, 45, 142, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.arch-intro-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.arch-intro-header .section-desc strong {
  color: var(--purple);
  font-weight: 700;
}

/* ============================================
   2. CONTROLS (Recherche + Filtres)
============================================ */
.arch-controls {
  max-width: 1000px;
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  position: relative;
  z-index: 2;
}

/* Barre de recherche */
.arch-search-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 22px;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--gray-400);
  pointer-events: none;
  transition: color 0.3s ease;
  z-index: 2;
}

.arch-search-input {
  width: 100%;
  padding: 16px 55px 16px 55px;
  font-size: 15px;
  color: var(--navy);
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 50px;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(74, 30, 92, 0.08);
  font-family: "Inter", sans-serif;
  font-weight: 500;
}

.arch-search-input::placeholder {
  color: var(--gray-400);
}

.arch-search-input:focus {
  border-color: var(--orange);
  box-shadow: 0 10px 30px rgba(232, 103, 42, 0.25);
}

.arch-search-wrapper:focus-within .search-icon {
  color: var(--orange);
}

.arch-clear-btn {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  background: rgba(232, 103, 42, 0.1);
  border: none;
  color: var(--orange);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.arch-clear-btn:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-50%) rotate(90deg);
}

/* Filtres */
.arch-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.arch-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.4s ease;
  font-family: "Poppins", sans-serif;
  box-shadow: 0 5px 15px rgba(74, 30, 92, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.arch-filter-btn i {
  font-size: 14px;
  color: var(--orange);
  transition: color 0.3s ease;
}

.arch-filter-btn:hover {
  background: linear-gradient(
    135deg,
    var(--purple) 0%,
    var(--purple-light) 100%
  );
  color: var(--white);
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(91, 45, 142, 0.3);
}

.arch-filter-btn:hover i {
  color: #ffb84d;
}

.arch-filter-btn.active {
  background: linear-gradient(
    135deg,
    var(--orange) 0%,
    var(--orange-dark) 100%
  );
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 10px 25px rgba(232, 103, 42, 0.5);
}

.arch-filter-btn.active i {
  color: var(--white);
}

/* ============================================
   3. COMPTEUR
============================================ */
.arch-count {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: rgba(91, 45, 142, 0.08);
  color: var(--purple);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 auto 30px;
  position: relative;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
}

.arch-count i {
  color: var(--orange);
  font-size: 15px;
}

.arch-count strong {
  color: var(--orange);
  font-weight: 800;
  font-size: 15px;
}

/* ============================================
   4. LOADER
============================================ */
.arch-loader {
  text-align: center;
  padding: 80px 20px;
  color: var(--purple);
}

.loader-spinner {
  display: inline-block;
  width: 60px;
  height: 60px;
  border: 5px solid rgba(91, 45, 142, 0.1);
  border-left-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.arch-loader p {
  font-size: 15px;
  color: var(--gray-500);
  margin: 0;
  font-weight: 500;
}

/* ============================================
   5. GRILLE
============================================ */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  position: relative;
  z-index: 2;
}

.arch-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(74, 30, 92, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  animation: fadeInCard 0.6s ease-out forwards;
  border: 1px solid rgba(91, 45, 142, 0.05);
}

@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.arch-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(74, 30, 92, 0.22);
  border-color: transparent;
}

/* Photo */
.arch-card-photo {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple) 0%, #4a1e5c 100%);
}

.arch-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.arch-card:hover .arch-card-photo img {
  transform: scale(1.15);
  filter: brightness(1.1);
}

.arch-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(74, 30, 92, 0) 0%,
    rgba(74, 30, 92, 0.3) 60%,
    rgba(74, 30, 92, 0.85) 100%
  );
  opacity: 0.7;
  transition: opacity 0.5s ease;
}

.arch-card:hover .arch-card-overlay {
  opacity: 1;
}

/* Badge catégorie */
.arch-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  font-family: "Poppins", sans-serif;
}

.arch-card-badge i {
  font-size: 10px;
}

.arch-badge-activites {
  background: linear-gradient(
    135deg,
    var(--purple) 0%,
    var(--purple-light) 100%
  );
}

.arch-badge-campagnes {
  background: linear-gradient(
    135deg,
    var(--orange) 0%,
    var(--orange-dark) 100%
  );
}

.arch-badge-journees {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

/* Contenu carte */
.arch-card-content {
  padding: 20px 22px 22px;
  border-top: 4px solid var(--orange);
  transition: border-color 0.4s ease;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.arch-card-content::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--purple);
  transition: width 0.6s ease;
}

.arch-card:hover .arch-card-content::before {
  width: 100%;
}

.arch-card-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.arch-card-date i {
  color: var(--orange);
  font-size: 11px;
}

.arch-card-title {
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.35;
  transition: color 0.4s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.arch-card:hover .arch-card-title {
  color: var(--purple);
}

.arch-card-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.6;
  margin: 0 0 15px 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.arch-card-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed rgba(91, 45, 142, 0.15);
}

.arch-card:hover .arch-card-more {
  color: var(--purple);
  gap: 12px;
}

.arch-card-more i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

/* ============================================
   6. EMPTY STATE
============================================ */
.arch-empty {
  text-align: center;
  padding: 70px 30px;
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 40px rgba(74, 30, 92, 0.1);
  border: 1px dashed rgba(91, 45, 142, 0.2);
  position: relative;
  z-index: 2;
}

.arch-empty-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 25px;
  background: linear-gradient(
    135deg,
    var(--purple) 0%,
    var(--purple-light) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 42px;
  box-shadow: 0 10px 30px rgba(91, 45, 142, 0.4);
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.arch-empty h3 {
  font-family: "Poppins", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
}

.arch-empty p {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.7;
  margin: 0;
}

/* ============================================
   7. RESPONSIVE
============================================ */
@media (max-width: 1024px) {
  .arch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .arch-section {
    padding: 60px 0;
  }

  .arch-filter-btn {
    padding: 10px 18px;
    font-size: 12px;
  }

  .arch-filter-btn span {
    display: none;
  }

  .arch-filter-btn i {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .arch-grid {
    grid-template-columns: 1fr;
  }

  .arch-card-photo {
    height: 200px;
  }

  .arch-search-input {
    padding: 14px 45px 14px 50px;
    font-size: 14px;
  }
}
