/* ============================================
   OÙ NOUS TRAVAILLONS CSS — AVDA
   Styles de la page Où nous travaillons
   Dernière mise à jour : Juillet 2026
   ============================================ */

/* ==========================================
   PAGE HERO
   ========================================== */
.page-hero {
  position: relative;
  background: var(--gradient-primary);
  padding: calc(var(--navbar-height-scrolled) + var(--spacing-4xl)) 0 var(--spacing-4xl);
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(223, 162, 26, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -35%;
  left: -15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(60, 130, 26, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: url('../images/ui/pattern-dots.png') repeat;
  opacity: 0.03;
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 0.4rem 1.4rem;
  background-color: rgba(223, 162, 26, 0.15);
  border: 1px solid rgba(223, 162, 26, 0.35);
  color: var(--brand-accent);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--spacing-lg);
  animation: fadeInUp 0.6s ease forwards;
}

.page-hero-title {
  font-size: var(--fs-display);
  font-weight: var(--fw-extrabold);
  color: var(--text-white);
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 0.6s ease 0.1s forwards;
  opacity: 0;
}

.page-hero-subtitle {
  font-size: var(--fs-body-lg);
  color: rgba(255, 255, 255, 0.8);
  max-width: 650px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   SECTION — Introduction
   ========================================== */
.where-intro {
  text-align: center;
  max-width: 850px;
  margin: 0 auto;
}

.intro-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  color: var(--brand-accent);
  border-radius: var(--radius-full);
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
  transition: all var(--transition-normal);
}

.intro-icon:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: var(--shadow-primary);
}

.intro-text {
  font-size: var(--fs-body);
  color: var(--text-muted);
  line-height: 1.8;
}

/* ==========================================
   SECTION — Deux colonnes provinces
   ========================================== */
.provinces-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-2xl);
  align-items: start;
}

/* Carte province */
.province-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.province-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.province-card-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-xl);
  border-bottom: 1px solid var(--border-light);
}

.province-nord-kivu .province-card-header {
  background: linear-gradient(135deg, rgba(19,68,30,0.04) 0%, rgba(19,68,30,0.01) 100%);
}

.province-sud-kivu .province-card-header {
  background: linear-gradient(135deg, rgba(223,162,26,0.04) 0%, rgba(223,162,26,0.01) 100%);
}

.province-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.province-nord-kivu .province-icon {
  background-color: rgba(19,68,30,0.08);
  color: var(--brand-primary);
}

.province-sud-kivu .province-icon {
  background-color: rgba(223,162,26,0.12);
  color: #8B6914;
}

.province-card-header h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
}

.province-badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-primary {
  background-color: rgba(19,68,30,0.1);
  color: var(--brand-primary);
}

.badge-accent {
  background-color: rgba(223,162,26,0.15);
  color: #8B6914;
}

.badge-success {
  background-color: var(--theme-agriculture-light);
  color: var(--theme-agriculture-dark);
}

.badge-info {
  background-color: var(--theme-education-light);
  color: var(--theme-education-dark);
}

.badge-warning {
  background-color: #FFF8E1;
  color: #8B6914;
}

.province-card-body {
  padding: var(--spacing-xl);
}

/* Illustration SVG */
.province-illustration {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-md);
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
}

.province-svg {
  width: 100%;
  height: auto;
  max-height: 180px;
}

.province-dot {
  transition: all var(--transition-normal);
}

.province-dot-active {
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; r: 5; }
  50% { opacity: 0.5; r: 7; }
}

/* Liste des territoires */
.territoire-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.territoire-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.territoire-item:hover {
  background-color: var(--bg-surface);
}

.territoire-item i {
  margin-top: 4px;
  font-size: 0.6rem;
  color: var(--text-light);
  flex-shrink: 0;
}

.territoire-actif i {
  color: var(--theme-agriculture);
  font-size: 0.7rem;
}

.territoire-item div {
  flex: 1;
}

.territoire-item strong {
  display: block;
  font-size: var(--fs-body-sm);
  color: var(--text-dark);
  margin-bottom: 2px;
}

.territoire-item span {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.territoire-item .badge {
  flex-shrink: 0;
  align-self: center;
}

/* ==========================================
   SECTION — Tableau récapitulatif
   ========================================== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.where-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body-sm);
}

.where-table thead th {
  background-color: var(--brand-primary);
  color: var(--text-white);
  padding: var(--spacing-md) var(--spacing-lg);
  text-align: left;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.where-table thead th:first-child {
  border-radius: var(--radius-sm) 0 0 0;
}

.where-table thead th:last-child {
  border-radius: 0 var(--radius-sm) 0 0;
}

.where-table tbody td {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dark);
}

.where-table tbody tr:hover {
  background-color: var(--bg-surface);
}

.where-table tbody tr.row-active {
  background-color: rgba(60,130,26,0.03);
}

.where-table tbody td i {
  color: var(--brand-primary);
  margin-right: var(--spacing-xs);
  font-size: 0.6rem;
}

.where-table .badge {
  white-space: nowrap;
}

/* ==========================================
   SECTION — Graphique barres
   ========================================== */
.where-chart {
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.where-chart .chart-bar-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: var(--spacing-md);
}

.where-chart .chart-bar-label {
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-medium);
  color: var(--text-dark);
  text-align: right;
}

.where-chart .chart-bar-track {
  height: 32px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.where-chart .chart-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--spacing-sm);
  transition: width 1.5s ease;
}

.where-chart .chart-bar-fill span {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-white);
  white-space: nowrap;
}

/* ==========================================
   SECTION — Bureaux
   ========================================== */
.bureaux-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.bureau-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  text-align: center;
  transition: all var(--transition-normal);
}

.bureau-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: transparent;
}

.bureau-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: var(--bg-surface);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: 1.4rem;
  margin-bottom: var(--spacing-md);
  transition: all var(--transition-normal);
}

.bureau-card:hover .bureau-icon {
  background-color: var(--brand-primary);
  color: var(--text-white);
  transform: scale(1.1);
}

.bureau-card h4 {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

.bureau-coords {
  font-size: var(--fs-small);
  color: var(--brand-accent);
  font-weight: var(--fw-medium);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
}

.bureau-coords i {
  font-size: 0.75rem;
}

.bureau-card p {
  font-size: var(--fs-body-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

/* ==========================================
   SECTION — CTA
   ========================================== */
.cta-section {
  background-color: var(--bg-main);
}

.cta-card {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-3xl);
  text-align: center;
  color: var(--text-white);
  transition: all var(--transition-normal);
}

.cta-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.cta-icon {
  font-size: 3.5rem;
  color: var(--brand-accent);
  margin-bottom: var(--spacing-lg);
  display: inline-block;
  transition: transform var(--transition-normal);
}

.cta-card:hover .cta-icon {
  transform: scale(1.1) rotate(-5deg);
}

.cta-card h2 {
  color: var(--text-white);
  font-size: var(--fs-h2);
  margin-bottom: var(--spacing-md);
}

.cta-card p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 550px;
  margin: 0 auto var(--spacing-xl);
  line-height: 1.7;
}

.cta-card .btn-group {
  justify-content: center;
}

/* ==========================================
   AOS — Animations
   ========================================== */
.aos-init {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   RESPONSIVE — Tablette
   ========================================== */
@media (max-width: 1023px) {
  .provinces-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .bureaux-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .where-chart .chart-bar-item {
    grid-template-columns: 110px 1fr;
  }
}

/* ==========================================
   RESPONSIVE — Mobile
   ========================================== */
@media (max-width: 767px) {
  .page-hero {
    padding: calc(var(--navbar-height-scrolled) + var(--spacing-2xl)) 0 var(--spacing-2xl);
  }

  .page-hero-title {
    font-size: clamp(1.5rem, 6vw, 2.25rem);
  }

  .page-hero-subtitle {
    font-size: var(--fs-body-sm);
  }

  .province-card-header {
    flex-direction: column;
    text-align: center;
  }

  .province-illustration {
    display: none;
  }

  .bureaux-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .where-chart .chart-bar-item {
    grid-template-columns: 90px 1fr;
    gap: var(--spacing-sm);
  }

  .where-chart .chart-bar-label {
    font-size: var(--fs-small);
  }

  .where-chart .chart-bar-track {
    height: 26px;
  }

  .where-table {
    font-size: var(--fs-small);
  }

  .where-table thead th,
  .where-table tbody td {
    padding: var(--spacing-sm);
  }

  .territoire-item {
    flex-wrap: wrap;
  }

  .territoire-item .badge {
    margin-top: var(--spacing-xs);
  }

  .cta-card {
    padding: var(--spacing-xl) var(--spacing-lg);
  }

  .cta-card .btn-group {
    flex-direction: column;
    align-items: center;
  }
}

/* ==========================================
   RESPONSIVE — Petit mobile
   ========================================== */
@media (max-width: 480px) {
  .province-card-body {
    padding: var(--spacing-md);
  }

  .where-chart .chart-bar-item {
    grid-template-columns: 1fr;
    gap: var(--spacing-xs);
  }

  .where-chart .chart-bar-label {
    text-align: left;
  }

  .bureau-icon {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }
}