@charset "UTF-8";

/* =====================================================================
   PANAFIVE — LE COMPTOIR, LA DISCUSSION GÉNÉRALE
   =====================================================================
   CE QUE CETTE FEUILLE NE REDESSINE PAS
   ---------------------------------------------------------------------
   Les messages sont ceux de la messagerie (messagerie.css), la coquille
   et les pastilles de rôle ceux des registres (registre.css), les
   étiquettes le composant `.chip`, les états le composant `.prefix`, la
   case de saisie le composeur commun. Il ne reste ici que ce que le
   Comptoir a de PROPRE : la liste des sujets, l'en-tête d'un sujet,
   l'encart « Où on en est », les moments repliés, le passage surligné.

   ⚠ messagerie.css EST HORS COUCHE : ce qu'elle pose sur `.mp-msg` ou
   `.mp-messages` l'emporte sur tout ce qui est écrit ici, quelle que soit
   la spécificité. D'où, plus bas, le pli d'un moment qui reprend son
   remplissage de 1rem — c'est celui que `.mp-msg` suppose de son parent.

   Les classes portent le préfixe `ctr-` : `cpt-` est celui de « Mon
   compte ».
   ===================================================================== */

@layer components {

	/* -----------------------------------------------------------------
	   LES MESURES DU TEXTE LONG — le patron de la vitrine
	   (`--feat-texte`, fonctionnalites.css) : le texte qu'on LIT descend
	   un cran sous le corps du site, l'interligne s'ouvre, la ligne se
	   borne à soixante-six signes.
	   ----------------------------------------------------------------- */
	.ctr-racine {
		--ctr-texte:    clamp(.86rem, .84rem + .12vw, .92rem);
		--ctr-texte-lh: 1.72;
		--ctr-mesure:   66ch;

		/* Le filet d'accent des blocs qui en portent un (encart, réponse
		   retenue, message d'origine). Un ESPACE et non un contour : il
		   doit rester visible quand le membre a choisi « aucun contour ». */
		--ctr-accent: var(--space-1);

		/* Deux durées que l'échelle du site n'a pas : le battement du
		   point « en direct », et l'éclat qui désigne un message visé. Ce
		   ne sont pas des transitions d'état, mais des signaux lents. */
		--ctr-duree-pouls: 1.6s;
		--ctr-duree-eclat: 3s;
	}

	.ctr-racine li + li { margin-top: 0; }

	/* =================================================================
	   L'EN-TÊTE DE LA LISTE
	   ================================================================= */
	.ctr-tete { align-items: flex-end; }

	.ctr-tete-texte {
		display: flex;
		flex-direction: column;
		gap: var(--space-2);
		min-width: 0;
	}

	.ctr-accroche {
		max-width: var(--ctr-mesure);
		margin: 0;

		font-size: var(--fs-sm);
		line-height: 1.55;
		color: var(--secondary-color);
	}

	.ctr-tete > .button { flex: none; }

	/* --- Les étiquettes, en pastilles filtrantes ------------------------- */
	.ctr-filtres {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-2);
		min-width: 0;
	}

	.ctr-filtres .chip { text-decoration: none; }

	.ctr-outils { justify-content: space-between; }

	.ctr-outils > .reg-suivi { flex: 0 1 300px; }

	/* =================================================================
	   LA LISTE DES SUJETS
	   =================================================================
	   Des CARTES et non des rangées de tableau : un titre de sujet est
	   une phrase, et il a besoin d'air pour se lire. Toute la carte est
	   cliquable (le lien du titre s'étend sur elle), sauf les liens
	   qu'elle porte elle-même — l'auteur, l'étiquette. */
	.ctr-liste {
		display: flex;
		flex-direction: column;
		gap: var(--space-2);
		min-width: 0;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.ctr-ligne {
		position: relative;
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		gap: var(--space-4);
		min-width: 0;

		padding: var(--space-3) var(--space-4);
		border: var(--contour-l) var(--contour-s) var(--pf-line-soft);
		border-radius: var(--radius);
		background: var(--pf-panel);

		transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
	}

	.ctr-ligne:hover {
		border-color: var(--pf-gold-line);
		background: var(--pf-panel-hover);
	}

	/* Épinglé : un voile d'or à peine posé. La pastille dit déjà le mot ;
	   le voile fait seulement tenir les épinglés ensemble en tête. */
	.ctr-ligne.est-epingle {
		background: color-mix(in srgb, var(--pf-panel), var(--pf-gold) 5%);
	}

	.ctr-ligne-avatar { flex: none; }

	.ctr-ligne-corps {
		display: flex;
		flex-direction: column;
		gap: var(--space-2);
		min-width: 0;
	}

	.ctr-ligne-titre {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;

		font-size: var(--fs-sm);
		font-weight: 600;
		line-height: 1.35;
		color: var(--primary-color);
		text-decoration: none;
		overflow-wrap: anywhere;
	}

	.ctr-ligne.est-neuf .ctr-ligne-titre { font-weight: 750; }

	.ctr-ligne-titre:hover { color: var(--pf-gold-strong); }

	/* Le titre s'étend sur toute la carte. */
	.ctr-ligne-titre::after {
		content: "";
		position: absolute;
		inset: 0;
		border-radius: inherit;
	}

	/* … et ce que la carte porte de cliquable passe au-dessus. */
	.ctr-ligne a:not(.ctr-ligne-titre) {
		position: relative;
		z-index: 1;
	}

	.ctr-ligne-titre:focus-visible {
		outline: none;
	}

	.ctr-ligne-titre:focus-visible::after {
		outline: 2px solid var(--pf-gold);
		outline-offset: 2px;
	}

	.ctr-ligne-meta {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-2);
		min-width: 0;

		font-size: var(--fs-xs);
		color: var(--secondary-color);
	}

	.ctr-ligne-par {
		display: inline-flex;
		align-items: center;
		gap: var(--space-1);
		min-width: 0;
	}

	.ctr-ligne-marques {
		display: inline-flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-1);
	}

	.ctr-ligne-etat {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: var(--space-1);
		min-width: 0;

		font-size: var(--fs-xs);
		color: var(--secondary-color);
		text-align: end;
	}

	.ctr-ligne-reponses {
		display: inline-flex;
		align-items: center;
		gap: var(--space-1);

		font-weight: 650;
		font-variant-numeric: tabular-nums;
		color: var(--primary-color);
	}

	.ctr-ligne-reponses > .ti { color: var(--pf-gold); }

	.ctr-ligne-dernier {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 0;
		min-width: 0;
	}

	.ctr-ligne-dernier-nom { max-width: 16ch; }

	/* --- L'auteur, partout ----------------------------------------------- */
	.ctr-auteur {
		font-weight: 650;
		color: var(--primary-color);
		text-decoration: none;
	}

	a.ctr-auteur:hover { color: var(--pf-gold-strong); }

	.ctr-auteur.est-supprime {
		font-weight: 500;
		color: var(--secondary-color);
	}

	/* =================================================================
	   LES PASTILLES D'ÉTAT — le composant `.prefix`, une teinte chacune
	   ================================================================= */
	.ctr-marque.est-epingle { --prefix-teinte: var(--pf-info); }
	.ctr-marque.est-verrou  { --prefix-teinte: var(--pf-warn); }
	.ctr-marque.est-masque  { --prefix-teinte: var(--pf-danger); }
	.ctr-marque.est-direct  { --prefix-teinte: var(--pf-live); }

	/* Le non-lu : la pastille d'or du site, un cran plus appuyée. */
	.ctr-marque.est-neuf { font-weight: 750; }

	/* LE POINT DU DIRECT BAT, doucement, trois fois puis se fige : aucune
	   animation sans fin. Le mouvement réduit l'arrête (règle globale). */
	.ctr-marque.est-direct > .ti {
		animation: ctr-pouls var(--ctr-duree-pouls) var(--ease-out) 3;
	}

	@keyframes ctr-pouls {
		50% { opacity: .35; }
	}

	/* `.chip` porte une étiquette ; dans une ligne de méta, elle se fait
	   un cran plus discrète. */
	.ctr-ligne-meta .ctr-etiquette {
		padding: 0 var(--space-2);
		font-size: var(--fs-2xs);
	}

	/* =================================================================
	   UN SUJET — L'EN-TÊTE
	   ================================================================= */
	.ctr-retour {
		display: inline-flex;
		align-items: center;
		align-self: flex-start;
		gap: var(--space-1);

		font-size: var(--fs-xs);
		font-weight: 600;
		color: var(--secondary-color);
		text-decoration: none;
	}

	.ctr-retour:hover { color: var(--pf-gold-strong); }

	.ctr-sujet-tete {
		display: flex;
		flex-direction: column;
		gap: var(--space-3);
		min-width: 0;

		padding: var(--space-5);
		border: var(--contour-l) var(--contour-s) var(--pf-line-soft);
		border-radius: var(--radius);
		background: var(--pf-panel);
	}

	.ctr-sujet-marques {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-2);
	}

	.ctr-sujet-marques > a.chip { text-decoration: none; }

	/* Un titre de sujet est une PHRASE : ni capitales, ni corps d'affiche
	   — la base les pose sur tous les h1 du site. */
	.ctr-sujet-titre {
		margin: 0;

		font-size: var(--fs-xl);
		font-weight: 750;
		line-height: 1.25;
		letter-spacing: 0;
		text-transform: none;
		overflow-wrap: anywhere;
	}

	.ctr-sujet-meta {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-2);
		margin: 0;

		font-size: var(--fs-xs);
		color: var(--secondary-color);
	}

	.ctr-sujet-avatar { display: inline-flex; }

	.ctr-sujet-origine {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-1);
		margin: 0;

		font-size: var(--fs-xs);
		color: var(--secondary-color);
	}

	.ctr-sujet-origine a {
		font-weight: 650;
		color: var(--pf-gold-strong);
	}

	.ctr-sujet-gestes {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-2);
		padding-top: var(--space-3);
		border-top: 1px solid var(--pf-line-soft);
	}

	.ctr-sujet-gestes form { margin: 0; }

	/* --- Les réglages : titre, étiquette, modération --------------------- */
	.ctr-reglages {
		border: var(--contour-l) var(--contour-s) var(--pf-line-soft);
		border-radius: var(--radius);
		background: var(--pf-panel);
	}

	.ctr-reglages-tete {
		display: flex;
		align-items: center;
		gap: var(--space-2);
		padding: var(--space-3) var(--space-4);

		font-size: var(--fs-sm);
		font-weight: 650;
		color: var(--secondary-color);
		cursor: pointer;
		list-style: none;
	}

	.ctr-reglages-tete::-webkit-details-marker { display: none; }

	.ctr-reglages-tete:hover,
	.ctr-reglages[open] > .ctr-reglages-tete { color: var(--primary-color); }

	.ctr-reglages-corps {
		display: flex;
		flex-direction: column;
		gap: var(--space-4);
		padding: 0 var(--space-4) var(--space-4);
	}

	.ctr-moderation {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-2);
		padding-top: var(--space-4);
		border-top: 1px solid var(--pf-line-soft);
	}

	.ctr-moderation-titre {
		display: inline-flex;
		align-items: center;
		gap: var(--space-1);
		margin-inline-end: var(--space-2);

		font-size: var(--fs-2xs);
		font-weight: 800;
		letter-spacing: var(--track-wide);
		text-transform: uppercase;
		color: var(--pf-gold);
	}

	.ctr-geste { margin: 0; }

	/* --- Les formulaires --------------------------------------------------- */
	.ctr-form {
		display: flex;
		flex-direction: column;
		gap: var(--space-3);
		min-width: 0;
		margin: 0;
	}

	.ctr-form-sujet {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
		align-items: end;
	}

	.ctr-champ {
		display: flex;
		flex-direction: column;
		gap: var(--space-1);
		min-width: 0;
		margin: 0;
	}

	.ctr-champ > span:not(.visually-hidden),
	.ctr-choix > legend {
		font-size: var(--fs-2xs);
		font-weight: 700;
		letter-spacing: .06em;
		text-transform: uppercase;
		color: var(--secondary-color);
	}

	.ctr-champ textarea { min-height: 0; }

	.ctr-aide {
		max-width: var(--ctr-mesure);
		margin: 0;

		font-size: var(--fs-xs);
		line-height: 1.55;
		color: var(--secondary-color);
	}

	.ctr-form-pied {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: var(--space-2);
	}

	/* ⚠ UN <label> : theme.css lui donnerait la majuscule, l'espacement et
	   la graisse d'un INTITULÉ de champ. C'est une phrase, elle se lit comme
	   une phrase. */
	.ctr-case {
		display: flex;
		align-items: center;
		gap: var(--space-2);
		margin: 0;

		font-size: var(--fs-sm);
		font-weight: 400;
		text-transform: none;
		letter-spacing: normal;
		color: var(--primary-color);
	}

	/* --- Les étiquettes à choisir : des pastilles qui se cochent --------- */
	.ctr-choix {
		display: flex;
		flex-wrap: wrap;
		gap: var(--space-2);
		min-width: 0;
		margin: 0;
		padding: 0;
		border: 0;
	}

	.ctr-choix > legend {
		width: 100%;
		margin-bottom: var(--space-2);
		padding: 0;
	}

	/* ⚠ CES PASTILLES SONT DES <label> : theme.css leur donnait la majuscule,
	   l'espacement large et la marge basse d'un intitulé de champ (« DISCUSSION »),
	   que `.chip` ne déclare pas. Une étiquette se lit ici comme dans la liste. */
	.ctr-choix-etiquette {
		margin: 0;
		text-transform: none;
		letter-spacing: normal;
		cursor: pointer;
	}

	.ctr-choix-etiquette:hover {
		border-color: var(--pf-gold-line);
		background: var(--pf-surface-2);
	}

	/* Le même état que `.chip.is-on` : une seule façon de dire « choisi ». */
	.ctr-choix-etiquette:has(input:checked) {
		color: var(--pf-gold-strong);
		background: var(--pf-gold-soft);
		border-color: var(--pf-gold-line);
	}

	.ctr-choix-etiquette:has(input:focus-visible) {
		outline: 2px solid var(--pf-gold);
		outline-offset: 2px;
	}

	/* =================================================================
	   L'ENCART « OÙ ON EN EST »
	   =================================================================
	   Le point de la discussion, en tête : on doit pouvoir arriver dans un
	   sujet de deux cents messages et savoir en dix secondes ce qui est
	   décidé. Un filet d'or à gauche — la couleur de ce qui est tenu par
	   l'auteur et la modération. */
	.ctr-encart {
		display: flex;
		flex-direction: column;
		gap: var(--space-3);
		min-width: 0;

		padding: var(--space-4) var(--space-5);
		border: var(--contour-l) var(--contour-s) var(--pf-gold-line);
		border-inline-start: var(--ctr-accent) solid var(--pf-gold);
		border-radius: var(--radius);
		background: color-mix(in srgb, var(--pf-panel), var(--pf-gold) 4%);
	}

	.ctr-encart-tete {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: var(--space-2);
	}

	.ctr-encart-titre {
		display: inline-flex;
		align-items: center;
		gap: var(--space-2);
		margin: 0;

		font-size: var(--fs-xs);
		font-weight: 800;
		letter-spacing: var(--track-wide);
		line-height: 1.3;
		color: var(--pf-gold);
	}

	/* « Mis à jour par X · il y a 5 min » : la même ligne à points que
	   l'en-tête du sujet (.ctr-sujet-meta), l'heure dans son <time>. */
	.ctr-encart-maj {
		display: inline-flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-1);

		font-size: var(--fs-2xs);
		color: var(--secondary-color);
	}

	.ctr-encart-texte {
		max-width: var(--ctr-mesure);

		font-size: var(--ctr-texte);
		line-height: var(--ctr-texte-lh);
		color: var(--pf-ink-soft);
		overflow-wrap: anywhere;
	}

	.ctr-encart-vide {
		margin: 0;
		font-size: var(--fs-xs);
		color: var(--secondary-color);
	}

	.ctr-encart-retenue {
		display: flex;
		flex-direction: column;
		gap: var(--space-1);
		min-width: 0;

		padding: var(--space-3) var(--space-4);
		border-inline-start: var(--ctr-accent) solid var(--pf-success);
		border-radius: var(--radius);
		background: var(--pf-success-soft);

		color: inherit;
		text-decoration: none;
		transition: background-color var(--dur) var(--ease-out);
	}

	.ctr-encart-retenue:hover { background: color-mix(in srgb, var(--pf-success-soft), var(--pf-success) 8%); }

	.ctr-encart-retenue-tete {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-2);

		font-size: var(--fs-2xs);
		font-weight: 800;
		letter-spacing: .06em;
		text-transform: uppercase;
		color: var(--pf-success);
	}

	.ctr-encart-retenue-nom {
		font-weight: 650;
		letter-spacing: 0;
		text-transform: none;
		color: var(--primary-color);
	}

	.ctr-encart-retenue-texte {
		font-size: var(--fs-sm);
		line-height: 1.55;
		color: var(--pf-ink-soft);
	}

	.ctr-encart-edition > summary {
		display: inline-flex;
		align-items: center;
		gap: var(--space-1);

		font-size: var(--fs-xs);
		font-weight: 650;
		color: var(--pf-gold-strong);
		cursor: pointer;
		list-style: none;
	}

	.ctr-encart-edition > summary::-webkit-details-marker { display: none; }

	.ctr-encart-edition[open] > summary { margin-bottom: var(--space-3); }

	/* =================================================================
	   LE FIL
	   =================================================================
	   La conversation elle-même est dessinée par messagerie.css ; le fil
	   n'ajoute que son fond et ses angles. Il ne DÉFILE PAS dans un cadre,
	   contrairement à celui d'un dossier : c'est la page qui défile, et
	   les messages se paginent par quarante. */
	.ctr-fil-messages {
		border-radius: var(--radius);
		background: var(--pf-surface);
	}

	.ctr-pagination { display: flex; justify-content: center; }

	/* LA RÉPONSE RETENUE, dans la bulle : la même teinte que dans l'encart. */
	.mp-msg-role.ctr-retenue {
		gap: var(--space-1);
		background: var(--pf-success-soft);
		color: var(--pf-success);
	}

	/* SUR UN TÉLÉPHONE, le nom, deux pastilles et l'heure ne tiennent pas sur
	   une ligne : c'est l'HEURE qui passe dessous, jamais une pastille qui se
	   casse en trois (« AUTEUR / DU / SUJET », constaté à 390 px).
	   messagerie.css (hors couche) ne fixe ni l'un ni l'autre : ces deux
	   règles s'appliquent. */
	.ctr-fil-messages .mp-msg-tete {
		flex-wrap: wrap;
	}

	.ctr-fil-messages .mp-msg-role {
		white-space: nowrap;
	}

	/* Un message retiré ou masqué, tel que L'ÉQUIPE le lit encore : on ne
	   doit jamais le confondre avec ce que le public voit. Même dessin que
	   la note interne d'un dossier (registre.css), dans le rouge du retrait. */
	.ctr-fil-messages .mp-msg.ctr-est-retire .mp-bulle {
		background: var(--pf-danger-soft);
		outline: 1px dashed var(--pf-danger);
		outline-offset: calc(var(--space-1) * -1);
		border-radius: var(--radius-xs);
	}

	/* --- Le pied d'un message : versions, renvoi ------------------------- */
	.ctr-versions-btn {
		padding: 0;
		border: 0;
		background: none;

		font: inherit;
		font-size: var(--fs-2xs);
		color: var(--pf-gold-strong);
		text-decoration: underline;
		text-underline-offset: .2em;
		cursor: pointer;
	}

	.ctr-renvoi {
		display: inline-flex;
		align-items: center;
		gap: var(--space-1);
		min-width: 0;
		max-width: 100%;

		font-size: var(--fs-2xs);
		font-weight: 650;
		color: var(--pf-gold-strong);
		text-decoration: none;
	}

	.ctr-renvoi:hover { text-decoration: underline; }

	/* --- Le passage surligné, à l'arrivée sur l'original ----------------- */
	mark.ctr-surligne {
		padding: 0 calc(var(--space-1) / 2);
		border-radius: var(--radius-xs);
		background: color-mix(in srgb, var(--pf-gold), transparent 70%);
		color: inherit;
	}

	/* Le message visé, quand le passage n'y est plus (il a été corrigé
	   depuis) : c'est tout le message qui s'éclaire, puis s'éteint. Un
	   CALQUE qui se fond, et non le fond du message — `.mp-msg:hover`
	   (messagerie.css, hors couche) l'écraserait au premier survol. */
	.ctr-cible::before {
		content: "";
		position: absolute;
		inset: 0;
		border-radius: var(--radius);
		background: var(--pf-gold-soft);
		box-shadow: inset var(--ctr-accent) 0 0 var(--pf-gold);
		pointer-events: none;
		animation: ctr-eclat var(--ctr-duree-eclat) var(--ease-out) forwards;
	}

	@keyframes ctr-eclat {
		0%, 55% { opacity: 1; }
		100%    { opacity: 0; }
	}

	/* =================================================================
	   LES MOMENTS — une rafale retombée, repliée
	   =================================================================
	   Un cadre dans le fil, qui dit ce qui s'est passé (« 23 messages ·
	   5 participants »), quand, et montre les deux messages qui ont le
	   plus fait réagir. Le reste attend derrière un pli natif. */
	.ctr-moment {
		display: flex;
		flex-direction: column;
		gap: var(--space-3);
		min-width: 0;
		margin: var(--space-3) 0;

		padding: var(--space-3) 0;
		border: var(--contour-l) var(--contour-s) var(--pf-line-soft);
		border-radius: var(--radius);
		background: var(--pf-panel);
	}

	.ctr-moment-tete,
	.ctr-moment-phares,
	.ctr-moment-pli > summary {
		margin-inline: var(--space-4);
	}

	.ctr-moment-tete {
		display: flex;
		align-items: center;
		gap: var(--space-3);
		min-width: 0;
	}

	.ctr-moment-icone {
		display: inline-grid;
		place-items: center;
		flex: none;
		width: 2.25em;
		height: 2.25em;

		border-radius: 50%;
		background: var(--pf-gold-soft);
		color: var(--pf-gold);
	}

	.ctr-moment-texte {
		display: flex;
		flex-direction: column;
		min-width: 0;
	}

	.ctr-moment-titre {
		font-size: var(--fs-sm);
		font-weight: 700;
		color: var(--primary-color);
	}

	.ctr-moment-quand {
		font-size: var(--fs-2xs);
		color: var(--secondary-color);
	}

	.ctr-moment-phares {
		display: flex;
		flex-direction: column;
		gap: var(--space-2);
		padding: 0;
		list-style: none;
	}

	.ctr-phare {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: baseline;
		gap: var(--space-2);

		padding: var(--space-2) var(--space-3);
		border-radius: var(--radius);
		background: var(--pf-surface);

		font-size: var(--fs-xs);
		color: inherit;
		text-decoration: none;
		transition: background-color var(--dur) var(--ease-out);
	}

	.ctr-phare:hover { background: var(--pf-surface-2); }

	.ctr-phare-auteur {
		font-weight: 700;
		color: var(--primary-color);
	}

	.ctr-phare-texte { color: var(--pf-ink-soft); }

	.ctr-phare-reactions {
		font-variant-numeric: tabular-nums;
		color: var(--secondary-color);
		white-space: nowrap;
	}

	.ctr-moment-pli > summary {
		display: inline-flex;
		align-items: center;
		align-self: flex-start;
		gap: var(--space-2);

		font-size: var(--fs-xs);
		font-weight: 650;
		color: var(--pf-gold-strong);
		cursor: pointer;
		list-style: none;
	}

	.ctr-moment-pli > summary::-webkit-details-marker { display: none; }

	.ctr-moment-pli > summary > .ti {
		transition: transform var(--dur) var(--ease-out);
	}

	.ctr-moment-pli[open] > summary > .ti { transform: rotate(180deg); }

	/* LE PLI REPREND LE REMPLISSAGE DE `.mp-messages` : chaque message s'y
	   étend de 1rem de part et d'autre (marge négative, messagerie.css),
	   et c'est cette valeur, écrite en dur là-bas, qu'il doit trouver ici
	   pour ne pas déborder du cadre. */
	.ctr-moment-corps {
		display: flex;
		flex-direction: column;
		margin-top: var(--space-2);
		padding: 0 1rem;
	}

	/* =================================================================
	   ÉCRIRE
	   ================================================================= */

	/* « Marie écrit… » — sa place est réservée : la ligne qui apparaît et
	   disparaît ne fait pas sauter le composeur. */
	.ctr-ecrit {
		min-height: 1.5em;
		margin: 0;

		font-size: var(--fs-2xs);
		font-style: italic;
		color: var(--secondary-color);
	}

	.ctr-invite {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-3);

		padding: var(--space-4);
		border: var(--contour-l) var(--contour-s) var(--pf-line-soft);
		border-radius: var(--radius);
		background: var(--pf-panel);

		font-size: var(--fs-sm);
		color: var(--secondary-color);
	}

	.ctr-invite > .ti { color: var(--pf-gold); }

	.ctr-invite > .button { margin-inline-start: auto; }

	/* --- Lancer un sujet, corriger sans script -------------------------- */
	.ctr-nouveau,
	.ctr-correction {
		display: flex;
		flex-direction: column;
		gap: var(--space-4);
		min-width: 0;

		padding: var(--space-5);
		border: var(--contour-l) var(--contour-s) var(--pf-line-soft);
		border-radius: var(--radius);
		background: var(--pf-panel);
	}

	.ctr-section-titre {
		display: inline-flex;
		align-items: center;
		gap: var(--space-2);
		margin: 0;

		font-size: var(--fs-md);
		font-weight: 750;
		letter-spacing: 0;
		line-height: 1.3;
		text-transform: none;
	}

	.ctr-section-titre > .ti { color: var(--pf-gold); }

	.ctr-nouveau-titre { font-size: var(--fs-lg); }

	.ctr-nouveau-source {
		display: flex;
		flex-direction: column;
		gap: var(--space-1);
		margin: 0;

		padding: var(--space-3) var(--space-4);
		border-inline-start: var(--ctr-accent) solid var(--pf-gold);
		border-radius: var(--radius);
		background: var(--pf-surface);
	}

	.ctr-nouveau-source-tete {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-2);

		font-size: var(--fs-xs);
		font-weight: 650;
		color: var(--secondary-color);
	}

	.ctr-nouveau-source-tete a { color: var(--pf-gold-strong); }

	.ctr-nouveau-source-texte {
		font-size: var(--fs-sm);
		line-height: 1.55;
		color: var(--pf-ink-soft);
	}

	/* =================================================================
	   CE QUE LE SCRIPT AJOUTE
	   ================================================================= */

	/* « Répondre à ce passage » : il suit la sélection. Sa position vient
	   du script, en variables — la feuille garde le dessin. */
	.ctr-passage-btn {
		position: fixed;
		top: var(--ctr-y, 0);
		left: var(--ctr-x, 0);
		z-index: var(--z-dropdown);
		box-shadow: var(--shadow-md);
	}

	/* « Nouveaux messages ↓ », quand on lit plus haut que l'arrivée.
	   Centré par les deux bords et une marge automatique, jamais par un
	   `translateX(-50%)` qui écraserait l'animation d'entrée. */
	.ctr-nouveaux-bas {
		position: fixed;
		inset-inline: 0;
		bottom: var(--space-6);
		z-index: var(--z-dropdown);

		width: max-content;
		max-width: calc(100% - var(--gutter) * 2);
		margin-inline: auto;
		box-shadow: var(--shadow-md);

		animation: ctr-apparait var(--dur) var(--ease-out);
	}

	@keyframes ctr-apparait {
		from { opacity: 0; transform: translateY(var(--space-2)); }
	}

	/* Le menu « … » d'un message : le menu du site (`menu-list-1
	   est-simple`), posé en position fixe par le script contre son bouton. */
	.ctr-menu {
		position: fixed;
		z-index: var(--z-dropdown);
		min-width: 14rem;
	}

	.ctr-menu form { margin: 0; }

	.ctr-menu .menu-rang { width: 100%; }

	/* --- La fenêtre des versions -------------------------------------------- */
	.ctr-fenetre {
		width: min(36rem, calc(100% - var(--gutter) * 2));
		max-height: min(80svh, 44rem);
		padding: 0;
		margin: auto;

		border: var(--contour-l) var(--contour-s) var(--border-color);
		border-radius: var(--radius-lg);
		background: var(--pf-panel);
		box-shadow: var(--shadow-lg);
		color: var(--texte-color);
	}

	/* Le voile en clair, comme celui de la confirmation (`.cm`, style.css) :
	   `::backdrop` n'hérite pas des variables dans tous les navigateurs. */
	.ctr-fenetre::backdrop { background: rgba(4, 3, 2, .76); }

	.ctr-fenetre-corps {
		display: flex;
		flex-direction: column;
		gap: var(--space-4);
		padding: var(--space-5);
	}

	.ctr-fenetre-tete {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--space-3);
	}

	.ctr-versions {
		display: flex;
		flex-direction: column;
		gap: var(--space-3);
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.ctr-version {
		display: flex;
		flex-direction: column;
		gap: var(--space-2);

		padding: var(--space-3) var(--space-4);
		border-radius: var(--radius);
		background: var(--pf-surface);
	}

	.ctr-version-quand {
		font-size: var(--fs-2xs);
		font-variant-numeric: tabular-nums;
		color: var(--secondary-color);
	}

	.ctr-version-texte {
		font-size: var(--fs-sm);
		line-height: 1.55;
		color: var(--pf-ink-soft);
		overflow-wrap: anywhere;
	}

	/* =================================================================
	   PETITS ÉCRANS
	   ================================================================= */
	@media (max-width: 720px) {

		.ctr-outils > .reg-suivi { flex: 1 1 100%; }

		.ctr-form-sujet { grid-template-columns: minmax(0, 1fr); }

		.ctr-sujet-tete,
		.ctr-nouveau,
		.ctr-correction { padding: var(--space-4); }

		.ctr-encart { padding: var(--space-4); }
	}

	@media (max-width: 560px) {

		/* La carte passe sur deux lignes : l'état descend sous le titre,
		   l'avatar garde sa colonne. */
		.ctr-ligne {
			grid-template-columns: auto minmax(0, 1fr);
			gap: var(--space-2) var(--space-3);
		}

		.ctr-ligne-etat {
			grid-column: 2;
			flex-direction: row;
			flex-wrap: wrap;
			align-items: center;
			gap: var(--space-2);
			text-align: start;
		}

		.ctr-ligne-dernier {
			flex-direction: row;
			align-items: center;
			gap: var(--space-1);
		}

		.ctr-phare { grid-template-columns: minmax(0, 1fr) auto; }

		.ctr-phare-auteur { grid-column: 1 / -1; }
	}
}

/* =====================================================================
   UNE CITATION DE PASSAGE TIENT SUR DEUX LIGNES
   =====================================================================
   `.truncate` coupe à une ligne, et c'est une UTILITÉ : rangée dans la
   couche du même nom, elle passe devant tout composant. La reprise doit
   donc vivre dans `utilities`, avec une classe de plus. */
@layer utilities {

	.mp-msg-cite.est-passage .truncate {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		white-space: normal;
	}
}
