.fournee-graph {
	position: relative;
}

.fournee-graph__svg {
	width: 100%;
	height: auto;
	display: block;
}

/* Axes et repères */
.fournee-graph .axis,
.fournee-graph .tick {
	stroke: #465c4a;
	stroke-width: 2;
}

.fournee-graph .small {
	font-size: 14px;
	fill: #465c4a;
	font-weight: 500;
}

.fournee-graph .temp-label {
	font-size: 12px;
	fill: #465c4a;
	text-anchor: middle;
	font-weight: 600;
	opacity: 0.9;
}

.fournee-graph .axis-bottom-label {
	font-size: 12px;
	fill: #465c4a;
	text-anchor: end;
	opacity: 0.75;
}

/* Courbe */
.fournee-graph .curve {
	fill: none;
	stroke: #b64e10;
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Zones */
.fournee-graph .zone-opacity {
	opacity: 0.2;
	transition: opacity 0.25s ease;
}

.fournee-graph .zone-stroke {
	stroke: #465c4a;
	stroke-width: 1.5;
}

.fournee-graph .z1 { fill: #b64e10; }
.fournee-graph .z2 { fill: #cc6a1e; }
.fournee-graph .z3 { fill: #d58f2e; }
.fournee-graph .z4 { fill: #c7a13f; }
.fournee-graph .z5 { fill: #9aa061; }
.fournee-graph .z6 { fill: #6f8b68; }

.fournee-graph .zone-group {
	cursor: pointer;
	outline: none;
}

.fournee-graph .zone-group:hover .zone-opacity,
.fournee-graph .zone-group:focus .zone-opacity,
.fournee-graph .zone-group:focus-within .zone-opacity {
	opacity: 0.45;
}

/* Badges */
.fournee-graph .badge {
	fill: #fff;
	stroke: #465c4a;
	stroke-width: 2;
	transition: transform 0.2s ease, fill 0.2s ease;
	transform-origin: center;
}

.fournee-graph .badge-text {
	font-size: 14px;
	font-weight: 700;
	fill: #465c4a;
	text-anchor: middle;
	dominant-baseline: middle;
	pointer-events: none;
}

.fournee-graph .zone-group:hover .badge,
.fournee-graph .zone-group:focus .badge,
.fournee-graph .zone-group:focus-within .badge {
	transform: scale(1.06);
	fill: #fffaf4;
}

/* Popovers */
.fournee-graph__popovers {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 5;
}

.fournee-graph__popover {
	position: absolute;
	min-width: 180px;
	max-width: 240px;
	padding: 12px 14px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid rgba(70, 92, 74, 0.15);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, -8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	pointer-events: none;
	z-index: 10;
}

.fournee-graph__popover.is-active {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, -16px);
	pointer-events: auto;
}

/* Lien vers le guide correspondant : c'est ce qui fait du graphique
   un point d'entrée et non une simple illustration. */
.fournee-graph__popover-lien {
	margin: 10px 0 0;
	padding-top: 8px;
	border-top: 1px dashed rgba(70, 92, 74, 0.2);
	font-size: 13px;
}

.fournee-graph__popover-lien a {
	color: var(--wp--preset--color--custom-feu, #c04a09);
	text-decoration: none;
	font-weight: 500;
}

.fournee-graph__popover-lien a:hover,
.fournee-graph__popover-lien a:focus-visible {
	text-decoration: underline;
}

.fournee-graph .zone-group:focus-visible {
	outline: 2px solid var(--wp--preset--color--custom-feu, #c04a09);
	outline-offset: 2px;
}

/* Rendu en <p> depuis le 07/08/2026 : la graisse était héritée du <h3>,
   elle doit maintenant être déclarée pour que l'apparence ne bouge pas. */
.fournee-graph__popover-title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: #1f2c20;
}

.fournee-graph__popover-temp {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	color: #b64e10;
}

.fournee-graph__popover-list {
	margin: 0;
	padding-left: 16px;
}

.fournee-graph__popover-list li {
	margin-bottom: 3px;
	font-size: 13px;
	line-height: 1.35;
	color: #465c4a;
}

/* Petit triangle sous la bulle */
.fournee-graph__popover::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -8px;
	width: 14px;
	height: 14px;
	background: #fff;
	border-right: 1px solid rgba(70, 92, 74, 0.15);
	border-bottom: 1px solid rgba(70, 92, 74, 0.15);
	transform: translateX(-50%) rotate(45deg);
}

/* Responsive */
@media (max-width: 900px) {
	.fournee-graph .small {
		font-size: 12px;
	}

	.fournee-graph .temp-label,
	.fournee-graph .axis-bottom-label {
		font-size: 11px;
	}

	.fournee-graph__popover {
		min-width: 160px;
		max-width: 200px;
		padding: 10px 12px;
	}

	.fournee-graph__popover-title {
		font-size: 14px;
	}

	.fournee-graph__popover-temp,
	.fournee-graph__popover-list li {
		font-size: 12px;
	}
}

@media (max-width: 640px) {
	.fournee-graph .small {
		font-size: 11px;
	}

	.fournee-graph .temp-label {
		font-size: 10px;
	}

	.fournee-graph .axis-bottom-label {
		display: none;
	}

	.fournee-graph .badge-text {
		font-size: 12px;
	}

	.fournee-graph__popover {
		min-width: 140px;
		max-width: 170px;
		padding: 9px 10px;
		border-radius: 12px;
	}

	.fournee-graph__popover-title {
		font-size: 13px;
	}

	.fournee-graph__popover-temp,
	.fournee-graph__popover-list li {
		font-size: 11px;
	}
}
/* ==================================================================
   Version « accueil » — [fournee_graph version="accueil"]
   Courbe en bandeau + curseur de six boutons + panneau de détail.
   ================================================================== */
.fournee-graph--accueil {
	--repere: 7.05%;
	/* La courbe s'étire en largeur à hauteur fixe : au-delà de cette largeur,
	   elle paraît trop plate. À ajuster ici. */
	max-width: 750px!important;
	margin-inline: auto;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
	padding: 28px 28px 30px;
}

.fournee-graph__svg--accueil {
	height: 325px;
}

.fournee-graph--accueil .curve,
.fournee-graph--accueil .axis {
	vector-effect: non-scaling-stroke;
}

.fournee-graph--accueil .zone-accueil {
	cursor: pointer;
}

.fournee-graph--accueil .zone-accueil.is-active .zone-opacity,
.fournee-graph--accueil .zone-accueil:hover .zone-opacity {
	opacity: 0.6;
}

/* Petit repère qui suit la zone choisie */
.fournee-graph__curseur {
	position: relative;
	height: 14px;
	margin-top: 4px;
}

.fournee-graph__repere {
	position: absolute;
	top: 0;
	left: var(--repere);
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 9px solid transparent;
	border-right: 9px solid transparent;
	border-bottom: 12px solid var(--wp--preset--color--cfab-noir, #2c3136);
	transition: left 0.25s ease;
}

/* Les six boutons : largeurs proportionnelles aux zones (flex-grow posé en ligne) */
.fournee-graph__zones {
	display: flex;
	gap: 4px;
}

.fournee-graph__zone-btn {
	flex-basis: 0;
	min-width: 0;
	min-height: 56px;
	padding: 6px 4px;
	border: 0;
	border-radius: 6px;
	background: #f3eee9;
	color: var(--wp--preset--color--cfab-noir, #2c3136);
	font: inherit;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fournee-graph__zone-btn:hover {
	background: #ebe2da;
}

.fournee-graph__zone-btn:focus-visible {
	outline: 2px solid var(--wp--preset--color--custom-feu, #c04a09);
	outline-offset: 2px;
}

.fournee-graph__zone-num {
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
}

.fournee-graph__zone-temp {
	font-size: 12px;
	line-height: 1.2;
	white-space: nowrap;
}

.fournee-graph__zone-btn.is-active { color: #fff; }
.fournee-graph__zone-btn.z1-btn.is-active { background: #b64e10; }
.fournee-graph__zone-btn.z2-btn.is-active { background: #cc6a1e; color: #2c3136; }
.fournee-graph__zone-btn.z3-btn.is-active { background: #d58f2e; color: #2c3136; }
.fournee-graph__zone-btn.z4-btn.is-active { background: #c7a13f; color: #2c3136; }
.fournee-graph__zone-btn.z5-btn.is-active { background: #9aa061; color: #2c3136; }
.fournee-graph__zone-btn.z6-btn.is-active { background: #6f8b68; }

/* Panneau de détail */
.fournee-graph__panneaux {
	margin-top: 26px;
	padding-top: 24px;
	border-top: 1px solid rgba(70, 92, 74, 0.15);
}

.fournee-graph__panneau {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	align-items: flex-start;
}

.fournee-graph__panneau[hidden] {
	display: none;
}

.fournee-graph__panneau-plats,
.fournee-graph__panneau-recettes {
	flex: 1 1 300px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fournee-graph__panneau-titre {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-family: var(--wp--preset--font-family--playfair-display, serif);
	font-weight: 600;
	font-size: 24px;
	line-height: 1.2;
	color: #1f2c20;
}

.fournee-graph__panneau-badge {
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 2px solid #465c4a;
	color: #465c4a;
	font-family: var(--wp--preset--font-family--open-sans, sans-serif);
	font-size: 15px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fournee-graph__puces {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fournee-graph__puces li {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 0 14px;
	border-radius: 999px;
	font-size: 15px;
	color: var(--wp--preset--color--cfab-noir, #2c3136);
}

.z1-panneau .fournee-graph__puces li { background: rgba(182, 78, 16, 0.16); }
.z2-panneau .fournee-graph__puces li { background: rgba(204, 106, 30, 0.16); }
.z3-panneau .fournee-graph__puces li { background: rgba(213, 143, 46, 0.18); }
.z4-panneau .fournee-graph__puces li { background: rgba(199, 161, 63, 0.2); }
.z5-panneau .fournee-graph__puces li { background: rgba(154, 160, 97, 0.2); }
.z6-panneau .fournee-graph__puces li { background: rgba(111, 139, 104, 0.2); }

.fournee-graph__panneau-surtitre {
	margin: 0;
	font-weight: 300;
	font-size: 14px;
	text-transform: uppercase;
}

.fournee-graph__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.fournee-graph__categorie {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 5px;
	background: var(--wp--preset--color--custom-feu, #c04a09);
	color: #fff !important;
	text-decoration: none;
}

.fournee-graph__categorie:hover,
.fournee-graph__categorie:focus-visible {
	background: var(--wp--preset--color--custom-brique, #740d02);
}

.fournee-graph__panneau-lien {
	font-family: var(--wp--preset--font-family--jost, sans-serif);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--wp--preset--color--custom-feu, #c04a09);
	text-decoration: none;
}

.fournee-graph__panneau-lien:hover,
.fournee-graph__panneau-lien:focus-visible {
	text-decoration: underline;
}

@media (max-width: 640px) {
	.fournee-graph--accueil {
		padding: 18px 14px 20px;
	}

	.fournee-graph__svg--accueil {
		height: 130px;
	}

	/* Sur mobile, les plages ne tiennent plus : on garde le numéro seul. */
	.fournee-graph__zone-temp {
		display: none;
	}

	.fournee-graph__zone-btn {
		min-height: 44px;
	}

	.fournee-graph__panneau-titre {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fournee-graph__repere,
	.fournee-graph__zone-btn {
		transition: none;
	}
}
