/* ============================================
   PORTFOLIO.CSS - Ultra-Responsive Version
   Compatible avec le système de thèmes
   ============================================ */

/* ===========================
   PORTFOLIO HERO SECTION
   =========================== */
.portfolio-hero {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem);
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
  position: relative;
  overflow: hidden;
}

.portfolio-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: var(--gradient-accent);
  border-radius: 50%;
  pointer-events: none;
}

.portfolio-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.portfolio-hero-inner,
.hero-left,
.hero-right {
  position: relative;
  z-index: 1;
    display: flex;

}

.portfolio-hero-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
    grid-template-rows: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
  padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.75rem, 3vw, 1rem);
  background: var(--bg-white);
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-weight: var(--weight-semibold);
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.hero-badge i {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
}

/* Hero Title */
.hero__title,
.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: var(--weight-bold);
  line-height: 1.1;
  margin-top: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle,
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.7;
  max-width: 600px;
}

.hero__cta,
.hero-ctas {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1rem);
  flex-wrap: wrap;
}

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 3vw, 1.5rem);

 
}

.portefolio-stat-card,
.stat-card {
  display: flex;
  background: var(--bg-white);
  padding: clamp(1.25rem, 4vw, 2rem);
  border-radius: var(--radius-lg);

  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  transition: all var(--transition-base) var(--ease-smooth);
}

.portefolio-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}



.stat-value {
  font-size: clamp(1rem, 2vw, 100rem);
  font-weight: var(--weight-bold);
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-xs);
}


.stat-label {
  font-size: 18px;
  color: var(--ui-muted);
  font-weight: var(--weight-medium);
}

.portefolio-stat-icon,
.stat-icon {
  width: clamp(50px, 8vw, 60px);
  height: clamp(50px, 8vw, 60px);
  background: var(--bg-light);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: clamp(1.5rem, 4vw, 2rem);
  flex-shrink: 0;
}

/* Hero Visual */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width:100%

}

.hero-visual img {
  width: 50%;
  height: auto;
  justify-content: center;
  align-items: center;
  
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
    margin: 0;
  padding: 0;
}

/* Responsive Hero */
@media (max-width: 968px) {
  .portfolio-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__subtitle,
  .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__cta,
  .hero-ctas {
    justify-content: center;
  }

  .hero-badge {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 640px) {
  .hero__cta,
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

  .hero__cta .btn,
  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===========================
   PORTFOLIO SECTION
   =========================== */
.portfolio-section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}



.section-label {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
  padding: clamp(0.4rem, 1.5vw, 0.5rem) clamp(0.75rem, 2.5vw, 1rem);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  margin-bottom: var(--space-md);
  border: 1px solid var(--ui-border);
}

.section-label i {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
}



.section-subtitle,
.section-description {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

/* ===========================
   PROJECTS GRID
   =========================== */
.portfolio-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

/* Portfolio Card */
.portfolio-card,
.project-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(  --shadow-sm);
  transition: all var(--transition-base) var(--ease-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
}

.portfolio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base) var(--ease-smooth);
  z-index: 1;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.portfolio-card:hover::before {
  transform: scaleX(1);
}

/* Portfolio Card Image */
.portfolio-card__image,
.project-image {
  position: relative;
  width: 100%;
  height: clamp(180px, 25vw, 220px);
  overflow: hidden;
  background: var(--bg-light);
}

.portfolio-card__image img,
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base) var(--ease-smooth);
}

.portfolio-card:hover .portfolio-card__image img,
.project-card:hover .project-image img {
  transform: scale(1.05);
}

/* Project Placeholder */
.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  color: var(--ui-muted);
  font-size: clamp(3rem, 6vw, 4rem);
}

/* Project Badge */
.project-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: clamp(0.4rem, 1.5vw, 0.5rem) clamp(0.75rem, 2.5vw, 1rem);
  background: var(--success);
  color: white;
  border-radius: var(--radius-sm);
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  font-weight: var(--weight-semibold);
  box-shadow: var(--shadow-sm);
  z-index:30;
}

.project-badge i {
  font-size: clamp(0.875rem, 2vw, 1rem);
}

/* Project Overlay */
.project-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-accent-transparent);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

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

.project-actions {
  display: flex;
  gap: clamp(0.5rem, 0vw, 1rem);
}

.action-btn {
  width: clamp(44px, 7vw, 50px);
  height: clamp(44px, 7vw, 50px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast) var(--ease-smooth);
  transform: translateY(20px);
  opacity: 0;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
}

.portfolio-card:hover .action-btn,
.project-card:hover .action-btn {
  transform: translateY(0);
  opacity: 1;
}

.action-btn:nth-child(1) {
  transition-delay: 0.05s;
}

.action-btn:nth-child(2) {
  transition-delay: 0.1s;
}

/* Portfolio Card Content */
.portfolio-card__content,
.project-content {
  padding: clamp(1.25rem, 4vw, 2rem);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-card__header,
.project-header {
  margin-bottom: clamp(0.75rem, 2vw, 1rem);
}

.portfolio-card__title,
.project-title {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: var(--weight-semibold);
  margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
  line-height: 1.3;
}

.portfolio-card__title a,
.project-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast) var(--ease-smooth);
}

.portfolio-card__title a:hover,
.project-title a:hover {
  color: var(--accent);
}

/* Tech Stack Tags */
.portfolio-card__tags,
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.375rem, 1vw, 0.5rem);
  margin-top: var(--space-xs);
}

.portfolio-card__tag,
.tech-badge {
  padding: clamp(0.25rem, 1vw, 0.375rem) clamp(0.5rem, 2vw, 0.75rem);
  background: var(--gradient-accent);
  color: var(--ui-text);
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-sm);
  font-size: clamp(0.75rem, 1.8vw, 0.8rem);
  font-weight: var(--weight-medium);
  transition: all var(--transition-fast) var(--ease-smooth);
  white-space: nowrap;
}

.portfolio-card__tag:hover,
.tech-badge:hover {
  background: var(--gradient-accent-transparent);
  color: white;
  border-color: var(--accent);
}

/* Project Description */
.portfolio-card__description,
.project-description {
  line-height: 1.7;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  font-size: clamp(0.9rem, 2vw, 1rem);
  flex: 1;
}

/* Portfolio Card Footer */
.portfolio-card__footer,
.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  margin-top: auto;
  padding-top: clamp(0.75rem, 2vw, 1rem);
  border-top: 1px solid var(--ui-border);
  flex-wrap: wrap;
}

.portfolio-card__meta,
.project-meta {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1rem);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: clamp(0.375rem, 1vw, 0.5rem);
  color: var(--ui-muted);
  font-size: clamp(0.8rem, 2vw, 0.85rem);
}

.meta-item i {
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.portfolio-card__links,
.project-link {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1vw, 0.5rem);
  color: var(--accent);
  text-decoration: none;
  font-weight: var(--weight-semibold);
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  transition: all var(--transition-fast) var(--ease-smooth);
}

.portfolio-card__links:hover,
.project-link:hover {
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
}

/* ===========================
   EMPTY STATE
   =========================== */
.empty-state-container {
  padding: clamp(3rem, 8vw, 6rem) var(--space-md);
}

.empty-state-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-white);
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: var(--radius-lg);
  box-shadow: var(  --shadow-sm);
  text-align: center;
}

.empty-icon {
  width: clamp(80px, 12vw, 100px);
  height: clamp(80px, 12vw, 100px);
  margin: 0 auto clamp(1.5rem, 4vw, 2rem);
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ui-muted);
  font-size: clamp(2.5rem, 6vw, 3rem);
}

.empty-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: var(--weight-bold);
  color: var(--ui-text);
  margin-bottom: clamp(0.75rem, 2vw, 1rem);
}

.empty-text {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--ui-muted);
  line-height: 1.7;
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.empty-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: clamp(0.75rem, 2vw, 1rem);
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.empty-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: clamp(0.75rem, 2vw, 1rem);
  background: var(--bg-light);
  border-radius: var(--radius-md);
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  color: var(--ui-text);
}

.empty-feature i {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--accent);
}

.empty-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: normal;
  text-align: center;
}

/* ===========================
   CTA SECTION
   =========================== */
.cta-section {
  padding: clamp(3rem, 8vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: var(--gradient-accent-transparent);
  border-radius: 50%;
  pointer-events: none;
}

.cta-content {

  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  position: relative;
  z-index: 1;
}

.cta-icon {
  width: clamp(80px, 12vw, 100px);
  height: clamp(80px, 12vw, 100px);
  margin: 0 auto clamp(1.5rem, 4vw, 2rem);
  background: var(--gradient-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: clamp(2.5rem, 6vw, 3rem);
  box-shadow: var(--shadow-lg);
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--weight-bold);
  margin-bottom: clamp(0.75rem, 2vw, 1rem);
  background: linear-gradient(135deg, var(--portfolio-primary), var(--portfolio-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.cta-text {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--ui-muted);
  line-height: 1.7;
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.cta-buttons {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1rem);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===========================
   MODAL
   =========================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base) var(--ease-smooth),
              visibility var(--transition-base) var(--ease-smooth);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: min(90%, 800px);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-base) var(--ease-smooth);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: clamp(1rem, 3vw, 1.5rem);
  right: clamp(1rem, 3vw, 1.5rem);
  width: clamp(36px, 6vw, 40px);
  height: clamp(36px, 6vw, 40px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast) var(--ease-smooth);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  z-index: 10;
}

.modal-close:hover {
  transform: rotate(90deg);
}

.modal-body {
  padding-top: clamp(1.5rem, 4vw, 2rem);
}

/* ===========================
   UTILITIES
   =========================== */
.text-gradient {
  background: linear-gradient(135deg, var(--portfolio-primary), var(--portfolio-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   RESPONSIVE HELPERS
   =========================== */

/* Hide on mobile */
@media (max-width: 640px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Hide on tablet */
@media (max-width: 968px) {
  .hide-tablet {
    display: none !important;
  }
}

/* Hide on desktop */
@media (min-width: 969px) {
  .hide-desktop {
    display: none !important;
  }
}

/* Stack on mobile */
@media (max-width: 640px) {
  .stack-mobile {
    flex-direction: column !important;
  }

  .stack-mobile > * {
    width: 100% !important;
  }
}