/* =========================================================================
   NigerData — feuille de style principale
   Mobile-first, aucun framework (pas de Bootstrap). Organisation du fichier :
   1. Variables et reset
   2. Typographie de base
   3. Mise en page générale (conteneurs, sections)
   4. En-tête / navigation
   5. Accueil (hero, recherche, statistiques, grille thématiques)
   6. Cartes plateforme
   7. Fil d'ariane
   8. Formulaires
   9. Boutons
   10. Pied de page
   11. Partenaires
   12. Accessibilité (focus visible)
   13. Media queries (tablette / desktop)
   ========================================================================= */

/* ---------- 1. Variables et reset ---------- */
:root {
  --nd-accent:        #2E5C8A;
  --nd-accent-dark:   #1F4166;
  --nd-text:        #2C2C2A;
  --nd-text-muted:  #5F5E5A;
  --nd-bg-white:    #FFFFFF;
  --nd-bg-section:  #EEF3F8;
  --nd-bg-accent-pale:#E4EDF5;
  --nd-bg-hero:     #DCE7F2;
  --nd-border:      #E2DED2;
  --nd-radius:      8px;
  --nd-radius-sm:   6px;
  --nd-max-width:   1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--nd-text);
  background: var(--nd-bg-white);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--nd-accent); }

ul { list-style: none; margin: 0; padding: 0; }

/* ---------- 2. Typographie de base ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--nd-text);
}

.nd-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. Mise en page générale ---------- */
.nd-container {
  max-width: var(--nd-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.nd-container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.nd-section { padding: 48px 0; }
.nd-section-alt   { background: var(--nd-bg-section); }
.nd-section-accent { background: var(--nd-bg-accent-pale); }

.nd-section-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  padding-left: 16px;
  border-left: 4px solid var(--nd-accent);
}

.nd-empty {
  color: var(--nd-text-muted);
  font-style: italic;
}

/* ---------- 4. En-tête / navigation ---------- */
.nd-header {
  background: var(--nd-bg-white);
  box-shadow: 0 1px 3px rgba(44, 44, 42, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nd-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.nd-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--nd-text);
  text-decoration: none;
}
.nd-logo-image {
  display: flex;
  align-items: center;
}
.nd-logo-image img {
  height: 40px;
  width: auto;
  display: block;
}

.nd-nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nd-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--nd-text);
}

.nd-nav {
  display: none;
  width: 100%;
}
.nd-nav.is-open { display: block; }

.nd-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
}
.nd-nav-list a {
  display: block;
  padding: 10px 0;
  color: var(--nd-text);
  text-decoration: none;
  font-weight: 600;
  border-top: 1px solid var(--nd-border);
}
.nd-nav-list a:hover { color: var(--nd-accent); }

/* ---------- 5. Accueil ---------- */
.nd-hero {
  padding: 64px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, var(--nd-bg-hero) 0%, var(--nd-bg-white) 100%);
  border-bottom: 1px solid var(--nd-border);
}
.nd-eyebrow {
  color: var(--nd-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.nd-hero-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.nd-hero-tagline {
  color: var(--nd-text-muted);
  font-size: 16px;
  margin: 0 0 28px;
}

.nd-search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}
.nd-search-form input[type="text"] {
  padding: 12px 14px;
  border: 1.5px solid var(--nd-border);
  border-radius: var(--nd-radius-sm);
  font-size: 15px;
  width: 100%;
}
.nd-search-form button {
  padding: 12px 24px;
  background: var(--nd-accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(74, 85, 101, 0.25);
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.nd-search-form button:hover {
  background: var(--nd-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(74, 85, 101, 0.32);
}

.nd-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  text-align: center;
}
.nd-stat {
  background: var(--nd-bg-white);
  border: 1px solid var(--nd-border);
  border-radius: var(--nd-radius);
  padding: 28px 16px;
}
.nd-stat-value {
  display: block;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--nd-accent);
}
.nd-stat-label {
  display: block;
  font-size: 13px;
  color: var(--nd-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nd-thematique-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.nd-thematique-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 22px;
  background: var(--nd-bg-white);
  border: 1px solid var(--nd-border);
  border-radius: var(--nd-radius);
  text-decoration: none;
  color: var(--nd-text);
  box-shadow: 0 1px 2px rgba(44, 44, 42, 0.04);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.nd-thematique-card:hover {
  border-color: var(--nd-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(44, 44, 42, 0.10);
}
.nd-thematique-icon {
  color: var(--nd-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--nd-bg-accent-pale);
}
.nd-thematique-icon-lg { margin-bottom: 8px; }
.nd-thematique-name {
  font-weight: 700;
  font-size: 17px;
}
.nd-thematique-count {
  font-size: 13px;
  color: var(--nd-text-muted);
}
.nd-thematique-description {
  color: var(--nd-text-muted);
  max-width: 640px;
  margin-bottom: 28px;
}

/* ---------- 6. Cartes plateforme ---------- */
.nd-plateforme-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.nd-plateforme-card {
  background: var(--nd-bg-white);
  border: 1px solid var(--nd-border);
  border-radius: var(--nd-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(44, 44, 42, 0.04);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nd-plateforme-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(44, 44, 42, 0.10);
}
.nd-plateforme-nom {
  font-size: 18px;
  margin: 0;
}
.nd-plateforme-organisation {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--nd-text-muted);
  margin: 0;
}
.nd-plateforme-description {
  color: var(--nd-text-muted);
  margin: 0 0 6px;
  flex: 1;
}

/* ---------- 7. Fil d'ariane ---------- */
.nd-breadcrumb {
  font-size: 14px;
  color: var(--nd-text-muted);
  margin-bottom: 20px;
}
.nd-breadcrumb a {
  color: var(--nd-text-muted);
  text-decoration: underline;
}

/* ---------- 8. Formulaires ---------- */
.nd-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}
.nd-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nd-field label {
  font-weight: 600;
  font-size: 14px;
}
.nd-field input,
.nd-field select,
.nd-field textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--nd-border);
  border-radius: var(--nd-radius-sm);
  font-size: 15px;
  font-family: inherit;
  width: 100%;
}

/* Honeypot : masqué visuellement mais toujours présent dans le DOM pour
   les robots qui remplissent tous les champs sans regarder le rendu. */
.nd-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nd-notice {
  padding: 14px 16px;
  border-radius: var(--nd-radius-sm);
  margin-bottom: 20px;
  font-size: 15px;
}
.nd-notice-succes {
  background: var(--nd-bg-accent-pale);
  color: var(--nd-accent-dark);
}
.nd-notice-erreur {
  background: #fbe4e1;
  color: #8a2e22;
}

/* ---------- 9. Boutons ---------- */
.nd-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease, transform .15s ease, box-shadow .15s ease;
}
.nd-btn-primary {
  background: var(--nd-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(74, 85, 101, 0.22);
}
.nd-btn-primary:hover {
  background: var(--nd-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(74, 85, 101, 0.3);
}
.nd-btn-secondary {
  background: transparent;
  color: var(--nd-accent);
  border: 1.5px solid var(--nd-accent);
}
.nd-btn-secondary:hover { background: var(--nd-bg-accent-pale); }

/* ---------- 10. Pied de page ---------- */
.nd-footer {
  background: var(--nd-bg-section);
  border-top: 3px solid var(--nd-accent);
  padding: 32px 0;
  margin-top: 40px;
}
.nd-footer-inner {
  text-align: center;
  color: var(--nd-text-muted);
  font-size: 14px;
}
.nd-footer-inner p { margin: 0 0 6px; }
.nd-footer-inner a { color: var(--nd-accent); font-weight: 600; }

/* ---------- 11. Partenaires ---------- */
.nd-partners-section .nd-section-title { margin-bottom: 32px; }

.nd-partners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  align-items: center;
  justify-items: center;
}
.nd-partner-logo img {
  max-height: 56px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.65;
  transition: filter .2s ease, opacity .2s ease;
}
.nd-partner-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* ---------- 12. Accessibilité : focus visible ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--nd-accent);
  outline-offset: 2px;
}

/* ---------- 13. Media queries ---------- */
@media (min-width: 640px) {
  .nd-stats { grid-template-columns: repeat(3, 1fr); }
  .nd-thematique-grid { grid-template-columns: repeat(2, 1fr); }
  .nd-plateforme-list { grid-template-columns: repeat(2, 1fr); }
  .nd-partners-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
  .nd-nav-toggle { display: none; }
  .nd-nav { display: block; width: auto; flex: 1 1 auto; min-width: 0; }
  .nd-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 4px;
    column-gap: 20px;
    padding-top: 0;
  }
  .nd-nav-list a {
    padding: 6px 0;
    border-top: none;
  }
  .nd-thematique-grid { grid-template-columns: repeat(4, 1fr); }
  .nd-plateforme-list { grid-template-columns: repeat(3, 1fr); }
  .nd-hero-title { font-size: 46px; }
  .nd-search-form { flex-direction: row; }
  .nd-search-form button { flex-shrink: 0; }
}
