/* Styles de la page individuelle Projets (Showcase, Filtres, Recherche & Modal Détails) */

.projects-hero {
  background: linear-gradient(135deg, #0B2447 0%, #17486f 60%, #1B6B82 100%);
  color: #fff;
  padding: 60px 0 45px;
  position: relative;
  overflow: hidden;
}

.projects-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 40px solid rgba(28, 200, 216, 0.15);
  pointer-events: none;
}

.projects-hero .badge {
  display: inline-block;
  background: rgba(28, 200, 216, 0.2);
  color: #55e6f5;
  border: 1px solid rgba(28, 200, 216, 0.4);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.projects-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.projects-hero p {
  max-width: 65ch;
  color: #cde1ef;
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.projects-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Barre de filtres et recherche */
.projects-toolbar {
  padding: 30px 0 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.toolbar-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.search-box input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbfe;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--navy);
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  background: #ffffff;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27, 107, 130, 0.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fbfe;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--teal);
  color: var(--navy);
}

.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

/* Compteur de projets */
.projects-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 0.92rem;
  color: var(--muted);
}

.projects-count-bar strong {
  color: var(--navy);
}

/* Grille des Projets */
.projects-gallery-section {
  padding: 35px 0 80px;
  background: #fbfdff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

.project-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(16, 43, 78, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(16, 43, 78, 0.1);
}

.project-thumbnail {
  height: 190px;
  background: linear-gradient(135deg, #0B2447, #1B6B82 55%, #1CC8D8);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-thumbnail img {
  transform: scale(1.05);
}

.project-thumbnail .no-image {
  font-family: Sora, Inter, sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.05em;
}

.featured-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(11, 36, 71, 0.85);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-content h3 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.35;
}

.project-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.project-tags span {
  background: #f0f6fa;
  color: var(--teal);
  border: 1px solid #dce9f2;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.project-team {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #edf4f8;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.project-team strong {
  color: var(--navy);
}

.project-team a {
  color: var(--blue);
  font-weight: 600;
}

.project-team a:hover {
  text-decoration: underline;
}

.project-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--blue);
  padding: 6px 12px;
  border-radius: 8px;
  background: #eef4fc;
  transition: all 0.15s ease;
}

.btn-code:hover {
  background: var(--blue);
  color: #fff;
}

.btn-details {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy);
  background: #f0f4f8;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-details:hover {
  background: #e2ecf5;
}

/* Modale de Détails du Projet */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 36, 71, 0.6);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #ffffff;
  border-radius: 20px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(11, 36, 71, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  font-size: 1.2rem;
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s ease;
}

.modal-close-btn:hover {
  background: #f0f4f8;
}

.modal-cover {
  height: 240px;
  background: linear-gradient(135deg, #0B2447, #1B6B82);
  position: relative;
  overflow: hidden;
}

.modal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 28px;
}

.modal-body h2 {
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.modal-body h2::after {
  display: none;
}

.modal-body p {
  color: #3b5266;
  line-height: 1.7;
  font-size: 0.96rem;
  margin-bottom: 20px;
}

.modal-meta-section {
  background: #f7fafd;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Empty state */
.empty-gallery {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  background: #ffffff;
  border: 1px dashed var(--line);
  border-radius: 16px;
}

.empty-gallery h3 {
  color: var(--navy);
  margin-bottom: 8px;
}

.empty-gallery p {
  color: var(--muted);
  max-width: 45ch;
  margin: 0 auto 16px;
}
