/* TQ – Carte de l'Afrique interactive */
.tq-amap{
  --tq-branch:#FFAD52; --tq-benef:#A14A2E; --tq-horizon:#C9D9E8; --tq-off:#DEDEDE;
  --tq-gold:#D4A23F; --tq-dark:#2E1A12; --tq-cream:#FBF3EE; --tq-line:#EAD5C6;
  position:relative; width:100%; max-width:640px; margin-inline:auto;
  font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif;
}
.tq-amap__stage{ position:relative; }
.tq-amap__svg svg{ display:block; width:100%; height:auto; overflow:visible; }

/* Seuls les pays actifs et leurs étiquettes réagissent à la souris */
.tq-amap__svg svg *{ pointer-events:none; }
.tq-amap__svg .tq-c,
.tq-amap__svg .tq-lbl,
.tq-amap__svg .tq-lbl *{ pointer-events:auto; cursor:pointer; }

/* Petits États insulaires (Cap-Vert, Comores, Maurice, Seychelles, Sao Tomé) : anneau repère */
.tq-amap .tq-hit{ fill:transparent; stroke:#CFC6BE; stroke-width:1.2; stroke-dasharray:3 2.5; transition:stroke .25s, stroke-width .25s; }
.tq-amap .tq-hit[data-status]{ pointer-events:auto; cursor:pointer; }
.tq-amap .tq-hit[data-status="branch"]{ stroke:var(--tq-branch); }
.tq-amap .tq-hit[data-status="benef"]{ stroke:var(--tq-benef); }
.tq-amap .tq-hit[data-status="horizon"]{ stroke:var(--tq-horizon); }
.tq-amap .tq-hit.is-active{ stroke:var(--tq-dark); stroke-width:1.8; }

/* Couleurs par statut (pilotées depuis Réglages › Carte Afrique) */
.tq-amap .tq-c[data-status="branch"]{ fill:var(--tq-branch); }
.tq-amap .tq-c[data-status="benef"]{ fill:var(--tq-benef); }
.tq-amap .tq-c[data-status="horizon"]{ fill:var(--tq-horizon); }
.tq-amap .tq-off{ fill:var(--tq-off); }

.tq-amap .tq-c{ transition:filter .25s ease, opacity .25s ease; outline:none; }
/* Atténuation sans transparence : les petits pays dessinés par-dessus (Gambie, Burundi, Lesotho…) ne foncent pas */
.tq-amap.has-active .tq-c[data-status="branch"]:not(.is-active){ fill:color-mix(in srgb, var(--tq-branch) 55%, #fff); }
.tq-amap.has-active .tq-c[data-status="benef"]:not(.is-active){ fill:color-mix(in srgb, var(--tq-benef) 55%, #fff); }
.tq-amap.has-active .tq-c[data-status="horizon"]:not(.is-active){ fill:color-mix(in srgb, var(--tq-horizon) 55%, #fff); }
.tq-amap .tq-c.is-active,
.tq-amap .tq-c:focus-visible{ filter:drop-shadow(0 6px 10px rgba(46,26,18,.35)) brightness(1.12); opacity:1; }
.tq-amap .tq-c:focus-visible{ stroke:var(--tq-dark); stroke-width:2; }

/* Étiquettes */
.tq-amap .tq-lbl{ transition:transform .3s cubic-bezier(.2,.8,.2,1); transform-box:fill-box; transform-origin:center; }
.tq-amap .tq-lbl.is-active{ transform:translateY(-3px) scale(1.06); }

/* Points + onde pulsée */
.tq-amap .tq-pin{ transition:transform .3s; transform-box:fill-box; transform-origin:center; }
.tq-amap .tq-pin.is-active{ transform:scale(1.35); }
.tq-amap .tq-ring{
  fill:none; stroke:var(--tq-benef); stroke-width:2; opacity:0;
  transform-box:fill-box; transform-origin:center; animation:tqPulse 2.4s ease-out infinite;
}
.tq-amap .tq-ring.is-active{ stroke:var(--tq-gold); }
@keyframes tqPulse{ 0%{ transform:scale(.6); opacity:.9; } 80%,100%{ transform:scale(2.6); opacity:0; } }

/* Infobulle */
.tq-amap__tip{
  position:absolute; z-index:5; min-width:170px; max-width:240px;
  padding:12px 14px; border-radius:14px; background:#fff; color:var(--tq-dark);
  box-shadow:0 18px 40px -18px rgba(46,26,18,.45); border:1px solid var(--tq-line);
  display:flex; flex-direction:column; gap:6px; text-align:start;
  transform:translate(-50%, calc(-100% - 14px)); pointer-events:none; animation:tqTipIn .18s ease-out;
}
.tq-amap__tip[hidden]{ display:none; }
.tq-amap__tip.is-pinned{ pointer-events:auto; }
.tq-amap__tip::after{
  content:""; position:absolute; bottom:-7px; left:calc(50% - 7px); width:14px; height:14px;
  background:#fff; border-right:1px solid var(--tq-line); border-bottom:1px solid var(--tq-line); transform:rotate(45deg);
}
.tq-amap__tip-head{ display:flex; align-items:center; gap:10px; }
.tq-amap__tip-flag{ flex:none; width:22px; height:22px; border-radius:50%; object-fit:cover; box-shadow:0 0 0 1px rgba(0,0,0,.12); }
.tq-amap__tip-flag[hidden]{ display:none; }
.tq-amap__tip-name{ font-family:'Amiri',serif; font-size:19px; line-height:1.2; }
.tq-amap__tip-status{ align-self:flex-start; font-size:12.5px; font-weight:600; padding:3px 10px; border-radius:999px; background:var(--tq-cream); color:var(--tq-benef); }
.tq-amap__tip-status[data-s="branch"]{ background:#FFF0DD; color:#9A5A08; }
.tq-amap__tip-status[data-s="horizon"]{ background:#EEF2F6; color:#4A5D70; }
.tq-amap__tip-link{ font-size:14px; font-weight:700; color:var(--tq-benef); text-decoration:none; }
.tq-amap__tip-link:hover{ text-decoration:underline; }
.tq-amap__tip-link[hidden]{ display:none; }
@keyframes tqTipIn{ from{ opacity:0; margin-top:6px; } to{ opacity:1; margin-top:0; } }

/* Légende */
.tq-amap__legend{ list-style:none; margin:16px 0 0; padding:14px 18px; display:flex; flex-wrap:wrap; gap:10px 22px; justify-content:center; background:var(--tq-cream); border-radius:16px; }
.tq-amap__legend li{ display:flex; align-items:center; gap:10px; font-size:14.5px; color:var(--tq-dark); }
.tq-amap__legend li::before{ content:""; width:12px; height:12px; border-radius:2px; transform:rotate(45deg); background:var(--tq-benef); }
.tq-amap__legend li[data-s="branch"]::before{ background:var(--tq-branch); }
.tq-amap__legend li[data-s="horizon"]::before{ background:var(--tq-horizon); }

/* Liste des pays */
.tq-amap__list{ list-style:none; margin:18px 0 0; padding:0; display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.tq-amap[data-list="false"] .tq-amap__list{ display:none; }
.tq-amap__list [data-country]{
  display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:0 14px; border-radius:999px;
  border:1px solid var(--tq-line); background:#fff; color:var(--tq-dark); font-size:14px; font-weight:600; text-decoration:none;
  transition:background .2s, border-color .2s, color .2s; cursor:pointer;
}
.tq-amap__list .tq-amap__nolink{ cursor:default; }
.tq-amap__list [data-country]::before{ content:""; width:9px; height:9px; border-radius:2px; transform:rotate(45deg); background:var(--tq-benef); }
.tq-amap__list [data-s="branch"]::before{ background:var(--tq-branch); }
.tq-amap__list [data-s="horizon"]::before{ background:var(--tq-horizon); }
.tq-amap__list .is-active,
.tq-amap__list [data-country]:hover,
.tq-amap__list [data-country]:focus-visible{ background:var(--tq-benef); border-color:var(--tq-benef); color:#fff; }
.tq-amap__list .is-active::before,
.tq-amap__list [data-country]:hover::before,
.tq-amap__list [data-country]:focus-visible::before{ background:#fff; }

/* Étiquettes : dessinées (en arabe dans le SVG fourni) ou générées (nom + drapeau) */
.tq-amap[data-labels="false"] .tq-lbl{ display:none; }
.tq-amap[data-baked="false"] .tq-lbl:not(.tq-lbl--auto){ display:none; }
.tq-amap .tq-lbl__text{
  font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif; font-size:13.5px; font-weight:500; fill:#17352E;
}
.tq-amap .tq-lbl--auto{ animation:tqLblIn .35s ease-out both; }
@keyframes tqLblIn{ from{ opacity:0; } to{ opacity:1; } }

@media (prefers-reduced-motion: reduce){
  .tq-amap .tq-ring{ animation:none; opacity:.5; }
  .tq-amap .tq-c, .tq-amap .tq-lbl, .tq-amap .tq-pin{ transition:none; }
}
