/* references.css - Specific stylesheet for NØDE Références page */

/* ==========================================
   1. HERO SECTION (50VH)
   ========================================== */
.references-hero {
  position: relative;
  height: 50vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.references-hero .hero-glow {
  position: absolute;
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  width: 50vw;
  height: 35vw;
  background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(168,184,232,0.06) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
}

.references-hero .hero-content {
  position: relative;
  z-index: 10;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 4%;
  width: 100%;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--text-primary);
}

.breadcrumb .separator {
  margin: 0 8px;
}

.breadcrumb .current {
  color: var(--accent-iris-1);
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 64px);
  color: var(--text-primary);
  letter-spacing: 0.15em;
  margin-bottom: 1.25rem;
  line-height: 1.1;
}

/* Large Stat Box */
.large-stat-box {
  display: flex;
  gap: 3rem;
  align-items: center;
  margin-top: 1.5rem;
}

.large-stat-box .stat-number {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(60px, 8vw, 96px);
  background: var(--gradient-iris);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.large-stat-box .stat-text {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-secondary);
  max-width: 550px;
  line-height: 1.6;
}


/* ==========================================
   2. FILTER PILLS
   ========================================== */
.filter-wrapper {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4.5rem;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  background: transparent;
  border-radius: 50px;
  padding: 10px 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--border-active);
  color: #ffffff;
}

.filter-btn.active {
  background: var(--gradient-iris);
  color: #080808;
  border-color: transparent;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(168, 184, 232, 0.15);
}


/* ==========================================
   3. PROJECTS GRID & CARDS
   ========================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1), transform 300ms cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  opacity: 1;
  transform: scale(1) translateY(0);
}

.project-card.filtered-out {
  opacity: 0;
  transform: scale(0.93) translateY(12px);
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  border: none;
  padding: 0;
  margin: 0;
}

.project-card:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(168, 184, 232, 0.05);
}

.project-image-box {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.project-placeholder-svg {
  width: 100%;
  height: 100%;
}

.project-content {
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-iris-1);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.project-title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.project-tags .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  padding: 4px 10px;
}

.project-link-btn {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--accent-iris-1);
  background: none;
  border: none;
  cursor: pointer;
  align-self: flex-start;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  padding: 5px 0;
}

.project-link-btn:hover {
  color: #ffffff;
  padding-left: 4px;
}


/* ==========================================
   4. INTERACTIVE MODAL DIALOG
   ========================================== */
dialog#project-details-modal {
  border: none;
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none; /* Controlled by native dialog top layer */
  justify-content: center;
  align-items: center;
  padding: 0;
}

dialog#project-details-modal[open] {
  display: flex;
  animation: modalFadeIn 350ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

dialog#project-details-modal::backdrop {
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(15px);
}

.modal-wrapper {
  width: 90%;
  max-width: 1100px;
  position: relative;
  z-index: 1010;
}

/* Close Button top-right */
.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background-color: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1020;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.modal-close-btn svg {
  stroke: var(--text-secondary);
  transition: stroke var(--transition-fast), transform var(--transition-fast);
}

.modal-close-btn:hover {
  border-color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.modal-close-btn:hover svg {
  stroke: #ffffff;
  transform: rotate(90deg);
}

/* Inner Layout Grid */
.modal-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 56px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.modal-visual-column {
  display: flex;
  align-items: center;
  height: 100%;
}

.modal-graphic-container {
  width: 100%;
  aspect-ratio: 4/3;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

/* Modal text detail fields */
.modal-info-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-iris-1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.modal-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 32px;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.modal-description {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2.25rem;
  font-weight: 300;
}

.modal-tech-section {
  margin-bottom: 2.25rem;
}

.modal-tech-section h4,
.modal-impact-section h4 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.modal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal-pills .pill {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  padding: 5px 12px;
}

/* KPI Dashboards inside modal */
.modal-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.kpi-item {
  padding: 16px 20px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

.kpi-val {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 22px;
  background: var(--gradient-iris);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.kpi-label {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}


/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .modal-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 40px;
  }

  .modal-close-btn {
    top: 16px;
    right: 16px;
  }
}

@media (max-width: 768px) {
  .references-hero {
    height: auto;
    padding: 100px 0 60px 0;
  }

  .large-stat-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .filter-wrapper {
    margin-bottom: 2.5rem;
  }

  .modal-layout {
    padding: 40px 24px 30px 24px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-visual-column {
    display: none; /* Hide visual on mobile to fit text perfectly */
  }

  .modal-kpis {
    grid-template-columns: 1fr;
  }
}

/* Anti-copy protection styles */
.no-copy, .project-card, dialog#project-details-modal {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* Premium Image Styling & Transitions */
.project-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform var(--transition-smooth, 0.4s cubic-bezier(0.16, 1, 0.3, 1));
}

.project-card:hover .project-card-img {
  transform: scale(1.04);
}

.modal-project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 4px;
}
