/* =========================================================
   DIGITAL SYSTEM GROUP CI - Design moderne & cohérent
   Couleurs : #0B1D3A, #FFC107, #16A34A, blanc, gris clair
   Mobile-first, compact, professionnel
   ========================================================= */

:root {
  --dsgci-blue: #0B1D3A;
  --dsgci-blue-light: #1a3a6e;
  --dsgci-yellow: #FFC107;
  --dsgci-yellow-dark: #e0a800;
  --dsgci-green: #16A34A;
  --dsgci-green-dark: #12813a;
  --dsgci-white: #ffffff;
  --dsgci-gray: #f4f6f9;
  --dsgci-text: #2d3748;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--dsgci-text);
  background-color: var(--dsgci-white);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--dsgci-blue);
}

p { text-align: justify; }

a { color: var(--dsgci-blue-light); transition: color .2s ease; text-decoration: none; }
a:hover { color: var(--dsgci-green); }

img { max-width: 100%; height: auto; display: block; }
img:not(.partner-logo):not([src*="logo"]) { object-fit: cover; }
img[src*="logo"], .partner-logo, .ong-card img.logo-img { object-fit: contain; }

img[loading="lazy"] { opacity: 0; transition: opacity .5s ease; }
img[loading="lazy"].loaded, img[loading="lazy"]:not([src]) { opacity: 1; }
img.error { visibility: hidden; min-height: 0; }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.35rem;
  border-radius: 9999px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .04em;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(11,29,58,.18); }

.btn-yellow { background-color: var(--dsgci-yellow); color: var(--dsgci-blue); }
.btn-yellow:hover { background-color: var(--dsgci-yellow-dark); color: var(--dsgci-blue); }

.btn-blue { background-color: var(--dsgci-blue); color: var(--dsgci-white); }
.btn-blue:hover { background-color: var(--dsgci-blue-light); color: var(--dsgci-white); }

.btn-green { background-color: var(--dsgci-green); color: var(--dsgci-white); }
.btn-green:hover { background-color: var(--dsgci-green-dark); color: var(--dsgci-white); }

.btn-outline {
  border: 2px solid var(--dsgci-white);
  color: var(--dsgci-white);
  background-color: transparent;
}
.btn-outline:hover { background-color: var(--dsgci-white); color: var(--dsgci-blue); }

/* Top bar */
.top-bar { background-color: var(--dsgci-blue); color: var(--dsgci-white); font-size: .8rem; }
.top-bar a { color: var(--dsgci-white); }
.top-bar a:hover { color: var(--dsgci-yellow); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--dsgci-white);
  transition: box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(11,29,58,.12); }

.logo-text { font-family: 'Poppins', sans-serif; line-height: 1.05; }

.nav-link {
  position: relative;
  font-weight: 600;
  color: var(--dsgci-blue);
  padding: .4rem 0;
  font-size: .88rem;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--dsgci-yellow);
  transition: width .3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.mobile-menu-btn { display: none; }
.mobile-nav { display: none; }

@media (max-width: 1023px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .mobile-nav {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
    background-color: var(--dsgci-white);
    border-top: 1px solid #eef2f6;
  }
  .mobile-nav.open { max-height: 520px; }
  .mobile-nav .nav-link { display: block; padding: .6rem 0; border-bottom: 1px solid #f1f5f9; }
  .mobile-nav .nav-link::after { display: none; }
  .mobile-nav .btn { margin-top: .5rem; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--dsgci-white);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,29,58,.92) 0%, rgba(11,29,58,.65) 55%, rgba(11,29,58,.35) 100%);
}
.hero > * { position: relative; z-index: 1; }

/* Compteurs */
.counter-value {
  font-family: 'Poppins', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--dsgci-yellow);
  line-height: 1;
}
.counter-label { font-size: .85rem; color: rgba(255,255,255,.85); }

/* Cards */
.ong-card {
  background: var(--dsgci-white);
  border-radius: .85rem;
  box-shadow: 0 6px 20px rgba(11,29,58,.08);
  transition: transform .3s ease, box-shadow .3s ease;
  overflow: hidden;
}
.ong-card:hover { transform: translateY(-5px); box-shadow: 0 14px 32px rgba(11,29,58,.14); }

/* Section badge */
.section-badge {
  display: inline-block;
  padding: .2rem .85rem;
  border-radius: 9999px;
  background-color: rgba(255,193,7,.15);
  color: var(--dsgci-blue);
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .75rem;
}

/* Gallery */
.gallery-item { break-inside: avoid; margin-bottom: 1rem; }
.gallery-item img {
  width: 100%;
  border-radius: .65rem;
  transition: transform .3s ease, opacity .3s ease;
}
.gallery-item img:hover { transform: scale(1.02); }
.gallery-filter button.active { background-color: var(--dsgci-yellow); color: var(--dsgci-blue); }

/* Partners */
.partner-logo {
  filter: grayscale(100%);
  opacity: .75;
  transition: all .3s ease;
  max-height: 60px;
  object-fit: contain;
}
.partner-logo:hover { filter: grayscale(0%); opacity: 1; }

/* Footer */
.site-footer {
  background-color: var(--dsgci-blue);
  color: rgba(255,255,255,.85);
  font-size: .9rem;
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: var(--dsgci-yellow); }

/* Form */
.form-control {
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid #d1d5db;
  border-radius: .45rem;
  background-color: var(--dsgci-white);
  color: var(--dsgci-text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--dsgci-green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.2);
}

/* Accessibility */
:focus-visible { outline: 3px solid var(--dsgci-yellow); outline-offset: 2px; }

/* Utilities */
.bg-pattern { background-image: radial-gradient(rgba(255,193,7,.08) 1px, transparent 1px); background-size: 18px 18px; }
.text-shadow { text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.bg-dsgci-blue { background-color: var(--dsgci-blue); }
.bg-dsgci-yellow { background-color: var(--dsgci-yellow); }
.bg-dsgci-green { background-color: var(--dsgci-green); }
.text-dsgci-blue { color: var(--dsgci-blue); }
.text-dsgci-yellow { color: var(--dsgci-yellow); }
.text-dsgci-green { color: var(--dsgci-green); }

/* Compact spacing overrides */
section { position: relative; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }

/* Logo crispness */
.site-header img, .site-footer img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Logo image dans le footer (fond blanc) */
.footer-logo {
  background-color: var(--dsgci-white);
  border-radius: .65rem;
  padding: .5rem;
}

/* =========================================================
   Footer professionnel
   ========================================================= */

.site-footer {
  position: relative;
  background-color: var(--dsgci-blue);
  color: rgba(255,255,255,.9);
  font-size: .9rem;
  border-top: 4px solid var(--dsgci-yellow);
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--dsgci-yellow) 0%, var(--dsgci-green) 50%, var(--dsgci-yellow) 100%);
  z-index: 1;
}

.footer-heading {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--dsgci-white);
  margin-bottom: .75rem;
}

.footer-link,
.footer-links a {
  color: rgba(255,255,255,.85);
  transition: color .2s ease, transform .2s ease;
  display: inline-block;
}

.footer-link:hover,
.footer-links a:hover {
  color: var(--dsgci-yellow);
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: rgba(255,255,255,.12);
  color: var(--dsgci-white);
  font-size: 1rem;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.social-icon:hover {
  background-color: var(--dsgci-yellow);
  color: var(--dsgci-blue);
  transform: translateY(-2px);
}

.newsletter-form .footer-input {
  background-color: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--dsgci-white);
  border-radius: .5rem;
  padding: .65rem .8rem;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.newsletter-form .footer-input::placeholder {
  color: rgba(255,255,255,.55);
}

.newsletter-form .footer-input:focus {
  outline: none;
  border-color: var(--dsgci-yellow);
  background-color: rgba(255,255,255,.12);
  box-shadow: 0 0 0 3px rgba(255,193,7,.25);
}

.copyright-bar {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: rgba(255,255,255,.6);
}

@media (min-width: 768px) {
  .copyright-bar { flex-direction: row; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
