/* ============================================================
   PROJETS.CSS — Projets actifs · CRRA Kénitra
   ============================================================ */

/* ── HERO ──────────────────────────────────────────────────── */
.proj-hero {
  background: var(--green-900);
  padding: var(--s12) 0 var(--s10);
  position: relative;
  overflow: hidden;
}

.proj-hero::before {
  content: '';
  position: absolute;
  right: -5%;
  top: -55%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 70px solid rgba(201,168,76,.05);
  pointer-events: none;
}

.proj-hero::after {
  content: '';
  position: absolute;
  right: 9%;
  bottom: -30%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid rgba(201,168,76,.09);
  pointer-events: none;
}

.proj-hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--s12);
}

.proj-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  margin-bottom: var(--s4);
}

.proj-hero-eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: rgba(255,255,255,.28);
}

.proj-hero-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.5vw, 2.7rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin-bottom: var(--s4);
  max-width: 520px;
}

.proj-hero-desc {
  font-size: var(--t-md);
  font-weight: 300;
  color: rgba(255,255,255,.46);
  max-width: 500px;
  line-height: 1.75;
  margin: 0;
}

.proj-hero-stats {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  align-items: flex-end;
  flex-shrink: 0;
}

.proj-hero-stat { text-align: right }

.proj-hero-stat-n {
  font-family: var(--serif);
  font-size: var(--t-4xl);
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  display: block;
}

.proj-hero-stat-l {
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  display: block;
  margin-top: 2px;
}


/* ── INTRO ─────────────────────────────────────────────────── */
.proj-intro {
  background: var(--white);
  padding: var(--s12) 0;
  border-bottom: 1px solid var(--slate-200);
}

.proj-intro .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s16);
  align-items: center;
}

.proj-intro-text h2 {
  font-family: var(--serif);
  font-size: var(--t-2xl);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: var(--s4);
}

.proj-intro-text p {
  font-size: var(--t-base);
  color: var(--slate-500);
  line-height: 1.8;
  margin: 0;
}

.proj-intro-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--slate-200);
  border-radius: var(--r);
  overflow: hidden;
}

.proj-kpi {
  background: var(--parchment);
  padding: var(--s5) var(--s6);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.proj-kpi-n {
  font-family: var(--serif);
  font-size: var(--t-3xl);
  font-weight: 900;
  color: var(--green-900);
  line-height: 1;
}

.proj-kpi-l {
  font-size: var(--t-xs);
  color: var(--slate-400);
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.4;
}

.proj-kpi-l strong {
  display: block;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}


/* ── LISTE DES PROJETS ─────────────────────────────────────── */
.proj-list-section {
  background: var(--parchment);
  padding: var(--s12) 0;
  border-bottom: 1px solid var(--slate-200);
}

.proj-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: var(--s8);
}

/* Card projet — layout 2 panneaux */
.proj-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 260px;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.proj-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

/* Accent couleur par UR — bande gauche */
.proj-card[data-ur="uracrp"] { border-left: 5px solid var(--green-800) }
.proj-card[data-ur="urpp"]   { border-left: 5px solid #8B2020 }
.proj-card[data-ur="srd"]    { border-left: 5px solid var(--gold-500) }

/* Corps gauche */
.proj-card-body {
  padding: var(--s6) var(--s8);
  display: flex;
  flex-direction: column;
}

.proj-card-tags {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s4);
  flex-wrap: wrap;
}

.proj-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px var(--s3);
  border-radius: 20px;
}

.proj-tag-ur {
  background: var(--green-50);
  color: var(--green-800);
  border: 1px solid var(--green-200);
}

.proj-tag-ur[data-ur="urpp"] {
  background: #F8ECEC;
  color: #8B2020;
  border-color: rgba(139,32,32,.25);
}

.proj-tag-source {
  background: var(--gold-100);
  color: var(--gold-600);
  border: 1px solid rgba(201,168,76,.3);
}

.proj-card-title {
  font-family: var(--serif);
  font-size: var(--t-xl);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: var(--s3);
  flex: 1;
}

.proj-card-desc {
  font-size: var(--t-sm);
  color: var(--slate-500);
  line-height: 1.75;
  margin-bottom: var(--s5);
}

/* Partenaires en bas du corps */
.proj-card-partners {
  margin-top: auto;
  padding-top: var(--s4);
  border-top: 1px solid var(--slate-100);
}

.proj-partners-label {
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate-300);
  margin-bottom: var(--s2);
}

.proj-partners-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.proj-partner-chip {
  font-size: var(--t-xs);
  color: var(--slate-500);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  padding: 2px var(--s3);
  font-weight: 500;
}

/* Panneau droit vert foncé */
.proj-card-meta {
  background: var(--green-900);
  padding: var(--s6) var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.proj-meta-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.proj-meta-lbl {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
}

.proj-meta-val {
  font-size: var(--t-sm);
  color: rgba(255,255,255,.75);
  font-weight: 500;
  line-height: 1.4;
}

.proj-meta-val.proj-status-active {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--gold-400);
}

.proj-meta-val.proj-status-active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-400);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1 }
  50%       { opacity: .4 }
}

/* Barre progression temporelle */
.proj-meta-bar {
  margin-top: auto;
  padding-top: var(--s4);
  border-top: 1px solid rgba(255,255,255,.08);
}

.proj-bar-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  margin-bottom: var(--s2);
  display: flex;
  justify-content: space-between;
}

.proj-bar-track {
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  overflow: hidden;
}

.proj-bar-fill {
  height: 100%;
  background: var(--gold-500);
  border-radius: 2px;
  transition: width var(--dur-slow) var(--ease);
}


/* ── FINANCEMENT / BAILLEURS ──────────────────────────────── */
.proj-funding {
  background: var(--green-900);
  padding: var(--s12) 0;
}

.proj-funding .sec-eyebrow { color: rgba(255,255,255,.32) }
.proj-funding .sec-eyebrow::before { background: rgba(255,255,255,.22) }
.proj-funding .sec-title   { color: var(--white) }
.proj-funding .sec-head    { border-bottom-color: rgba(255,255,255,.08) }

.proj-funding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: var(--s8);
}

.proj-funder {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r);
  padding: var(--s6);
  border-top: 2px solid var(--gold-500);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.proj-funder-name {
  font-family: var(--serif);
  font-size: var(--t-lg);
  font-weight: 600;
  color: var(--gold-400);
  line-height: 1.2;
}

.proj-funder-desc {
  font-size: var(--t-sm);
  color: rgba(255,255,255,.38);
  line-height: 1.65;
  font-weight: 300;
  margin: 0;
}

.proj-funder-projs {
  margin-top: auto;
  padding-top: var(--s3);
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: var(--t-xs);
  color: rgba(255,255,255,.25);
  font-style: italic;
}


/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .proj-hero .container   { grid-template-columns: 1fr }
  .proj-hero-stats        { flex-direction: row; align-items: flex-start }
  .proj-hero-stat         { text-align: left }
  .proj-intro .container  { grid-template-columns: 1fr; gap: var(--s8) }
  .proj-intro-kpis        { grid-template-columns: repeat(4, 1fr) }
  .proj-card              { grid-template-columns: 1fr }
  .proj-card-meta         { flex-direction: row; flex-wrap: wrap; gap: var(--s5) }
  .proj-funding-grid      { grid-template-columns: repeat(2, 1fr) }
}

@media (max-width: 768px) {
  .proj-intro-kpis  { grid-template-columns: 1fr 1fr }
  .proj-funding-grid { grid-template-columns: 1fr }
  .proj-card-meta   { flex-direction: column }
}
