/* ═════════════════════════════════════════════════════════════
   JE CHERCHE À MÉDINE — THEME V7 REDESIGN
   Fichier de surcharges appliqué par-dessus main.css.
   Cible : cartes catégorie + sous-catégorie "app-like" visibles.
   Non-destructif : retirer l'enqueue = retour au design V6.
   ═════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   1. GRILLE CATÉGORIES — 2 COLONNES FORCÉES SUR MOBILE
   Corrige le bug ligne 462 de main.css qui forçait 1fr ≤639px.
   ───────────────────────────────────────────────────────────── */
.categories-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: .75rem;
}

@media (min-width: 560px) {
	.categories-grid {
		grid-template-columns: repeat(3, 1fr) !important;
		gap: 1rem;
	}
}

@media (min-width: 1024px) {
	.categories-grid {
		grid-template-columns: repeat(4, 1fr) !important;
		gap: 1.25rem;
	}
}

/* ─────────────────────────────────────────────────────────────
   2. CARTES CATÉGORIE — REDESIGN PREMIUM (.cat-mega-card)
   ───────────────────────────────────────────────────────────── */
.cat-mega-card {
	position: relative;
	background: #fff;
	border-radius: 20px;
	padding: 18px 16px 16px;
	border: 1px solid rgba(15, 23, 42, 0.06);
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 4px 16px rgba(15, 23, 42, 0.06);
	transition:
		transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	display: block;
	overflow: hidden;
	min-height: 130px;
	text-decoration: none;
	color: inherit;
	-webkit-tap-highlight-color: transparent;
}

/* Halo coloré en fond — utilise la classe .cat-bg-* existante sur l'emoji
   pour générer un halo cohérent avec la palette de la catégorie */
.cat-mega-card::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 110px;
	height: 110px;
	border-radius: 50%;
	transform: translate(35%, -35%);
	transition: transform 0.3s, opacity 0.3s;
	pointer-events: none;
	opacity: 0.55;
	z-index: 0;
}

/* Halo — 1 règle par classe .cat-bg-* (réutilise la palette existante) */
.cat-mega-card:has(.cat-bg-health)     ::before,
.cat-mega-card .cat-bg-health     ~ ::before { background: #FECACA; }
.cat-mega-card.halo-health::before     { background: #FECACA; }
.cat-mega-card.halo-food::before       { background: #FED7AA; }
.cat-mega-card.halo-sport::before      { background: #A7F3D0; }
.cat-mega-card.halo-kids::before       { background: #FBCFE8; }
.cat-mega-card.halo-school::before     { background: #C7D2FE; }
.cat-mega-card.halo-housing::before    { background: #FDE68A; }
.cat-mega-card.halo-admin::before      { background: #BAE6FD; }
.cat-mega-card.halo-translator::before { background: #FECDD3; }
.cat-mega-card.halo-visa::before       { background: #BBF7D0; }
.cat-mega-card.halo-commerce::before   { background: #FDE68A; }

/* Fallback : détecte via le child .cat-bg-* si classe halo-* non présente */
.cat-mega-card:has(.cat-bg-health)::before     { background: #FECACA; }
.cat-mega-card:has(.cat-bg-food)::before       { background: #FED7AA; }
.cat-mega-card:has(.cat-bg-sport)::before      { background: #A7F3D0; }
.cat-mega-card:has(.cat-bg-kids)::before       { background: #FBCFE8; }
.cat-mega-card:has(.cat-bg-school)::before     { background: #C7D2FE; }
.cat-mega-card:has(.cat-bg-housing)::before    { background: #FDE68A; }
.cat-mega-card:has(.cat-bg-admin)::before      { background: #BAE6FD; }
.cat-mega-card:has(.cat-bg-translator)::before { background: #FECDD3; }
.cat-mega-card:has(.cat-bg-visa)::before       { background: #BBF7D0; }
.cat-mega-card:has(.cat-bg-commerce)::before   { background: #FDE68A; }

/* Feedback hover / press */
.cat-mega-card:hover {
	transform: translateY(-2px);
	box-shadow:
		0 4px 12px rgba(15, 23, 42, 0.08),
		0 8px 24px rgba(15, 23, 42, 0.08);
}

.cat-mega-card:active {
	transform: scale(0.97);
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 2px 8px rgba(15, 23, 42, 0.08);
}

.cat-mega-card:active::before {
	transform: translate(20%, -20%);
	opacity: 0.8;
}

.cat-mega-card:focus-visible {
	outline: 2px solid #2563EB;
	outline-offset: 3px;
}

/* Le contenu reste au-dessus du halo */
.cat-mega-card .cat-header,
.cat-mega-card .cat-subcategories {
	position: relative;
	z-index: 1;
}

/* Emoji plus grand et plus "chargé" */
.cat-mega-card .cat-emoji {
	width: 56px !important;
	height: 56px !important;
	border-radius: 16px !important;
	font-size: 28px !important;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.6),
		0 2px 8px rgba(0, 0, 0, 0.08) !important;
	flex-shrink: 0;
}

.cat-mega-card .cat-name {
	font-size: 15px !important;
	font-weight: 800 !important;
	letter-spacing: -0.2px !important;
	line-height: 1.2 !important;
	color: #0F172A;
}

/* Badge count — pill visible avec point coloré */
.cat-mega-card .cat-count {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	font-size: 11px !important;
	font-weight: 700 !important;
	color: #0F172A !important;
	background: rgba(15, 23, 42, 0.06);
	padding: 3px 9px;
	border-radius: 999px;
	margin-top: 4px !important;
	width: fit-content;
	line-height: 1.3;
}

.cat-mega-card .cat-count::before {
	content: '';
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.8;
	flex-shrink: 0;
}

/* Recolorise le badge selon la catégorie */
.cat-mega-card:has(.cat-bg-health)     .cat-count { color: #B91C1C; background: #FEE2E2; }
.cat-mega-card:has(.cat-bg-food)       .cat-count { color: #C2410C; background: #FFEDD5; }
.cat-mega-card:has(.cat-bg-sport)      .cat-count { color: #047857; background: #D1FAE5; }
.cat-mega-card:has(.cat-bg-kids)       .cat-count { color: #BE185D; background: #FCE7F3; }
.cat-mega-card:has(.cat-bg-school)     .cat-count { color: #3730A3; background: #E0E7FF; }
.cat-mega-card:has(.cat-bg-housing)    .cat-count { color: #A16207; background: #FEF3C7; }
.cat-mega-card:has(.cat-bg-admin)      .cat-count { color: #0369A1; background: #E0F2FE; }
.cat-mega-card:has(.cat-bg-translator) .cat-count { color: #BE123C; background: #FFE4E6; }
.cat-mega-card:has(.cat-bg-visa)       .cat-count { color: #15803D; background: #DCFCE7; }
.cat-mega-card:has(.cat-bg-commerce)   .cat-count { color: #A16207; background: #FEF3C7; }

/* ─────────────────────────────────────────────────────────────
   3. HEADER CATÉGORIE (page archive) — plus app-like
   ───────────────────────────────────────────────────────────── */
.category-header {
	background: #fff;
	border-radius: 20px;
	padding: 18px;
	border: 1px solid rgba(15, 23, 42, 0.06);
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 4px 16px rgba(15, 23, 42, 0.06);
	position: relative;
	overflow: hidden;
	margin-bottom: 1rem;
}

.category-header::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	transform: translate(35%, -35%);
	opacity: 0.45;
	z-index: 0;
	pointer-events: none;
}

.category-header:has(.cat-bg-health)     ::before { background: #FECACA; }
.category-header:has(.cat-bg-food)       ::before { background: #FED7AA; }
.category-header:has(.cat-bg-sport)      ::before { background: #A7F3D0; }
.category-header:has(.cat-bg-kids)       ::before { background: #FBCFE8; }
.category-header:has(.cat-bg-school)     ::before { background: #C7D2FE; }
.category-header:has(.cat-bg-housing)    ::before { background: #FDE68A; }
.category-header:has(.cat-bg-admin)      ::before { background: #BAE6FD; }
.category-header:has(.cat-bg-translator) ::before { background: #FECDD3; }
.category-header:has(.cat-bg-visa)       ::before { background: #BBF7D0; }
.category-header:has(.cat-bg-commerce)   ::before { background: #FDE68A; }

.category-header > * {
	position: relative;
	z-index: 1;
}

.category-header .cat-big-icon {
	width: 68px;
	height: 68px;
	border-radius: 18px !important;
	font-size: 34px !important;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.6),
		0 2px 10px rgba(0, 0, 0, 0.1) !important;
	flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   4. CARTES ACCUEIL V6 (.ccard6) — plus visibles + halo
   ───────────────────────────────────────────────────────────── */
.ccard6 {
	position: relative;
	overflow: hidden;
	padding: 1.5rem 1rem 1.25rem !important;
	border-radius: 20px !important;
	border: 1px solid rgba(15, 23, 42, 0.06) !important;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 4px 16px rgba(15, 23, 42, 0.06) !important;
	transition:
		transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
	-webkit-tap-highlight-color: transparent;
}

/* Halo subtil sur les cartes accueil V6 */
.ccard6::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 100px;
	height: 100px;
	border-radius: 50%;
	transform: translate(35%, -35%);
	opacity: 0.35;
	z-index: 0;
	pointer-events: none;
	background: #BAE6FD;
	transition: opacity 0.3s, transform 0.3s;
}

.ccard6[data-slug="sante"]::before              { background: #FECACA; }
.ccard6[data-slug="restaurants"]::before        { background: #FED7AA; }
.ccard6[data-slug="sport"]::before              { background: #A7F3D0; }
.ccard6[data-slug="activites-enfants"]::before  { background: #FBCFE8; }
.ccard6[data-slug="ecoles-privees"]::before     { background: #C7D2FE; }
.ccard6[data-slug="logement"]::before           { background: #FDE68A; }
.ccard6[data-slug="administrations"]::before    { background: #BAE6FD; }
.ccard6[data-slug="commerces"]::before          { background: #DDD6FE; }
.ccard6[data-slug="traducteurs-officiels"]::before { background: #FECDD3; }
.ccard6[data-slug="maktab-visa"]::before        { background: #BBF7D0; }

.ccard6:hover {
	transform: translateY(-3px);
	box-shadow:
		0 6px 16px rgba(15, 23, 42, 0.08),
		0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

.ccard6:active {
	transform: scale(0.97);
}

.ccard6:active::before {
	transform: translate(20%, -20%);
	opacity: 0.55;
}

.ccard6 > * {
	position: relative;
	z-index: 1;
}

.ccard6__em {
	font-size: 2.5rem !important;
	margin-bottom: 0.5rem !important;
	line-height: 1 !important;
}

.ccard6__nm {
	font-weight: 800 !important;
	font-size: 0.9375rem !important;
	color: #0F172A !important;
	letter-spacing: -0.2px;
}

.ccard6__ct {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.6875rem !important;
	font-weight: 700 !important;
	color: #64748B !important;
	background: rgba(15, 23, 42, 0.05);
	padding: 3px 9px;
	border-radius: 999px;
	margin-top: 0.5rem !important;
	line-height: 1.3;
}

.ccard6__ct::before {
	content: '';
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.8;
	flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   5. ANIMATIONS STAGGERED RENFORCÉES
   ───────────────────────────────────────────────────────────── */
@keyframes jcm-v7-slide-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.categories-grid .cat-mega-card,
.cats-v6__grid .ccard6 {
	animation: jcm-v7-slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.categories-grid .cat-mega-card:nth-child(1),
.cats-v6__grid .ccard6:nth-child(1) { animation-delay: 0.05s; }
.categories-grid .cat-mega-card:nth-child(2),
.cats-v6__grid .ccard6:nth-child(2) { animation-delay: 0.10s; }
.categories-grid .cat-mega-card:nth-child(3),
.cats-v6__grid .ccard6:nth-child(3) { animation-delay: 0.15s; }
.categories-grid .cat-mega-card:nth-child(4),
.cats-v6__grid .ccard6:nth-child(4) { animation-delay: 0.20s; }
.categories-grid .cat-mega-card:nth-child(5),
.cats-v6__grid .ccard6:nth-child(5) { animation-delay: 0.25s; }
.categories-grid .cat-mega-card:nth-child(6),
.cats-v6__grid .ccard6:nth-child(6) { animation-delay: 0.30s; }
.categories-grid .cat-mega-card:nth-child(7),
.cats-v6__grid .ccard6:nth-child(7) { animation-delay: 0.35s; }
.categories-grid .cat-mega-card:nth-child(8),
.cats-v6__grid .ccard6:nth-child(8) { animation-delay: 0.40s; }
.categories-grid .cat-mega-card:nth-child(n+9),
.cats-v6__grid .ccard6:nth-child(n+9) { animation-delay: 0.45s; }

/* ─────────────────────────────────────────────────────────────
   6. ACCESSIBILITÉ
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.cat-mega-card,
	.cat-mega-card::before,
	.ccard6,
	.ccard6::before,
	.categories-grid .cat-mega-card,
	.cats-v6__grid .ccard6 {
		animation: none !important;
		transition: none !important;
	}
}

/* ─────────────────────────────────────────────────────────────
   7. RTL (arabe) — miroir des halos
   ───────────────────────────────────────────────────────────── */
[dir="rtl"] .cat-mega-card::before,
[dir="rtl"] .category-header::before,
[dir="rtl"] .ccard6::before {
	right: auto;
	left: 0;
	transform: translate(-35%, -35%);
}

[dir="rtl"] .cat-mega-card:active::before,
[dir="rtl"] .ccard6:active::before {
	transform: translate(-20%, -20%);
}

/* ─────────────────────────────────────────────────────────────
   7b. FIX V7.0.1 — MOBILE ÉTROIT (≤480px)
   Sur cartes narrow, bascule en layout VERTICAL centré :
   emoji en haut, nom + badge centrés en dessous.
   Corrige :
     - texte tronqué ("Cardiologi…", "Dermatolog…")
     - badge "1\nadresses" qui casse ligne
     - halo trop gros qui masque le contenu
   ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {

	/* Carte : passe en vertical + padding compact */
	.cat-mega-card {
		padding: 14px 12px 12px !important;
		min-height: 140px;
	}

	/* Header : colonne centrée */
	.cat-mega-card .cat-header {
		flex-direction: column !important;
		align-items: center !important;
		text-align: center;
		gap: 10px !important;
		margin-bottom: 0 !important;
	}

	/* Emoji compact */
	.cat-mega-card .cat-emoji {
		width: 48px !important;
		height: 48px !important;
		font-size: 24px !important;
		border-radius: 14px !important;
	}

	/* Le div conteneur (nom + badge) prend toute la largeur */
	.cat-mega-card .cat-header > div:not(.cat-emoji) {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 6px;
	}

	/* Nom : wrap autorisé, 2 lignes max avec ellipsis */
	.cat-mega-card .cat-name {
		font-size: 13px !important;
		line-height: 1.25 !important;
		white-space: normal !important;
		word-wrap: break-word;
		overflow-wrap: break-word;
		hyphens: auto;
		/* Clamp à 2 lignes max */
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		max-width: 100%;
	}

	/* Badge count : NE CASSE JAMAIS LA LIGNE */
	.cat-mega-card .cat-count {
		font-size: 10px !important;
		padding: 2px 8px !important;
		margin-top: 2px !important;
		white-space: nowrap !important;
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	/* Halo réduit et repositionné (ne déborde plus) */
	.cat-mega-card::before {
		width: 80px !important;
		height: 80px !important;
		transform: translate(30%, -30%);
		opacity: 0.45;
	}

	.cat-mega-card:active::before {
		transform: translate(15%, -15%);
		opacity: 0.7;
	}

	/* Grille : resserre le gap pour plus d'espace par carte */
	.categories-grid {
		gap: 10px !important;
	}
}

/* Entre 481px et 559px : layout horizontal mais compact */
@media (min-width: 481px) and (max-width: 559px) {
	.cat-mega-card .cat-emoji {
		width: 48px !important;
		height: 48px !important;
		font-size: 24px !important;
	}
	.cat-mega-card .cat-name {
		font-size: 14px !important;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.cat-mega-card .cat-count {
		white-space: nowrap !important;
	}
}

/* Tous écrans : protège TOUJOURS le badge du wrap */
.cat-mega-card .cat-count,
.ccard6__ct {
	white-space: nowrap !important;
}

/* ─────────────────────────────────────────────────────────────
   9. ACCESSIBILITÉ V7.1.0 — skip-link + focus visible
   ───────────────────────────────────────────────────────────── */
.skip-link.screen-reader-text:focus {
	position: absolute !important;
	top: 10px;
	left: 10px;
	background: #fff;
	color: #1B4F72;
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	border-radius: 8px;
	z-index: 100000;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	outline: 2px solid #2E86C1;
	clip: auto !important;
	width: auto !important;
	height: auto !important;
}

/* Focus outline visible sur tous les éléments interactifs */
.cat-mega-card:focus-visible,
.ccard6:focus-visible,
.listing-card:focus-visible,
.btn-cta:focus-visible,
button:focus-visible,
a:focus-visible {
	outline: 2px solid #2E86C1;
	outline-offset: 3px;
}

/* ─────────────────────────────────────────────────────────────
   10. OPTIMISATION — preload hint utile pour Twemoji
   (Twemoji est chargé lazy, on n'en fait pas plus ici)
   ───────────────────────────────────────────────────────────── */
img.emoji {
	pointer-events: none;
}

/* =============================================================
   V7.2.1 — FICHE LISTING PREMIUM APP-LIKE
   ============================================================= */

/* ─────────────────────────────────────────────────────────────
   11. SECTION CARDS — structure réutilisable
   ───────────────────────────────────────────────────────────── */
.jcm-card-section {
	background: #fff;
	border-radius: 20px;
	border: 1px solid rgba(15, 23, 42, 0.06);
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 4px 20px rgba(15, 23, 42, 0.06);
	padding: 24px;
	margin-top: 20px;
}

.jcm-card-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.jcm-card-section-head h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 1.25rem;
	font-weight: 800;
	color: #0F172A;
	letter-spacing: -0.4px;
	line-height: 1.2;
}

.jcm-card-section-icon {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	font-size: 18px;
	background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
	border-radius: 10px;
	flex-shrink: 0;
	line-height: 1;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ─────────────────────────────────────────────────────────────
   12. BOUTON PARTAGER — repositionné et plus premium
   ───────────────────────────────────────────────────────────── */
.jcm-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: #fff;
	border: 1.5px solid #E2E8F0;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 700;
	color: #475569;
	cursor: pointer;
	margin-top: 14px;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	-webkit-tap-highlight-color: transparent;
	font-family: inherit;
}

.jcm-share-btn:hover {
	background: #EFF6FF;
	border-color: #2E86C1;
	color: #2E86C1;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(46, 134, 193, 0.15);
}

.jcm-share-btn:active {
	transform: scale(0.96);
}

.jcm-share-btn svg { flex-shrink: 0; }

.jcm-share-toast {
	display: inline-block;
	margin-left: 10px;
	padding: 8px 14px;
	background: #10B981;
	color: #fff;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	animation: jcm-toast-in 0.3s ease-out;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.jcm-share-toast.is-error { background: #DC2626; }

@keyframes jcm-toast-in {
	from { opacity: 0; transform: translateY(-8px) scale(0.9); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─────────────────────────────────────────────────────────────
   13. BOUTON "SIGNALER UNE INFORMATION INCORRECTE"
   ───────────────────────────────────────────────────────────── */
.jcm-report-wrap {
	margin-top: 20px;
	display: flex;
	justify-content: center;
}

.jcm-report-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	background: #fff;
	border: 1.5px dashed #CBD5E1;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: #64748B;
	text-decoration: none;
	transition: all 0.2s;
	-webkit-tap-highlight-color: transparent;
}

.jcm-report-btn:hover {
	background: #FEF2F2;
	border-color: #FCA5A5;
	border-style: solid;
	color: #DC2626;
}

.jcm-report-btn:active { transform: scale(0.97); }
.jcm-report-btn svg { flex-shrink: 0; }

/* ─────────────────────────────────────────────────────────────
   14. REVIEWS / AVIS — refonte premium
   ───────────────────────────────────────────────────────────── */
.jcm-reviews-aggregate {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 6px 14px;
	background: linear-gradient(135deg, #FEF3C7, #FDE68A);
	border-radius: 999px;
	border: 1px solid rgba(245, 158, 11, 0.2);
}

.jcm-aggr-num {
	font-size: 1.5rem;
	font-weight: 800;
	color: #B45309;
	line-height: 1;
}

.jcm-aggr-stars {
	color: #F59E0B;
	font-size: 14px;
	letter-spacing: 1px;
	line-height: 1;
}

.jcm-aggr-stars .empty { color: rgba(245, 158, 11, 0.25); }

.jcm-aggr-stars .half {
	background: linear-gradient(90deg, #F59E0B 50%, rgba(245, 158, 11, 0.25) 50%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.jcm-aggr-count {
	font-size: 12px;
	color: #92400E;
	font-weight: 600;
}

.jcm-reviews-list {
	list-style: none;
	padding: 0;
	margin: 0 0 24px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.jcm-review-item {
	padding: 16px;
	background: #F8FAFC;
	border-radius: 14px;
	border: 1px solid rgba(15, 23, 42, 0.04);
	transition: border-color 0.2s;
}

.jcm-review-item:hover {
	border-color: rgba(15, 23, 42, 0.1);
}

.jcm-review-head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	column-gap: 12px;
	row-gap: 4px;
	margin-bottom: 12px;
}

.jcm-review-avatar {
	grid-row: 1 / 3;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #2E86C1, #1B4F72);
	color: #fff;
	font-weight: 800;
	font-size: 16px;
	display: grid;
	place-items: center;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(46, 134, 193, 0.25);
}

.jcm-review-meta-top {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.jcm-review-author {
	font-size: 14px;
	color: #0F172A;
	font-weight: 700;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jcm-review-date {
	font-size: 11px;
	color: #94A3B8;
	font-weight: 500;
}

.jcm-review-rating {
	grid-column: 3;
	grid-row: 1 / 3;
	color: #F59E0B;
	font-size: 14px;
	letter-spacing: 1px;
	line-height: 1;
	white-space: nowrap;
}

.jcm-review-rating .empty { color: #E2E8F0; }

.jcm-review-body {
	font-size: 14px;
	line-height: 1.6;
	color: #334155;
}

.jcm-review-body p { margin: 0 0 8px; }
.jcm-review-body p:last-child { margin-bottom: 0; }

/* Empty state premium */
.jcm-reviews-empty {
	text-align: center;
	padding: 32px 20px;
	background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
	border-radius: 16px;
	border: 2px dashed #CBD5E1;
	margin-bottom: 24px;
}

.jcm-reviews-empty-icon {
	font-size: 42px;
	line-height: 1;
	margin-bottom: 12px;
}

.jcm-reviews-empty-title {
	font-size: 16px;
	font-weight: 700;
	color: #0F172A;
	margin: 0 0 4px;
}

.jcm-reviews-empty-text {
	font-size: 13px;
	color: #64748B;
	margin: 0;
}

/* Formulaire review — étoiles cliquables */
.jcm-review-form-title {
	font-size: 1.0625rem;
	font-weight: 800;
	color: #0F172A;
	margin: 0 0 14px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.jcm-review-form-title::before {
	content: '✍️';
	font-size: 18px;
	line-height: 1;
}

.comment-form-rating {
	margin: 14px 0;
	padding: 14px;
	background: #F8FAFC;
	border-radius: 12px;
	border: 1px solid rgba(15, 23, 42, 0.06);
}

.comment-form-rating > label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: #0F172A;
	margin-bottom: 8px;
}

.jcm-rating-stars {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}

.jcm-rating-stars input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.jcm-rating-stars label {
	font-size: 2rem;
	color: #E2E8F0;
	cursor: pointer;
	line-height: 1;
	padding: 0 2px;
	transition: color 0.15s, transform 0.15s;
	user-select: none;
}

.jcm-rating-stars label:hover,
.jcm-rating-stars label:hover ~ label,
.jcm-rating-stars input:checked ~ label {
	color: #F59E0B;
}

.jcm-rating-stars input:focus-visible + label {
	outline: 2px solid #2E86C1;
	outline-offset: 2px;
	border-radius: 4px;
}

.jcm-rating-stars label:active {
	transform: scale(1.2);
}

.jcm-review-notes {
	font-size: 12px;
	color: #64748B;
	font-style: italic;
	margin-top: 8px;
}

/* Bouton submit */
.jcm-btn-submit,
.jcm-review-form input[type="submit"],
#submit {
	background: linear-gradient(135deg, #1B4F72, #2E86C1) !important;
	color: #fff !important;
	border: none !important;
	padding: 12px 24px !important;
	border-radius: 12px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	cursor: pointer !important;
	transition: transform 0.2s, box-shadow 0.2s !important;
	box-shadow: 0 4px 12px rgba(46, 134, 193, 0.25) !important;
}

.jcm-btn-submit:hover,
.jcm-review-form input[type="submit"]:hover,
#submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(46, 134, 193, 0.35) !important;
}

.jcm-btn-submit:active,
.jcm-review-form input[type="submit"]:active,
#submit:active {
	transform: scale(0.98);
}

/* ─────────────────────────────────────────────────────────────
   15. ADRESSES SIMILAIRES — cartes horizontales premium
   ───────────────────────────────────────────────────────────── */
.jcm-similar-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.jcm-similar-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px;
	background: #fff;
	border-radius: 16px;
	border: 1px solid rgba(15, 23, 42, 0.06);
	text-decoration: none;
	color: inherit;
	transition:
		transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
		border-color 0.2s;
	-webkit-tap-highlight-color: transparent;
	position: relative;
	overflow: hidden;
}

.jcm-similar-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
	border-color: rgba(46, 134, 193, 0.4);
}

.jcm-similar-card:active {
	transform: scale(0.98);
}

.jcm-similar-emoji {
	font-size: 28px;
	width: 54px;
	height: 54px;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
	border-radius: 14px;
	line-height: 1;
	flex-shrink: 0;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.8),
		0 1px 2px rgba(15, 23, 42, 0.05);
}

.jcm-similar-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.jcm-similar-title {
	font-size: 15px;
	font-weight: 800;
	color: #0F172A;
	margin: 0;
	line-height: 1.25;
	letter-spacing: -0.2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jcm-similar-sub {
	font-size: 11px;
	font-weight: 700;
	color: #2E86C1;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	line-height: 1.2;
}

.jcm-similar-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 2px;
}

.jcm-similar-quartier {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 12px;
	color: #64748B;
	font-weight: 500;
}

.jcm-similar-quartier svg {
	color: #94A3B8;
	flex-shrink: 0;
}

.jcm-similar-rating {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 12px;
	color: #334155;
	padding: 2px 8px;
	background: #FEF3C7;
	border-radius: 999px;
}

.jcm-similar-rating span[aria-hidden] {
	color: #F59E0B;
}

.jcm-similar-rating strong {
	color: #92400E;
	font-weight: 800;
}

.jcm-similar-rating-count {
	color: #A16207;
	font-weight: 500;
}

.jcm-similar-arrow {
	color: #CBD5E1;
	flex-shrink: 0;
	transition: color 0.2s, transform 0.2s;
}

.jcm-similar-card:hover .jcm-similar-arrow {
	color: #2E86C1;
	transform: translateX(3px);
}

/* Tablette : 2 colonnes */
@media (min-width: 640px) {
	.jcm-similar-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Desktop : 3 colonnes */
@media (min-width: 1024px) {
	.jcm-similar-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.jcm-similar-arrow { display: none; }
	.jcm-similar-card {
		flex-direction: column;
		align-items: stretch;
		text-align: left;
	}
}

/* ─────────────────────────────────────────────────────────────
   16. RESPONSIVE V7.2.1 — mobile ≤480px
   ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.jcm-card-section {
		padding: 18px 16px;
		border-radius: 16px;
		margin-top: 16px;
	}

	.jcm-card-section-head {
		flex-direction: column;
		align-items: flex-start;
		padding-bottom: 12px;
		margin-bottom: 16px;
	}

	.jcm-card-section-head h2 {
		font-size: 1.125rem;
	}

	.jcm-card-section-icon {
		width: 32px;
		height: 32px;
		font-size: 16px;
	}

	/* Reviews */
	.jcm-review-item {
		padding: 14px;
		border-radius: 12px;
	}
	.jcm-review-avatar {
		width: 36px;
		height: 36px;
		font-size: 14px;
	}
	.jcm-review-author { font-size: 13px; }
	.jcm-review-rating { font-size: 13px; }
	.jcm-review-body { font-size: 13px; }

	.jcm-reviews-empty {
		padding: 24px 14px;
	}
	.jcm-reviews-empty-icon { font-size: 36px; }

	/* Similar */
	.jcm-similar-card {
		padding: 12px;
	}
	.jcm-similar-emoji {
		width: 48px;
		height: 48px;
		font-size: 24px;
		border-radius: 12px;
	}
	.jcm-similar-title { font-size: 14px; }
	.jcm-similar-arrow { display: none; }

	/* Aggregate badge */
	.jcm-reviews-aggregate {
		padding: 5px 12px;
	}
	.jcm-aggr-num { font-size: 1.25rem; }

	/* Report button */
	.jcm-report-btn {
		font-size: 12px;
		padding: 9px 14px;
	}

	/* Share button */
	.jcm-share-btn {
		padding: 9px 14px;
		font-size: 13px;
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.jcm-share-btn,
	.jcm-similar-card,
	.jcm-similar-arrow,
	.jcm-rating-stars label,
	.jcm-review-item {
		transition: none !important;
	}
}

/* ─────────────────────────────────────────────────────────────
   8. FALLBACK pour navigateurs sans support :has()
   (Safari <15.4, anciens Firefox). On applique les halos
   via un cat-bg direct sur .cat-mega-card quand le HTML
   le permet (v7+ template).
   ───────────────────────────────────────────────────────────── */
@supports not selector(:has(*)) {
	.cat-mega-card.cat-bg-health::before     { background: #FECACA; }
	.cat-mega-card.cat-bg-food::before       { background: #FED7AA; }
	.cat-mega-card.cat-bg-sport::before      { background: #A7F3D0; }
	.cat-mega-card.cat-bg-kids::before       { background: #FBCFE8; }
	.cat-mega-card.cat-bg-school::before     { background: #C7D2FE; }
	.cat-mega-card.cat-bg-housing::before    { background: #FDE68A; }
	.cat-mega-card.cat-bg-admin::before      { background: #BAE6FD; }
	.cat-mega-card.cat-bg-translator::before { background: #FECDD3; }
	.cat-mega-card.cat-bg-visa::before       { background: #BBF7D0; }
	.cat-mega-card.cat-bg-commerce::before   { background: #FDE68A; }
}
