/* Portfolio VibeWeb - Styles corrigés pour reproduire la maquette */

/* Reset et base */
.portfolio-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: none !important;
  color: #ffffff;
}

/* Filtres - Style exact de la maquette */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 60px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 6px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.filter-btn .count {
  opacity: 0.7;
  font-size: 12px;
  margin-left: 4px;
}

.filter-btn i {
  font-size: 12px;
}

/* Grille du portfolio - 3 colonnes comme la maquette */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  transition: all 0.3s ease;
}

/* Cartes projet - Style exact de la maquette */
.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 1;
  transform: scale(1);
  animation: fadeInUp 0.6s ease forwards;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
}

.project-card.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.project-card.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Prévisualisation du projet - EXACTEMENT comme la maquette */
.project-preview {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, #4f46e5 0%, #10b981 100%);
  padding: 20px;
  overflow: hidden;
}

/* Image personnalisée (si définie) */
.project-image-preview {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
}

/* Mockup navigateur - EXACTEMENT comme la maquette */
.browser-mockup {
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  height: 100%;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.project-card:hover .browser-mockup {
  transform: scale(0.98);
}

.browser-header {
  background: #f8f9fa;
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid #e9ecef;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.browser-dot.red {
  background: #ff5f57;
}
.browser-dot.yellow {
  background: #ffbd2e;
}
.browser-dot.green {
  background: #28ca42;
}

.browser-content {
  padding: 16px;
  height: calc(100% - 28px);
  position: relative;
  background: #ffffff;
}

.content-header {
  height: 24px;
  background: linear-gradient(135deg, #4f46e5 0%, #10b981 100%);
  border-radius: 4px;
  margin-bottom: 12px;
}

.content-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-line {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
}

.content-line:nth-child(1) {
  width: 75%;
}
.content-line:nth-child(2) {
  width: 100%;
}
.content-line:nth-child(3) {
  width: 60%;
}
.content-line:nth-child(4) {
  width: 85%;
}

/* Overlay au hover */
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.view-project-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
}

.view-project-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.view-project-btn i {
  font-size: 14px;
}

/* Contenu de la carte - Style exact de la maquette */
.project-content {
  padding: 24px;
  color: #ffffff;
}

.project-category {
  color: #4f46e5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.project-title {
  color: #ffffff !important;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.project-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px !important;
}

/* Technologies - Style exact */
.project-technologies {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tech-tag {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid rgba(79, 70, 229, 0.2);
  transition: all 0.3s ease;
}

.tech-tag.highlight {
  background: rgba(79, 70, 229, 0.2);
  transform: scale(1.05);
}

/* Statistiques - Style exact de la maquette */
.project-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 20px;
}

.stat-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.stat-value.positive {
  color: #10b981;
}

.stat-value.negative {
  color: #ef4444;
}

.stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: capitalize;
}

/* Lien du projet */
.project-action {
  margin-top: 15px;
}

.project-link {
  color: #4f46e5;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: #ffffff;
}

/* États de chargement et vide */
.portfolio-loading,
.portfolio-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.portfolio-empty i {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.3;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Animations d'entrée décalées */
.project-card:nth-child(1) {
  animation-delay: 0.1s;
}
.project-card:nth-child(2) {
  animation-delay: 0.2s;
}
.project-card:nth-child(3) {
  animation-delay: 0.3s;
}
.project-card:nth-child(4) {
  animation-delay: 0.4s;
}
.project-card:nth-child(5) {
  animation-delay: 0.5s;
}
.project-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* Couleurs spécifiques par catégorie */
.project-card[data-category="vitrine"] .project-preview {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
}

.project-card[data-category="ecommerce"] .project-preview {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.project-card[data-category="refonte"] .project-preview {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.project-card[data-category="saas"] .project-preview {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.project-card[data-category="mobile"] .project-preview {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .project-stats {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .portfolio-container {
    padding: 40px 15px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portfolio-filters {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
  }

  .filter-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .project-stats {
    gap: 20px;
  }

  .stat-value {
    font-size: 16px;
  }

  .project-content {
    padding: 20px;
  }

  .project-preview {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .portfolio-filters {
    padding: 6px;
  }

  .filter-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .project-preview {
    height: 140px;
    padding: 15px;
  }

  .project-content {
    padding: 16px;
  }

  .project-title {
    font-size: 16px;
  }

  .project-description {
    font-size: 13px;
  }
}

/* Intégration avec Astra */
.ast-container .portfolio-container {
  max-width: 100%;
  margin: 0;
}

/* Adaptation pour le thème sombre */
.ast-theme-transparent-header .portfolio-container {
  padding-top: 80px;
}

/* Compatibilité avec les conteneurs Astra */
.ast-separate-container .portfolio-container,
.ast-page-builder-template .portfolio-container {
  background: #0a0a0a;
}

/* Compatibilité avec Elementor */
.elementor-widget-container .portfolio-container {
  padding: 40px 0;
}

/* Correction pour l'affichage pleine largeur */
body.elementor-page .portfolio-container {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* Corrections pour les cas spécifiques */
.elementor-section .portfolio-container {
  width: 100%;
  margin-left: 0;
  transform: none;
}

/* Amélioration de la lisibilité */
.project-card {
  backdrop-filter: blur(10px);
}

/* Effet de focus pour l'accessibilité */
.filter-btn:focus,
.view-project-btn:focus,
.project-link:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* Amélioration des performances */
.project-card,
.filter-btn,
.view-project-btn {
  will-change: transform;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}
