/**
 * asscw-fiche.css - le rendu d'une fiche composee par blocs (produit,
 * producteur, marque...), sur le site.
 *
 * Portee a .asscw-fiche, et rien d'autre. AUCUNE police, AUCUNE couleur de
 * texte imposee : la fiche herite du theme. Seuls la grille, les espacements
 * et les couleurs CHOISIES dans les blocs colores (posees en style direct par
 * le rendu) sont a nous.
 */

.asscw-fiche {
	display: flex;
	flex-direction: column;
	gap: 28px;
	max-width: 1080px;
	margin: 0 auto;
	padding: 24px 16px;
}

.asscw-fiche__bloc {
	min-width: 0;
}

/* ── Titre ──────────────────────────────────────────────────────────────── */

.asscw-fiche__entete {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.asscw-fiche__surtitre {
	margin: 0;
	font-size: .8em;
	letter-spacing: .12em;
	text-transform: uppercase;
	opacity: .75;
}

.asscw-fiche__titre {
	margin: 0;
}

.asscw-fiche__intertitre {
	margin: 0;
}

/* ── Images ─────────────────────────────────────────────────────────────── */

.asscw-fiche__figure {
	margin: 0;
}

.asscw-fiche__figure img,
.asscw-fiche__image,
.asscw-fiche__duo-image img,
.asscw-fiche__galerie-item img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.asscw-fiche__figure figcaption {
	margin-top: 8px;
	font-size: .9em;
	opacity: .75;
}

.asscw-fiche__galerie {
	display: grid;
	grid-template-columns: repeat(var(--asscw-fiche-cols, 3), minmax(0, 1fr));
	gap: 12px;
}

.asscw-fiche__galerie-item img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* ── Textes ─────────────────────────────────────────────────────────────── */

.asscw-fiche__accroche {
	margin: 0;
	font-size: 1.15em;
	line-height: 1.5;
}

.asscw-fiche__texte--centre {
	text-align: center;
}

.asscw-fiche__texte > :first-child,
.asscw-fiche__corps > :first-child,
.asscw-fiche__contenu > :first-child,
.asscw-fiche__description > :first-child {
	margin-top: 0;
}

.asscw-fiche__texte > :last-child,
.asscw-fiche__corps > :last-child,
.asscw-fiche__contenu > :last-child,
.asscw-fiche__description > :last-child {
	margin-bottom: 0;
}

.asscw-fiche__prix {
	margin: 0;
	font-size: 1.4em;
	font-weight: 600;
}

.asscw-fiche__valeur {
	line-height: 1.6;
}

/* ── Video ──────────────────────────────────────────────────────────────── */

.asscw-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 6px;
	overflow: hidden;
}

.asscw-video iframe,
.asscw-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.asscw-fiche__video-legende {
	margin: 8px 0 0;
	font-size: .9em;
	opacity: .75;
}

/* ── Bouton, filet ──────────────────────────────────────────────────────── */

.asscw-fiche__bouton {
	display: inline-block;
	padding: 12px 22px;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.2;
}

.asscw-fiche__bouton:hover {
	filter: brightness(.92);
	text-decoration: none;
}

.asscw-fiche__filet {
	border: 0;
	border-top: 1px solid currentColor;
	opacity: .2;
	margin: 0;
}

/* ── Bandeau colore ─────────────────────────────────────────────────────── */

.asscw-fiche__bandeau {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 36px 32px;
	border-radius: 10px;
}

.asscw-fiche__bandeau .asscw-fiche__surtitre,
.asscw-fiche__bandeau-titre,
.asscw-fiche__bandeau-texte > :first-child,
.asscw-fiche__bandeau > p:last-child {
	margin: 0;
}

.asscw-fiche__bandeau-titre {
	color: inherit;
}

/* ── Image et texte ─────────────────────────────────────────────────────── */

.asscw-fiche__duo {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 28px;
	align-items: center;
}

.asscw-fiche__duo--droite .asscw-fiche__duo-image {
	order: 2;
}

.asscw-fiche__duo--sans-image {
	grid-template-columns: minmax(0, 1fr);
}

.asscw-fiche__duo-titre {
	margin: 0 0 12px;
}

.asscw-fiche__duo-texte > :last-child {
	margin-bottom: 0;
}

/* ── Mise en page d'un bloc (reglages communs) ──────────────────────────── */

.asscw-fiche__bloc--largeur-lecture {
	max-width: 720px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.asscw-fiche__bloc--largeur-etroite {
	max-width: 480px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.asscw-fiche__bloc--align-gauche { text-align: left; }
.asscw-fiche__bloc--align-centre { text-align: center; }
.asscw-fiche__bloc--align-droite { text-align: right; }

/* La grille pose un ecart fixe (gap) : « serre » et « aere » le corrigent
   par une marge, negative ou non, sans toucher aux voisins. */
.asscw-fiche__bloc--espace-serre { margin-top: -16px; }
.asscw-fiche__bloc--espace-aere { margin-top: 28px; }

.asscw-fiche__bloc--fond {
	padding: 28px 32px;
	border-radius: 10px;
}

.asscw-fiche__bloc--fond h1,
.asscw-fiche__bloc--fond h2,
.asscw-fiche__bloc--fond h3,
.asscw-fiche__bloc--fond a {
	color: inherit;
}

/* ── Colonnes ───────────────────────────────────────────────────────────── */

.asscw-fiche__colonnes {
	display: grid;
	grid-template-columns: repeat(var(--asscw-fiche-cols, 2), minmax(0, 1fr));
	gap: 28px;
	align-items: start;
}

.asscw-fiche__colonne {
	min-width: 0;
}

.asscw-fiche__colonne-titre {
	margin: 0 0 10px;
}

.asscw-fiche__colonne > :last-child {
	margin-bottom: 0;
}

/* ── Exergue, citation, tableau, encadre ────────────────────────────────── */

.asscw-fiche__exergue {
	margin: 0;
	font-size: 1.5em;
	line-height: 1.35;
	font-weight: 600;
}

.asscw-fiche__exergue--tres-grande {
	font-size: 2.1em;
	line-height: 1.2;
}

.asscw-fiche__citation {
	margin: 0;
	padding: 4px 0 4px 24px;
	border-left: 3px solid currentColor;
	font-size: 1.15em;
	font-style: italic;
}

.asscw-fiche__citation > :first-child { margin-top: 0; }
.asscw-fiche__citation > p:last-of-type { margin-bottom: 0; }

.asscw-fiche__citation-auteur {
	display: block;
	margin-top: 10px;
	font-size: .85em;
	font-style: normal;
	opacity: .75;
}

.asscw-fiche__tableau {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.asscw-fiche__tableau caption {
	text-align: left;
	font-weight: 600;
	padding: 0 0 10px;
}

.asscw-fiche__tableau th,
.asscw-fiche__tableau td {
	padding: 10px 12px;
	border-bottom: 1px solid rgba(0, 0, 0, .1);
	vertical-align: top;
	text-align: left;
}

.asscw-fiche__tableau th {
	width: 34%;
	font-weight: 600;
}

.asscw-fiche__encadre {
	margin: 0;
	padding: 20px 24px;
	border-left: 4px solid currentColor;
	border-radius: 0 8px 8px 0;
}

.asscw-fiche__encadre-titre {
	margin: 0 0 8px;
}

.asscw-fiche__encadre > :last-child {
	margin-bottom: 0;
}

/* ── Fiche produit : images a gauche, resume natif a droite ─────────────── */

.asscw-fiche__produit {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.asscw-fiche__produit--sans-image {
	grid-template-columns: minmax(0, 1fr);
}

/* ⚠ WooCommerce et la plupart des themes font FLOTTER le resume a droite sur
   48 % (« .woocommerce div.product div.summary »), et les images a gauche.
   Ici la grille decide de la place ; les flottements du theme, plus
   specifiques que ces regles, doivent etre defaits : d'ou !important, borne
   a ces deux selecteurs. */
.asscw-fiche__produit .summary,
.asscw-fiche__produit .woocommerce-product-gallery {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
}

/* ── Sous 720 px : tout s'empile ────────────────────────────────────────── */

@media (max-width: 719px) {
	.asscw-fiche {
		gap: 22px;
	}

	.asscw-fiche__duo,
	.asscw-fiche__duo--droite {
		grid-template-columns: minmax(0, 1fr);
	}

	.asscw-fiche__duo--droite .asscw-fiche__duo-image {
		order: 0;
	}

	.asscw-fiche__galerie {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.asscw-fiche__bandeau {
		padding: 26px 20px;
	}

	.asscw-fiche__produit {
		grid-template-columns: minmax(0, 1fr);
	}

	.asscw-fiche__colonnes {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.asscw-fiche__bloc--fond {
		padding: 20px;
	}
}
