/**
 * Courbe de Croissance - Styles V2
 * @version 2.0.0
 */

/* Modal */
.growth-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.growth-modal--visible {
  opacity: 1;
  visibility: visible;
}
.growth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.growth-modal__content {
  position: relative;
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: translateY(20px);
  transition: transform 0.3s;
}
.growth-modal--visible .growth-modal__content {
  transform: translateY(0);
}
.growth-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eee;
}
.growth-modal__header h3 {
  margin: 0;
  font-size: 1.125rem;
}
.growth-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.growth-modal__close:hover {
  opacity: 1;
}
.growth-modal__form {
  padding: 1.5rem;
}
.growth-modal__footer {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.growth-modal__footer button {
  flex: 1;
}

/* En-tête bébé */
.growth-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 16px;
  color: white;
  margin-bottom: 1.5rem;
}
.growth-header__icon {
  font-size: 3rem;
}
.growth-header__name {
  margin: 0;
  font-size: 1.5rem;
}
.growth-header__details {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  opacity: 0.9;
}
.growth-header__badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

/* Cards */
.growth-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.growth-card--highlight {
  border: 2px solid #f0f0f0;
}
.growth-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
}
.growth-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.growth-card__date {
  font-size: 0.8125rem;
  color: #888;
}
.growth-card__footer {
  padding: 0.75rem 1.25rem;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}
.growth-card__note {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: #666;
  background: #f9f9f9;
  border-top: 1px solid #f0f0f0;
}

/* Métriques */
.growth-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: #f0f0f0;
}
.growth-metric {
  background: white;
  padding: 1rem 1.25rem;
  text-align: center;
}
.growth-metric__header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.growth-metric__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
}
.growth-metric__status {
  font-size: 0.875rem;
}
.growth-metric__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}
.growth-metric__details {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #888;
}

/* Tabs graphique */
.growth-tabs {
  display: flex;
  gap: 0.25rem;
  background: #f0f0f0;
  padding: 0.25rem;
  border-radius: 8px;
}
.growth-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s;
}
.growth-tab--active {
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Graphique */
.growth-chart-container {
  padding: 1rem;
  height: 320px;
}

/* Légende */
.growth-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.8125rem;
  color: #666;
}
.growth-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.growth-legend__color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* Tableau */
.growth-table-wrapper {
  overflow-x: auto;
}
.growth-table {
  width: 100%;
  border-collapse: collapse;
}
.growth-table th,
.growth-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}
.growth-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  background: #fafafa;
}
.growth-table__delete {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.growth-table__delete:hover {
  opacity: 1;
}

/* Empty state */
.growth-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #888;
}
.growth-empty__hint {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Actions */
.growth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Boutons */
.pfm-tool__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.pfm-tool__btn--primary {
  background: linear-gradient(135deg, #9360F7, #ad1457);
  color: white;
}
.pfm-tool__btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(147, 96, 247, 0.3);
}
.pfm-tool__btn--secondary {
  background: #f5f5f5;
  color: #333;
}
.pfm-tool__btn--secondary:hover {
  background: #eee;
}

/* Footer */
.growth-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: #999;
}
.growth-footer__reset {
  background: none;
  border: none;
  color: #999;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 0.5rem;
}

/* Partage */
.growth-share {
  padding: 1.5rem;
}
.growth-share__intro {
  margin: 0 0 1rem;
  color: #666;
}
.growth-share__url {
  display: flex;
  gap: 0.5rem;
}
.growth-share__url input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.875rem;
  background: #f9f9f9;
}
.growth-share__note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: #888;
}

/* Hints */
.pfm-tool__hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #999;
}

/* Responsive */
@media (max-width: 640px) {
  .growth-header {
    flex-direction: column;
    text-align: center;
  }
  .growth-card__header {
    flex-direction: column;
    gap: 0.75rem;
  }
  .growth-tabs {
    width: 100%;
    justify-content: center;
  }
  .growth-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .growth-actions {
    flex-direction: column;
  }
  .growth-actions button {
    width: 100%;
  }
  .growth-table th:nth-child(n+4),
  .growth-table td:nth-child(n+4) {
    display: none;
  }
}
