diff --git a/ecrire/inc/filtres.php b/ecrire/inc/filtres.php
index 914fe09a864170010485c841d377feb953c592e3..6e17085f05d3bc8ca5367557d0cc4c4500f41226 100644
--- a/ecrire/inc/filtres.php
+++ b/ecrire/inc/filtres.php
@@ -1396,13 +1396,13 @@ function calcul_pagination($total, $nom, $pas, $liste = true) {
 	$debut = 'debut'.$nom;
 
 	$pagination = array(
-		'lien_base' => self(),
+		'lien_base' => parametre_url(self(),'ahah_id',''), // nettoyer l'id ahah eventuel
 		'total' => $total,
 		'position' => intval(_request($debut)),
 		'pas' => $pas,
 		'nombre_pages' => floor(($total-1)/$pas)+1,
 		'page_courante' => floor(intval(_request($debut))/$pas)+1,
-		'lien_pagination' => '<a href="@url@">@item@</a>',
+		'lien_pagination' => '<a href="@url@" class="lien_pagination">@item@</a>',
 		'lien_item_courant' => '<span class="on">@item@</span>'
 	);
 
diff --git a/ecrire/public/compiler.php b/ecrire/public/compiler.php
index 526cdc82655c9ca8692bd037f7c5393023c3bd6b..2b2fc50cbc1382bbab509b8ca0415c052e859c1a 100644
--- a/ecrire/public/compiler.php
+++ b/ecrire/public/compiler.php
@@ -435,6 +435,7 @@ function compile_cas($tableau, $descr, &$boucles, $id_boucle) {
 	// par un caractere distinguant le cas, pour exploitation par debug.
 	foreach ($tableau as $p) {
 
+		$ahah_out = false;
 		switch($p->type) {
 		// texte seul
 		case 'texte':
@@ -488,6 +489,8 @@ function compile_cas($tableau, $descr, &$boucles, $id_boucle) {
 				$newdescr, $boucles, $id_boucle);
 			$apres = calculer_liste($p->apres,
 				$newdescr, $boucles, $id_boucle);
+			if ($boucles[$nom]->mode_partie=='p+')
+				$ahah_out = array($nom,$descr['nom']);
 			$newdescr['niv']--;
 			$altern = calculer_liste($p->altern,
 				$newdescr, $boucles, $id_boucle);
@@ -541,6 +544,10 @@ function compile_cas($tableau, $descr, &$boucles, $id_boucle) {
 				$code = "((strval($t = $code)!='')"
 					." ?\n\t$tab($res) :\n\t$tab($altern))";
 			}
+			if ($ahah_out!==false){
+				$code = "(\$ahah = '<div id=\"$ahah_out[0]_$ahah_out[1]\" class=\"bloc_ahah_pagination $ahah_out[0] $ahah_out[1]\">'.$code.'</div>').
+				((\$_GET['ahah_id']=='$ahah_out[0]_$ahah_out[1]')?die(\$ahah):'')";
+			}
 		}
 		if ($code != "''")
 			$codes[]= (($mode == 'validation') ?