@charset "UTF-8";

/* =====================================================================
   PANAFIVE — LES ÉVÉNEMENTS (lot 4b, 06/10/2026)
   =====================================================================
   Deux pages, une feuille :
     · /evenements/ — l'agenda (les cartes de catalogue.css, qui portent
       en plus une affiche) et la page d'un événement (des cartes du site
       côte à côte, l'intérieur séparé par des filets, jamais une carte
       dans une carte) ;
     · /ville/evenements.php — la couche `rp`, chargée AVANT ville-hud.css
       et donc dans le même ordre de couches que le reste de la ville.

   L'AFFICHE est une image hébergée AILLEURS (un lien https choisi par
   l'organisateur). Elle peut ne jamais arriver : sous elle, l'icône du
   genre attend, et assets/js/evenements.js la montre si le lien casse.
   ===================================================================== */

@layer components {

	/* =================================================================
	   1. L'AFFICHE
	   ================================================================= */

	.evt-affiche {
		position: relative;
		display: grid;
		place-items: center;
		aspect-ratio: 16 / 9;
		overflow: hidden;
		background:
			radial-gradient(120% 90% at 20% 0%, var(--pf-gold-soft), transparent 60%),
			var(--pf-surface);
		border-bottom: var(--contour-l) var(--contour-s) var(--border-color);
	}

	.evt-affiche img {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	/* L'icône du genre : seulement quand il n'y a rien d'autre à montrer. */
	.evt-affiche-repli { display: none; color: var(--pf-gold); opacity: .6; }
	.evt-affiche-repli .ti { width: 46px; height: 46px; }

	.evt-affiche.est-sans-affiche .evt-affiche-repli { display: block; }
	.evt-affiche.est-sans-affiche img { display: none; }

	/* La grande, sur la page d'un événement : l'image ENTIÈRE, à ses
	   proportions — une affiche se lit, elle ne se recadre pas. */
	.evt-affiche.est-grande {
		aspect-ratio: auto;
		min-height: 240px;
		border: var(--contour-l) var(--contour-s) var(--border-color);
		border-radius: var(--card-radius);
		box-shadow: var(--shadow-xs);
	}

	.evt-affiche.est-grande img {
		position: static;
		height: auto;
		max-height: 620px;
		object-fit: contain;
	}

	.evt-affiche.est-grande.est-sans-affiche { aspect-ratio: 4 / 3; min-height: 0; }
	.evt-affiche.est-grande .evt-affiche-repli .ti { width: 72px; height: 72px; }

	/* =================================================================
	   2. L'AGENDA — les cartes de catalogue.css, avec leur affiche
	   ================================================================= */

	.evt-carte .store-card-head { padding-top: var(--space-4); }

	.evt-marque {
		font-size: var(--fs-xs);
		color: var(--secondary-color);
		overflow-wrap: anywhere;
	}

	.evt-carte .store-meta { margin-bottom: var(--space-4); }
	.evt-carte .store-meta span { min-width: 0; overflow-wrap: anywhere; }

	.evt-quand.est-ouvert,
	.evt-quand.est-ouvert .ti { color: var(--pf-success); opacity: 1; font-weight: 600; }

	.evt-flag-ouvert {
		color: #ffffff;
		background: var(--pf-success);
	}

	.evt-compte {
		font-size: var(--fs-2xs);
		font-weight: 700;
		opacity: .7;
	}

	/* =================================================================
	   3. LA PAGE D'UN ÉVÉNEMENT
	   ================================================================= */

	.evt-page {
		container-type: inline-size;
		display: grid;
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		gap: var(--space-5);
		align-items: start;
		margin-bottom: var(--space-5);
	}

	.evt-page-blocs { display: grid; gap: var(--space-4); min-width: 0; }

	.evt-bloc-titre {
		display: flex;
		align-items: center;
		gap: var(--space-2);
		margin: 0 0 var(--space-3);
		font-size: var(--fs-lg);
	}

	.evt-bloc-titre .ti { color: var(--pf-gold); width: 1em; height: 1em; }

	.evt-etat {
		display: flex;
		align-items: center;
		gap: var(--space-2);
		margin: 0;
		font-size: var(--fs-lg);
		font-weight: 700;
	}

	.evt-etat.est-ouvert { color: var(--pf-success); }

	.evt-point {
		flex: 0 0 auto;
		width: 10px;
		height: 10px;
		border-radius: 50%;
		background: currentColor;
		box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent);
	}

	.evt-repetition {
		display: flex;
		align-items: center;
		gap: var(--space-2);
		margin: var(--space-2) 0 0;
		color: var(--secondary-color);
	}

	.evt-repetition .ti { color: var(--pf-gold); flex: 0 0 auto; }

	.evt-sous-titre {
		margin: var(--space-4) 0 var(--space-1);
		font-size: var(--fs-2xs);
		font-weight: 700;
		letter-spacing: .08em;
		text-transform: uppercase;
		color: var(--secondary-color);
	}

	/* Les créneaux et les règles : des lignes séparées par des filets. */
	.evt-creneaux,
	.evt-regles {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.evt-creneaux li,
	.evt-regles li {
		display: flex;
		align-items: center;
		gap: var(--space-2);
		margin: 0;
		padding: var(--space-2) 0;
		border-top: 1px solid var(--border-color);
	}

	.evt-regles li:first-child { border-top: 0; padding-top: 0; }
	.evt-regles .ti { color: var(--pf-gold); flex: 0 0 auto; }

	.evt-fuseau {
		margin: var(--space-3) 0 0;
		font-size: var(--fs-2xs);
		color: var(--secondary-color);
	}

	.evt-lieu {
		margin: 0 0 var(--space-2);
		font-weight: 600;
		overflow-wrap: anywhere;
	}

	.evt-aide {
		margin: 0;
		font-size: var(--fs-sm);
		line-height: 1.5;
		color: var(--secondary-color);
	}

	.evt-texte {
		line-height: 1.65;
		overflow-wrap: anywhere;
	}

	.evt-retour {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: var(--space-3);
		margin: var(--space-5) 0 0;
	}

	/* ── LOT B : la zone Équipe (ui_equipe_zone, après le contenu public) ──
	   Des faits en deux colonnes, le journal du jeu en lignes à filets, et
	   le retrait de l'affiche sur une ligne. */
	.evt-equipe {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		gap: var(--space-4);
	}

	.evt-equipe-faits {
		display: grid;
		grid-template-columns: max-content minmax(0, 1fr);
		gap: var(--space-2) var(--space-4);
		margin: 0;
	}

	.evt-equipe-faits dt {
		font-size: var(--fs-2xs);
		font-weight: 700;
		letter-spacing: .06em;
		text-transform: uppercase;
		color: var(--secondary-color);
	}

	.evt-equipe-faits dd {
		margin: 0;
		min-width: 0;
		overflow-wrap: anywhere;
	}

	.evt-equipe-faits small {
		display: block;
		font-size: var(--fs-2xs);
		color: var(--secondary-color);
	}

	.evt-journal {
		list-style: none;
		margin: 0;
		padding: 0;
		max-height: 420px;
		overflow-y: auto;
	}

	.evt-journal li {
		display: grid;
		grid-template-columns: max-content minmax(0, 1fr);
		gap: 2px var(--space-3);
		padding: var(--space-2) 0;
		border-top: 1px solid var(--border-color);
	}

	.evt-journal li:first-child { border-top: 0; padding-top: 0; }

	.evt-journal time {
		grid-row: span 2;
		font-size: var(--fs-2xs);
		color: var(--secondary-color);
		white-space: nowrap;
	}

	.evt-journal strong { font-weight: 600; }

	.evt-journal small {
		font-size: var(--fs-2xs);
		color: var(--secondary-color);
		overflow-wrap: anywhere;
	}

	.evt-equipe-affiche {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--space-2);
		margin: var(--space-2) 0 0;
	}

	.evt-equipe-affiche input { flex: 1 1 220px; min-width: 0; }

	@media (max-width: 860px) {
		.evt-page { grid-template-columns: minmax(0, 1fr); }
	}
}

/* =====================================================================
   4. L'ONGLET DE LA VILLE — la couche `rp` (voir ville-hud.css)
   ===================================================================== */

@layer rp {

	.rp-evt {
		flex-direction: row;
		align-items: flex-start;
		gap: 16px;
	}

	.rp-evt .evt-affiche,
	.rp-evt-mien .evt-affiche {
		flex: 0 0 176px;
		border: 0;
		background: var(--rp-surface-2);
	}

	.rp-evt .evt-affiche-repli,
	.rp-evt-mien .evt-affiche-repli { color: rgba(255, 255, 255, .55); opacity: 1; }

	.rp-evt-corps {
		flex: 1 1 auto;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	.rp-evt-regles {
		list-style: none;
		margin: 4px 0 0;
		padding: 0;
		display: flex;
		flex-wrap: wrap;
		gap: 4px 16px;
		font-size: 15px;
		color: var(--rp-doux);
	}

	.rp-evt-regles li {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		min-width: 0;
		overflow-wrap: anywhere;
	}

	.rp-evt-regles .ti { width: 16px; height: 16px; flex: 0 0 auto; }

	.rp-evt .rp-carte-pied { justify-content: flex-start; margin-top: 8px; }

	.rp-etiquette.est-ouvert {
		background: var(--rp-vert);
		color: #0b0c0e;
	}

	/* Un événement illégal : le bouche-à-oreille, pas de page publique. */
	.rp-etiquette.est-prive {
		background: var(--rp-ambre);
		color: #0b0c0e;
	}

	/* « Mes événements » : un bloc par événement, des tuiles dedans, un
	   filet entre deux blocs — comme la fiche d'une faction. */
	.rp-evt-mien {
		display: flex;
		flex-direction: column;
		gap: 14px;
		padding-bottom: 24px;
		margin-bottom: 24px;
		border-bottom: 1px solid var(--rp-filet);
	}

	.rp-evt-mien:last-of-type { border-bottom: 0; margin-bottom: 0; }

	.rp-evt-mien-tete {
		display: flex;
		align-items: center;
		gap: 16px;
		min-width: 0;
	}

	.rp-evt-mien-tete .evt-affiche { flex-basis: 132px; }

	.rp-evt-mien-nom {
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 6px;
	}

	.rp-evt-mien-nom h2 {
		margin: 0;
		font-family: var(--rp-ui);
		font-size: 26px;
		font-weight: 700;
		letter-spacing: .04em;
		color: #ffffff;
		overflow-wrap: anywhere;
	}

	.rp-evt-mien-nom p {
		margin: 0;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		color: var(--rp-doux);
	}

	.rp-tuiles.est-trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }

	.rp-tuile.est-alerte dd { color: var(--rp-ambre); }

	.rp-tuile small {
		font-size: 14px;
		color: var(--rp-doux);
	}

	/* ── LOT C : régler son événement depuis le site (06/10/2026) ──
	   Des blocs séparés par un filet : la présentation, les invitations,
	   l'équipe, puis les demandes récentes et ce que le jeu en a fait. */
	.rp-evt-reglages {
		display: flex;
		flex-direction: column;
		gap: 18px;
		padding-top: 16px;
		border-top: 1px solid var(--rp-filet);
	}

	.rp-evt-bloc {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.rp-evt-bloc-titre {
		margin: 0;
		font-family: var(--rp-ui);
		font-size: 17px;
		font-weight: 700;
		letter-spacing: .1em;
		text-transform: uppercase;
		color: #ffffff;
	}

	.rp-evt-reglages .rp-champ input[type="text"],
	.rp-evt-reglages .rp-champ input[type="tel"],
	.rp-evt-reglages .rp-champ input[type="datetime-local"],
	.rp-evt-ligne input {
		box-sizing: border-box;
		min-height: 44px;
		padding: 8px 12px;
		border: 1px solid var(--rp-filet);
		border-radius: 0;
		background: var(--rp-surface);
		color: var(--rp-texte);
		font-family: var(--rp-lecture);
		font-size: 16px;
		letter-spacing: normal;
		text-transform: none;
	}

	.rp-evt-reglages .rp-champ input { width: 100%; }

	.rp-evt-reglages input:focus {
		outline: 2px solid var(--rp-bleu);
		outline-offset: 0;
	}

	/* Le champ de date suit le thème sombre de l'onglet. */
	.rp-evt-reglages input[type="datetime-local"] { color-scheme: dark; }

	.rp-evt-case {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		font-size: 16px;
		color: var(--rp-texte);
		cursor: pointer;
	}

	.rp-evt-case input { width: 18px; height: 18px; margin: 0; accent-color: var(--rp-bleu); }

	.rp-evt-jours {
		display: flex;
		flex-wrap: wrap;
		gap: 8px 16px;
		margin: 0;
		padding: 0;
		border: 0;
	}

	.rp-evt-jours legend {
		width: 100%;
		margin-bottom: 6px;
		padding: 0;
		font-family: var(--rp-ui);
		font-size: 15px;
		letter-spacing: .04em;
		text-transform: uppercase;
		color: var(--rp-doux);
	}

	.rp-evt-aide {
		margin: -4px 0 0;
		font-size: 14px;
		color: var(--rp-doux);
	}

	/* Un champ, un menu et un bouton sur une ligne : ajouter un invité, un
	   membre de l'équipe, changer un rôle. */
	.rp-evt-ligne {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		margin: 0;
	}

	.rp-evt-ligne input { flex: 1 1 180px; min-width: 0; }

	.rp-bouton.est-petit {
		min-height: 36px;
		padding: 0 14px;
		gap: 8px;
		font-size: 15px;
	}

	.rp-evt-reglages .rp-rangee { flex-wrap: wrap; gap: 8px 14px; }

	.rp-evt-reglages .rp-rangee-fin {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
	}

	.rp-rangee-fin.est-ok { color: var(--rp-vert); }
	.rp-rangee-fin.est-refus { color: var(--rp-rouge); }
	.rp-rangee-fin.est-attente { color: var(--rp-ambre); }

	@media (max-width: 760px) {
		.rp-evt { flex-direction: column; }
		.rp-evt .evt-affiche { flex-basis: auto; width: 100%; }
		.rp-tuiles.est-trois { grid-template-columns: repeat(2, minmax(0, 1fr)); }
		.rp-evt-ligne > * { flex: 1 1 100%; }
	}
}
