/* Fiche produit de test (includes/fiche.php). S'appuie sur grilles.css
   (jetons, bouton d'action, grammages en cartes, quantité), accueil.css
   (en-tête du site, blocs, icônes, bandeau de réassurance) et
   calendrier.css (calendrier de culture et couleurs des étapes). */

.og-fiche-page {
	display: block;
}

.og-fiche-haut {
	padding: 24px var(--og-accueil-gouttiere) 64px;
}

.og-fiche .og-ariane ol {
	margin-bottom: 20px;
	color: var(--og-gris-texte);
}

.og-fiche-colonnes {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 56px;
	align-items: start;
}

/* Photos : grande photo à faire glisser, vignettes dessous. Sur ordinateur,
   elles restent visibles sous la barre collante (74 px) pendant qu'on lit la
   colonne de droite. */
.og-fiche-photos {
	position: sticky;
	top: 96px;
}

body.admin-bar .og-fiche-photos {
	top: 128px;
}

.og-fiche-photos-piste {
	display: flex;
	overflow-x: auto;
	aspect-ratio: 1;
	border-radius: var(--og-arrondi);
	background: var(--og-creme);
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.og-fiche-photos-piste::-webkit-scrollbar {
	display: none;
}

.og-fiche-photos-piste img {
	flex: 0 0 100%;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	scroll-snap-align: start;
}

.og-fiche-colonnes[data-epuise] .og-fiche-photos-piste img {
	filter: grayscale(0.85) brightness(1.04);
}

.og-fiche-photos .og-carte-badges {
	top: 14px;
	left: 14px;
}

.og-fiche-vignettes {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	overflow-x: auto;
}

.og-fiche-vignettes button {
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: var(--og-arrondi);
	background: none;
	opacity: 0.7;
	cursor: pointer;
	transition: opacity 0.2s, border-color 0.2s;
}

.og-fiche-vignettes button:hover,
.og-fiche-vignettes button[aria-current="true"] {
	border-color: var(--og-or);
	background: none;
	opacity: 1;
}

.og-fiche-vignettes img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Infos : famille et nom latin, titre, accroche, labels, achat, saison. */
.og-fiche-infos {
	display: grid;
	gap: 20px;
	min-width: 0;
}

.og-fiche-infos .og-accueil-surtitre {
	margin: 0 0 -12px;
}

.og-fiche-infos .og-accueil-surtitre i {
	color: var(--og-gris-texte);
	font: italic 400 var(--og-taille-l)/1.3 var(--og-police-texte);
	letter-spacing: 0;
	text-transform: none;
}

.og-fiche .og-fiche-titre {
	margin: 0;
	color: var(--og-brun);
	font: 700 var(--og-taille-affiche-l)/1.15 var(--og-police);
}

/* Mention « Bio » tirée du nom : verte, un peu plus petite que le titre. */
.og-fiche-bio {
	color: var(--og-vert);
	font-size: 0.65em;
	white-space: nowrap;
}

.og-fiche-sachet {
	margin: -8px 0 0;
	color: var(--og-gris-texte);
	font: 600 var(--og-taille-l)/1.4 var(--og-police);
}

.og-fiche-achat {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 24px;
	border: 1px solid color-mix(in srgb, var(--og-or) 25%, transparent);
	border-radius: var(--og-arrondi);
	background: var(--og-creme-clair);
}

.og-fiche-prix-ligne {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin: 0;
}

.og-fiche .og-fiche-prix {
	font-size: var(--og-taille-grand);
	line-height: 1.2;
}

.og-fiche-prix-detail {
	color: var(--og-gris-texte);
	font: 400 var(--og-taille-m)/1.4 var(--og-police-bouton);
}

/* « Sur demande » : le délai de réponse sur sa propre ligne. */
.og-fiche-prix-dessous {
	flex-basis: 100%;
	font-size: var(--og-taille-s);
}

/* Un seul grammage : le sachet, son poids et ses graines. */
.og-fiche-sachet-unique {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	color: var(--og-brun);
	font: 500 var(--og-taille-m)/1.4 var(--og-police-bouton);
}

.og-fiche-sachet-unique svg {
	flex: none;
	color: var(--og-or);
}

.og-fiche-etiquette {
	margin: 0 0 10px;
	color: var(--og-brun);
	font: 700 var(--og-taille-s)/1.4 var(--og-police);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.og-fiche-panier {
	justify-content: flex-start;
	gap: 12px;
}

.og-fiche .og-fiche-panier .og-bouton-action {
	flex: 1 1 200px;
	min-height: 48px;
	font-size: var(--og-taille-l);
}

.og-fiche .og-quantite {
	height: 48px;
}

/* Grammage ou produit épuisé : mention et « M'avertir » à la place du panier. */
.og-fiche-epuise,
.og-fiche-achat[data-epuise] .og-fiche-panier {
	display: none;
}

.og-fiche-achat[data-epuise] .og-fiche-epuise {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* Formulaire « M'avertir » de WooCommerce, aux couleurs du site. */
.og-fiche .wc_bis_form[hidden] {
	display: none;
}

.og-fiche .wc_bis_form h3 {
	margin: 0 0 10px;
	color: var(--og-brun);
	font: 700 var(--og-taille-l)/1.3 var(--og-police);
}

.og-fiche .wc_bis_form__form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.og-fiche .wc_bis_form__input {
	flex: 1 1 220px;
	min-height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 2px solid var(--og-gris);
	border-radius: 4px;
	background: var(--og-blanc);
	color: var(--og-texte);
	font: 500 var(--og-taille-l)/1.2 var(--og-police);
}

.og-fiche .wc_bis_form__input:focus {
	border-color: var(--og-or);
	outline: none;
}

.og-fiche .wc_bis_form button.wc_bis_form__button {
	min-height: 48px;
	padding-inline: 22px;
}

/* Messages de WooCommerce (inscription à « M'avertir »). */
.og-fiche .woocommerce-message,
.og-fiche .woocommerce-info,
.og-fiche .woocommerce-error {
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 0;
	border-left: 4px solid var(--og-vert);
	border-radius: 4px;
	background: var(--og-creme);
	color: var(--og-texte);
	font: 500 var(--og-taille-m)/1.4 var(--og-police);
	list-style: none;
}

.og-fiche .woocommerce-error {
	border-left-color: var(--og-erreur);
}

.og-fiche .woocommerce-message::before,
.og-fiche .woocommerce-info::before,
.og-fiche .woocommerce-error::before {
	display: none;
}

/* Variétés proches (tout épuisé), livraison. */
.og-fiche-proches {
	margin: 0;
	color: var(--og-brun);
	font: 400 var(--og-taille-s)/1.5 var(--og-police-bouton);
}

.og-fiche-proches a {
	color: var(--og-or);
}

.og-fiche-livraison {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--og-gris-texte);
	font: 400 var(--og-taille-s)/1.4 var(--og-police-bouton);
}

.og-fiche-livraison .og-accueil-icone {
	flex: none;
	width: 26px;
	height: 26px;
	color: var(--og-or);
}

/* Accroche et labels. */
.og-fiche-description {
	font-size: var(--og-taille-xl);
	line-height: 1.5;
}

.og-fiche-description p {
	margin: 0 0 6px;
}

/* Labels sur toute la largeur de la colonne (demande de Gaël du 10/11) :
   colonnes égales, pastille au-dessus du libellé, taille de la pastille
   proportionnelle à la largeur de la colonne. */
.og-fiche-labels {
	container-type: inline-size;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
	gap: 12px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.og-fiche-labels li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: var(--og-brun);
	font: 700 var(--og-taille-m)/1.3 var(--og-police);
	text-align: center;
}

.og-fiche .og-fiche-labels img.og-accueil-pastille {
	width: clamp(72px, 22cqi, 120px);
	height: auto;
	aspect-ratio: 1;
}

/* Saison, tirée du calendrier : étapes et ligne « En ce moment ». */
.og-fiche-saison {
	display: grid;
	gap: 10px;
	padding-top: 16px;
	border-top: 1px solid var(--og-creme);
}

.og-fiche-saison .og-fiche-etiquette {
	margin: 0;
}

/* Réussir sa culture : calendrier, repères, pas à pas, mot des producteurs. */
.og-fiche-culture {
	display: grid;
	gap: 32px;
}

.og-fiche-culture .og-accueil-entete {
	margin-bottom: 0;
}

.og-fiche-culture-bas {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	gap: 40px;
	align-items: start;
}

.og-fiche .og-fiche-sous-titre {
	margin: 0 0 14px;
	color: var(--og-texte);
	font: 700 var(--og-taille-titre)/1.3 var(--og-police);
}

.og-fiche-reperes {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 24px;
	margin: 0;
}

.og-fiche-repere {
	display: grid;
	grid-template-columns: 26px 1fr;
	align-content: start;
	gap: 2px 10px;
	padding: 11px 0;
	border-bottom: 1px solid color-mix(in srgb, var(--og-brun) 12%, transparent);
}

.og-fiche-repere .og-accueil-icone {
	grid-row: span 2;
	width: 24px;
	height: 24px;
	margin-top: 2px;
	color: var(--og-or);
}

.og-fiche-repere dt {
	color: var(--og-gris-texte);
	font: 500 var(--og-taille-s)/1.3 var(--og-police-bouton);
}

.og-fiche-repere dd {
	margin: 0;
	color: var(--og-texte);
	font: 600 var(--og-taille-l)/1.35 var(--og-police);
}

.og-fiche-repere dd small {
	display: block;
	color: var(--og-gris-texte);
	font: 400 var(--og-taille-s)/1.35 var(--og-police-bouton);
}

/* Étapes numérotées, reliées par un trait. */
.og-fiche-etapes {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: og-etape;
}

.og-fiche-etapes li {
	position: relative;
	display: grid;
	grid-template-columns: 34px 1fr;
	gap: 4px 14px;
	padding: 0 0 18px;
}

.og-fiche-etapes li::before {
	content: counter(og-etape);
	counter-increment: og-etape;
	position: relative;
	z-index: 1;
	display: grid;
	grid-row: span 2;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 1.5px solid var(--og-or);
	border-radius: 50%;
	background: var(--og-creme);
	color: var(--og-or);
	font: 700 var(--og-taille-m)/1 var(--og-police);
}

.og-fiche-etapes li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 30px;
	bottom: 0;
	left: 15px;
	width: 1.5px;
	background: color-mix(in srgb, var(--og-or) 30%, transparent);
}

.og-fiche-etape-tete {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding-top: 3px;
}

.og-fiche-etape-tete strong {
	font: 700 var(--og-taille-l)/1.3 var(--og-police);
}

.og-fiche-etape-quand {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 10px 2px 6px;
	border-radius: 999px;
	background: var(--og-blanc);
	color: var(--og-brun);
	font: 500 var(--og-taille-xs)/1.4 var(--og-police-bouton);
}

.og-fiche-etape-quand .og-cal-echantillon {
	width: 16px;
	height: 8px;
	border-radius: 2px;
}

.og-fiche-etapes p {
	margin: 0;
	font-size: var(--og-taille-l);
	line-height: 1.5;
}

.og-fiche-mot {
	display: grid;
	gap: 8px;
	margin-top: 8px;
	padding: 18px 22px;
	border-radius: var(--og-arrondi);
	background: var(--og-blanc);
}

.og-fiche-mot .og-fiche-mot-titre {
	margin: 0;
	color: var(--og-or);
	font: 700 var(--og-taille-l)/1.3 var(--og-police);
}

.og-fiche-mot p {
	margin: 0;
	font-size: var(--og-taille-l);
	font-style: italic;
	line-height: 1.5;
}

/* « Dans ce coffret » (1.8.8) : une ligne par variété, vignette, nom (lien
   vers sa fiche) et quantité ; une ligne sans produit garde une icône. */
.og-fiche-contenu {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.og-fiche-contenu > li > :is(a, div) {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 8px;
	border-radius: var(--og-arrondi);
	color: var(--og-texte);
	text-decoration: none;
}

.og-fiche-contenu > li > a {
	transition: background-color 0.2s;
}

.og-fiche-contenu > li > a:hover,
.og-fiche-contenu > li > a:focus-visible {
	background: var(--og-creme);
}

.og-fiche-contenu-image {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border-radius: var(--og-arrondi);
	background: var(--og-creme);
	color: var(--og-or);
}

.og-fiche-contenu-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.og-fiche-contenu-image .og-accueil-icone {
	width: 28px;
	height: 28px;
}

.og-fiche-contenu-texte {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.og-fiche-contenu-nom {
	font: 700 var(--og-taille-l)/1.3 var(--og-police);
}

.og-fiche-contenu > li > a .og-fiche-contenu-nom {
	color: var(--og-brun);
}

.og-fiche-contenu > li > a:hover .og-fiche-contenu-nom {
	color: var(--og-or);
}

.og-fiche-contenu-nom .og-fiche-bio {
	font-size: var(--og-taille-s);
}

.og-fiche-contenu-quantite {
	color: var(--og-gris-texte);
	font: 400 var(--og-taille-s)/1.4 var(--og-police-bouton);
}

/* Ancien contenu (fiche pas encore reprise) : « en bref » et description. */
.og-fiche-texte :is(h2, h3, h4) {
	margin: 0 0 10px;
	color: var(--og-brun);
	font: 700 var(--og-taille-xl)/1.3 var(--og-police);
}

.og-fiche-texte * + :is(h2, h3, h4) {
	margin-top: 24px;
}

.og-fiche-texte p {
	margin: 0 0 10px;
}

.og-fiche-texte ul {
	margin: 0 0 10px;
	padding-left: 18px;
}

.og-fiche-texte li {
	margin-bottom: 4px;
}

/* Le bandeau de réassurance ferme la page, au-dessus du pied de page. */
.og-fiche > .og-accueil-services {
	border-bottom: 0;
}

@media (max-width: 992px) {
	.og-fiche-colonnes {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.og-fiche-photos,
	body.admin-bar .og-fiche-photos {
		position: relative;
		top: auto;
	}

	.og-fiche .og-fiche-titre {
		font-size: var(--og-taille-affiche);
	}

	.og-fiche-culture-bas {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}
}

@media (max-width: 768px) {
	.og-fiche-haut {
		padding: 16px 16px 40px;
	}

	.og-fiche-photos-piste {
		margin-inline: -16px;
		border-radius: 0;
	}

	.og-fiche .og-fiche-titre {
		font-size: var(--og-taille-grand);
	}

	.og-fiche-achat {
		padding: 18px;
	}

	.og-fiche-description {
		font-size: var(--og-taille-l);
	}

	.og-fiche .wc_bis_form button.wc_bis_form__button {
		flex: 1 1 100%;
	}

	.og-fiche-reperes {
		grid-template-columns: minmax(0, 1fr);
	}
}
