@charset "UTF-8";

/* ============================================================
   MARCC — Ministère des Affaires Religieuses, du Culte et des Coutumes
   Design System — Maquettes UI/UX 2026
   ============================================================ */

:root {
  /* Palette Mali institutionnelle */
  --mali-green-50: #ecfdf3;
  --mali-green-100: #d1fae0;
  --mali-green-200: #a7f3c8;
  --mali-green-300: #6ee7a8;
  --mali-green-400: #34d37a;
  --mali-green-500: #14b53a;
  --mali-green-600: #0d9430;
  --mali-green-700: #0a7528;
  --mali-green-800: #085c20;
  --mali-green-900: #064a1a;

  --mali-gold-50: #fffbeb;
  --mali-gold-100: #fef3c7;
  --mali-gold-200: #fde68a;
  --mali-gold-300: #fcd34d;
  --mali-gold-400: #fbbf24;
  --mali-gold-500: #fcd116;
  --mali-gold-600: #d4a80f;

  --mali-red-500: #ce1126;
  --mali-red-600: #a80e1f;

  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;

  --font-sans: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-arabic: "Noto Naskh Arabic", "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --header-offset: 2.5rem;
  --touch-min: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  color: var(--neutral-800);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

.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;
}

.touch-target {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0.5rem;
}

.safe-area-top { padding-top: max(0px, var(--safe-top)); }
.safe-area-bottom { padding-bottom: max(0px, var(--safe-bottom)); }

[dir="rtl"] body,
[lang="ar"] { font-family: var(--font-arabic); }

/* Skip link — WCAG 2.1 */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--mali-green-700);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

/* Focus visible — accessibilité */
:focus-visible {
  outline: 2px solid var(--mali-gold-500);
  outline-offset: 2px;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--mali-green-600);
  color: white;
}
.btn-primary:hover { background: var(--mali-green-700); }
.btn-secondary {
  background: white;
  color: var(--mali-green-700);
  border: 1.5px solid var(--mali-green-600);
}
.btn-secondary:hover { background: var(--mali-green-50); }
.btn-gold {
  background: var(--mali-gold-500);
  color: var(--neutral-900);
}
.btn-gold:hover { background: var(--mali-gold-400); }
.btn-ghost {
  background: transparent;
  color: var(--neutral-600);
}
.btn-ghost:hover { background: var(--neutral-100); }

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--neutral-200);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-elevated {
  box-shadow: var(--shadow-md);
  border: none;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  letter-spacing: 0.025em;
}
.badge-green { background: var(--mali-green-100); color: var(--mali-green-800); }
.badge-gold { background: var(--mali-gold-100); color: var(--mali-gold-600); }
.badge-red { background: #fee2e2; color: var(--mali-red-600); }
.badge-gray { background: var(--neutral-100); color: var(--neutral-600); }

/* Section titles */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--neutral-900);
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--neutral-500);
  margin-top: 0.5rem;
}
.section-divider {
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--mali-green-500), var(--mali-gold-500));
  border-radius: 2px;
  margin-top: 0.75rem;
}

/* Government top bar */
.gov-bar {
  background: var(--neutral-900);
  color: var(--neutral-300);
  font-size: 0.75rem;
}
.gov-bar a { color: var(--neutral-300); text-decoration: none; }
.gov-bar a:hover { color: white; }

/* Mali flag stripe accent */
.flag-stripe {
  height: 4px;
  background: linear-gradient(90deg,
    var(--mali-green-500) 33.33%,
    var(--mali-gold-500) 33.33% 66.66%,
    var(--mali-red-500) 66.66%
  );
}

/* Hero */
.hero-gradient {
  background: linear-gradient(135deg, var(--mali-green-800) 0%, var(--mali-green-600) 50%, var(--mali-green-700) 100%);
}

/* Quick access grid */
.quick-access-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--neutral-200);
  text-decoration: none;
  color: var(--neutral-700);
  transition: all var(--transition);
  text-align: center;
}
.quick-access-item:hover {
  border-color: var(--mali-green-300);
  background: var(--mali-green-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.quick-access-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mali-green-100);
  color: var(--mali-green-700);
  border-radius: var(--radius-lg);
}
.quick-access-hint {
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--neutral-500);
  font-weight: 400;
}

/* Stats counter */
.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--neutral-200);
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--mali-green-600);
  line-height: 1;
}
.stat-label {
  font-size: 0.875rem;
  color: var(--neutral-500);
  margin-top: 0.5rem;
}

/* News card */
.news-card-image {
  aspect-ratio: 16/9;
  background: var(--neutral-200);
  object-fit: cover;
  width: 100%;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--neutral-500);
}
.breadcrumb a { color: var(--mali-green-600); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--neutral-300); }

/* Page header */
.page-header {
  background: var(--mali-green-800);
  color: white;
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Form elements */
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: white;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--mali-green-500);
  box-shadow: 0 0 0 3px var(--mali-green-100);
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 0.375rem;
}

/* Admin sidebar */
.admin-sidebar {
  width: 260px;
  background: var(--neutral-900);
  color: var(--neutral-300);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  transition: transform var(--transition);
}
.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--neutral-400);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.admin-sidebar-link:hover,
.admin-sidebar-link.active {
  background: rgba(255,255,255,0.05);
  color: white;
  border-left-color: var(--mali-gold-500);
}
.admin-main {
  margin-left: 260px;
  min-height: 100vh;
  background: var(--neutral-50);
}
.admin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 35;
}
.admin-overlay:not([hidden]) {
  display: block;
}
body.admin-nav-open {
  overflow: hidden;
}

@media (min-width: 1024px) {
  .admin-overlay { display: none !important; }
}

/* Mobile menu */
.mobile-menu-overlay {
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}
.mobile-menu-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1rem;
  margin: 0 0.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}
.mobile-nav-link--active {
  background: rgba(252, 209, 22, 0.15);
  color: var(--mali-gold-400);
  font-weight: 600;
}
.mobile-nav-link--child {
  padding-left: 1.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
}
.mobile-nav-link--grandchild {
  padding-left: 2.5rem;
}
.mobile-nav-group__trigger--child {
  padding-left: 1.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.mobile-nav-group__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0.75rem 1rem;
  margin: 0 0.25rem;
  border: none;
  border-radius: var(--radius-md);
  background: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.mobile-nav-group__trigger:hover,
.mobile-nav-group__trigger:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}
.mobile-nav-group__trigger[aria-expanded="true"] {
  color: var(--mali-gold-400);
}
.mobile-nav-group__trigger[aria-expanded="true"] .mobile-nav-group__icon {
  transform: rotate(180deg);
}
.mobile-nav-group__icon {
  transition: transform var(--transition);
  opacity: 0.7;
}
.mobile-nav-group__panel {
  overflow: hidden;
  transition: max-height 250ms ease;
}
.mobile-nav-group__panel:not(.hidden) {
  animation: slideDown 250ms ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Search modal */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  padding-top: max(1rem, var(--safe-top));
}
.search-modal.hidden { display: none; }
.search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.search-modal__panel {
  position: relative;
  width: 100%;
  max-width: 36rem;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 1.25rem;
  margin-top: 10vh;
  animation: fadeInUp 0.25s ease;
}
.search-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.search-modal__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--neutral-900);
}
.search-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  border: none;
  background: var(--neutral-100);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--neutral-600);
  transition: background var(--transition);
}
.search-modal__close:hover { background: var(--neutral-200); }
.search-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 480px) {
  .search-modal__form { flex-direction: row; }
}
.search-modal__input {
  flex: 1;
  min-height: var(--touch-min);
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
}
.search-modal__input:focus {
  outline: none;
  border-color: var(--mali-green-500);
  box-shadow: 0 0 0 3px var(--mali-green-100);
}
.search-modal__submit {
  min-height: var(--touch-min);
  padding: 0.75rem 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.6s ease forwards; }

/* Responsive utilities */
@media (max-width: 1023px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}

@media (max-width: 767px) {
  .section-title { font-size: 1.5rem; }
  .stat-number { font-size: 2rem; }
  .quick-access-item { padding: 1.25rem 0.75rem; }
  .card { border-radius: var(--radius-lg); }
}

/* Print */
@media print {
  .gov-bar, nav, footer, .no-print { display: none !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   HEADER & NAVIGATION — Style maquette accueil
   ============================================================ */

.gov-bar--hero {
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gov-bar--hero span,
.gov-bar--hero a {
  color: rgba(255, 255, 255, 0.65);
}

.site-header--hero {
  position: relative;
  z-index: 40;
  background: transparent;
  border-bottom: none;
}

/* Section brand : logo + infos à la une */
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--neutral-200);
}

.site-header--hero .site-header__brand {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.site-header__logo {
  flex-shrink: 0;
}

.site-header__headlines {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.site-header__headlines-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.625rem;
  background: #dc2626;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 0.25rem;
  line-height: 1;
  white-space: nowrap;
}

.headline-ticker {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 1.375rem;
  overflow: hidden;
}

.headline-ticker__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.headline-ticker__item.is-active {
  opacity: 1;
  transform: translateY(0);
}

.site-header--default .headline-ticker__item {
  color: var(--neutral-700);
}
.site-header--default .headline-ticker__item:hover {
  color: var(--mali-green-700);
}

.site-header--hero .headline-ticker__item {
  color: rgba(255, 255, 255, 0.85);
}
.site-header--hero .headline-ticker__item:hover {
  color: #fff;
}

.headline-ticker__controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.headline-ticker__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  border: none;
  border-radius: 0.25rem;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.site-header--default .headline-ticker__btn {
  color: var(--neutral-500);
}
.site-header--default .headline-ticker__btn:hover {
  background: var(--neutral-100);
  color: var(--neutral-800);
}

.site-header--hero .headline-ticker__btn {
  color: rgba(255, 255, 255, 0.6);
}
.site-header--hero .headline-ticker__btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Section navigation */
.site-header__nav-bar {
  padding: 0.25rem 0 0.625rem;
  border-top: 1px solid var(--neutral-100);
}

.site-header--hero .site-header__nav-bar {
  padding-bottom: 1rem;
  border-top-color: rgba(255, 255, 255, 0.1);
}

.site-header__nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.125rem;
}

.site-header__nav .nav-dropdown,
.site-header__nav > .nav-item {
  flex-shrink: 0;
}

.site-header__actions {
  flex-shrink: 0;
}

.site-header--hero.is-scrolled {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.hero-layout {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

.hero-layout > .gov-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

.hero-layout > .site-header {
  position: absolute;
  top: 2.5rem;
  left: 0;
  right: 0;
  z-index: 50;
}

.hero-layout > main {
  position: relative;
  z-index: 1;
}

/* Nav items */
.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4375rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  border-radius: 0.375rem;
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-item--hero {
  color: rgba(255, 255, 255, 0.85);
}
.nav-item--hero:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.nav-item--default {
  color: var(--neutral-700);
}
.nav-item--default:hover {
  color: var(--mali-green-700);
  background: var(--mali-green-50);
}

.nav-item--active.nav-item--hero {
  color: var(--mali-gold-400);
  font-weight: 600;
}
.nav-item--active.nav-item--hero::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0.875rem;
  right: 0.875rem;
  height: 2px;
  background: var(--mali-green-500);
  border-radius: 1px;
}

.nav-item--active.nav-item--default {
  color: var(--mali-green-700);
  font-weight: 600;
}

/* Dropdown */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 200px;
  background: rgba(20, 20, 20, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: var(--shadow-xl);
  z-index: 50;
}
.site-header--default .nav-dropdown-menu {
  background: #fff;
  border-color: var(--neutral-200);
}
.nav-dropdown-menu--sm { min-width: 140px; right: 0; left: auto; }

.nav-dropdown-link {
  display: block;
  padding: 0.75rem 0.875rem;
  min-height: var(--touch-min);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background var(--transition);
  border: none;
  background: none;
  cursor: pointer;
}
.site-header--default .nav-dropdown-link { color: var(--neutral-700); }
.nav-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.site-header--default .nav-dropdown-link:hover {
  background: var(--mali-green-50);
  color: var(--mali-green-700);
}
.nav-dropdown-link--parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}
.nav-dropdown-item {
  position: relative;
}
.nav-dropdown-submenu {
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% - 4px);
  min-width: 220px;
  background: rgba(20, 20, 20, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: var(--shadow-xl);
  z-index: 60;
}
.site-header--default .nav-dropdown-submenu {
  background: #fff;
  border-color: var(--neutral-200);
}
.nav-dropdown-item.has-submenu:hover > .nav-dropdown-submenu,
.nav-dropdown-item.has-submenu:focus-within > .nav-dropdown-submenu {
  display: block;
}

.nav-dropdown.is-open .nav-dropdown-menu { display: block; }

.nav-action-btn {
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: none;
  background: none;
  cursor: pointer;
  transition: background var(--transition);
}
.nav-action-btn--hero { color: rgba(255, 255, 255, 0.85); }
.nav-action-btn--hero:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.nav-lang--hero button { color: rgba(255, 255, 255, 0.85); }
.nav-lang--hero button:hover { background: rgba(255, 255, 255, 0.1); }

.lang-flag {
  display: inline-block;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  vertical-align: middle;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.lang-option--active {
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.site-header--default .lang-option--active {
  background: var(--mali-green-50);
  color: var(--mali-green-700);
}

/* ============================================================
   HERO ACCUEIL
   ============================================================ */

.hero-home {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-home__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #0f172a 0%, #1a2744 45%, #1e293b 100%);
}

.hero-home__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.035'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-home__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 72% 42%, rgba(252, 209, 22, 0.09) 0%, transparent 58%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 48%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-home__rings {
  position: absolute;
  right: 6%;
  top: 52%;
  transform: translateY(-50%);
  width: 380px;
  height: 380px;
  border: 1px solid rgba(252, 209, 22, 0.22);
  border-radius: 50%;
  pointer-events: none;
}
.hero-home__rings::before,
.hero-home__rings::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(252, 209, 22, 0.14);
  border-radius: 50%;
  inset: -48px;
}
.hero-home__rings::after {
  inset: -96px;
  border-color: rgba(252, 209, 22, 0.08);
}

.hero-home__content {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 12.5rem 1.5rem 5rem;
  text-align: center;
}

.hero-home__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero-home__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mali-gold-500);
  box-shadow: 0 0 8px var(--mali-gold-500);
}

.hero-home__title {
  font-family: Arial, sans-serif;
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 500;
  line-height: 1.18;
  color: #fff;
  margin-bottom: 1.75rem;
  letter-spacing: -0.01em;
}

.hero-home__title-sub {
  display: block;
  font-size: 0.95em;
  font-weight: 400;
  margin-top: 0.1em;
}

.hero-home__amp {
  font-family: Arial, sans-serif;
  color: var(--mali-gold-400);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1em;
}

.hero-home__desc {
  font-size: clamp(0.9375rem, 1.8vw, 1.0625rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.78);
  max-width: 640px;
  margin: 0 auto 2.75rem;
  font-weight: 400;
}

.hero-home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition);
}

.hero-btn--primary {
  background: #0d9430;
  color: #fff;
  box-shadow: 0 4px 20px rgba(13, 148, 48, 0.45);
  border-radius: 0.5rem;
}
.hero-btn--primary:hover {
  background: var(--mali-green-500);
  transform: translateY(-1px);
}

.hero-btn--ghost {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
  border-radius: 0.5rem;
}
.hero-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-home__slides {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-home__slide[hidden] {
  display: none;
}

.hero-home__nav {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-home__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  backdrop-filter: blur(6px);
}

.hero-home__nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hero-home__dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-home__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-home__dot.is-active {
  width: 1.25rem;
  background: var(--mali-gold-500);
}

.page-accueil {
  overflow-x: hidden;
  background: #0d0d0d;
}

/* Hero entrance animation */
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-hero-in {
  animation: heroFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

/* ============================================================
   RESPONSIVE — UI/UX breakpoints
   ============================================================ */

/* Tablet & below: header layout */
@media (max-width: 1279px) {
  .site-header__headlines-label {
    font-size: 0.5625rem;
    padding: 0.25rem 0.5rem;
  }
}

@media (min-width: 1280px) {
  .nav-item {
    padding: 0.4375rem 0.4rem;
    font-size: 0.75rem;
  }
}

@media (min-width: 1400px) {
  .nav-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 639px) {
  .site-header__brand {
    flex-wrap: wrap;
    gap: 0.625rem;
    padding: 0.625rem 0;
  }
  .site-header__logo {
    flex: 1;
    min-width: 0;
  }
  .site-header__actions {
    order: 2;
  }
  .site-header__headlines {
    width: 100%;
    order: 3;
  }
  .headline-ticker__controls {
    display: none;
  }
}

/* Hero layout header offset */
@media (max-width: 639px) {
  .hero-layout > .site-header { top: 2rem; }
  .gov-bar .max-w-\[1400px\] { padding-top: 0.5rem; padding-bottom: 0.5rem; }
}

@media (max-width: 767px) {
  .hero-home__rings { display: none; }
  .hero-home {
    min-height: 100svh;
    align-items: flex-end;
    padding-bottom: 3.5rem;
  }
  .hero-home__content {
    padding: 11rem 1rem 3.25rem;
  }
  .hero-home__nav {
    bottom: 0.75rem;
  }
  .hero-home__badge {
    font-size: 0.625rem;
    padding: 0.4rem 1rem;
    margin-bottom: 1.5rem;
  }
  .hero-home__title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    margin-bottom: 1.25rem;
  }
  .hero-home__desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 2rem;
  }
  .hero-home__actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  .hero-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    padding: 0.875rem 1.25rem;
  }
  .page-header { padding: 2rem 0; }
  .page-header h1 { font-size: 1.75rem; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-home__content { padding-top: 11.5rem; }
  .hero-home__rings {
    width: 280px;
    height: 280px;
    right: 4%;
  }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-home {
    min-height: auto;
    padding: 5rem 0 2rem;
  }
  .hero-home__content { padding-top: 4rem; }
}

/* Hover only on pointer devices */
@media (hover: hover) and (pointer: fine) {
  .hero-btn--primary:hover { transform: translateY(-2px); }
  .card:hover { transform: translateY(-2px); }
}
@media (hover: none) {
  .hero-btn:active { transform: scale(0.98); }
  .btn:active { transform: scale(0.98); }
}

.a11y-toolbar {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 80;
  display: flex;
  gap: 0.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.25rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.a11y-toolbar__btn {
  min-width: 2.5rem;
  min-height: 2.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  color: #0a7528;
}
.a11y-toolbar__btn:hover { background: #ecfdf3; }

@media (prefers-reduced-motion: reduce) {
  .animate-hero-in { animation: none; opacity: 1; transform: none; }
  .mobile-menu { transition: none; }
  .mobile-menu-overlay { transition: none; }
}

/* Login / 2FA */
.login-page {
  min-height: 100vh;
  background: var(--neutral-100);
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
.login-brand {
  display: none;
  background: linear-gradient(165deg, var(--mali-green-900) 0%, var(--mali-green-700) 55%, var(--mali-green-800) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.login-brand__flag {
  height: 6px;
  background: linear-gradient(90deg, var(--mali-green-500) 33.33%, var(--mali-gold-500) 33.33% 66.66%, var(--mali-red-500) 66.66%);
}
.login-brand__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  max-width: 32rem;
}
.login-brand__logo {
  width: 96px;
  height: 96px;
  border-radius: 9999px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  outline: 3px solid rgba(252, 209, 22, 0.45);
  margin-bottom: 1.5rem;
}
.login-brand__kicker {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mali-gold-400);
  font-weight: 700;
}
.login-brand__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0.5rem;
}
.login-brand__abbr {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}
.login-brand__tagline {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
}
.login-brand__footer {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1.5rem 3rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-panel {
  width: 100%;
  max-width: 28rem;
}
.login-panel__logo,
.login-panel__mobile-brand img {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  object-fit: cover;
  outline: 2px solid rgba(252, 209, 22, 0.4);
}
.login-panel__mobile-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-panel__mobile-brand img {
  margin: 0 auto;
}
.login-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}
.login-password {
  position: relative;
}
.login-password .form-input {
  padding-right: 5.5rem;
}
.login-password__toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--mali-green-700);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
@media (min-width: 1024px) {
  .login-shell { grid-template-columns: minmax(280px, 42%) 1fr; }
  .login-brand { display: flex; flex-direction: column; }
}

.place-card,
#associations {
  scroll-margin-top: 7rem;
}
.place-card {
  cursor: pointer;
}

[dir="rtl"] .mobile-menu {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}
[dir="rtl"] .mobile-menu.open {
  transform: translateX(0);
}
[dir="rtl"] .nav-dropdown-menu {
  left: auto;
  right: 0;
}
[dir="rtl"] .nav-dropdown-submenu {
  left: auto;
  right: calc(100% - 4px);
}
[dir="rtl"] .site-header__actions.ml-auto {
  margin-left: 0;
  margin-right: auto;
}
[dir="rtl"] .nav-dropdown-link--parent svg {
  transform: scaleX(-1);
}

