/* ==========================================================
   DECSI – Section Projets (exemples hébergés sur GitHub)
   Thème sombre par défaut, surcharge pour html[data-theme="light"]
   ========================================================== */

#projets {
  padding: 6rem 5%;
}

#projets .projects-header {
  max-width: 720px;
  margin: 0 auto 3rem;
  text-align: center;
}
.projects-header .section-sub {
    margin: 0px auto;
}
.projects-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1.6rem 1.5rem;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: #ece7f7;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

/* liseré dégradé en haut de la carte */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #c010c8, #22f5e8);
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(192, 16, 200, .6);
  box-shadow: 0 16px 36px rgba(192, 16, 200, .22);
}

.project-card h3 {
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 .6rem;
  color: inherit;
}

.project-card p {
  margin: 0 0 1.2rem;
  font-size: .95rem;
  line-height: 1.6;
  color: #a79cc0;
}

.project-card .bubbles {
  margin: 0 0 1.4rem;
  gap: .45rem;
}

.project-card .bubble {
  font-size: .78rem;
  padding: .4rem .8rem .4rem .7rem;
  animation: none;
}

.project-card .bubble::before { width: 7px; height: 7px; }

.project-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 500;
  font-size: .92rem;
  color: #22f5e8;
  text-decoration: none;
}

.project-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: none;
}

.project-link .arrow { transition: transform .2s ease; }
.project-card:hover .arrow { transform: translateX(4px); }

/* le lien couvre toute la carte (zone cliquable large) */
.project-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project-link:focus-visible {
  outline: 2px solid #c010c8;
  outline-offset: 4px;
  border-radius: 4px;
}

.projects-more {
  text-align: center;
  margin-top: 2.5rem;
}

.projects-more .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.projects-more .btn-outline svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ---------------- MODE CLAIR ---------------- */
html[data-theme="light"] #projets { background: #ffffff; }

html[data-theme="light"] .project-card {
  color: #1c1130;
  background: #ffffff;
  border: 1px solid rgba(122, 8, 166, .14);
  box-shadow: 0 10px 30px rgba(122, 8, 166, .08);
}

html[data-theme="light"] .project-card:hover,
html[data-theme="light"] .project-card:focus-within {
  border-color: rgba(192, 16, 200, .45);
  box-shadow: 0 16px 36px rgba(192, 16, 200, .16);
}

html[data-theme="light"] .project-card p { color: #5f5478; }
html[data-theme="light"] .project-link { color: #7a08a6; }

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-link .arrow { transition: none; }
  .project-card:hover { transform: none; }
}
