/* =========================================================================
   Réservation de Sièges - Mine en Scène
   Styles front-end du widget de réservation
   ========================================================================= */

.rsm-widget {
	max-width: 900px;
	margin: 0 auto 2em;
	font-family: inherit;
}

.rsm-en-tete {
	margin-bottom: 1em;
}

.rsm-titre-seance {
	margin: 0 0 0.2em;
}

.rsm-date-seance {
	color: #555;
	margin: 0 0 1em;
}

/* --- Légende --- */

.rsm-legende {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	margin-bottom: 1em;
	font-size: 0.9em;
}

.rsm-legende-item {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}

.rsm-pastille {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 3px;
}

.rsm-pastille-standard { background: #e53935; }
.rsm-pastille-strapontin { background: #fb8c00; }
.rsm-pastille-pmr { background: #fdd835; }
.rsm-pastille-selectionne { background: #2271b1; }
.rsm-pastille-reserve { background: #b0b0b0; }

/* --- Plan / SVG --- */

.rsm-plan-conteneur {
	margin-bottom: 1.5em;
	overflow-x: auto;
}

.rsm-chargement {
	padding: 2em;
	text-align: center;
	color: #777;
}

.rsm-svg-conteneur svg {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
}

/* États des sièges : on neutralise volontairement le remplissage d'origine
   du SVG (retiré en JS) pour laisser ces classes prendre le dessus. */
.rsm-siege {
	cursor: pointer;
	transition: fill 0.15s ease, opacity 0.15s ease;
	outline: none;
}

/* Le texte de numérotation (ex: "A1") dessiné par-dessus chaque siège ne doit
   jamais intercepter le clic : on le laisse purement visuel, le clic doit
   "traverser" jusqu'à la forme cliquable du siège en dessous. */
.rsm-svg-conteneur svg text,
.rsm-svg-conteneur svg tspan {
	pointer-events: none;
	user-select: none;
}

.rsm-siege.rsm-etat-libre.rsm-cat-standard {
	fill: #e53935;
}

.rsm-siege.rsm-etat-libre.rsm-cat-standard:hover {
	fill: #ef5350;
}

.rsm-siege.rsm-etat-libre.rsm-cat-strapontin {
	fill: #fb8c00;
}

.rsm-siege.rsm-etat-libre.rsm-cat-strapontin:hover {
	fill: #ffa726;
}

.rsm-siege.rsm-etat-libre.rsm-cat-pmr {
	fill: #fdd835;
}

.rsm-siege.rsm-etat-libre.rsm-cat-pmr:hover {
	fill: #ffe066;
}

.rsm-siege.rsm-etat-libre:focus-visible {
	stroke: #1b1b1b;
	stroke-width: 3;
}

.rsm-siege.rsm-etat-selectionne {
	fill: #2271b1;
}

.rsm-siege.rsm-etat-reserve {
	fill: #b0b0b0;
	cursor: not-allowed;
	opacity: 0.7;
}

.rsm-siege.rsm-etat-verrouille {
	fill: #e0a030;
	cursor: not-allowed;
	opacity: 0.8;
}

/* Garde-fou : l'état "sélectionné" doit toujours être visuellement prioritaire,
   même si une autre classe d'état restait présente par erreur (ex: cache
   navigateur retardé, ou rafraîchissement partiel). Cette règle est volontairement
   placée en dernier et plus spécifique pour ne jamais être supplantée. */
.rsm-siege.rsm-siege.rsm-etat-selectionne {
	fill: #2271b1 !important;
}

/* --- Récapitulatif de sélection --- */

.rsm-selection-recap {
	background: #f0f6fc;
	border: 1px solid #c3dcf3;
	border-radius: 6px;
	padding: 0.8em 1em;
	margin-bottom: 1em;
}

/* --- Formulaire --- */

.rsm-formulaire {
	background: #fafafa;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 1.2em;
}

.rsm-champ {
	margin-bottom: 1em;
}

.rsm-champ label {
	display: block;
	margin-bottom: 0.3em;
	font-weight: 600;
}

.rsm-champ input,
.rsm-champ textarea {
	width: 100%;
	max-width: 380px;
	padding: 0.5em;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
	font-family: inherit;
	resize: vertical;
}

/* Champ piège anti-spam : invisible pour un visiteur humain. */
.rsm-champ-piege {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

.rsm-message {
	color: #c0392b;
	font-weight: 600;
	min-height: 1.2em;
}

.rsm-bouton-valider {
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 0.7em 1.5em;
	font-size: 1em;
	border-radius: 4px;
	cursor: pointer;
}

.rsm-bouton-valider:hover {
	background: #135e96;
}

.rsm-bouton-valider:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* --- Confirmation --- */

.rsm-confirmation {
	background: #edf7ed;
	border: 1px solid #b8e0bb;
	color: #1e4620;
	padding: 1.2em;
	border-radius: 6px;
	font-weight: 600;
}

/* --- Aperçu en lecture seule (mode [reservation_sieges plan="..."]) --- */

.rsm-apercu .rsm-svg-conteneur svg .rsm-siege,
.rsm-svg-apercu svg [id] {
	fill: #c62828;
}
