/* ==========================================================
   ESPACE DIASPORA — Design System v7.0
   Palette "BLEU NUIT ROYAL · ÉMERAUDE · OR"
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --ed-navy: #050b1f;
  --ed-navy-2: #0a1838;
  --ed-navy-3: #0f2252;
  --ed-emerald: #10b981;
  --ed-emerald-light: #34d399;
  --ed-emerald-bright: #6ee7b7;
  --ed-emerald-dark: #047857;
  --ed-gold: #f59e0b;
  --ed-gold-light: #fbbf24;
  --ed-gold-bright: #fde68a;
  --ed-bronze: #92400e;
  --ed-text: #ffffff;
  --ed-text-muted: #cbd5e1;
  --ed-text-dim: #94a3b8;
  --ed-accent: #f59e0b;
}

* { box-sizing: border-box; }

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  color: var(--ed-text) !important;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(circle at 15% 0%, rgba(16,185,129,0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 100%, rgba(59,130,246,0.10) 0%, transparent 45%),
    radial-gradient(circle at 50% 30%, rgba(30,58,138,0.15) 0%, transparent 70%),
    #050b1f !important;
  background-attachment: fixed !important;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', sans-serif !important;
  letter-spacing: -0.025em !important;
  color: #ffffff !important;
}
h1 { font-weight: 800 !important; }
h2, h3 { font-weight: 700 !important; }

/* ---------- Cartes : bordure émeraude partout ---------- */
main section,
main > div > section,
main .bg-white\/5 {
  border-radius: 20px !important;
  background: linear-gradient(180deg, rgba(15,34,82,0.45) 0%, rgba(10,24,56,0.65) 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  box-shadow: 0 12px 32px -16px rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
}

main .bg-white\/5:hover {
  border-color: rgba(16, 185, 129, 0.5) !important;
  background: linear-gradient(180deg, rgba(15,34,82,0.55) 0%, rgba(10,24,56,0.75) 100%) !important;
}

/* ---------- Boutons PRINCIPAUX : OR (garde le contraste) ---------- */
button[class*="bg-emerald-6"],
a[class*="bg-emerald-6"],
button[class*="from-sky"],
a[class*="from-sky"],
button[class*="bg-sky-6"],
a[class*="bg-sky-6"],
button[class*="bg-amber-6"],
a[class*="bg-amber-6"] {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%) !important;
  color: #0a1838 !important;
  font-weight: 800 !important;
  box-shadow: 0 10px 24px -8px rgba(245,158,11,0.55), 0 0 0 1px rgba(255,255,255,0.15) inset !important;
}

button[class*="bg-emerald-6"]:hover,
a[class*="bg-emerald-6"]:hover,
button[class*="from-sky"]:hover,
a[class*="from-sky"]:hover,
button[class*="bg-sky-6"]:hover,
a[class*="bg-sky-6"]:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #fcd34d 50%, #fef08a 100%) !important;
  box-shadow: 0 14px 32px -8px rgba(245,158,11,0.75) !important;
  transform: translateY(-1px);
}

/* ---------- Boutons secondaires : bordure ÉMERAUDE ---------- */
button[class*="bg-white\/5"],
a[class*="bg-white\/5"] {
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #ffffff !important;
  background: rgba(16, 185, 129, 0.04) !important;
}

button[class*="bg-white\/5"]:hover,
a[class*="bg-white\/5"]:hover {
  border-color: rgba(16, 185, 129, 0.6) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #6ee7b7 !important;
}

/* ---------- Boutons rouges ---------- */
button[class*="bg-red-6"] {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  color: #fff !important;
  box-shadow: 0 10px 28px -10px rgba(220,38,38,0.55) !important;
}

/* ---------- Boutons bleus (info) ---------- */
button[class*="bg-blue-6"],
a[class*="bg-blue-6"] {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
  color: #fff !important;
}

/* ---------- Inputs : bordure ÉMERAUDE ---------- */
input, select, textarea {
  font-family: 'Inter', sans-serif !important;
  background: rgba(15, 34, 82, 0.5) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #ffffff !important;
  transition: all 0.2s ease !important;
}

input::placeholder, textarea::placeholder {
  color: rgba(148, 163, 184, 0.75) !important;
}

input:focus, select:focus, textarea:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.18) !important;
  background: rgba(15, 34, 82, 0.7) !important;
}

/* ---------- Override TOUS les "sky" → ÉMERAUDE ---------- */
.text-sky-400, .text-sky-300, .text-sky-500,
.text-blue-400, .text-blue-300 {
  color: var(--ed-emerald-light) !important;
}

.border-sky-500\/30, .border-sky-500\/20,
.border-sky-400\/30, .border-blue-500\/30 {
  border-color: rgba(16, 185, 129, 0.35) !important;
}

.bg-sky-500\/10, .bg-sky-500\/20, .bg-sky-600\/20,
.bg-blue-500\/10, .bg-blue-500\/20 {
  background-color: rgba(16, 185, 129, 0.12) !important;
}

.bg-sky-600, .bg-sky-500 {
  background: linear-gradient(135deg, #047857, #10b981) !important;
  color: #ffffff !important;
}

/* Carte solde portefeuille : dégradé émeraude → or */
section[class*="from-sky-6"],
section[class*="from-blue-6"] {
  background: linear-gradient(135deg, #047857 0%, #10b981 40%, #f59e0b 100%) !important;
}
section[class*="from-sky-6"] *,
section[class*="from-blue-6"] * {
  color: #ffffff !important;
}

/* ---------- Header pro ---------- */
.ed-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5,11,31,0.9) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(16,185,129,0.25) !important;
  padding: 12px 20px;
}

.ed-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ed-header-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.ed-header-logo img {
  width: 40px; height: 40px;
  filter: drop-shadow(0 4px 14px rgba(16,185,129,0.5));
}
.ed-header-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.ed-header-logo-name {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.ed-header-logo-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--ed-emerald-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 1px;
}

.ed-menu { display: none; gap: 4px; flex: 1; justify-content: center; }
.ed-menu a {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ed-menu a:hover {
  color: var(--ed-emerald-light);
  background: rgba(16,185,129,0.1);
}
.ed-menu a.active {
  color: var(--ed-emerald-light);
  background: rgba(16,185,129,0.15);
}

.ed-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.ed-bell {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(15,34,82,0.6);
  border: 1px solid rgba(16,185,129,0.35);
  display: flex; align-items: center; justify-content: center;
  color: var(--ed-emerald-light);
  text-decoration: none;
  transition: all 0.2s ease;
}
.ed-bell:hover {
  background: rgba(16,185,129,0.15);
  border-color: rgba(16,185,129,0.6);
}

.ed-avatar {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: 12px; font-weight: 800;
  color: #0a1838;
  text-decoration: none;
  box-shadow: 0 4px 14px -4px rgba(245,158,11,0.6);
  transition: all 0.2s ease;
}
.ed-avatar:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -4px rgba(245,158,11,0.8);
}

.ed-burger {
  display: flex;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(15,34,82,0.6);
  border: 1px solid rgba(16,185,129,0.35);
  align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--ed-emerald-light);
  cursor: pointer;
  transition: all 0.2s ease;
}
.ed-burger:hover {
  background: rgba(16,185,129,0.15);
}

.ed-mobile-menu {
  position: fixed; top: 0; right: -100%;
  width: 280px; max-width: 85vw; height: 100vh;
  background: rgba(5,11,31,0.98);
  backdrop-filter: blur(24px);
  z-index: 100; padding: 24px;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid rgba(16,185,129,0.3);
  overflow-y: auto;
}
.ed-mobile-menu.open { right: 0; }
.ed-mobile-menu-title {
  font-family: 'Manrope', sans-serif;
  font-size: 11px; font-weight: 700;
  color: var(--ed-emerald-dark);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px; margin-top: 20px;
}
.ed-mobile-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-size: 14px; font-weight: 600;
  transition: all 0.2s ease;
}
.ed-mobile-menu a:hover, .ed-mobile-menu a.active {
  background: rgba(16,185,129,0.15);
  color: var(--ed-emerald-light);
}
.ed-mobile-close {
  position: absolute; top: 20px; right: 20px;
  width: 38px; height: 38px; border-radius: 12px;
  background: rgba(16,185,129,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--ed-emerald-light); font-size: 20px;
  cursor: pointer; border: none;
}
.ed-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 99; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.ed-overlay.open { opacity: 1; pointer-events: auto; }

@media (min-width: 768px) {
  .ed-menu { display: flex; }
  .ed-burger { display: none; }
  .ed-mobile-menu, .ed-overlay { display: none !important; }
}

header:not(.ed-header) { display: none !important; }

/* ---------- Icônes ---------- */
.ed-icon, .ed-menu-icon {
  display: inline-block; vertical-align: middle;
  width: 1.1em; height: 1.1em; line-height: 1;
}
.ed-icon svg, .ed-menu-icon svg { width: 100%; height: 100%; display: block; }

main section div > .ed-icon {
  width: 32px !important;
  height: 32px !important;
  color: var(--ed-emerald-light) !important;
}

nav .ed-icon {
  width: 22px !important;
  height: 22px !important;
}

.ed-bell svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--ed-emerald-light) !important;
}

.ed-menu-icon {
  width: 15px !important;
  height: 15px !important;
}

/* ---------- Nav du bas ---------- */
nav[class*="fixed bottom-0"] {
  background: rgba(5,11,31,0.96) !important;
  backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(16,185,129,0.25) !important;
}

nav[class*="fixed bottom-0"] a {
  color: #94a3b8 !important;
}

nav[class*="fixed bottom-0"] a[class*="text-sky-400"],
nav[class*="fixed bottom-0"] a[class*="text-emerald-400"] {
  color: var(--ed-emerald-light) !important;
}

/* ---------- Images de couverture ---------- */
a[href^="projet-detail.html"] {
  position: relative; overflow: hidden;
  border: 1px solid rgba(16,185,129,0.3) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
a[href^="projet-detail.html"]:hover {
  transform: translateY(-2px);
  border-color: rgba(16,185,129,0.6) !important;
  box-shadow: 0 16px 40px -16px rgba(16,185,129,0.35);
}
.ed-cover-bg { transition: opacity 0.3s ease; }
a[href^="projet-detail.html"]:hover .ed-cover-bg { opacity: 0.22 !important; }

/* ---------- Bannière hero ---------- */
.ed-hero-banner { background: linear-gradient(135deg, #0f2252, #050b1f); }
.ed-hero-image {
  background-size: cover; background-position: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.ed-hero-banner:hover .ed-hero-image { transform: scale(1.03); }

/* ---------- Badge statut ---------- */
.ed-hero-banner #project-status {
  display: inline-flex !important;
  align-items: center !important;
  padding: 8px 16px !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  backdrop-filter: blur(12px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
  box-shadow: 0 8px 24px -4px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.15) inset !important;
  width: auto !important;
  max-width: fit-content !important;
  margin-bottom: 12px !important;
}
.ed-hero-banner #project-status[class*="orange"] {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0a1838 !important;
}
.ed-hero-banner #project-status[class*="emerald"] {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
  color: #ffffff !important;
}
.ed-hero-banner #project-status[class*="slate"] {
  background: linear-gradient(135deg, #475569 0%, #1e293b 100%) !important;
  color: #ffffff !important;
}
.ed-hero-banner #project-status[class*="yellow"] {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%) !important;
  color: #0a1838 !important;
}
.ed-hero-banner #project-status[class*="red"] {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  color: #ffffff !important;
}
.ed-hero-banner #project-status::before {
  content: '' !important;
  display: inline-block !important;
  width: 6px !important; height: 6px !important;
  border-radius: 50% !important;
  background: currentColor !important;
  margin-right: 8px !important;
  box-shadow: 0 0 8px currentColor !important;
  animation: edPulse 2s ease-in-out infinite !important;
  opacity: 0.9 !important;
}

@keyframes edPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Animation ---------- */
@keyframes edEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

main > * {
  animation: edEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
main > *:nth-child(1) { animation-delay: 0.03s; }
main > *:nth-child(2) { animation-delay: 0.07s; }
main > *:nth-child(3) { animation-delay: 0.11s; }
main > *:nth-child(4) { animation-delay: 0.15s; }
main > *:nth-child(5) { animation-delay: 0.19s; }
main > *:nth-child(6) { animation-delay: 0.23s; }

/* ---------- Scrollbar émeraude ---------- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16,185,129,0.7); }
