/* Carte des zones d'intervention — Totoké */

.tk-carte {
	--tk-accent: #ED8D1B;
	--tk-accent-fonce: #A35400; /* Assez foncé pour un contraste AA sur blanc et sur sable. */
	--tk-rouge: #EE1D23;
	--tk-encre: #14161A;
	--tk-gris: #5C6169;
	--tk-trait: #E4E0DA;
	--tk-mer: #E8F0F4;
	--tk-terre: #DEDAD3;
	color: var(--tk-encre);
}

/* La mise en page suit la largeur réellement disponible, et non celle de
   l'écran : le thème peut enfermer la carte dans une colonne étroite. */
.tk-carte {
	container-type: inline-size;
}

/* Les boutons de la carte prennent la police du site. Placé en tête :
   les règles plus bas peuvent ensuite changer la taille et la graisse. */
.tk-carte button { font: inherit; }

.tk-carte__grille {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	align-items: start;
}

/* Sur téléphone, et dans toute colonne étroite, la carte passe au-dessus
   du texte. */
.tk-carte__boite {
	order: -1;
}

@container (min-width: 760px) {
	.tk-carte__grille {
		grid-template-columns: 1.12fr .88fr;
		gap: 46px;
	}

	.tk-carte__boite {
		order: 0;
		/* La carte reste en place (et à l'écran) quand le texte du pays
		   s'allonge, par exemple avec la liste de ses missions. */
		position: sticky;
		top: 24px;
	}

	.tk-carte__panneaux {
		align-self: center;
	}
}

.tk-carte__boite {
	background: #fff;
	border-radius: 16px;
	padding: 12px;
	box-shadow: 0 1px 3px #0000000f;
}

.tk-carte__svg {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	display: block;
	border-radius: 10px;
	touch-action: pan-y; /* un doigt fait défiler la page, deux doigts zooment */
}

.tk-mer { fill: var(--tk-mer); }

.tk-fond {
	fill: var(--tk-terre);
	stroke: #fff;
	stroke-width: 0.03;
}

.tk-pays {
	fill: var(--c, #E8871E);
	stroke: #fff;
	stroke-width: 0.03;
	cursor: pointer;
	outline: none;
	transition: filter 0.25s, stroke-width 0.25s;
}

.tk-pays:hover,
.tk-pays:focus-visible,
.tk-pays.est-vu {
	filter: brightness(1.12) saturate(1.1);
	stroke-width: 0.09;
}

/* Focus clavier bien visible : un contour foncé de 3 px à l'écran,
   quel que soit le zoom. */
.tk-pays:focus-visible {
	stroke: var(--tk-encre);
	stroke-width: 3px;
	vector-effect: non-scaling-stroke;
}

.tk-route-fond {
	fill: none;
	stroke: #fff;
	stroke-linecap: round;
}

.tk-route {
	fill: none;
	stroke: var(--tk-rouge);
	stroke-linecap: round;
	animation: tk-file 3s linear infinite;
}

@keyframes tk-file {
	to { stroke-dashoffset: var(--file, -4.69); }
}

@media (prefers-reduced-motion: reduce) {
	.tk-route { animation: none; }
}

.tk-borne {
	cursor: pointer;
	outline: none;
}

.tk-borne.est-vu { opacity: 1 !important; }
.tk-borne:focus-visible circle { stroke-width: 0.14; stroke: var(--tk-encre); }

.tk-borne circle {
	fill: #fff;
	stroke: var(--tk-rouge);
	stroke-width: 0.06;
}

/* Zone de toucher invisible (au moins 44 × 44 px), sans changer le dessin. */
.tk-carte .tk-borne .tk-borne__zone {
	fill: transparent;
	stroke: none;
	pointer-events: all;
}

.tk-borne--arrivee circle {
	fill: var(--tk-rouge);
	stroke: #fff;
}

.tk-borne text {
	font-weight: 800;
	fill: #2C3138;
	text-anchor: middle;
	paint-order: stroke;
	stroke: #fff;
	stroke-width: 0.16em;
}

.tk-ville circle {
	fill: #fff;
	stroke: var(--tk-rouge);
	stroke-width: 0.03;
}

.tk-ville text {
	font-weight: 700;
	fill: #2C3138;
	text-anchor: middle;
	paint-order: stroke;
	stroke: #fff;
	stroke-width: 0.12em;
}

/* Les textes ne doivent jamais bloquer le clic sur un pays. */
.tk-ville text,
.tk-ville circle,
.tk-lbl {
	pointer-events: none;
}

.tk-lbl {
	text-anchor: middle;
	paint-order: stroke;
	stroke: #fff;
	stroke-width: 0.16em;
}

.tk-lbl--fond {
	fill: #8A867E;
	font-weight: 600;
}

.tk-lbl--pays {
	fill: #fff;
	stroke: #00000055;
	stroke-width: 0.11em;
	font-weight: 800;
}

[data-z] { transition: opacity 0.4s; }

/* --- Les panneaux de texte ------------------------------------------- */

.tk-kicker {
	display: block;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--tk-accent-fonce);
}

.tk-carte__panneaux h2 {
	font-size: clamp(28px, 3.4vw, 40px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
	margin: 8px 0 0;
}

.tk-carte__panneaux h3 {
	font-size: 19px;
	font-weight: 800;
	margin: 0 0 10px;
}

.tk-trait {
	width: 62px;
	height: 4px;
	background: var(--tk-rouge);
	border-radius: 2px;
	margin: 18px 0 26px;
}

.tk-pan p { color: var(--tk-gris); margin-bottom: 12px; }

.tk-pan .tk-aide {
	font-size: 14px;
	color: var(--tk-accent-fonce);
	font-weight: 600;
}

.tk-carte .tk-chiffres {
	display: flex;
	background: none;   /* le thème utilise aussi .tk-chiffres (bande de l'accueil) */
	border-bottom: 0;
	gap: 30px;
	margin: 26px 0 0;
	flex-wrap: wrap;
}

.tk-chiffres b {
	display: block;
	font-size: 30px;
	font-weight: 800;
	color: var(--tk-accent-fonce);
}

.tk-chiffres span { font-size: 13px; color: var(--tk-gris); }

.tk-carte ul.tk-liste { list-style: none; margin: 18px 0 0; padding: 0; }

.tk-liste li {
	padding-left: 22px;
	position: relative;
	margin-bottom: 11px;
	font-size: 16px;
}

.tk-liste li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 8px;
	height: 8px;
	background: var(--tk-rouge);
	border-radius: 2px;
}

.tk-carte ul.tk-choix {
	list-style: none;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin: 22px 0 16px;
	padding: 0;
}

.tk-choix button {
	min-height: 44px;
	background: #fff;
	border: 1px solid var(--tk-trait);
	border-radius: 11px;
	padding: 13px 18px 13px 15px;
	cursor: pointer;
	text-align: left;
	font: inherit;
	transition: 0.2s;
	display: flex;
	align-items: center;
	gap: 11px;
}

.tk-choix button:hover {
	border-color: var(--c);
	transform: translateY(-2px);
}

.tk-choix i {
	width: 13px;
	height: 13px;
	border-radius: 4px;
	background: var(--c);
	flex: none;
}

.tk-choix b { display: block; font-size: 16px; }
.tk-choix span { font-size: 13px; color: var(--tk-gris); }
.tk-choix .tk-choix__texte { display: block; font-size: inherit; color: inherit; }

/* Le pays ouvert reste repérable dans la liste. */
.tk-choix button[aria-expanded="true"] {
	border-color: var(--tk-encre);
	box-shadow: inset 0 0 0 1px var(--tk-encre);
}

.tk-carte .tk-retour {
	display: flex;
	align-items: center;
	min-height: 44px; /* cible confortable au doigt */
	background: none;
	border: 0;
	color: var(--tk-accent-fonce);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	padding: 0 4px 0 0;
	margin-bottom: 6px;
}

.tk-carte .tk-retour:hover { text-decoration: underline; }

.tk-lieux {
	font-size: 14px;
	line-height: 1.7;
	background: #fff;
	border-radius: 10px;
	padding: 16px 18px;
	margin-top: 18px;
}

/* Le thème peut resserrer les lettres de tout le site (letter-spacing en px).
   Dans la carte, une lettre ne mesure qu'une fraction d'unité : ce réglage
   empilerait les lettres les unes sur les autres. On le neutralise. */
.tk-carte__svg text {
	letter-spacing: normal;
	word-spacing: normal;
	text-transform: none;
}



/* Le thème espace les éléments de liste (.tk-contenu li + li) : la carte
   gère ses propres écarts. */
.tk-carte ul.tk-choix li,
.tk-carte ul.tk-carte-legende__liste li,
.tk-carte ul.tk-missions-pays__liste li { margin-top: 0; }

/* --- V2 : légende sous la carte -------------------------------------- */

.tk-carte-legende {
	margin-top: 12px;
	padding: 4px 4px 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--tk-encre);
}

.tk-carte-legende__titre {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tk-gris);
}

.tk-carte ul.tk-carte-legende__liste {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
}

.tk-carte-legende__liste li {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	overflow-wrap: anywhere;
}

.tk-carte-legende__liste i {
	flex: none;
	display: inline-block;
	width: 16px;
	height: 16px;
	border-radius: 4px;
	box-sizing: border-box;
}

/* Les pastilles de couleur sont bordées de foncé pour rester visibles
   (contraste d'au moins 3:1 avec le fond blanc). */
.tk-carte-legende__pays {
	background: var(--c, #E8871E);
	border: 1px solid #14161A99;
}

.tk-carte-legende__fond {
	background: var(--tk-terre);
	border: 1px solid #8A867E;
}

.tk-carte-legende__trajet {
	height: 0 !important;
	width: 22px !important;
	border-radius: 0 !important;
	border-top: 3px dashed var(--tk-rouge);
}

.tk-carte-legende__depart {
	border-radius: 50% !important;
	background: #fff;
	border: 3px solid var(--tk-rouge);
}

.tk-carte-legende__arrivee {
	border-radius: 50% !important;
	background: var(--tk-rouge);
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--tk-rouge);
}

.tk-carte .tk-pause {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-top: 4px;
	padding: 0 2px;
	background: none;
	border: 0;
	color: var(--tk-accent-fonce);
	font-weight: 600;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}

/* Bouton appuyé : « (arrêtée) » s'affiche et le lien n'est plus souligné. */
.tk-pause__etat { display: none; }
.tk-carte .tk-pause[aria-pressed="true"] {
	color: var(--tk-encre);
	text-decoration: none;
}
.tk-pause[aria-pressed="true"] .tk-pause__etat { display: inline; margin-left: 0.3em; }

.tk-carte--immobile .tk-route { animation: none; }

/* --- V2 : missions du pays ------------------------------------------- */

.tk-missions-pays {
	margin: 18px 0 22px;
}

.tk-carte__panneaux .tk-missions-pays h3 {
	font-size: 17px;
	margin: 0 0 10px;
}

.tk-carte ul.tk-missions-pays__liste {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.tk-carte .tk-missions-pays__liste a {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	box-sizing: border-box;
	padding: 11px 14px;
	background: #fff;
	border: 1px solid var(--tk-trait);
	border-radius: 11px;
	color: var(--tk-encre);
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: border-color 0.2s;
}

.tk-carte .tk-missions-pays__liste a:hover { border-color: var(--tk-accent-fonce); }
.tk-carte .tk-missions-pays__liste a:hover b { text-decoration: underline; }

.tk-missions-pays__photo {
	flex: none;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.tk-missions-pays__texte { display: block; min-width: 0; flex: 1; }

.tk-missions-pays__resultat {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	color: var(--tk-gris);
}

.tk-missions-pays__resultat strong { color: var(--tk-encre); font-weight: 800; }

.tk-missions-pays__liste b {
	display: block;
	font-size: 16px;
	line-height: 1.3;
}

.tk-missions-pays__infos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin-top: 4px;
	font-size: 13px;
	color: var(--tk-gris);
}

/* Le statut est écrit en toutes lettres : la couleur n'est qu'un repère. */
.tk-statut-carte {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
	/* Mêmes couleurs que la pastille de la page /missions/ (thème, missions.css). */
	background: var(--tk-encre, #15171C);
	color: #fff;
}

.tk-statut-carte--en-cours { background: #B0242A; }
.tk-statut-carte--preparation { background: #0E2A44; }

.tk-carte a.tk-toutes-missions {
	color: var(--tk-accent-fonce);
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-size: 14px;
	font-weight: 600;
}

/* --- V2 : clavier et lecteurs d'écran -------------------------------- */

/* Texte lu par les lecteurs d'écran, invisible à l'écran. */
.tk-carte .tk-lecteur {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.tk-carte button:focus-visible,
.tk-carte a:focus-visible {
	outline: 3px solid var(--tk-encre);
	outline-offset: 2px;
}

/* Titre focalisé par le script quand un panneau s'ouvre. */
.tk-pan h2[tabindex]:focus { outline: none; }
.tk-pan h2[tabindex]:focus-visible {
	outline: 3px solid var(--tk-encre);
	outline-offset: 4px;
}

/* Rien ne doit déborder sur un écran de 320 px. */
.tk-carte,
.tk-carte__grille > * { min-width: 0; }
.tk-pan { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
	.tk-pays,
	.tk-choix button,
	.tk-missions-pays__liste a,
	[data-z] { transition: none; }
	.tk-choix button:hover { transform: none; }
	.tk-carte .tk-pause { display: none; }
}
