/*
 * Repris des composants réels du thème (Salient) et du plugin "évènements"
 * déjà en place sur cjd-clermont.fr, pour que le module colle au reste de
 * l'espace membre :
 * - couleurs pilotées par les variables du thème --nectar-accent-color
 *   (vert de marque) et --nectar-extra-color-2 (bleu), jamais en dur ;
 * - forme de carte reprise de .events_list .event (rayon, ombre douce) ;
 * - forme de badge reprise de .event .categorie (pastille bordée) ;
 * - forme de bouton reprise de .apply_event_btn (pilule pleine couleur).
 */

.cjd-liste-idees,
.cjd-idees-validees,
.cjd-formulaire-depot {
	font-family: 'Open Sans', Helvetica, sans-serif;
	color: #2d2d2d;
}

.cjd-vide {
	background: #f1f1f1;
	border-radius: 10px;
	padding: 20px;
	font-size: 1rem;
}

/* --- Grille de cartes --- */

.cjd-liste-idees,
.cjd-idees-validees {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
}

.cjd-idee,
.cjd-idee-validee {
	display: flex;
	flex-direction: column;
	width: calc(33.333% - 20px);
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
	padding: 24px;
}

@media screen and (max-width: 1300px) {
	.cjd-idee,
	.cjd-idee-validee {
		width: calc(50% - 15px);
	}
}

@media screen and (max-width: 700px) {
	.cjd-idee,
	.cjd-idee-validee {
		width: 100%;
	}
}

/* --- Badges (pastilles) --- */

.cjd-idee__badges,
.cjd-idee-validee__badges {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.cjd-badge--statut {
	margin-left: auto;
}

.cjd-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border-radius: 21px;
	padding: 5px 14px;
	font-size: 13px;
	font-weight: 600;
	line-height: 20px;
	white-space: nowrap;
}

.cjd-badge .cjd-icone {
	width: 14px;
	height: 14px;
}

.cjd-idee__actions-auteur {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.cjd-bouton-secondaire {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 1px solid var(--nectar-accent-color, #00d556);
	color: var(--nectar-accent-color, #00d556);
	border-radius: 29px;
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.cjd-bouton-secondaire .cjd-icone {
	width: 14px;
	height: 14px;
}

.cjd-bouton-secondaire:hover {
	background: var(--nectar-accent-color, #00d556);
	color: #fff;
}

.cjd-formulaire-edition {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid #ececec;
}

.cjd-formulaire-edition .cjd-bouton-depot {
	margin-right: 10px;
}

.cjd-idee__annuler-edition {
	background: none;
	border: none;
	color: #8c8c8c;
	font-weight: 600;
	cursor: pointer;
}

.cjd-badge--nouveau {
	background: var(--nectar-extra-color-2, #1882e3);
	color: #fff;
}

.cjd-badge--statut {
	border: 1px solid var(--nectar-accent-color, #00d556);
	color: var(--nectar-accent-color, #00d556);
	background: transparent;
}

.cjd-badge--validee,
.cjd-badge--seuil-atteint {
	background: var(--nectar-accent-color, #00d556);
	color: #fff;
}

.cjd-idee-validee__date {
	font-size: 13px;
	font-weight: 700;
	color: #505050;
}

/* --- Contenu --- */

.cjd-idee__titre,
.cjd-idee-validee__titre {
	margin: 0 0 10px;
	font-size: 1.15rem;
	font-weight: 700;
	color: #2d2d2d;
}

.cjd-idee__description,
.cjd-idee-validee__description {
	margin: 0;
	color: #505050;
	font-size: 0.95rem;
	line-height: 1.6;
}

.cjd-idee__description p,
.cjd-idee-validee__description p {
	margin: 0 0 0.5rem;
}

.cjd-idee__description[data-clamped] {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.cjd-idee__conditions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 10px 0 0;
	font-size: 0.8rem;
	font-weight: 600;
	color: #8c8c8c;
}

.cjd-idee__voir-plus {
	align-self: flex-start;
	margin-top: 6px;
	padding: 0;
	border: none;
	background: none;
	color: var(--nectar-accent-color, #00d556);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}

.cjd-idee__separateur {
	border: none;
	border-top: 1px solid #ececec;
	margin: 18px 0 16px;
}

/* --- Pied de carte : votes à gauche, action à droite --- */

.cjd-idee__pied {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.cjd-idee__action {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.cjd-idee__votes,
.cjd-idee-validee__votes {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #8c8c8c;
	font-size: 0.9rem;
}

.cjd-idee__votes .cjd-icone {
	width: 18px;
	height: 18px;
	color: #2d2d2d;
}

.cjd-idee__compteur {
	font-weight: 700;
	color: #2d2d2d;
}

.cjd-idee__auteur {
	padding-left: 8px;
	border-left: 1px solid #e0e0e0;
}

.cjd-idee-validee__votes {
	margin-top: 14px;
	color: #8c8c8c;
}

/* --- Bouton de vote (pilule, reprend .apply_event_btn) --- */

.cjd-bouton-vote {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--nectar-accent-color, #00d556);
	color: #fff;
	border: none;
	border-radius: 29px;
	padding: 10px 22px;
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.cjd-bouton-vote .cjd-icone {
	width: 16px;
	height: 16px;
}

.cjd-bouton-vote:hover {
	opacity: 0.85;
}

.cjd-bouton-vote:disabled {
	background: #d9d9d9;
	color: #8c8c8c;
	cursor: not-allowed;
	opacity: 1;
}

.cjd-bouton-vote--actif {
	background: #2d2d2d;
}

/* --- Messages --- */

.cjd-message {
	border-radius: 10px;
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.cjd-message--succes {
	background: rgba(0, 213, 86, 0.12);
	color: #00873a;
}

.cjd-message--erreur {
	background: rgba(204, 0, 0, 0.08);
	color: #c00;
}

/* --- Formulaire de dépôt --- */

.cjd-formulaire-depot .cjd-champ {
	margin: 0 0 0.6rem;
}

.cjd-formulaire-depot label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
	font-size: 0.9rem;
}

.cjd-champ__requis {
	color: #c00;
}

.cjd-champ__optionnel {
	font-weight: 400;
	color: #8c8c8c;
	font-size: 0.8rem;
}

.cjd-formulaire-depot input[type='text'],
.cjd-formulaire-depot input[type='date'],
.cjd-formulaire-depot input[type='number'],
.cjd-formulaire-depot textarea {
	width: 100%;
	max-width: 500px;
	padding: 8px 10px;
	font-size: 14px;
	font-family: inherit;
	line-height: 20px;
	color: #555;
	background-color: #f1f1f1;
	border: none;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.cjd-formulaire-depot input:focus,
.cjd-formulaire-depot textarea:focus {
	outline: 2px solid var(--nectar-accent-color, #00d556);
	background-color: #fff;
}

.cjd-bouton-depot {
	display: inline-flex;
	align-items: center;
	background: var(--nectar-accent-color, #00d556);
	color: #fff;
	border: none;
	border-radius: 29px;
	padding: 13px 35px;
	font-size: 16px;
	font-weight: 700;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.cjd-bouton-depot:hover {
	opacity: 0.85;
}

@media screen and (max-width: 480px) {
	.cjd-idee__pied {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.cjd-bouton-vote {
		width: 100%;
		justify-content: center;
	}
}
