/*
 * Page du glossaire — liste A–Z (maquette « Glossaire »).
 *
 * Le hero (bandeau bleu + H1) est un bloc Kadence de la page, éditable : rien ici.
 *
 * Couleurs : UNIQUEMENT les six couleurs de la charte du site, par leurs variables existantes
 * (--ipdc-*) avec la valeur de la charte en repli. Aucune autre couleur, aucune variable nouvelle.
 *   navy #04162F · yellow #FFCC02 · purple #DFC8FF · blue #B9E9FF · cream #FFFDED · beige #F5F1D8
 * Le texte est toujours navy ; jaune / lavande / ciel / beige servent de FOND.
 */
.ipg {
	color: var(--ipdc-navy, #04162F);
}

/* ---------- Navigation alphabétique : deux rangées centrées de carrés beiges ---------- */

.ipg-az {
	margin: 0 auto 64px;
	max-width: 1000px;
}

/* Sélecteur volontairement spécifique : le thème pose un retrait sur toutes les listes du contenu. */
.ipg .ipg-az > ul.ipg-az__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	padding-left: 0;
	list-style: none;
}

.ipg-az__item {
	margin: 0;
}

.ipg-az__link,
.ipg-az__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;   /* cible tactile — WCAG 2.5.8 */
	height: 44px;
	border-radius: 8px;
	background: var(--ipdc-beige, #F5F1D8);
	color: var(--ipdc-navy, #04162F);
	font-size: 22px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ipg-az__link:hover,
.ipg-az__link:focus-visible {
	background: var(--ipdc-navy, #04162F);
	color: var(--ipdc-cream, #FFFDED);
}

.ipg-az__link:focus-visible {
	outline: 2px solid var(--ipdc-navy, #04162F);
	outline-offset: 3px;
}

/* Lettre sans terme : même carré, texte atténué ; l’absence est aussi annoncée en texte masqué. */
.ipg-az__empty {
	opacity: 0.45;
}

/* ---------- Sections par lettre ---------- */

.ipg-section {
	margin: 0 0 64px;
}

.ipg-section:last-child {
	margin-bottom: 0;
}

/* Sélecteurs renforcés : le thème stylise h2, h3 et p du contenu avec une spécificité supérieure à une simple classe. */
.ipg .ipg-section > h2.ipg-letter {
	display: flex;
	align-items: center;
	margin: 0 0 48px;
}

.ipg-letter:focus-visible {
	outline: 2px solid var(--ipdc-navy, #04162F);
	outline-offset: 6px;
	border-radius: 8px;
}

/* Pastille de lettre : jaune, lavande, ciel — en cycle, comme la maquette. */
.ipg-letter__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 8px;
	color: var(--ipdc-navy, #04162F);
	font-size: 32px;
	font-weight: 600;
	line-height: 1;
}

.ipg-letter__badge--1 { background: var(--ipdc-yellow, #FFCC02); }
.ipg-letter__badge--2 { background: var(--ipdc-purple, #DFC8FF); }
.ipg-letter__badge--3 { background: var(--ipdc-blue, #B9E9FF); }

/* ---------- Fiches ---------- */

/* Sélecteur volontairement spécifique : le thème pose un retrait sur toutes les listes du contenu. */
.ipg .ipg-section > ul.ipg-list {
	margin: 0;
	padding: 0;
	padding-left: 0;
	list-style: none;
}

.ipg-entry {
	margin: 0 0 48px;
}

.ipg-entry:last-child {
	margin-bottom: 0;
}

.ipg-entry__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	margin: 0 0 16px;
}

.ipg .ipg-section h3.ipg-entry__title {
	margin: 0;
	font-size: 32px;
	font-style: italic;
	font-weight: 700;
	line-height: 1.2;
}

.ipg-entry__title dfn {
	font-style: inherit;
}

/* Le titre reçoit le focus à l’arrivée sur l’ancre : l’anneau doit être visible. */
.ipg-entry__title:focus-visible {
	outline: 2px solid var(--ipdc-navy, #04162F);
	outline-offset: 6px;
	border-radius: 4px;
}

/* Même rythme typographique pour le développement et les paragraphes de la définition. */
.ipg .ipg-section p,
.ipg .ipg-entry__expansion,
.ipg .ipg-entry__def {
	color: var(--ipdc-navy, #04162F);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.5;
}

.ipg .ipg-section p {
	margin: 0 0 20px;
}

.ipg-entry__def > *:first-child { margin-top: 0; }
.ipg-entry__def > *:last-child  { margin-bottom: 0; }

.ipg-entry__def ul,
.ipg-entry__def ol {
	margin: 0 0 20px;
	padding-left: 1.4em;
}

.ipg-entry__def li {
	margin: 0 0 0.35em;
}

.ipg .ipg-section p.ipg-entry__more {
	margin: 20px 0 0;
	font-weight: 600;
}

.ipg .ipg-section p.ipg-entry__source {
	margin: 20px 0 0;
	font-size: 15px;
	font-weight: 500;
}

/* ---------- Permalien copiable : carré beige, icône lien ---------- */

.ipg-permalink {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;   /* cible tactile — WCAG 2.5.8 */
	height: 44px;
	border-radius: 8px;
	background: var(--ipdc-beige, #F5F1D8);
	color: var(--ipdc-navy, #04162F);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ipg-permalink:hover,
.ipg-permalink:focus-visible {
	background: var(--ipdc-navy, #04162F);
	color: var(--ipdc-cream, #FFFDED);
}

.ipg-permalink:focus-visible {
	outline: 2px solid var(--ipdc-navy, #04162F);
	outline-offset: 3px;
}

/* Confirmation de copie, à l’ACTIVATION (pas au survol : hors WCAG 1.4.13). Aucun attribut title. */
.ipg-permalink.is-copied::after {
	content: attr(data-ipg-copied);
	position: absolute;
	bottom: calc(100% + 6px);
	right: 0;
	z-index: 60;
	padding: 0.3em 0.7em;
	border-radius: 6px;
	background: var(--ipdc-navy, #04162F);
	color: var(--ipdc-cream, #FFFDED);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	pointer-events: none;
}

.ipg-permalink__icon {
	pointer-events: none;
}

.ipg-empty {
	font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
	.ipg-az__link,
	.ipg-permalink { transition: none; }
}

/* ---------- Tablette : rythme réduit d’un cran ---------- */
@media (max-width: 1024px) {
	.ipg-az { margin-bottom: 56px; }
	.ipg-section { margin-bottom: 56px; }
	.ipg .ipg-section > h2.ipg-letter { margin-bottom: 40px; }
	.ipg-entry { margin-bottom: 40px; }
	.ipg .ipg-section h3.ipg-entry__title { font-size: 28px; }
}

/* ---------- Mobile : carrés 44 px centrés, titres 24 px, texte 16 px ---------- */
@media (max-width: 767px) {
	.ipg-az { margin-bottom: 48px; }
	.ipg .ipg-az > ul.ipg-az__list { gap: 12px; justify-content: center; }
	.ipg-az__link, .ipg-az__empty { font-size: 20px; }
	.ipg-section { margin-bottom: 48px; }
	.ipg .ipg-section > h2.ipg-letter { margin-bottom: 32px; }
	.ipg-letter__badge { font-size: 28px; }
	.ipg-entry { margin-bottom: 32px; }
	.ipg-entry__head { gap: 16px; margin-bottom: 12px; }
	.ipg .ipg-section h3.ipg-entry__title { font-size: 24px; line-height: 1.25; }
	.ipg .ipg-section p,
	.ipg .ipg-entry__expansion,
	.ipg .ipg-entry__def { font-size: 16px; }
	.ipg .ipg-section p { margin-bottom: 16px; }
}
