/*
 * Tuile « Votre interlocuteur au conseil municipal » (0.8.21, 28/11/2026) : en haut à
 * droite des pages des modules (devant le titre, qui passe à côté), palette grise et
 * relief des pages des élus et des salles. Mobile : une ligne qui déplie la tuile.
 */
.etika-interloc {
	--eil-encre: #243b53;
	--eil-gris: #52606d;
	--eil-trait: #e5e9f2;
	--eil-accent: var(--global-palette1, #2b6cb0);
	box-sizing: border-box;
	float: right;
	clear: right;
	position: relative;
	z-index: 2;
	width: 490px; /* plus large (28/11/2026) : le titre tient sur une ligne */
	max-width: 100%;
	margin: 18px 0 18px 46px; /* place pour la pastille qui déborde en haut et à gauche */
	border-radius: 14px;
	background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
	box-shadow: 0 0 0 1px var(--eil-trait), 0 1px 2px rgba(13, 27, 62, .06), 0 4px 14px rgba(13, 27, 62, .08);
	color: var(--eil-encre);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.4;
	text-align: left;
}
.etika-interloc *, .etika-interloc *::before, .etika-interloc *::after { box-sizing: border-box; }
.etika-interloc-seule { display: flow-root; }
.etika-interloc-seule .etika-interloc { float: none; margin: 0 0 24px auto; }

.etika-interloc .eil-details { margin: 0; padding: 0; border: 0; }
.etika-interloc .eil-titre {
	display: flex; align-items: center; gap: 6px; margin: 0; padding: 16px 18px 0 136px; white-space: nowrap;
	list-style: none; cursor: default;
	font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #486581;
}
.etika-interloc .eil-titre::-webkit-details-marker { display: none; }
.etika-interloc .eil-titre::marker { content: ""; }
.etika-interloc .eil-resume, .etika-interloc .eil-ouvrir { display: none; }

.etika-interloc .eil-corps { padding: 8px 18px 16px 136px; min-height: 104px; }
.etika-interloc ul.eil-slides { margin: 0; padding: 0; list-style: none; }
.etika-interloc .eil-slide { display: block; margin: 0; padding: 0; }
.etika-interloc:not(.eil-js) .eil-slide + .eil-slide { margin-top: 14px; }
.etika-interloc:not(.eil-js) .eil-slide + .eil-slide .eil-photo { position: static; width: 64px; height: 64px; margin-bottom: 8px; border-width: 2px; }
/* Plusieurs élus : tous dans la même case, un seul visible (le texte glisse, la photo s'efface) */
.etika-interloc.eil-js ul.eil-slides { display: grid; }
.etika-interloc.eil-js .eil-slide { grid-area: 1 / 1; visibility: hidden; }
.etika-interloc.eil-js .eil-slide.is-active,
.etika-interloc.eil-js .eil-slide.eil-sort-g,
.etika-interloc.eil-js .eil-slide.eil-sort-d { visibility: visible; }
.etika-interloc .eil-sort-g .eil-texte { animation: eil-sort-g .4s ease-in-out both; }
.etika-interloc .eil-sort-d .eil-texte { animation: eil-sort-d .4s ease-in-out both; }
.etika-interloc .eil-entre-d .eil-texte { animation: eil-entre-d .4s ease-in-out both; }
.etika-interloc .eil-entre-g .eil-texte { animation: eil-entre-g .4s ease-in-out both; }
.etika-interloc .eil-sort-g .eil-photo, .etika-interloc .eil-sort-d .eil-photo, .etika-interloc .eil-sort-g .eil-flou-cadre, .etika-interloc .eil-sort-d .eil-flou-cadre { animation: eil-photo-sort .25s ease-out both; }
.etika-interloc .eil-entre-d .eil-photo, .etika-interloc .eil-entre-g .eil-photo, .etika-interloc .eil-entre-d .eil-flou-cadre, .etika-interloc .eil-entre-g .eil-flou-cadre { animation: eil-photo-entre .25s ease-out both; }
/* L'élu qui arrive passe toujours devant celui qui part (28/11/2026) : à la boucle (du
   dernier au premier), l'ordre du code mettait l'ancien devant ; titre, chevrons et bouton
   « Replier » restent au-dessus des élus. Images à l'abri des transitions du thème. */
.etika-interloc.eil-js .eil-slide { z-index: 1; }
.etika-interloc.eil-js .eil-slide.is-active { z-index: 2; }
.etika-interloc .eil-replier { z-index: 3; }
/* Le texte qui glisse reste dans sa colonne, sans passer sur la photo (28/11/2026) : la
   liste coupe ce qui dépasse ; la photo, placée par rapport à la tuile, n'est pas coupée.
   Marge intérieure pour garder les ombres des badges et le contour du focus. */
.etika-interloc.eil-js ul.eil-slides { overflow: hidden; margin: -6px -8px; padding: 6px 8px; }
.etika-interloc .eil-slide img { transition: none; animation: none; }
/* Fondu des photos plus rapide (0,25 s) et texte en 0,4 s (28/11/2026) */
/* Les deux textes ne se montrent jamais en même temps (28/11/2026) : l'ancien a disparu à
   mi-parcours, le nouveau n'apparaît qu'ensuite (sinon « élue » laissait voir son « e »
   derrière « élu ») */
@keyframes eil-sort-g { 0% { transform: translateX(0); opacity: 1; } 45% { opacity: 0; } 100% { transform: translateX(-60px); opacity: 0; } }
@keyframes eil-sort-d { 0% { transform: translateX(0); opacity: 1; } 45% { opacity: 0; } 100% { transform: translateX(60px); opacity: 0; } }
@keyframes eil-entre-d { 0% { transform: translateX(60px); opacity: 0; } 50% { opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes eil-entre-g { 0% { transform: translateX(-60px); opacity: 0; } 50% { opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes eil-photo-sort { from { opacity: 1; } to { opacity: 0; } }
@keyframes eil-photo-entre { from { opacity: 0; } to { opacity: 1; } }

/* Pastille dans le coin haut gauche, un peu mangée par le bord (28/11/2026) */
.etika-interloc .eil-photo {
	position: absolute; top: -18px; left: -18px; z-index: 1;
	display: flex; align-items: center; justify-content: center; width: 132px; height: 132px; overflow: hidden; border-radius: 50%;
	border: 4px solid #fff; background: linear-gradient(145deg, #829ab1, #486581); color: #fff;
	box-shadow: none; /* bord blanc seul, sans ombre (28/11/2026) */
}
/* Fond flou de la photo, qui déborde sous le texte comme les tuiles en paysage d'« À la une » ;
   coupé par un cadre aux dimensions de la tuile (la pastille, elle, déborde) */
.etika-interloc .eil-flou-cadre { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: 14px; pointer-events: none; }
.etika-interloc .eil-flou {
	position: absolute; top: -50px; left: -50px; width: 200px; height: 200px; border-radius: 50%;
	background-size: cover; background-repeat: no-repeat; filter: blur(26px) saturate(1.15); opacity: .55; pointer-events: none;
}
.etika-interloc .eil-titre, .etika-interloc .eil-texte, .etika-interloc .eil-nav { position: relative; }
.etika-interloc .eil-texte { z-index: 1; }
.etika-interloc .eil-titre, .etika-interloc .eil-nav { z-index: 3; }
.etika-interloc .eil-photo img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; border-radius: 50%; }
.etika-interloc .eil-texte { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.etika-interloc .eil-nom { font-size: 16px; font-weight: 600; color: var(--eil-encre); overflow-wrap: anywhere; }
/* Fonction en badge : même relief clair que les cartes des élus */
.etika-interloc .eil-fonction {
	/* Relief plus marqué (28/11/2026) : comme le badge de la visionneuse */
	padding: 2px 10px; border-radius: 999px;
	background: linear-gradient(180deg, #ffffff 0%, #e8eef4 50%, #c9d5e2 100%); color: #243b53;
	box-shadow: 0 3px 7px -3px rgba(36, 59, 83, .6), 0 1px 2px rgba(36, 59, 83, .25), inset 0 1px 0 #fff, inset 0 -2px 3px rgba(72, 101, 129, .2);
	text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
	font-size: 12px; font-weight: 600;
}
/* Lien : icône « Mail », gris clair, sans soulignement (28/11/2026) ; 4,8:1 sur le fond */
.etika-interloc a.eil-contact {
	display: inline-flex; align-items: center; gap: 7px; margin-top: 4px;
	color: #5f6f82; font-size: 14px; font-weight: 600; text-decoration: none;
}
.etika-interloc a.eil-contact svg { flex: none; }
.etika-interloc a.eil-contact:hover { color: #334e68; }
.etika-interloc a.eil-contact:focus-visible, .etika-interloc .eil-bouton:focus-visible, .etika-interloc .eil-titre:focus-visible {
	outline: 3px solid var(--eil-accent); outline-offset: 2px; border-radius: 4px;
}
/* Pastille cliquable : ouvre la photo dans la visionneuse (28/11/2026) */
.etika-interloc button.eil-agrandir { display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; cursor: zoom-in; }
.etika-interloc button.eil-agrandir:hover img { filter: brightness(1.08); }
.etika-interloc button.eil-agrandir:focus-visible { outline: 3px solid var(--eil-accent); outline-offset: 2px; }
.etika-interloc .eil-photo:has(.eil-agrandir:focus-visible) { overflow: visible; }

/* Plusieurs élus : chevrons, rang, arrêt du défilement */
.etika-interloc .eil-nav { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.etika-interloc .eil-nav[hidden] { display: none; }
.etika-interloc .eil-compte { margin-right: auto; font-size: 12px; color: var(--eil-gris); }
.etika-interloc .eil-bouton {
	display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 0; padding: 0;
	border: 1px solid var(--eil-trait); border-radius: 50%; background: #fff; color: var(--eil-encre); cursor: pointer;
	box-shadow: 0 1px 3px rgba(13, 27, 62, .08);
}
.etika-interloc .eil-bouton:hover { border-color: #9fb3c8; background: #f6f8fb; }

/* Mobile : pleine largeur, une ligne qui déplie la tuile */
@media (max-width: 700px) {
	.etika-interloc { float: none; width: auto; margin: 14px 0 20px 10px; }
	.etika-interloc .eil-photo { top: -12px; left: -10px; width: 100px; height: 100px; border-width: 3px; }
	.etika-interloc .eil-flou { top: -40px; left: -40px; width: 160px; height: 160px; }
	.etika-interloc .eil-corps { padding: 8px 14px 14px 100px; min-height: 92px; }
	/* Une phrase : « Votre interlocuteur au conseil municipal : Mme X », chevron à droite */
	.etika-interloc .eil-titre {
		display: block; position: relative; padding: 12px 44px 12px 14px; cursor: pointer; white-space: normal;
		font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--eil-gris); line-height: 1.45;
	}
	.etika-interloc .eil-details[open] .eil-titre { padding: 12px 40px 0 100px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #486581; }
	.etika-interloc .eil-resume { display: inline; font-weight: 600; color: var(--eil-encre); }
	.etika-interloc .eil-details[open] .eil-resume { display: none; }
	.etika-interloc .eil-ouvrir { display: block; position: absolute; top: 50%; right: 14px; margin-top: -8px; transition: transform .2s; }
	.etika-interloc .eil-details[open] .eil-ouvrir { top: 14px; margin-top: 0; transform: rotate(180deg); }
}
@media (prefers-reduced-motion: reduce) {
	.etika-interloc .eil-ouvrir { transition: none; }
	.etika-interloc .eil-slide .eil-texte, .etika-interloc .eil-slide .eil-photo, .etika-interloc .eil-slide .eil-flou-cadre { animation: none !important; }
}

/*
 * Menu flottant (essai du 28/11/2026, Lucie) : en bas à droite de l'écran, la tuile se
 * replie au bout de quelques secondes en une pastille (photos + nom) qui la redéplie.
 * Sans script : la tuile reste ouverte (la pastille est cachée).
 */
.etika-interloc.eil-flottant {
	position: fixed; right: 24px; bottom: 24px; z-index: 9990; float: none;
	width: 490px; max-width: calc(100vw - 66px); margin: 0;
	background: none; box-shadow: none;
}
/* Ordinateur (28/11/2026) : sur le bord droit, le script le place à la hauteur du haut du
   bloc, puis le garde en haut de l'écran, sous l'en-tête collé (top en ligne) */
.etika-interloc.eil-flottant.eil-ancre-js { bottom: auto; }
/* Bouton « remonter en haut » de Kadence au même coin : le menu passe au-dessus */
body:has(#kt-scroll-up) .etika-interloc.eil-flottant:not(.eil-ancre-js) { bottom: 84px; }
/* Le conteneur ne capte pas la souris, seuls la carte et la pastille (28/11/2026) : il
   s'étirait du haut au bas de l'écran (top et bottom à la fois) et cachait le survol des
   tuiles de la page */
.etika-interloc.eil-flottant { pointer-events: none; }
.etika-interloc.eil-flottant > * { pointer-events: auto; }
.etika-interloc.eil-flottant .eil-details {
	position: relative; border-radius: 14px;
	background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
	box-shadow: 0 0 0 1px var(--eil-trait), 0 4px 10px rgba(13, 27, 62, .08), 0 22px 44px -14px rgba(13, 27, 62, .38);
	transform-origin: 100% 100%;
	animation: eil-deplie .34s cubic-bezier(.2, .8, .2, 1) both;
}
.etika-interloc.eil-flottant.eil-repli .eil-details { animation: eil-replie .26s ease-in both; }
.etika-interloc.eil-flottant.eil-ferme { width: auto; }
.etika-interloc.eil-flottant.eil-ferme .eil-details { display: none; }
@keyframes eil-deplie { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes eil-replie { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(14px) scale(.9); } }

/* Replier : petit bouton rond au coin haut droit de la tuile */
.etika-interloc .eil-replier {
	position: absolute; top: -12px; right: -12px; z-index: 3;
	display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 0; padding: 0;
	border: 1px solid var(--eil-trait); border-radius: 50%; background: #fff; color: var(--eil-gris); cursor: pointer;
	box-shadow: 0 2px 6px rgba(13, 27, 62, .16);
}
.etika-interloc .eil-replier:hover { border-color: #9fb3c8; color: var(--eil-encre); }
.etika-interloc .eil-replier:focus-visible, .etika-interloc .eil-mini:focus-visible { outline: 3px solid var(--eil-accent); outline-offset: 2px; }

/* Pastille repliée : photos en pile, « Votre interlocuteur » et le nom */
.etika-interloc .eil-mini {
	display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 6px 18px 6px 6px;
	border: 0; border-radius: 999px; background: linear-gradient(180deg, #ffffff 0%, #f1f4f8 100%);
	box-shadow: 0 0 0 1px var(--eil-trait), 0 10px 24px -8px rgba(13, 27, 62, .35);
	font: inherit; text-align: left; color: var(--eil-encre); cursor: pointer;
	animation: eil-mini-entre .3s cubic-bezier(.2, .8, .2, 1) both;
	transition: transform .2s ease, box-shadow .2s ease;
}
.etika-interloc .eil-mini[hidden] { display: none; }
.etika-interloc .eil-mini:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #c5cfdb, 0 14px 28px -8px rgba(13, 27, 62, .4); }
@keyframes eil-mini-entre { from { opacity: 0; transform: translateY(10px) scale(.85); } to { opacity: 1; transform: none; } }
.etika-interloc .eil-mini-photos { display: flex; flex: none; }
.etika-interloc .eil-mini-photo {
	display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; overflow: hidden; border-radius: 50%;
	border: 2px solid #fff; background: linear-gradient(145deg, #829ab1, #486581); color: #fff;
	box-shadow: 0 1px 3px rgba(13, 27, 62, .2);
}
.etika-interloc .eil-mini-photo + .eil-mini-photo { margin-left: -18px; }
.etika-interloc .eil-mini-photo img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; }
.etika-interloc .eil-mini-texte { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.25; }
.etika-interloc .eil-mini-titre { font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #486581; white-space: nowrap; }

/* Essai (28/11/2026) : chevrons et compteur sous la photo, resserrés, à gauche et toujours
   dans la tuile ; photo agrandie (148 px) pour leur laisser la place ; la colonne du texte
   ne porte plus la navigation */
.etika-interloc.eil-flottant { width: 506px; }
.etika-interloc.eil-flottant .eil-photo { width: 148px; height: 148px; }
.etika-interloc.eil-flottant .eil-titre { padding-left: 152px; }
.etika-interloc.eil-flottant .eil-corps { padding-left: 152px; }
.etika-interloc.eil-flottant.eil-js .eil-details { min-height: 176px; }
.etika-interloc.eil-flottant .eil-nav {
	position: absolute; top: 138px; left: 10px; z-index: 3; width: auto; margin: 0;
	justify-content: flex-start; gap: 3px;
}
.etika-interloc.eil-flottant .eil-compte { margin: 0 2px; min-width: 28px; text-align: center; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.etika-interloc.eil-flottant .eil-bouton { width: 24px; height: 24px; }
.etika-interloc.eil-flottant .eil-bouton svg { width: 13px; height: 13px; }

/* Mobile : la tuile flottante garde son titre (pas de ligne repliable) */
@media (max-width: 700px) {
	/* Largeur prise sur la fenêtre sans la barre de défilement (100 % d'un élément fixe, et non
	   100vw, 28/11/2026) : 22 px à gauche pour la photo qui déborde, 24 px à droite pour le
	   bouton « Replier » posé à cheval sur le coin */
	.etika-interloc.eil-flottant { right: 12px; bottom: 12px; max-width: calc(100% - 46px); }
	body:has(#kt-scroll-up) .etika-interloc.eil-flottant:not(.eil-ancre-js):not(.eil-mobile-js) { bottom: 68px; }
	/* Placé par le script à côté du bouton « remonter en haut » : on le voit glisser */
	.etika-interloc.eil-flottant.eil-mobile-js { transition: left .35s ease, bottom .35s ease; }
	.etika-interloc.eil-flottant .eil-titre,
	.etika-interloc.eil-flottant .eil-details[open] .eil-titre {
		display: block; padding: 12px 18px 0 112px; cursor: default; white-space: normal;
		font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #486581;
	}
	.etika-interloc.eil-flottant .eil-resume, .etika-interloc.eil-flottant .eil-ouvrir { display: none; }
	.etika-interloc .eil-mini { padding-right: 14px; }
	.etika-interloc .eil-mini-photo { width: 42px; height: 42px; }
	.etika-interloc.eil-flottant .eil-photo { width: 112px; height: 112px; }
	.etika-interloc.eil-flottant .eil-corps { padding-left: 112px; }
	.etika-interloc.eil-flottant.eil-js .eil-details { min-height: 140px; }
	/* Chevrons en bas à gauche de la carte, sous la photo et sous le texte (28/11/2026) :
	   la colonne du texte, étroite, ne les touche plus */
	.etika-interloc.eil-flottant .eil-nav { top: auto; bottom: 10px; left: 10px; gap: 4px; }
	.etika-interloc.eil-flottant.eil-js .eil-corps { padding-bottom: 46px; }
	.etika-interloc.eil-flottant .eil-bouton { width: 22px; height: 22px; }
}
/* Fiche ouverte en grand (modale des listes) : le menu flottant disparaît (28/11/2026). La
   modale rend le reste de la page inerte, menu compris : resté visible par-dessus, il
   bloquait le défilement de la fiche quand le doigt partait de lui (mobile). */
.etika-interloc.eil-flottant[inert],
body:has(.el-modale-overlay.is-visible) .etika-interloc.eil-flottant { display: none; }
@media print {
	.etika-interloc.eil-flottant { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.etika-interloc.eil-flottant .eil-details, .etika-interloc .eil-mini { animation: none !important; transition: none; }
	.etika-interloc.eil-flottant.eil-mobile-js { transition: none; }
	.etika-interloc .eil-mini:hover { transform: none; }
}
