* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Thème style GitHub dark */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #161b22;
  --accent: #238636;
  --accent-hover: #2ea043;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --border: #30363d;
  --border-hover: #8b949e;
  --success: #238636;
  --link: #58a6ff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 14px;
  position: relative;
  overflow-x: hidden;
}

/* Styles pour les bulles animées */
.bubbles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -100px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(88, 166, 255, 0.15), rgba(88, 166, 255, 0.05));
  border: 1px solid rgba(88, 166, 255, 0.1);
  animation: rise linear infinite;
}

@keyframes rise {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-110vh) translateX(20px);
    opacity: 0;
  }
}

/* Main simplifié - z-index pour être au-dessus des bulles */
.main {
  max-width: 1012px;
  margin: 0 auto;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

/* Hero style GitHub - sobre, sans gradient */
.hero {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Section title style GitHub */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* Card style GitHub - bordures simples, pas d'effets fancy */
.source-card {
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.source-card:hover {
  border-color: var(--border-hover);
}

.card-image {
  position: relative;
  height: 140px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-overlay {
  display: none;
}

/* Badge style GitHub label */
.card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.125rem 0.5rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.card-content {
  padding: 1rem;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Title style GitHub */
.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--link);
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.card-creator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
}

.creator-label {
  color: var(--text-secondary);
}

.creator-name {
  color: var(--text-primary);
  font-weight: 500;
}

/* Verified badge style GitHub */
.verified-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-left: 0.25rem;
}

.verified-icon {
  width: 16px;
  height: 16px;
  color: var(--success);
}

.verified-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s;
  border: 1px solid var(--border);
  z-index: 10;
}

.verified-badge::before {
  content: "";
  position: absolute;
  bottom: calc(100%);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s;
}

.verified-badge:hover::after,
.verified-badge:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Boutons style GitHub */
.card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 5px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s;
  text-decoration: none;
  line-height: 20px;
}

.btn-icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: rgba(240, 246, 252, 0.1);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: #21262d;
  color: #c9d1d9;
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #30363d;
  border-color: var(--border-hover);
}

/* Placeholder card style GitHub */
.source-card-placeholder {
  border-style: dashed;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.source-card-placeholder:hover {
  border-color: var(--border);
}

.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.placeholder-icon {
  width: 32px;
  height: 32px;
  opacity: 0.4;
}

/* Footer style GitHub - z-index pour être au-dessus des bulles */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  position: relative;
  z-index: 1;
  background: var(--bg-primary);
}

.footer-content {
  max-width: 1012px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.footer-link {
  color: var(--link);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Toast style GitHub */
.toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 200;
  border: 1px solid var(--success);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  width: 16px;
  height: 16px;
  color: var(--success);
}

/* Added styles for creator verified badge */
.creator-verified {
  margin-left: 0.25rem;
}

/* Modal style GitHub */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  max-width: 440px;
  width: 90%;
  transform: scale(0.95);
  transition: transform 0.15s;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.modal-icon {
  width: 24px;
  height: 24px;
  color: #d29922;
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.modal-text strong {
  color: var(--text-primary);
}

.modal-text-secondary {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .sources-grid {
    grid-template-columns: 1fr;
  }

  .card-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}
