/* ==========================================================================
   LE41 PRO - ASSEMBLÉE GÉNÉRALE & VOTE A DISTANCE (LOI ELAN) STYLES
   Live Quorum Gauge, Resolution Voting Cards, Signature Pad, PV Generator
   Optimisé pour Mobile & Tablettes (Vote au Pouce & Signature Tactile)
   ========================================================================== */

.ag-dashboard-header {
  background: linear-gradient(-45deg, #1e1b4b, #1e3a8a, #0f172a, #065f46);
  background-size: 400% 400%;
  animation: gradientMove 10s ease infinite;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  color: white;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  flex-wrap: wrap;
}

.ag-title-group h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
}

.ag-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.5rem;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  animation: pulseGlow 3s infinite;
}

.ag-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Quorum Meter Component */
.quorum-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.quorum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quorum-bar-track {
  height: 16px;
  background-color: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
}

.quorum-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #8b5cf6, #10b981);
  background-size: 200% 200%;
  animation: gradientMove 4s ease infinite;
  border-radius: var(--radius-full);
  transition: width 500ms ease-out;
  position: relative;
}

.quorum-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2.5s infinite;
}

.quorum-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--color-warning);
  z-index: 2;
}

.quorum-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Resolution Voting Card */
.resolution-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color var(--transition-fast);
}

.resolution-card.active-voting {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.resolution-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.resolution-num {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-primary);
}

.majority-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-input);
  color: var(--text-muted);
}

/* Vote Buttons Group */
.vote-actions-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.btn-vote {
  flex: 1;
  padding: 0.75rem 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
  min-height: 46px;
  -webkit-tap-highlight-color: transparent;
}

.btn-vote-pour {
  background-color: var(--color-success-light);
  color: var(--color-success);
  border-color: var(--color-success);
}
.btn-vote-pour:hover, .btn-vote-pour.selected {
  background-color: var(--color-success);
  color: white;
}

.btn-vote-contre {
  background-color: var(--color-danger-light);
  color: var(--color-danger);
  border-color: var(--color-danger);
}
.btn-vote-contre:hover, .btn-vote-contre.selected {
  background-color: var(--color-danger);
  color: white;
}

.btn-vote-abstention {
  background-color: var(--color-warning-light);
  color: var(--color-warning);
  border-color: var(--color-warning);
}
.btn-vote-abstention:hover, .btn-vote-abstention.selected {
  background-color: var(--color-warning);
  color: white;
}

/* Signature Pad Canvas */
.signature-canvas {
  width: 100%;
  height: 160px;
  background-color: #ffffff;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: crosshair;
  touch-action: none; /* Crucial for touch draw on smartphones */
}

/* Responsive AG Breakpoints */
@media (max-width: 768px) {
  .ag-dashboard-header {
    padding: 1.25rem 1rem;
    gap: 1rem;
  }

  .ag-title-group h2 {
    font-size: 1.15rem;
  }

  .ag-header-actions {
    width: 100%;
  }

  .ag-header-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .resolution-card {
    padding: 1rem;
  }

  .vote-actions-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .btn-vote {
    padding: 0.6rem 0.25rem;
    font-size: 0.75rem;
    flex-direction: column;
    gap: 2px;
  }

  .btn-vote i {
    width: 18px;
    height: 18px;
  }

  .quorum-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  .vote-actions-group {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .btn-vote {
    flex-direction: row;
    padding: 0.75rem;
    font-size: 0.85rem;
    min-height: 48px;
  }
}
