/*
Theme Name: Drummond Export
Theme URI: http://www.drummondexport.com/
Author: Calypso Communication
Description: Thème sur mesure qui recrée le site de Drummond Export (Les Aliments Trans Gras inc.) : bandeau rouge, colonne de gauche, catalogue de produits avec fiches et emballages. À l'activation, crée les pages, le menu et la page d'accueil.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: drummondexport
*/

/* ---------- Base ---------- */

:root {
	--de-rouge: #9b0d16;
	--de-rouge-fonce: #6e0a10;
	--de-beige: #b4ab9d;
	--de-gris: #9b9b9a;
	--de-texte: #fff;
	--de-largeur: 1000px;
	--de-colonne: 235px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: #4a4744 url("assets/images/ui/bg.jpg");
	color: var(--de-texte);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	position: relative;
}

/* Bandeau rouge pleine largeur, derrière le site (comme l'original). */
body::before {
	content: "";
	position: absolute;
	top: 46px;
	left: 0;
	right: 0;
	height: 87px;
	background: url("assets/images/ui/menu_bg.png") repeat-x;
	z-index: 0;
}

img {
	max-width: 100%;
	height: auto;
	border: 0;
}

a {
	color: var(--de-beige);
}

a:hover,
a:focus {
	color: #fff;
}

:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.de-saut {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	padding: 8px 14px;
	background: #fff;
	color: #000;
}

.de-saut:focus {
	left: 8px;
}

/* ---------- Cadre ---------- */

.de-site {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: var(--de-colonne) minmax(0, 1fr);
	max-width: var(--de-largeur);
	min-height: 100vh;
	margin: 0 auto;
	background: url("assets/images/ui/content_bg.png");
}

.de-colonne {
	position: relative;
	z-index: 2;
	width: 230px;
	margin-left: 5px;
	padding: 20px 0 60px;
	background:
		url("assets/images/ui/menu_left_bg_bottom.jpg") no-repeat center bottom,
		url("assets/images/ui/menu_left_bg.jpg") repeat-y left top;
	text-align: center;
}

.home .de-colonne {
	padding-top: 180px;
}

.de-logo {
	display: inline-block;
}

.de-logo img {
	display: block;
	width: 204px;
}

.de-slogan {
	display: block;
	margin: 70px 0 0 5px;
}

.de-burger {
	display: none;
}

.de-colonne-principale {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding-top: 46px;
}

/* Boutons de langue (FRANÇAIS / ENGLISH / ESPAÑOL), en haut à droite comme l'original. */
.de-langues {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 4;
}

.de-langues ul {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.de-langues a {
	display: block;
	width: 110px;
	height: 26px;
	overflow: hidden;
	background: url("assets/images/ui/lang_btn.png") no-repeat var(--de-bouton, 0) 0;
	color: transparent;
	font-size: 1px;
}

.de-langues a:hover,
.de-langues a:focus-visible {
	filter: brightness(1.15);
}

/* ---------- Bandeau rouge et menu ---------- */

.de-bandeau {
	position: relative;
	z-index: 3;
	height: 87px;
	background: url("assets/images/ui/menu_bg.png") repeat-x;
}

.de-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.de-nav .menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 6px;
	padding: 9px 0 0 14px;
}

.de-nav .menu > li > a {
	display: block;
	padding: 6px 8px;
	color: #fff;
	font-size: 13px;
	font-weight: bold;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.de-nav .menu-item-has-children > a::after {
	content: "\25BC";
	margin-left: 1px;
	font-size: 12px;
}

.de-nav .menu > li > a:hover,
.de-nav .menu > li > a:focus-visible,
.de-nav .menu > .est-ouvert > a,
.de-nav .menu > .current-menu-item > a,
.de-nav .menu > .current-menu-ancestor > a,
.de-nav .menu > .current-menu-parent > a {
	color: #e7dccb;
}

/* Sous-menu : barre rouge foncé dans le bandeau, sous les rubriques, comme sur le site d'origine. */
.de-nav .sub-menu {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 40px;
	min-height: 27px;
	padding: 4px 12px 4px 22px;
	background: rgba(50, 0, 4, .72);
}

.de-nav .est-ouvert > .sub-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.de-nav .sub-menu li + li::before {
	content: "|";
	margin: 0 9px;
	color: #fff;
}

.de-nav .sub-menu a {
	color: #fff;
	font-size: 13px;
	text-decoration: none;
	text-transform: uppercase;
}

.de-nav .sub-menu a:hover,
.de-nav .sub-menu a:focus-visible,
.de-nav .sub-menu .current-menu-item > a {
	color: #e7dccb;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Catégories de produits (colonne de gauche) ---------- */

.de-categories {
	margin-top: 40px;
	padding-left: 4px;
	text-align: left;
}

.de-categories ul {
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.de-categories ul ul {
	margin: 0 0 2px;
}

.de-categories a {
	display: block;
	width: 220px;
	height: 31px;
	margin-bottom: 2px;
	padding: 9px 8px 0 35px;
	overflow: hidden;
	background: url("assets/images/ui/sub_menu_btn.png") no-repeat 0 -33px;
	color: #000;
	font-size: 12px;
	font-weight: bold;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.de-categories .a-enfants {
	background-position: 0 -99px;
}

.de-categories .est-ouvert {
	background-position: 0 -66px;
}

.de-categories .de-categories__principal[aria-current="page"]:not(.a-enfants),
.de-categories .de-categories__principal:not(.a-enfants):hover {
	background-position: 0 0;
}

.de-categories ul ul a {
	background-position: 0 -163px;
}

.de-categories ul ul a:hover,
.de-categories ul ul a:focus-visible {
	background-position: 0 -194px;
	color: #fff;
}

.de-categories ul ul .est-actif {
	background-position: 0 -132px;
}

.de-categories a:focus-visible {
	outline-offset: -2px;
}

/* ---------- Contenu ---------- */

.de-contenu {
	flex: 1;
	padding: 28px 28px 60px;
}

.de-fil {
	margin-bottom: 18px;
	font-size: 11px;
	text-transform: uppercase;
}

.de-fil a {
	text-decoration: none;
}

.de-titre,
.de-catalogue__titre {
	margin: 0 0 22px;
	color: var(--de-beige);
	font-size: 22px;
	font-weight: normal;
	line-height: 1.3;
}

.de-titre::before,
.de-catalogue__titre::before {
	content: "";
	display: block;
	width: 134px;
	height: 6px;
	margin-bottom: 8px;
	background: url("assets/images/ui/cat_bar.png") no-repeat;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content h2 {
	margin: 1.6em 0 .6em;
	color: var(--de-beige);
	font-size: 18px;
}

.entry-content h3 {
	margin: 1.4em 0 .4em;
	color: #fff;
	font-size: 16px;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
	margin: 0 0 1em;
}

.entry-content li {
	margin-bottom: .4em;
}

.entry-content .wp-block-image {
	margin: 0 0 1.2em;
}

.entry-content .wp-block-image img {
	box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

.entry-content .de-sans-ombre img {
	box-shadow: none;
}

.entry-content .alignright {
	float: right;
	margin: 4px 0 14px 22px;
}

.entry-content .alignleft {
	float: left;
	margin: 4px 22px 14px 0;
}

.entry-content .aligncenter {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.entry-content .wp-block-columns {
	gap: 28px;
	margin-bottom: 1.4em;
}

.entry-content .wp-block-separator {
	clear: both;
	margin: 28px 0;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, .25);
}

.de-intro {
	font-size: 17px;
}

/* Listes en colonnes (pays d'exportation) */
.de-colonnes-3 {
	columns: 3 180px;
	column-gap: 30px;
}

.de-colonnes-3 li {
	break-inside: avoid;
}

/* Tableaux (historique, valeurs, téléphones) */
.entry-content .wp-block-table {
	margin: 0 0 1.4em;
	overflow-x: auto;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content .wp-block-table td,
.entry-content .wp-block-table th {
	padding: 9px 12px 9px 0;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, .15);
	vertical-align: top;
	text-align: left;
}

.entry-content .wp-block-table thead {
	border: 0;
	color: var(--de-beige);
	font-size: 13px;
	text-transform: uppercase;
}

.entry-content .wp-block-table td:first-child {
	white-space: nowrap;
	padding-right: 22px;
}

.de-tableau-large td:first-child {
	white-space: normal !important;
	width: 30%;
}

.de-annee {
	color: var(--de-beige);
	font-weight: bold;
}

/* Personnes (équipe) */
.de-personnes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 26px;
	margin: 0 0 1.4em;
	padding: 0;
	list-style: none;
}

.de-personne img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	margin-bottom: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

.de-personne p {
	margin: 0 0 .2em;
}

.de-personne strong {
	color: var(--de-beige);
	font-size: 16px;
}

/* Promesse 5 étoiles */
.de-etoiles {
	margin: 0 0 1.4em;
	padding: 0;
	list-style: none;
}

.de-etoiles li {
	position: relative;
	margin-bottom: 18px;
	padding-left: 48px;
	min-height: 32px;
}

.de-etoiles li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 32px;
	height: 32px;
	background: url("assets/images/contenu/etoile.png") no-repeat;
}

.de-etoiles strong {
	color: var(--de-beige);
}

/* ---------- Accueil ---------- */

.de-diaporama {
	position: relative;
	max-width: 716px;
	margin: 0 auto 18px;
	aspect-ratio: 716 / 340;
}

.de-diaporama img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 2s ease;
}

.de-diaporama img.est-visible {
	opacity: 1;
}

.de-infolettre {
	text-align: center;
	margin: 0 0 22px;
}

.de-infolettre a {
	display: inline-block;
}

.de-infolettre img {
	display: block;
}

.de-accueil-tuiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 230px));
	justify-content: center;
	gap: 12px;
	margin: 0 0 1em;
	padding: 0;
	list-style: none;
}

.de-accueil-tuiles a {
	position: relative;
	display: block;
	color: #fff;
	text-decoration: none;
}

.de-accueil-tuiles img {
	display: block;
	width: 100%;
	transition: filter .2s;
}

.de-accueil-tuiles a:hover img,
.de-accueil-tuiles a:focus-visible img {
	filter: brightness(1.08);
}

.de-accueil-tuiles span {
	position: absolute;
	left: 12px;
	right: 40px;
	bottom: 10%;
	transform: translateY(35%);
	font-size: 15px;
	line-height: 1.2;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

/* ---------- Catalogue ---------- */

.de-catalogue__entete {
	margin: 0 0 18px;
}

.de-catalogue__entete img {
	display: block;
	width: 100%;
}

.de-catalogue__entete--centre img {
	width: auto;
	max-height: 300px;
	margin: 0 auto;
}

.de-catalogue__intro {
	margin-bottom: 24px;
}

.de-catalogue__intro li {
	margin-bottom: .5em;
}

.de-boutons {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 6px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}

.de-boutons a {
	display: block;
	width: 195px;
	height: 31px;
	padding: 9px 8px 0 12px;
	overflow: hidden;
	background: url("assets/images/ui/sub_menu_btn.png") no-repeat -25px -163px;
	color: #000;
	font-size: 12px;
	font-weight: bold;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.de-boutons a:hover,
.de-boutons a:focus-visible {
	background-position: -25px -194px;
	color: #fff;
}

.de-boutons a[aria-current="page"] {
	background-position: -25px -132px;
}

.de-produits {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 26px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.de-produits__carte a {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: var(--de-beige);
	text-decoration: none;
}

.de-produits__nom {
	flex: 1;
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px dashed rgba(255, 255, 255, .25);
	line-height: 1.35;
}

.de-produits__carte img {
	display: block;
	width: 100%;
	aspect-ratio: 180 / 115;
	object-fit: cover;
	margin-bottom: 10px;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.de-bouton {
	align-self: flex-start;
	width: 90px;
	height: 29px;
	overflow: hidden;
	background: url("assets/images/ui/details_btn.png") no-repeat -97px 0;
	color: transparent;
	font-size: 1px;
}

.de-produits__carte a:hover .de-bouton,
.de-produits__carte a:focus-visible .de-bouton {
	width: 96px;
	background-position: 0 0;
}

.de-produits__carte a:hover .de-produits__nom {
	color: #fff;
}

.de-fiche {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 26px;
}

.de-fiche__photo {
	display: block;
	flex: 1 1 320px;
	max-width: 600px;
	cursor: zoom-in;
}

.de-fiche__photo img {
	display: block;
	width: 100%;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

.de-fiche__contact img {
	display: block;
}

.de-fiche__contact:hover img,
.de-fiche__contact:focus-visible img {
	filter: brightness(1.15);
}

.de-fiche__sous-titre {
	margin: 0 0 12px;
	color: var(--de-beige);
	font-size: 16px;
	font-weight: normal;
}

.de-emballages {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 20px;
	margin: 0 0 26px;
	padding: 0;
	list-style: none;
}

.de-emballages li {
	width: 105px;
	text-align: center;
	font-size: 13px;
}

.de-emballages img {
	display: block;
	width: 105px;
	height: 105px;
	margin-bottom: 4px;
}

.de-catalogue__retour {
	font-size: 13px;
}

/* Tuiles des catégories (page Produits) */
.de-tuiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 18px;
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
}

.de-tuiles a {
	display: block;
	height: 100%;
	padding: 10px;
	background: rgba(0, 0, 0, .22);
	color: #fff;
	text-align: center;
	text-decoration: none;
	transition: background .2s;
}

.de-tuiles a:hover,
.de-tuiles a:focus-visible {
	background: rgba(0, 0, 0, .4);
}

.de-tuiles img {
	display: block;
	width: 100%;
	height: 140px;
	object-fit: contain;
	margin-bottom: 8px;
}

.de-tuiles span {
	font-weight: bold;
	text-transform: uppercase;
	font-size: 13px;
}

/* ---------- Formulaire ---------- */

.de-formulaire {
	clear: both;
	max-width: 640px;
	margin-top: 30px;
}

.de-formulaire__grille {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px;
}

.de-formulaire__plein {
	grid-column: 1 / -1;
}

.de-formulaire p {
	margin: 0 0 14px;
}

.de-formulaire label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
}

.de-formulaire input,
.de-formulaire textarea {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #888;
	border-radius: 2px;
	background: #fff;
	color: #111;
	font: inherit;
}

.de-formulaire button {
	padding: 10px 22px;
	border: 0;
	border-radius: 2px;
	background: linear-gradient(var(--de-rouge), var(--de-rouge-fonce));
	color: #fff;
	font: inherit;
	font-weight: bold;
	cursor: pointer;
}

.de-formulaire button:hover,
.de-formulaire button:focus-visible {
	background: var(--de-rouge-fonce);
}

.de-formulaire__miel {
	position: absolute;
	left: -9999px;
}

.de-message {
	padding: 10px 14px;
	border-left: 4px solid;
	background: rgba(0, 0, 0, .25);
}

.de-message--ok {
	border-color: #7fc77f;
}

.de-message--erreur {
	border-color: #ff7b7b;
}

.de-carte {
	position: relative;
	margin: 0 0 1.4em;
	aspect-ratio: 16 / 9;
	max-height: 380px;
	width: 100%;
}

.de-carte iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Pied de page ---------- */

.de-pied {
	position: relative;
	z-index: 1;
	min-height: 87px;
	padding: 18px 16px 14px;
	background: url("assets/images/ui/menu_bg.png") repeat-x;
	background-size: auto 100%;
	color: #fff;
	font-size: 12px;
	text-align: center;
}

.de-pied p {
	margin: 0 0 4px;
}

.de-pied a {
	color: #fff;
}

.de-pied__droits {
	opacity: .8;
	font-size: 11px;
}

/* ---------- Visionneuse ---------- */

.de-visionneuse {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 50px;
	background: rgba(0, 0, 0, .88);
}

.de-visionneuse[hidden] {
	display: none;
}

.de-visionneuse img {
	max-width: 100%;
	max-height: 100%;
	background: #fff;
}

.de-visionneuse button {
	position: absolute;
	border: 0;
	background: none;
	color: #fff;
	font-size: 44px;
	line-height: 1;
	cursor: pointer;
}

.de-visionneuse__fermer {
	top: 10px;
	right: 18px;
}

.de-visionneuse__prec {
	left: 12px;
}

.de-visionneuse__suiv {
	right: 12px;
}

.de-visionneuse.est-seule .de-visionneuse__prec,
.de-visionneuse.est-seule .de-visionneuse__suiv {
	display: none;
}

/* ---------- Cellulaire et tablette ---------- */

@media (max-width: 860px) {
	body::before {
		display: none;
	}

	.de-site {
		display: block;
		min-height: 0;
	}

	.de-colonne,
	.home .de-colonne {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: auto;
		margin: 0;
		padding: 10px 16px;
		background: #2f2f2f url("assets/images/ui/menu_left_bg.jpg") repeat-y left top;
		background-size: 100% auto;
	}

	.de-logo img {
		width: 92px;
	}

	.de-slogan,
	.de-categories {
		display: none;
	}

	.de-langues {
		position: static;
		padding: 8px 16px 0;
	}

	.de-langues ul {
		justify-content: flex-end;
	}

	.de-burger {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		padding: 10px 14px;
		border: 1px solid rgba(255, 255, 255, .4);
		border-radius: 3px;
		background: var(--de-rouge);
		color: #fff;
		font: inherit;
		font-weight: bold;
		text-transform: uppercase;
		cursor: pointer;
	}

	.de-burger__icone,
	.de-burger__icone::before,
	.de-burger__icone::after {
		display: block;
		width: 18px;
		height: 2px;
		background: #fff;
	}

	.de-burger__icone {
		position: relative;
	}

	.de-burger__icone::before,
	.de-burger__icone::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.de-burger__icone::before {
		top: -6px;
	}

	.de-burger__icone::after {
		top: 6px;
	}

	.de-colonne-principale {
		padding-top: 0;
	}

	.de-bandeau {
		display: none;
		height: auto;
		background: linear-gradient(var(--de-rouge), var(--de-rouge-fonce));
	}

	.menu-ouvert .de-bandeau {
		display: block;
	}

	.de-nav .menu {
		display: block;
		padding: 10px 16px 14px;
	}

	.de-nav .menu > li > a {
		padding: 10px 0;
		border-bottom: 1px solid rgba(255, 255, 255, .2);
	}

	.de-nav .sub-menu {
		position: static;
		padding: 4px 0 8px 14px;
		background: none;
		box-shadow: none;
	}

	.de-nav .est-ouvert > .sub-menu {
		display: block;
	}

	.de-nav .sub-menu li + li::before {
		content: none;
	}

	.de-nav .sub-menu a {
		display: block;
		padding: 8px 0;
	}

	.de-contenu {
		padding: 20px 16px 40px;
	}

	.entry-content .alignright,
	.entry-content .alignleft {
		float: none;
		margin: 0 0 1.2em;
	}

	.de-accueil-tuiles {
		grid-template-columns: repeat(auto-fit, minmax(150px, 230px));
	}

	.de-accueil-tuiles span {
		font-size: 13px;
	}

	.de-formulaire__grille {
		grid-template-columns: 1fr;
	}
}
