/* Damancom 2.0 — feuille de styles complémentaire à Tailwind CDN */
:root {
  --dm-green: #0D3D2B;
  --dm-green-soft: #14583D;
  --dm-green-light: #1F7553;
  --dm-gold: #C9A84C;
  --dm-gold-soft: #E0C36B;
  --dm-white: #FFFFFF;
  --dm-cream: #FAF7EE;
  --dm-ink: #0B1F18;
  --dm-muted: #5C6F66;
  --font-size-scale: 1;
}

html {
  font-size: calc(16px * var(--font-size-scale));
}

body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 600px at 110% -10%, rgba(201, 168, 76, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 100%, rgba(13, 61, 43, 0.12), transparent 60%),
    var(--dm-cream);
  color: var(--dm-ink);
  min-height: 100vh;
}
html.dark body {
  background:
    radial-gradient(1200px 600px at 110% -10%, rgba(201, 168, 76, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 100%, rgba(31, 117, 83, 0.22), transparent 60%),
    #06120C;
  color: #E6EEEA;
}

.font-serif-display { font-family: 'Playfair Display', Georgia, serif; }

.brand-gradient {
  background: linear-gradient(135deg, var(--dm-green) 0%, var(--dm-green-light) 60%, var(--dm-gold) 140%);
}

.glass-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(13, 61, 43, 0.08);
  box-shadow: 0 12px 40px rgba(13, 61, 43, 0.10);
  border-radius: 20px;
}
html.dark .glass-card {
  background: rgba(11, 31, 24, 0.65);
  border: 1px solid rgba(201, 168, 76, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.glass-soft {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(13, 61, 43, 0.06);
  border-radius: 16px;
}
html.dark .glass-soft {
  background: rgba(11, 31, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-gold {
  background: linear-gradient(135deg, var(--dm-gold), #B89438);
  color: var(--dm-ink);
  font-weight: 700;
  border-radius: 12px;
  padding: 0.7rem 1.25rem;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.35);
}
.btn-gold:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 12px 28px rgba(201, 168, 76, 0.4); }
.btn-gold:active { transform: translateY(0); }

.btn-green {
  background: linear-gradient(135deg, var(--dm-green), var(--dm-green-light));
  color: #fff;
  font-weight: 600;
  border-radius: 12px;
  padding: 0.7rem 1.25rem;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 24px rgba(13, 61, 43, 0.25);
}
.btn-green:hover { transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid rgba(13, 61, 43, 0.18);
  color: var(--dm-green);
  font-weight: 600;
  border-radius: 12px;
  padding: 0.6rem 1rem;
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,0.6);
}
html.dark .btn-ghost { color: var(--dm-gold-soft); border-color: rgba(201,168,76,0.3); background: rgba(255,255,255,0.05); }
.btn-ghost:hover { background: rgba(13,61,43,0.06); }
html.dark .btn-ghost:hover { background: rgba(201,168,76,0.1); }

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: 0.25rem 0.65rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 600;
}
.chip-green { background: rgba(31,117,83,0.12); color: #145C40; }
.chip-gold  { background: rgba(201,168,76,0.18); color: #826421; }
.chip-red   { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.chip-blue  { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.chip-grey  { background: rgba(100,116,139,0.15); color: #475569; }
html.dark .chip-green { background: rgba(31,117,83,0.25); color: #BFE9D2; }
html.dark .chip-gold  { background: rgba(201,168,76,0.25); color: #F2D88A; }
html.dark .chip-red   { background: rgba(220, 38, 38, 0.25); color: #fda4a4; }

.kpi-card {
  position: relative;
  overflow: hidden;
}
.kpi-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.0), rgba(201,168,76,0.18));
  pointer-events: none; mix-blend-mode: lighten;
}

.timeline-step .dot {
  width: 32px; height: 32px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid rgba(13,61,43,0.15); background: #fff; color: var(--dm-green); font-weight: 700;
}
.timeline-step.done .dot { background: var(--dm-green); color: #fff; border-color: var(--dm-green); }
.timeline-step.current .dot { background: var(--dm-gold); color: var(--dm-ink); border-color: var(--dm-gold); animation: pulse 1.4s ease-in-out infinite; }
.timeline-step .bar { width: 3px; flex: 1; background: rgba(13,61,43,0.12); margin-left: 14px; }
.timeline-step.done .bar { background: var(--dm-green); }

@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.6);} 50% { box-shadow: 0 0 0 12px rgba(201,168,76,0);} }

.sidebar-link {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  color: rgba(255,255,255,0.78);
  font-weight: 500;
  position: relative;
}
.sidebar-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(201,168,76,0.35), rgba(201,168,76,0.12));
  color: #fff;
}
.sidebar-link.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--dm-gold); border-radius: 4px;
}

.toast-stack { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: 0.5rem; z-index: 60; }

.animate-rise { animation: rise .6s ease forwards; opacity: 0; transform: translateY(8px); }
@keyframes rise { to { opacity: 1; transform: none; } }

.scroll-hidden::-webkit-scrollbar { display: none; }
.scroll-hidden { scrollbar-width: none; }

.wilaya-dot { transition: transform .15s ease, fill .15s ease; cursor: pointer; }
.wilaya-dot:hover { transform-origin: center; fill: var(--dm-gold); }

.shimmer {
  background: linear-gradient(110deg, rgba(255,255,255,0.0), rgba(255,255,255,0.5), rgba(255,255,255,0.0));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.contrast-high {
  filter: contrast(1.25) saturate(1.15);
}

.calendar-day {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.calendar-day:hover:not(.disabled) { background: rgba(201,168,76,0.18); transform: scale(1.03); }
.calendar-day.disabled { color: rgba(0,0,0,0.25); cursor: not-allowed; }
html.dark .calendar-day.disabled { color: rgba(255,255,255,0.18); }
.calendar-day.selected { background: var(--dm-green); color: #fff; }
.calendar-day.weekend { color: var(--dm-gold); }

.chat-bubble-user {
  background: linear-gradient(135deg, var(--dm-green), var(--dm-green-light));
  color: #fff;
  border-radius: 18px 18px 4px 18px;
}
.chat-bubble-bot {
  background: rgba(255,255,255,0.85);
  color: var(--dm-ink);
  border-radius: 18px 18px 18px 4px;
  border: 1px solid rgba(13,61,43,0.08);
}
html.dark .chat-bubble-bot {
  background: rgba(11,31,24,0.7);
  color: #E6EEEA;
  border-color: rgba(255,255,255,0.06);
}
