/* ==========================================================================
   Bourse aux équipements — fclb/assets/css/bourse-equipements.css
   Respecte la charte typo du thème : texte courant clamp(17-19px),
   .text-small réservé aux métadonnées (clamp 15-16px).
   ========================================================================== */

.bourse-page {
	max-width: 1140px;
	margin: 0 auto;
	padding: 40px 20px 80px;
}

/* ---------- Hero — même pattern que .planning-hero ---------- */

.bourse-hero {
	text-align: center;
	margin-bottom: 40px;
}

.bourse-hero h1 {
	color: var(--fclb-green-dark);
}

.bourse-hero p {
	max-width: 640px;
	margin: 12px auto 0;
	color: #3A3A3A;
}

.bourse-deposit-btn {
	display: inline-block;
	margin-top: 20px;
	background: var(--fclb-green-dark);
	color: #FFFFFF !important;
	border-radius: 6px;
	padding: 12px 24px;
	text-decoration: none !important;
}

.bourse-deposit-btn:hover {
	background: #1B3D12;
}

/* ---------- Barre outils : recherche + filtres ---------- */

.bourse-toolbar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin-bottom: 28px;
}

.bourse-search {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 420px;
}

.bourse-search svg {
	position: absolute;
	left: 14px;
	color: #6B6F6C;
	pointer-events: none;
}

.bourse-search input[type="search"] {
	width: 100%;
	font-family: var(--font-body);
	font-size: clamp(17px, 1vw + 13px, 18px);
	padding: 11px 40px 11px 40px;
	border: 1.5px solid #DEE4DA;
	border-radius: 999px;
	background: #FBFCFA;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.bourse-search input[type="search"]:focus {
	outline: none;
	border-color: var(--fclb-green-dark);
	background: #FFFFFF;
	box-shadow: 0 0 0 3px rgba(42, 92, 30, 0.12);
}

.bourse-search__clear {
	position: absolute;
	right: 12px;
	color: #6B6F6C;
	text-decoration: none !important;
	font-size: 15px;
	line-height: 1;
	padding: 4px;
}
.bourse-search__clear:hover { color: var(--fclb-green-dark); }

.bourse-results-count {
	text-align: center;
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	color: #6B6F6C;
	margin: -16px 0 24px;
}

/* ---------- Filtres — boutons alignés sur la charte globale (button {}) ---------- */

.bourse-filters {
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.bourse-filter-chip {
	border: 2px solid #D8E4CE;
	background: #FFFFFF;
	color: #3A3A3A;
	border-radius: 999px;
	padding: 8px 18px;
	text-decoration: none !important;
	transition: border-color 0.15s, background 0.15s;
}

.bourse-filter-chip.active {
	background: var(--fclb-green-dark);
	border-color: var(--fclb-green-dark);
	color: #FFFFFF !important;
}

/* ---------- Layout deux colonnes : sidebar 1/3 + contenu 2/3 ---------- */

.bourse-layout {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 28px;
	align-items: start;
}

.bourse-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
	position: sticky;
	top: 24px;
}

.bourse-sidebar__visual img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 12px;
}

.bourse-main {
	min-width: 0; /* évite qu'une longue description ne fasse déborder la grille */
}

@media (max-width: 860px) {
	.bourse-layout {
		grid-template-columns: 1fr;
	}
	.bourse-sidebar {
		position: static;
		order: 2; /* la liste d'annonces passe avant la colonne latérale sur mobile */
	}
	.bourse-main {
		order: 1;
	}
}

/* ---------- Liste d'annonces (empilées) ---------- */

.bourse-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.bourse-empty {
	text-align: center;
	color: #6B6F6C;
	padding: 40px 0;
}

.bourse-row {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	background: #FFFFFF;
	border: 1px solid #E4E7E4;
	border-radius: 10px;
	padding: 14px;
	text-decoration: none !important;
	color: inherit;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.bourse-row:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	border-color: #C7DABC;
}

.bourse-row-photo {
	position: relative;
	width: 110px;
	height: 110px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
	background: var(--fclb-green-pale);
	display: flex;
	align-items: center;
	justify-content: center;
}

.bourse-row-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bourse-card-photo-placeholder {
	color: var(--fclb-green-dark);
	font-weight: 600;
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	text-align: center;
	padding: 0 8px;
}

/* Métadonnée — autorisée sous 17px selon la charte */
.bourse-row-photo .bourse-photo-count {
	position: absolute;
	bottom: 6px;
	right: 6px;
	background: rgba(0, 0, 0, 0.6);
	color: #FFFFFF;
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	font-weight: 600;
	padding: 1px 7px;
	border-radius: 10px;
}

.bourse-row-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bourse-row-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

.bourse-row-heading {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.bourse-row-title {
	font-size: clamp(18px, 1vw + 14px, 20px);
	margin: 0;
	line-height: 1.3;
}

.bourse-row-price {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: clamp(20px, 1.3vw + 14px, 23px);
	color: var(--fclb-green-dark);
	white-space: nowrap;
	flex-shrink: 0;
}

/* Badge catégorie — métadonnée, autorisée sous 17px */
.bourse-badge {
	align-self: flex-start;
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 4px;
	background: var(--fclb-green-pale);
	color: var(--fclb-green-dark);
}

.bourse-row-desc {
	color: #3A3A3A;
	margin: 0;
}

.bourse-row-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: auto;
	padding-top: 8px;
}

/* Métadonnée — date de dépôt, autorisée sous 17px */
.bourse-row-footer > span:first-child {
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	color: #6B6F6C;
}

.bourse-contact-btn {
	background: var(--fclb-green-dark);
	color: #FFFFFF !important;
	font-size: clamp(15px, 0.7vw + 13px, 16px) !important;
	padding: 7px 14px;
	border-radius: 5px;
	white-space: nowrap;
}

@media (max-width: 560px) {
	.bourse-row {
		gap: 12px;
		padding: 12px;
	}
	.bourse-row-photo {
		width: 76px;
		height: 76px;
	}
	.bourse-row-top {
		flex-direction: column;
		gap: 4px;
	}
	.bourse-row-desc {
		display: none; /* garde la liste compacte sur mobile */
	}
}

/* ---------- Encart de confiance (remplace l'ancien bloc légal brut) ---------- */

.bourse-trust {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 22px 24px;
	background: var(--fclb-green-pale);
	border-radius: 12px;
}

.bourse-trust svg {
	flex-shrink: 0;
	color: var(--fclb-green-dark);
	margin-top: 2px;
}

.bourse-trust__titre {
	font-family: var(--font-heading);
	font-weight: 700;
	color: var(--fclb-green-dark);
	margin: 0 0 6px;
}

.bourse-trust__texte {
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	color: #3A3A3A;
	line-height: 1.55;
	margin: 0;
}

@media (max-width: 540px) {
	.bourse-trust { flex-direction: column; }
}

/* ==========================================================================
   Fiche détail d'une annonce — single-annonce_equip.php
   ========================================================================== */

.annonce-detail {
	max-width: 1140px;
	margin: 0 auto;
	padding: 32px 20px 80px;
}

.annonce-retour {
	display: inline-block;
	margin-bottom: 20px;
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	font-weight: 600;
	color: var(--fclb-green-dark);
	text-decoration: none;
}

.annonce-detail-layout {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 36px;
	align-items: start;
}

/* ---------- Carrousel ---------- */

.annonce-carousel {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: var(--fclb-green-pale);
}

.annonce-carousel-track {
	position: relative;
	aspect-ratio: 4 / 3;
}

.annonce-carousel-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
}

.annonce-carousel-slide.active {
	opacity: 1;
	visibility: visible;
}

.annonce-carousel-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.annonce-carousel-placeholder {
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--fclb-green-dark);
	font-weight: 600;
}

.annonce-carousel-prev,
.annonce-carousel-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.85);
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: var(--fclb-green-dark);
}

.annonce-carousel-prev { left: 10px; }
.annonce-carousel-next { right: 10px; }

.annonce-carousel-dots {
	position: absolute;
	bottom: 12px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 6px;
}

.annonce-carousel-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.6);
	cursor: pointer;
}

.annonce-carousel-dot.active {
	background: #FFFFFF;
}

/* ---------- Infos ---------- */

.annonce-title {
	margin: 10px 0 4px;
}

.annonce-prix {
	font-family: var(--font-heading);
	font-size: clamp(22px, 2vw + 14px, 28px);
	font-weight: 700;
	color: var(--fclb-green-dark);
	margin: 0 0 16px;
}

.annonce-description {
	color: #3A3A3A;
	margin-bottom: 12px;
}

.annonce-meta {
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	color: #6B6F6C;
	margin-bottom: 24px;
}

/* ---------- Formulaire de contact ---------- */

.annonce-contact-box {
	border: 1px solid #E4E7E4;
	border-radius: 10px;
	padding: 22px;
	background: #FFFFFF;
}

.annonce-contact-box h2 {
	font-size: clamp(19px, 1.5vw + 13px, 24px);
	margin: 0 0 14px;
}

.annonce-contact-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.annonce-contact-form label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-weight: 600;
	color: #3A3A3A;
}

.annonce-contact-form__hint {
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	font-weight: 600;
	color: #6B6F6C;
	margin: 0;
}

.annonce-contact-form input,
.annonce-contact-form textarea {
	padding: 10px 12px;
	border: 1px solid #D8E4CE;
	border-radius: 6px;
	resize: vertical;
}

.annonce-contact-form button {
	border: none;
	cursor: pointer;
	background: var(--fclb-green-dark);
	color: #FFFFFF;
	border-radius: 6px;
	padding: 12px;
}

.annonce-contact-form button:hover {
	background: #1B3D12;
}

.annonce-contact-confirmation {
	color: var(--fclb-green-dark);
	font-weight: 600;
}

.annonce-contact-erreur {
	color: #B3261E;
	margin-bottom: 10px;
}

@media (max-width: 800px) {
	.annonce-detail-layout {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Formulaire de dépôt d'annonce — page-deposer-une-annonce.php
   ========================================================================== */

.bourse-depot .annonce-retour {
	display: inline-block;
	margin-bottom: 20px;
}

.bourse-depot-form {
	max-width: 620px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.bourse-depot-section {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 18px;
	background: #FFFFFF;
	border: 1px solid #E4E7E4;
	border-radius: 14px;
	padding: 30px 28px 28px;
	box-shadow: 0 2px 10px rgba(30, 86, 49, 0.05);
}

.bourse-depot-step {
	position: absolute;
	top: -16px;
	left: 28px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--fclb-green-dark);
	color: #FFFFFF;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bourse-depot-section h2 {
	font-size: clamp(19px, 1.5vw + 13px, 23px);
	margin: 6px 0 0;
}

.bourse-depot-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.bourse-depot-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-weight: 600;
	color: #2A2E27;
}

.bourse-depot-form input[type="text"],
.bourse-depot-form input[type="number"],
.bourse-depot-form input[type="email"],
.bourse-depot-form input[type="tel"],
.bourse-depot-form select,
.bourse-depot-form textarea {
	font-family: var(--font-body);
	font-weight: 400;
	padding: 11px 14px;
	border: 1.5px solid #DEE4DA;
	border-radius: 8px;
	background: #FBFCFA;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.bourse-depot-form input:focus,
.bourse-depot-form select:focus,
.bourse-depot-form textarea:focus {
	outline: none;
	border-color: var(--fclb-green-dark);
	background: #FFFFFF;
	box-shadow: 0 0 0 3px rgba(42, 92, 30, 0.12);
}

.bourse-depot-form select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235B6B54' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 36px;
}

.bourse-depot-form textarea {
	resize: vertical;
	min-height: 96px;
}

.bourse-depot-hint {
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	font-weight: 400;
	color: #6B6F6C;
}

/* ---------- Toggle Prix / Don ---------- */

.bourse-depot-prix-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bourse-depot-prix-toggle {
	display: flex;
	gap: 14px;
	margin-bottom: 4px;
}

.bourse-depot-radio {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: 6px;
	font-weight: 400 !important;
	color: #3A3A3A !important;
	cursor: pointer;
}

.bourse-depot-radio input[type="radio"] {
	width: auto;
	margin: 0;
	accent-color: var(--fclb-green-dark);
	cursor: pointer;
}

/* ---------- Zone photos ---------- */

.bourse-depot-photo-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.bourse-depot-photo-label {
	font-weight: 600;
	color: #2A2E27;
}

.bourse-depot-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

.bourse-depot-dropzone {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	align-self: flex-start;
	background: var(--fclb-green-pale);
	color: var(--fclb-green-dark);
	border: 1.5px dashed #9FDF6A;
	border-radius: 8px;
	padding: 12px 20px;
	cursor: pointer;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: clamp(17px, 1vw + 13px, 18px);
	transition: background 0.15s ease, border-color 0.15s ease;
}

.bourse-depot-dropzone:hover {
	background: #D5EDC1;
	border-color: var(--fclb-green-dark);
}

.bourse-depot-photo-count {
	font-size: clamp(15px, 0.7vw + 13px, 16px);
	color: #6B6F6C;
	margin: 0;
}

.bourse-depot-photo-count--warning {
	color: #B3261E;
	font-weight: 600;
}

.bourse-depot-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.bourse-depot-preview-thumb {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #DEE4DA;
}

/* ---------- Bouton d'envoi ---------- */

.bourse-depot-form .bourse-deposit-btn {
	border: none;
	cursor: pointer;
	align-self: center;
	margin-top: 4px;
	padding: 14px 32px;
	font-size: clamp(17px, 1vw + 13px, 18px);
	box-shadow: 0 4px 14px rgba(42, 92, 30, 0.22);
	transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.bourse-depot-form .bourse-deposit-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(42, 92, 30, 0.28);
}

.bourse-depot-form .bourse-deposit-btn:active {
	transform: translateY(0);
}

.bourse-depot-form .bourse-deposit-btn:disabled {
	opacity: 0.6;
	cursor: wait;
	box-shadow: none;
	transform: none;
}

/* Piège anti-spam — invisible pour un humain, accessible aux bots */
.bourse-depot-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 560px) {
	.bourse-depot-section {
		padding: 26px 20px 22px;
	}
	.bourse-depot-row {
		grid-template-columns: 1fr;
	}
}