/* ============================================================
   STYLE.CSS — Mini-Lab Numérique
   ============================================================ */

/* ── 1. VARIABLES & RESET ─────────────────────────────────── */
:root {
  --blue:        #003189;
  --blue-dark:   #00236b;
  --blue-light:  #e8edf8;
  --orange:      #FF6B35;
  --orange-dark: #e05520;
  --white:       #ffffff;
  --grey-light:  #f4f6fb;
  --grey:        #e2e8f0;
  --text:        #1a1a2e;
  --text-muted:  #64748b;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow:      0 4px 20px rgba(0,49,137,.10);
  --shadow-lg:   0 8px 40px rgba(0,49,137,.16);
  --transition:  .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* ── 2. UTILITAIRES ───────────────────────────────────────── */
.section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
.section-title { font-size: 2rem; font-weight: 700; color: var(--blue); }
.section-desc  { color: var(--text-muted); font-size: .95rem; margin-top: 6px; }
.see-all {
  font-size: .9rem; font-weight: 600; color: var(--orange);
  display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.see-all:hover { gap: 10px; }

/* ── 3. BOUTONS ───────────────────────────────────────────── */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  transition: var(--transition);
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
  border: 2px solid var(--orange);
}
.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,53,.35);
}
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.6);
}
.btn-secondary:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--white);
}

/* ── 4. HEADER ────────────────────────────────────────────── */
.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow);
  height: 72px;
  display: flex;
  align-items: center;
}
.header-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.header-logo { display: flex; align-items: center; gap: 12px; }
.logo-circle {
  width: 44px; height: 44px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.logo-circle.small  { width: 36px; height: 36px; font-size: .8rem; }
.logo-circle.large  { width: 72px; height: 72px; font-size: 1.4rem; }
.logo-text          { display: flex; flex-direction: column; }
.logo-title         { font-weight: 700; font-size: 1rem; color: var(--blue); line-height: 1.2; }
.logo-subtitle      { font-size: .72rem; color: var(--text-muted); }

/* ── GROUPE AUTH (profil + déconnexion) ── */
.header-auth-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

/* ── BOUTON DÉCONNEXION HEADER ── */
.btn-deconnexion-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
  position: static !important;
}

/* ── 5. NAV ───────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; gap: 8px;
  flex: 1; justify-content: center;
}
.nav-link {
  padding: 8px 14px; border-radius: 8px;
  font-size: .9rem; font-weight: 500; color: var(--text);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active { background: var(--blue-light); color: var(--blue); }
.nav-btn {
  margin-left: 8px; padding: 10px 22px;
  background: var(--blue); color: var(--white);
  border-radius: var(--radius); font-size: .9rem; font-weight: 600;
  transition: var(--transition);
}
.nav-btn:hover { background: var(--blue-dark); transform: translateY(-1px); }
.nav-toggle {
  display: none; background: none; border: none;
  font-size: 1.4rem; color: var(--blue); cursor: pointer;
}

/* ── Avatar mini dans le bouton nav ── */
.avatar-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  color: #003189;
  font-weight: 700;
  font-size: 13px;
  margin-right: 6px;
}

/* ── Bouton profil — variante verte ── */
.nav-btn-profil {
  background: #22c55e !important;
  border-color: #22c55e !important;
  display: inline-flex;
  align-items: center;
}

/* ── 6. HERO ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 60%, #001a5e 100%);
  color: var(--white);
  padding: 80px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  min-height: 520px;
}
.hero-content { max-width: 560px; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 16px; border-radius: 20px;
  font-size: .8rem; font-weight: 600; letter-spacing: .05em;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 2.6rem; font-weight: 700; line-height: 1.25;
  margin-bottom: 20px;
}
.hero-desc {
  color: rgba(255,255,255,.8); font-size: 1rem;
  line-height: 1.7; margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual {
  display: grid; grid-template-columns: repeat(2, 160px); gap: 16px;
}
.hero-card {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}
.hero-card:hover { background: rgba(255,255,255,.2); transform: translateY(-4px); }
.hero-card-icon {
  font-size: 2rem; color: var(--orange);
  margin-bottom: 10px;
}
.hero-card span { font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.9); }

/* ── 7. STATS ─────────────────────────────────────────────── */
.stats { background: var(--white); box-shadow: var(--shadow); }
.stats-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap;
}
.stat-item {
  flex: 1; min-width: 160px;
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 32px; text-align: center;
}
.stat-number {
  font-size: 2.4rem; font-weight: 700; color: var(--blue); line-height: 1;
}
.stat-label { font-size: .85rem; color: var(--text-muted); margin-top: 6px; }
.stat-divider { width: 1px; height: 48px; background: var(--grey); }

/* ── 8. CATEGORIES ────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  cursor: pointer;
}
.cat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--blue-light);
}
.cat-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 16px;
}
.cat-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.cat-card p  { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }
.cat-count {
  display: inline-block; margin-top: 14px;
  font-size: .78rem; font-weight: 600;
  background: var(--blue-light); color: var(--blue);
  padding: 4px 12px; border-radius: 20px;
}

/* ── 9. ACTUALITES ────────────────────────────────────────── */
.actu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.actu-featured { grid-column: 1 / -1; }
.actu-card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
}
.actu-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.actu-tag {
  display: inline-block; padding: 4px 14px;
  border-radius: 20px; font-size: .75rem; font-weight: 700;
  letter-spacing: .04em; margin-bottom: 14px;
}
.tag-actu   { background: #e8edf8; color: var(--blue); }
.tag-projet { background: #eefaf3; color: #16a34a; }
.tag-form   { background: #fff3ee; color: var(--orange); }
.actu-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.actu-card p  { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }
.actu-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--grey);
  font-size: .82rem; color: var(--text-muted);
}
.actu-meta i   { margin-right: 6px; }
.actu-link     { color: var(--blue); font-weight: 600; font-size: .85rem; transition: var(--transition); }
.actu-link:hover { color: var(--orange); }

/* ── 10. CTA ──────────────────────────────────────────────── */
.cta {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  padding: 80px 24px; text-align: center; color: var(--white);
}
.cta-inner { max-width: 600px; margin: 0 auto; }
.cta h2    { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.cta p     { font-size: 1rem; opacity: .9; margin-bottom: 32px; }
.cta .btn-primary {
  background: var(--white); color: var(--orange); border-color: var(--white);
}
.cta .btn-primary:hover { background: var(--grey-light); }

/* ── 11. FOOTER ───────────────────────────────────────────── */
.footer { background: var(--blue-dark); color: var(--white); }
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px; padding: 60px 24px 40px;
}
.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4, .footer-contact h4 {
  color: var(--white); font-size: .9rem; font-weight: 700; margin-bottom: 4px;
}
.footer-links a {
  font-size: .85rem; color: rgba(255,255,255,.65);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--orange); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact p {
  font-size: .85rem; display: flex; align-items: center;
  gap: 10px; color: rgba(255,255,255,.65);
}
.footer-contact i { color: var(--orange); width: 16px; }

/* ── Footer Donateurs ── */
.footer-donateurs {
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 28px 40px;
  text-align: center;
}
.donateurs-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 20px;
}
.donateurs-label i {
  color: #e94560;
  margin-right: 6px;
}
.donateurs-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
}
.donateur-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.25s ease;
  text-decoration: none;
  min-width: 120px;
  min-height: 60px;
}
.donateur-item:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.donateur-item img {
  max-height: 40px;
  max-width: 130px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.75;
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.donateur-item:hover img {
  opacity: 1;
  filter: none;
}
.donateur-texte {
  flex-direction: column;
  gap: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: default;
}
.donateur-texte i {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.4);
}
.donateur-texte:hover { color: rgba(255,255,255,0.9); }

/* ── Footer Bottom ── */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 24px; text-align: center;
  font-size: .8rem; color: rgba(255,255,255,.4);
  max-width: 1200px; margin: 0 auto;
}

/* ── 12. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner    { grid-template-columns: 1fr 1fr; }
  .hero-title      { font-size: 2rem; }
}

@media (max-width: 768px) {
  .nav {
    display: none; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--white); padding: 16px 24px;
    box-shadow: var(--shadow-lg); gap: 4px;
  }
  .nav.nav-open    { display: flex; }
  .nav-toggle      { display: block; }
  .header-inner    { position: relative; }
  .hero            { flex-direction: column; text-align: center; padding: 60px 24px; min-height: auto; }
  .hero-actions    { justify-content: center; }
  .hero-visual     { grid-template-columns: repeat(2, 140px); }
  .stat-divider    { display: none; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .actu-grid       { grid-template-columns: 1fr; }
  .actu-featured   { grid-column: 1; }
  .footer-inner    { grid-template-columns: 1fr; gap: 28px; padding: 40px 24px 28px; }
  .section-title   { font-size: 1.6rem; }
}

@media (max-width: 600px) {
  .donateurs-logos { gap: 16px; }
  .donateur-item   { min-width: 90px; padding: 8px 14px; }
  .donateur-item img { max-height: 30px; max-width: 100px; }
}

@media (max-width: 480px) {
  .hero-visual     { grid-template-columns: repeat(2, 130px); }
  .hero-title      { font-size: 1.7rem; }
  .categories-grid { grid-template-columns: 1fr; }
  .hero-actions    { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; }
}

/* ── 13. ANIMATIONS ───────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-content { animation: fadeInUp .6s ease both; }
.stats-inner  { animation: fadeInUp .5s ease .2s both; }
