/* DWC — Exposants : styles de base.
   Couleurs, tailles et colonnes viennent des réglages (Exposants › Réglages › Apparence),
   sous forme de variables --dwcex-*. Rien à modifier ici. */

.dwcex-exposants,
.dwcex-detail {
	--dwcex-texte: #1c1c1c;
	--dwcex-douce: #6b7280;
	--dwcex-accent: #0f766e;
	--dwcex-bordure: #e3e5e8;
	--dwcex-fond: #fff;
	--dwcex-rayon: 6px;
	--dwcex-espace: 20px;
	--dwcex-carte-hauteur: 190px;
	--dwcex-logo-hauteur: 82px;
	--dwcex-logo-largeur: 100%;
	--dwcex-detail-logo: 300px;
	--dwcex-ombre: 0 1px 2px rgba(16, 24, 40, .05);
	--dwcex-ombre-survol: 0 8px 24px rgba(16, 24, 40, .10);
	--dwcex-survol-y: -2px;
	color: var(--dwcex-texte);
}

.dwcex-exposants__titre { margin: 0 0 var(--dwcex-espace); }

/* Pages automatiques (archive et fiche natives) : conteneur centré. */
.dwcex-archive,
.dwcex-single {
	box-sizing: border-box;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 48px 20px 64px;
}

.dwcex-archive__entete h1 { margin: 0 0 28px; }

/* ---------- Filtres ---------- */

.dwcex-filtres {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 24px;
	align-items: flex-end;
	margin: 0 0 28px;
}

.dwcex-filtre {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: .9rem;
}

.dwcex-filtre__label {
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--dwcex-douce);
}

.dwcex-filtre select,
.dwcex-filtre input[type="search"] {
	min-width: 190px;
	padding: 9px 12px;
	border: 1px solid var(--dwcex-bordure);
	border-radius: var(--dwcex-rayon);
	background: #fff;
	color: var(--dwcex-texte);
	font-size: .9rem;
}

.dwcex-filtre select:focus-visible,
.dwcex-filtre input[type="search"]:focus-visible,
.dwcex-bouton:focus-visible,
.dwcex-page:focus-visible {
	outline: 2px solid var(--dwcex-accent);
	outline-offset: 2px;
}

.dwcex-boutons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dwcex-bouton {
	padding: 7px 14px;
	border: 1px solid var(--dwcex-bordure);
	border-radius: 999px;
	background: #fff;
	color: var(--dwcex-texte);
	font-size: .85rem;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color .15s, border-color .15s, color .15s;
}

.dwcex-bouton:hover { border-color: var(--dwcex-accent); color: var(--dwcex-accent); }

.dwcex-bouton.is-actif {
	background: var(--dwcex-accent);
	border-color: var(--dwcex-accent);
	color: #fff;
}

/* ---------- Grille ---------- */

.dwcex-resultats { transition: opacity .15s; }
.dwcex-exposants.is-chargement .dwcex-resultats { opacity: .45; pointer-events: none; }

.dwcex-grille {
	display: grid;
	grid-template-columns: repeat(var(--dwcex-cols, 4), minmax(0, 1fr));
	gap: var(--dwcex-espace);
	padding-top: 12px; /* place pour le badge qui déborde */
}

/* ---------- Carte ---------- */

.dwcex-carte {
	position: relative;
	background: var(--dwcex-fond);
	border: 1px solid var(--dwcex-bordure);
	border-radius: var(--dwcex-rayon);
	box-shadow: var(--dwcex-ombre);
	transition: box-shadow .18s ease, transform .18s ease;
}

.dwcex-carte:hover {
	box-shadow: var(--dwcex-ombre-survol);
	transform: translateY(var(--dwcex-survol-y));
}

.dwcex-carte__lien {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	height: 100%;
	min-height: var(--dwcex-carte-hauteur);
	padding: 30px 18px 22px;
	box-sizing: border-box;
	color: inherit;
	text-align: center;
	text-decoration: none;
}

.dwcex-carte__logo {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.dwcex-carte__logo img {
	width: auto;
	height: auto;
	max-width: var(--dwcex-logo-largeur);
	max-height: var(--dwcex-logo-hauteur);
	object-fit: contain;
}

.dwcex-carte__sans-logo { font-weight: 700; font-size: 1.05rem; }

.dwcex-carte__nom {
	display: block;
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .01em;
}

.dwcex-carte__desc {
	font-size: .8rem;
	line-height: 1.45;
	color: var(--dwcex-douce);
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Badges (couleur : réglage de chaque niveau) ---------- */

.dwcex-badge {
	position: absolute;
	top: -11px;
	left: 14px;
	padding: 3px 12px;
	border-radius: 12px;
	background: #2f5c8f;
	color: #fff;
	font-size: .7rem;
	font-weight: 500;
	line-height: 1.6;
	white-space: nowrap;
}

.dwcex-badge--statique,
.dwcex-badge--petit { position: static; display: inline-block; }
.dwcex-badge--petit { padding: 2px 10px; font-size: .66rem; }

/* ---------- Pagination et états ---------- */

.dwcex-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: 34px;
}

.dwcex-page {
	min-width: 38px;
	padding: 8px 12px;
	box-sizing: border-box;
	border: 1px solid var(--dwcex-bordure);
	border-radius: var(--dwcex-rayon);
	color: var(--dwcex-texte);
	text-align: center;
	text-decoration: none;
}

.dwcex-page:hover { border-color: var(--dwcex-accent); }
.dwcex-page.is-actif { background: var(--dwcex-accent); border-color: var(--dwcex-accent); color: #fff; }

.dwcex-vide { padding: 40px 0; color: var(--dwcex-douce); text-align: center; }

/* ---------- Fiche détaillée ---------- */

.dwcex-detail__titre { margin: 0 0 6px; }
.dwcex-detail__accroche { margin: 0 0 28px; font-size: 1.05rem; color: var(--dwcex-douce); }

.dwcex-detail__tete {
	display: grid;
	grid-template-columns: minmax(0, var(--dwcex-detail-logo)) minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	margin-bottom: 36px;
}

.dwcex-detail__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px;
	background: #fff;
	border: 1px solid var(--dwcex-bordure);
	border-radius: var(--dwcex-rayon);
}

.dwcex-detail__logo:empty { display: none; }
.dwcex-detail__logo img { max-width: 100%; height: auto; }

.dwcex-detail__contact-titre { margin: 0 0 16px; font-size: 1.4rem; }
.dwcex-detail__badges { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 14px; }

.dwcex-detail__site a,
.dwcex-detail__retour a,
.dwcex-participation__edition {
	color: var(--dwcex-accent);
	text-decoration: none;
}

.dwcex-detail__site a { border-bottom: 1px solid currentColor; }
.dwcex-detail__site a:hover { border-bottom-color: transparent; }
.dwcex-detail__adresse,
.dwcex-detail__tel { margin: 6px 0; color: var(--dwcex-douce); }
.dwcex-detail__tel a { color: inherit; }
.dwcex-detail__corps { line-height: 1.65; }
.dwcex-detail__retour { margin-top: 40px; }

.dwcex-participations { margin-top: 44px; padding-top: 8px; border-top: 1px solid var(--dwcex-bordure); }
.dwcex-participations__titre { margin: 22px 0 14px; font-size: 1.3rem; }
.dwcex-participations__liste { margin: 0; padding: 0; list-style: none; }

.dwcex-participation {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	padding: 12px 4px;
	border-bottom: 1px solid var(--dwcex-bordure);
}

.dwcex-participation:last-child { border-bottom: 0; }
.dwcex-participation.is-courante { padding-left: 12px; padding-right: 12px; border-radius: var(--dwcex-rayon); background: rgba(0, 0, 0, .03); }
.dwcex-participation__edition { min-width: 68px; font-weight: 600; }
.dwcex-participation__edition:hover { text-decoration: underline; }
.dwcex-stand, .dwcex-note { font-size: .82rem; color: var(--dwcex-douce); }

/* ---------- Écrans plus étroits ---------- */

@media (max-width: 1024px) {
	.dwcex-grille { grid-template-columns: repeat(min(var(--dwcex-cols, 4), var(--dwcex-cols-tablette, 3)), minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.dwcex-grille { grid-template-columns: repeat(var(--dwcex-cols-mobile, 1), minmax(0, 1fr)); }
	.dwcex-detail__tete { grid-template-columns: 1fr; gap: 24px; }
	.dwcex-filtre { flex: 1 1 200px; }
	.dwcex-filtre select,
	.dwcex-filtre input[type="search"] { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.dwcex-carte, .dwcex-resultats, .dwcex-bouton { transition: none; }
	.dwcex-carte:hover { transform: none; }
}
