/*
 * Omamori - Section OHADA (v1.22).
 * Carte d'Afrique avec marqueurs pulsants + grille de drapeaux animes.
 */

.ohada-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 32px;
}

/* ---- Carte ---- */
.ohada-map-card {
  position: relative;
  background: linear-gradient(160deg, #e9f6f4 0%, #f6fbfa 100%);
  border: 1px solid #d3e7e4;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(15, 44, 42, 0.07);
}
.ohada-map {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
/* Pays africains hors OHADA : fond neutre. */
.ohada-map .ac path {
  fill: #d4e4e1;
  stroke: #fff;
  stroke-width: 0.5;
  transition: fill .2s ease;
}
/* Pays OHADA : couleur Omamori, interactifs. */
.ohada-map .ac.oh path {
  fill: #1ea69a;
  stroke: #fff;
  stroke-width: 0.6;
  cursor: pointer;
  transition: fill .2s ease;
}
.ohada-map .ac.oh:hover path,
.ohada-map .ac.oh:focus path {
  fill: #0f8a5f;
  outline: none;
}
/* Cameroun (pays courant) mis en avant en dore. */
.ohada-map .ac.oh[data-pays="Cameroun"] path { fill: #e8a33d; }
.ohada-map .ac.oh[data-pays="Cameroun"]:hover path { fill: #d98a1f; }

@media (prefers-reduced-motion: reduce) {
  .ohada-map .ac path { transition: none; }
}

/* Badge "17 pays" */
.ohada-map-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #0f2c2a;
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(15, 44, 42, 0.25);
}
.omb-num { font-size: 1.8rem; font-weight: 800; line-height: 1; color: #4dd1c0; }
.omb-lbl { font-size: .72rem; line-height: 1.1; text-transform: uppercase; letter-spacing: .04em; }

/* Tooltip dynamique (JS) */
.ohada-map-tip {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f2c2a;
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  opacity: .55;
  transition: opacity .2s ease, background .2s ease;
}
.ohada-map-tip.active { opacity: 1; background: #1ea69a; }

/* ---- Grille de drapeaux ---- */
.ohada-flags {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}
.oha-flag {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  background: #fff;
  border: 1px solid var(--border, #e3eae9);
  border-radius: 10px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.oha-flag:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(15, 44, 42, 0.12);
  border-color: #1ea69a;
}
.oha-flag.is-cur {
  border-color: #e8a33d;
  background: #fffaf0;
}
.oha-flag-img {
  flex: 0 0 auto;
  width: 30px;
  height: 20px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  line-height: 0;
}
.oha-flag-img svg { width: 30px; height: 20px; display: block; }
.oha-flag-name {
  font-size: .86rem;
  font-weight: 600;
  color: #0f2c2a;
  line-height: 1.15;
}

/* =====================================================================
   SELECTEUR DE LANGUE FR / EN (v1.23)
   ===================================================================== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: #f1f5f4;
  border: 1px solid #e0e8e7;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.lang-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  color: #6c807c;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.lang-opt:hover { color: #0f2c2a; }
.lang-opt.active {
  background: #fff;
  color: #178c81;
  box-shadow: 0 1px 3px rgba(15,44,42,.12);
}
.lang-flag {
  width: 18px; height: 12px;
  border-radius: 2px; overflow: hidden; line-height: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.lang-flag svg { width: 18px; height: 12px; display: block; }

/* En mobile, le selecteur de langue (drapeaux FR/EN) est affiche dans le
   menu hamburger via .nav.open .nav-cta (cf. omamori.css). On l'agrandit
   un peu pour le tactile. */
@media (max-width: 960px) {
  .nav.open .nav-cta .lang-switch { padding: 3px; }
  .nav.open .nav-cta .lang-opt { padding: 7px 12px; font-size: .9rem; }
  .nav.open .nav-cta .lang-flag { width: 22px; height: 15px; }
  .nav.open .nav-cta .lang-flag svg { width: 22px; height: 15px; }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .ohada-grid { grid-template-columns: 1fr; gap: 28px; }
  .ohada-map-card { max-width: 420px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .ohada-flags { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
  .oha-flag { padding: 7px 9px; }
  .oha-flag-name { font-size: .8rem; }
}
