/**
 * LPTENT Show-room — styles sobres et neutres.
 * Toutes les règles sont préfixées .lptent- pour éviter les conflits avec le thème.
 */

.lptent-showroom {
	--lptent-border: #dcdfe4;
	--lptent-bg: #ffffff;
	--lptent-bg-alt: #f6f7f9;
	--lptent-text: #24292f;
	--lptent-muted: #6b7280;
	--lptent-accent: #1f4d7a;
	--lptent-accent-text: #ffffff;
	--lptent-success: #1a7f37;
	--lptent-error: #b32d2e;
	--lptent-warning: #9a6700;
	--lptent-radius: 4px;

	color: var(--lptent-text);
	max-width: 100%;
}

.lptent-section {
	margin: 0 0 2.5rem;
}

.lptent-section__title {
	margin: 0 0 1rem;
	font-size: 1.5rem;
	line-height: 1.3;
}

.lptent-subtitle {
	margin: 2rem 0 0.75rem;
	font-size: 1.15rem;
	line-height: 1.3;
}

.lptent-help {
	margin: 0.5rem 0;
	color: var(--lptent-muted);
	font-size: 0.9rem;
}

.lptent-notice {
	padding: 0.75rem 1rem;
	border-left: 3px solid var(--lptent-muted);
	background: var(--lptent-bg-alt);
	border-radius: var(--lptent-radius);
}

.lptent-notice--warning {
	border-left-color: var(--lptent-warning);
}

/* --- Calendrier ---------------------------------------------------------- */

.lptent-calendar-wrap {
	margin-bottom: 1rem;
}

.lptent-calendar {
	font-size: 0.9rem;
}

.lptent-calendar .fc .fc-button {
	background: var(--lptent-accent);
	border-color: var(--lptent-accent);
	text-transform: none;
	box-shadow: none;
}

.lptent-calendar .fc .fc-button:disabled {
	opacity: 0.5;
}

.lptent-calendar .fc .fc-toolbar-title {
	font-size: 1.05rem;
}

.lptent-event {
	border: 0;
	background: var(--lptent-accent);
	font-size: 0.8rem;
}

.lptent-event--annulee {
	background: #9aa1ab;
	text-decoration: line-through;
	opacity: 0.7;
}

.lptent-fallback__list {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}

/* --- Formulaires --------------------------------------------------------- */

.lptent-form {
	padding: 1.25rem;
	border: 1px solid var(--lptent-border);
	border-radius: var(--lptent-radius);
	background: var(--lptent-bg-alt);
}

.lptent-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem 1rem;
}

.lptent-field {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.lptent-field--wide {
	grid-column: 1 / -1;
}

.lptent-field label {
	font-size: 0.85rem;
	font-weight: 600;
}

.lptent-field input,
.lptent-field select,
.lptent-toolbar select {
	width: 100%;
	max-width: 100%;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--lptent-border);
	border-radius: var(--lptent-radius);
	background: var(--lptent-bg);
	color: inherit;
	font: inherit;
	line-height: 1.3;
	box-sizing: border-box;
}

.lptent-field input:focus,
.lptent-field select:focus {
	outline: 2px solid var(--lptent-accent);
	outline-offset: 1px;
}

.lptent-req {
	color: var(--lptent-error);
}

/* Honeypot : masqué visuellement mais présent dans le DOM. */
.lptent-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.lptent-actions {
	margin: 1rem 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.lptent-btn {
	display: inline-block;
	padding: 0.55rem 1.1rem;
	border: 1px solid var(--lptent-border);
	border-radius: var(--lptent-radius);
	background: var(--lptent-bg);
	color: var(--lptent-text);
	font: inherit;
	line-height: 1.2;
	cursor: pointer;
}

.lptent-btn:hover {
	background: #eceff3;
}

.lptent-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.lptent-btn--primary {
	background: var(--lptent-accent);
	border-color: var(--lptent-accent);
	color: var(--lptent-accent-text);
}

.lptent-btn--primary:hover {
	background: #163a5c;
}

.lptent-btn--danger {
	color: var(--lptent-error);
	border-color: #e7c3c3;
}

.lptent-btn--small {
	padding: 0.3rem 0.7rem;
	font-size: 0.85rem;
}

.lptent-message {
	margin-top: 0.9rem;
	font-size: 0.9rem;
}

.lptent-message:empty {
	margin-top: 0;
}

.lptent-message--success {
	color: var(--lptent-success);
}

.lptent-message--error {
	color: var(--lptent-error);
}

.lptent-message--info {
	color: var(--lptent-muted);
}

.lptent-message__link {
	margin: 0.4rem 0 0;
	font-size: 0.85rem;
	color: var(--lptent-muted);
	word-break: break-all;
}

/* --- Mes réservations ---------------------------------------------------- */

.lptent-mine__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lptent-mine__item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--lptent-border);
	border-radius: var(--lptent-radius);
	margin-bottom: 0.4rem;
	background: var(--lptent-bg);
}

.lptent-mine__actions {
	display: flex;
	gap: 0.4rem;
}

/* --- Tableau des emprunts ------------------------------------------------ */

.lptent-toolbar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
}

.lptent-toolbar select {
	width: auto;
}

.lptent-table-wrap {
	overflow-x: auto;
}

.lptent-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
	background: var(--lptent-bg);
}

.lptent-table th,
.lptent-table td {
	padding: 0.55rem 0.7rem;
	border-bottom: 1px solid var(--lptent-border);
	text-align: left;
	vertical-align: top;
}

.lptent-table thead th {
	background: var(--lptent-bg-alt);
	font-weight: 600;
	white-space: nowrap;
}

.lptent-table tr[data-statut='rendu'] {
	color: var(--lptent-muted);
}

.lptent-table__actions {
	white-space: nowrap;
}

.lptent-empty td {
	color: var(--lptent-muted);
	font-style: italic;
}

.lptent-badge {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	font-size: 0.78rem;
	background: var(--lptent-bg-alt);
	border: 1px solid var(--lptent-border);
	white-space: nowrap;
}

.lptent-badge--emprunte {
	background: #fff4d6;
	border-color: #e8d08a;
	color: #7a5b00;
}

.lptent-badge--rendu {
	background: #e6f4ea;
	border-color: #a6d5b5;
	color: var(--lptent-success);
}

.lptent-badge--annulee {
	background: #fbe9e9;
	border-color: #e7c3c3;
	color: var(--lptent-error);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* --- Retour de matériel -------------------------------------------------- */

.lptent-commentaire {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.82rem;
	font-style: italic;
	color: var(--lptent-muted);
}

.lptent-table tr[data-retard='1'] td {
	background: #fff8f8;
}

.lptent-badge--retard {
	background: #fbe9e9;
	border-color: #e7c3c3;
	color: var(--lptent-error);
	font-weight: 600;
}

.lptent-retour td {
	background: var(--lptent-bg-alt);
}

.lptent-retour__form {
	padding: 0.4rem 0;
}

.lptent-retour__form .lptent-actions {
	margin-top: 0.6rem;
}

.lptent-hint {
	font-size: 0.78rem;
	color: var(--lptent-muted);
}

/* --- Mobile -------------------------------------------------------------- */

@media (max-width: 782px) {
	.lptent-section__title {
		font-size: 1.3rem;
	}

	.lptent-table thead {
		display: none;
	}

	.lptent-table,
	.lptent-table tbody,
	.lptent-table tr,
	.lptent-table td {
		display: block;
		width: 100%;
	}

	.lptent-table tr {
		border: 1px solid var(--lptent-border);
		border-radius: var(--lptent-radius);
		margin-bottom: 0.6rem;
		padding: 0.3rem 0;
	}

	.lptent-table td {
		border-bottom: 0;
		padding: 0.3rem 0.7rem;
	}

	.lptent-table td[data-label]::before {
		content: attr(data-label) ' : ';
		font-weight: 600;
	}

	.lptent-table td:empty {
		display: none;
	}

	.lptent-calendar .fc .fc-toolbar {
		flex-direction: column;
		gap: 0.4rem;
	}
}
