/* === PORTFOLIO SECTION - DESIGN 2025 === */
.portfolio-section {
  padding: clamp(4rem, 10vw, 8rem) 0;
  position: relative;
  isolation: isolate;
}

.portfolio-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #8b5cf6 10%,
    #6366f1 30%,
    #8b5cf6 50%,
    #6366f1 70%,
    #8b5cf6 90%,
    transparent 100%
  );
  background-size: 300% auto;
  background-position: 0% center;
  animation: shimmerGradient 10s ease-in-out infinite alternate;
  filter: blur(3px) brightness(1.25);
  mix-blend-mode: screen;
  opacity: 0.7;
  z-index: 5;
  pointer-events: none;
}

@keyframes shimmerGradient {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.portfolio-container {
  max-width: min(1200px, 90vw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* === HEADER ÉPURÉ === */
.portfolio-header {
  text-align: center;
  margin-bottom: clamp(3rem, 8vw, 5rem);
max-width: 680px;
 margin-inline: auto;
}

.portfolio-badge {
 display: inline-flex;
 align-items: center;
 gap: 0.5rem;
 font-size: 0.875rem;
 font-weight: 500;
 color: #6366f1;
 background: rgba(99, 102, 241, 0.06);
 padding: 0.5rem 1rem;
 border-radius: 50px;
 border: 1px solid rgba(99, 102, 241, 0.1);
 margin-bottom: 2rem;
 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-badge:hover {
 background: rgba(99, 102, 241, 0.1);
 border-color: rgba(99, 102, 241, 0.2);
}

.portfolio-title {
 font-size: clamp(2rem, 5vw, 3.3rem);
 font-weight: 600;
 line-height: 1.1;
 color: #0f172a;
 margin: 0 0 1.5rem 0;
 letter-spacing: -0.02em;
}

.portfolio-title em {
 font-style: normal;
 background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
 -webkit-background-clip: text;
 -webkit-text-fill-color: transparent;
 background-clip: text;
}

.title-accent {
 display: block;
 font-weight: 400;
 color: #64748b;
 margin-top: 0.25rem;
}

.portfolio-subtitle {
 font-size: clamp(1rem, 2.5vw, 1.25rem);
 line-height: 1.6;
 color: #475569;
 margin: 0;
}

.portfolio-subtitle strong {
 color: #334155;
 font-weight: 500;
}

/* === GRID MODERNE === */
.portfolio-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
 gap: clamp(1.5rem, 4vw, 2.5rem);
 margin-bottom: clamp(3rem, 8vw, 5rem);
}

/* === CARDS PORTFOLIO === */
.portfolio-card {
 background: white;
 border: 1px solid #f1f5f9;
 border-radius: 20px;
 overflow: hidden;
 position: relative;
 transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
 animation: fadeInUp 0.6s ease-out var(--delay, 0s) both;
 container-type: inline-size;
}

.portfolio-card::before {
 content: '';
 position: absolute;
 inset: 0;
 border-radius: inherit;
 padding: 1px;
 background: linear-gradient(135deg, transparent, var(--project-color, #6366f1));
 mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
 mask-composite: xor;
 opacity: 0;
 transition: opacity 0.3s ease;
}

.portfolio-card:hover {
 transform: translateY(-8px);
 box-shadow: 
   0 4px 12px rgba(0, 0, 0, 0.05),
   0 25px 50px rgba(0, 0, 0, 0.1);
 border-color: rgba(99, 102, 241, 0.1);
}

.portfolio-card:hover::before {
 opacity: 0.4;
}

/* === IMAGE DU PROJET === */
.portfolio-image {
 position: relative;
 aspect-ratio: 16/10;
 overflow: hidden;
 background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.project-image {
 width: 100%;
 height: 100%;
 object-fit: cover;
 transition: transform 0.4s ease;
}

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

.project-placeholder {
 width: 100%;
 height: 100%;
 display: flex;
 align-items: center;
 justify-content: center;
 background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
 color: #64748b;
}

.placeholder-content {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 0.5rem;
 font-size: 0.9rem;
 font-weight: 500;
}

/* === STATUS BADGE === */
.project-status {
 position: absolute;
 top: 1rem;
 right: 1rem;
 padding: 0.375rem 0.75rem;
 border-radius: 20px;
 font-size: 0.75rem;
 font-weight: 600;
 text-transform: uppercase;
 letter-spacing: 0.5px;
 backdrop-filter: blur(10px);
 border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-completed {
 background: rgba(16, 185, 129, 0.9);
 color: white;
}

.status-ongoing {
 background: rgba(245, 158, 11, 0.9);
 color: white;
}

.status-concept {
 background: rgba(139, 92, 246, 0.9);
 color: white;
}

/* === OVERLAY === */
.portfolio-overlay {
 position: absolute;
 inset: 0;
 background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
 display: flex;
 align-items: center;
 justify-content: center;
 opacity: 0;
 transition: all 0.3s ease;
 backdrop-filter: blur(2px);
}

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

.overlay-actions {
 display: flex;
 gap: 0.75rem;
 transform: translateY(20px);
 transition: transform 0.3s ease 0.1s;
}

.portfolio-card:hover .overlay-actions {
 transform: translateY(0);
}

.action-btn {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 padding: 0.75rem 1rem;
 background: rgba(255, 255, 255, 0.95);
 color: #374151;
 text-decoration: none;
 border-radius: 12px;
 font-size: 0.875rem;
 font-weight: 500;
 transition: all 0.3s ease;
 backdrop-filter: blur(10px);
 border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-demo:hover {
 background: var(--project-color, #6366f1);
 color: white;
 transform: translateY(-2px);
}

.action-code:hover {
 background: #1f2937;
 color: white;
 transform: translateY(-2px);
}

/* === CONTENU DU PROJET === */
.portfolio-content {
 padding: clamp(1.25rem, 4vw, 2rem);
}

.project-header {
 display: flex;
 align-items: center;
 justify-content: space-between;
 margin-bottom: 1rem;
}

.project-category {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 color: var(--project-color, #6366f1);
 font-size: 0.875rem;
 font-weight: 500;
}

.project-year {
 font-size: 0.8rem;
 color: #94a3b8;
 font-weight: 500;
}

.project-title {
 font-size: 1.25rem;
 font-weight: 600;
 color: #0f172a;
 margin: 0 0 0.75rem 0;
 line-height: 1.3;
}

.project-description {
 font-size: 0.95rem;
 color: #64748b;
 line-height: 1.5;
 margin: 0 0 1.25rem 0;
}

/* === TECHNOLOGIES === */
.project-technologies {
 display: flex;
 flex-wrap: wrap;
 gap: 0.5rem;
 margin-bottom: 1rem;
}

.tech-badge {
 padding: 0.25rem 0.75rem;
 background: color-mix(in srgb, var(--project-color, #6366f1) 10%, transparent);
 color: var(--project-color, #6366f1);
 border: 1px solid color-mix(in srgb, var(--project-color, #6366f1) 20%, transparent);
 border-radius: 20px;
 font-size: 0.8rem;
 font-weight: 500;
 transition: all 0.3s ease;
}

.tech-badge:hover {
 background: color-mix(in srgb, var(--project-color, #6366f1) 15%, transparent);
}

/* === CLIENT INFO === */
.project-client {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 font-size: 0.875rem;
 color: #64748b;
 padding-top: 0.75rem;
 border-top: 1px solid #f1f5f9;
}

.client-label {
 font-weight: 500;
}

.client-name {
 color: #374151;
 font-weight: 600;
}

/* === CTA SECTION === */
.portfolio-cta {
 text-align: center;
 padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem);
 border: 1px solid #f1f5f9;
 border-radius: 24px;
 position: relative;
 overflow: hidden;
}

.cta-content {
 max-width: 500px;
 margin: 0 auto;
 position: relative;
 z-index: 2;
}

.cta-title {
 font-size: clamp(1.5rem, 4vw, 2rem);
 font-weight: 600;
 color: #0f172a;
 margin: 0 0 0.75rem 0;
 line-height: 1.3;
}

.cta-text {
 font-size: 1.1rem;
 color: #64748b;
 line-height: 1.6;
 margin: 0 0 2.5rem 0;
}

.cta-actions {
 display: flex;
 gap: 1rem;
 justify-content: center;
 flex-wrap: wrap;
}

.cta-primary,
.cta-secondary {
 padding: 1rem 1.75rem;
 border-radius: 12px;
 text-decoration: none;
 font-weight: 600;
 font-size: 0.95rem;
 transition: all 0.3s ease;
 display: inline-flex;
 align-items: center;
 gap: 0.5rem;
 white-space: nowrap;
}

.cta-primary {
 background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
 color: white;
 border: 1px solid transparent;
 box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.cta-primary:hover {
 transform: translateY(-2px);
 box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.cta-primary svg {
 transition: transform 0.3s ease;
}

.cta-primary:hover svg {
 transform: translateX(2px);
}

.cta-secondary {
 background: transparent;
 color: #6366f1;
 border: 1px solid #e2e8f0;
}

.cta-secondary:hover {
 background: #f8fafc;
 border-color: #cbd5e1;
 transform: translateY(-1px);
}

/* === ÉTAT VIDE === */
.portfolio-empty {
 text-align: center;
 padding: clamp(3rem, 8vw, 5rem) 2rem;
}

.empty-icon {
 font-size: 3.5rem;
 margin-bottom: 1.5rem;
}

.portfolio-empty h3 {
 font-size: 1.75rem;
 font-weight: 600;
 color: #0f172a;
 margin: 0 0 1rem 0;
}

.portfolio-empty p {
 color: #64748b;
 font-size: 1.1rem;
 line-height: 1.6;
 margin: 0 0 2.5rem 0;
 max-width: 400px;
 margin-inline: auto;
}

.empty-cta {
 display: inline-flex;
 align-items: center;
 padding: 1.25rem 2rem;
 background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
 color: white;
 text-decoration: none;
 border-radius: 12px;
 font-weight: 600;
 font-size: 1rem;
 transition: all 0.3s ease;
 box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.empty-cta:hover {
 transform: translateY(-2px);
 box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

/* === RESPONSIVE MODERNE === */
@container (max-width: 380px) {
 .project-header {
   flex-direction: column;
   align-items: flex-start;
   gap: 0.5rem;
 }
 
 .overlay-actions {
   flex-direction: column;
   gap: 0.5rem;
 }
 
 .action-btn {
   justify-content: center;
 }
}

@media (max-width: 768px) {
 .portfolio-grid {
   grid-template-columns: 1fr;
 }
 
 .cta-actions {
   flex-direction: column;
   align-items: center;
 }
 
 .cta-primary,
 .cta-secondary {
   width: 100%;
   max-width: 280px;
   justify-content: center;
 }
 
 .portfolio-overlay {
   opacity: 1;
   background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 60%);
 }
 
 .overlay-actions {
   transform: translateY(0);
   position: absolute;
   bottom: 1rem;
   left: 1rem;
   right: 1rem;
 }
}

@media (prefers-reduced-motion: reduce) {
 .portfolio-card {
   animation: none;
 }
 
 .portfolio-card:hover {
   transform: none;
 }
 
 .project-image {
   transition: none;
 }
 
 .portfolio-cta::before {
   animation: none;
 }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
 .portfolio-section {
   background: 
     linear-gradient(135deg, #0f172a 0%, #1e293b 100%),
     radial-gradient(ellipse at bottom right, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
 }
 
 .portfolio-card {
   background: #1e293b;
   border-color: #334155;
 }
 
 .project-title,
 .portfolio-title,
 .cta-title {
   color: #f8fafc;
 }
 
 .project-description,
 .portfolio-subtitle,
 .cta-text {
   color: #cbd5e1;
 }
 
 .project-placeholder {
   background: linear-gradient(135deg, #334155 0%, #475569 100%);
   color: #94a3b8;
 }
 
 .portfolio-cta {
   background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
   border-color: #475569;
 }
}