/* 
Theme Name:		 Du Grain à  Moudre
Theme URI:		 https://dugrainamoudre.ch
Description:	 Thème de DGàM, basé sur restaurant-and-cafe
Author:			 Le Gaucho
Author URI:		 https://bimgen.ch
Template:		 restaurant-and-cafe
Version:		 1.0.0
Text Domain:	 restaurant-and-cafe-child
*/


/*
    Add your custom styles here
*/

/************** MENU **********************/
.overlay {
	z-index: 2;
}
.home #menu-opener {
	opacity: 1;
	background: none;
	border: none;
}
#menu-opener::before {
	position: absolute;
	top: 4px;
	left: 50%;
	width: 70%;
	height: 4px;
	border-radius: 0;
	background: #fff;
	content: '';
	-webkit-transform: translateX(-50%);
	-moz-transform: translateX(-50%);
	transform: translateX(-50%);
}
#menu-opener span {
	display: block;
	width: 70%;
	height: 4px;
	border-radius: 0px;
	background: #fff;
	position: absolute;
	top: 50%;
	left: 50%;
	-webkit-transform: translate(-50%, -50%);
	-moz-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
}
#menu-opener::after {
	position: absolute;
	bottom: 5px;
	left: 50%;
	width: 70%;
	height: 4px;
	border-radius: 0px;
	background: #fff;
	content: '';
	-webkit-transform: translateX(-50%);
	-moz-transform: translateX(-50%);
	transform: translateX(-50%);
}
/***************** NAVIGATION ***************************/

/* Supprime les contours */

a:focus:not(:focus-visible) {
    outline: none !important;
    border: none !important;
}
button:not(:focus-visible) {
    outline: none !important;
    border: none !important;
}
nav *, nav *:focus:not(:focus-visible) {
    outline: none !important;
    border: none !important;
}
#menu-opener:focus:not(:focus-visible){
    outline: none !important;
    border: none !important;
}
/***************** BANNER **************************/
.home .site-title, .home .site-description {
	opacity: 0;
}
.banner {
	background: #000;
	background-image: url(../../uploads/2017/02/bread-399286_1920-1349x699.jpg);
	background-repeat: no-repeat;
	background-size: 100%;
	position: relative;
}
.banner::before {
	background: rgba(0,0,0,0)
}
.banner img {
	opacity: 1;
}
.btn-green {
	visibility: hidden;
}
.banner .banner-text {
	bottom: 50%;
}
.banner .btn-scroll-down {
	bottom: 15%;
}
.banner-text {
	display: none;
}
.section-2::after {
	background: rgba(0,0,0,0)
}
#masthead.site-header {
	position: relative !important;
	background: #171616 !important;
}
/*************** SECTIONS ***************/


/************** PAGE TITLES **************/
.entry-header h1 {
/*display: none;*/
}
@media (max-width: 768px) {
	/* Titre de la page */
	.entry-title {
		text-align:center;
	}
}
/************** FOOTER ****************/
/* Container pour les logos du footer */
.footer-img {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  width: 100%;
  padding: 1rem 0;
}

/* Sections individuelles des logos */
.footer-img section {
  flex: 0 0 auto; /* Ne pas rétrécir ni grandir */
  text-align: center;
}

/* Cacher les titres des widgets */
.footer-img .widget-title {
  display: none;
}

/* Container des images */
.bg-footer-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px; /* Hauteur fixe pour tous les logos */
}

/* Liens */
.bg-footer-img a {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Images - hauteur uniforme et fixe */
.bg-footer-img img {
  height: 80px; /* Hauteur fixe - ne change jamais */
  width: auto; /* Largeur proportionnelle */
  object-fit: contain;
}
/************** ARTICLES **************/
.entry-meta {
	display: none;
}
/************** CONTACT FORM **************/
.nf-form-fields-required {
	display: none;
}
.nf-form-content {
	padding: 0;
	margin: 0;
}
/*#nf-field-4{
	text-align:center;
	vertical-align:middle;
	padding:3;
	margin:0;
	line-height:5px;
	float:right;
}*/
div.nf-field-label label, div.nf-field-element input {
	font: 16px/26px 'Lato', sans-serif;
}
#nf-label-field-7 {
	display: none;
}
div.nf-field-element input[type=button] {
	margin-top: 0px !important;
}
.contact-adresse {
	margin-top: 35px;
}
/*Masquer image farine meule*/
#post-35 div.post-thumbnail img {
	display: none;
}
/************** WOO COOMMERCE **************/
h2woocommerce-loop-product__title, .woocommerce ul.products li.product .woocommerce-loop-product__title {
	height: 2em;
	line-height: 1em;
	margin: 0;
	padding: 0;
}
.woocommerce div.product form.cart .variations {
	width: 0px;
}
.woocommerce div.product form.cart .variations label {
	display: block;
	width: 100px;
}
.reset_variations {
	display: none;
}
.cart-subtotal {
	display: none;
}
.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals {
	width: auto;
}
.reset_variations {
	display: none !important;
}
form.variations_form.cart td.label {
	display: none !important;
}
form.variations_form.cart .single_variation_wrap {
	margin-left: 0 !important;
}
th.product-price, th.product-quantity, th.product-subtotal, td.product-price, td.product-quantity, td.product-subtotal {
	text-align: right !important;
}
.woocommerce-order-details header, .woocommerce-order-details p {
	display: none;
}
.BG-hide-txt {
	display: none;
}
/************** BLOG (ARTICLES) **************/
/* =========================================================
   CARD ARTICLE - BLOC "LATEST POSTS"
   ========================================================= */

/* --- Structure de base --- */
.bg-last-article {
	display: flex;
	flex-direction: row;
	background: #ffffff;
	border-radius: 10px;
	overflow: hidden;
	height: 100%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 0.28s ease;
}

/* Effet hover */
.bg-last-article:hover {
	transform: translateY(-6px) scale(1.01);
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

/* Inner layout */
.bg-last-article__inner {
	display: flex;
	width: 100%;
}

/* Colonne gauche (image) */
.bg-last-article__left {
	flex: 0 0 42%;
	max-width: 42%;
	min-height: 150px;
	overflow: hidden;
}

.bg-last-article__left img,
.bg-last-article__left figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Colonne droite (texte) */
.bg-last-article__right {
	flex: 1;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
}

/* Titre / sous-titre / méta / extrait / footer */
.bg-last-article__title {
	margin: 0 0 0.5rem 0 !important;
	font-size: 1.5rem !important;
	font-weight: 600;
	line-height: 1.6rem !important;
	font-family: "Lato", sans-serif !important;
	text-align: center;
}

.bg-last-article__title a {
	text-decoration: none;
	color: rgba(157, 176, 92, 1);
}

.bg-last-article__title a:hover,
.bg-last-article__title a:active {
	outline: none;
}

.bg-last-article__subtitle {
	font-size: 0.9rem;
	font-weight: 600;
	color: rgba(157, 176, 92, 0.8);
	line-height: 1rem;
	padding: 0 0 0.7rem 0;
	margin: 0.25rem 0 -0.6rem 0;
	border-bottom: solid rgba(153, 153, 153, 1) 1px;
	text-align: center;
	width:100%;
}

.bg-last-article__meta {
	font-size: 0.7rem;
	font-style: italic;
	color: rgba(153, 153, 153, 1);
	text-align: center;
}

.bg-last-article__separator {
	margin: 0 0.3rem;
	font-size: 2rem;
	position: relative;
	top: 0.35rem;
}

.bg-last-article__excerpt {
	color: #333;
	line-height: 1.3rem;
	margin-bottom: 1rem;
	flex-grow: 0;
	text-align: justify;
	font-size: 0.95rem;
}

.bg-last-article__footer {
	margin-top: auto;
	text-align: center;
}

/* Bouton "En savoir plus" */
.bg-last-article__readmore {
	display: inline-block;
	padding: 0.5rem 0.9rem;
	background: rgba(157, 176, 92, 0.8);
	border-radius: 6px;
	transition: background 0.2s ease, transform 0.15s ease;
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 600 !important;
}

.bg-last-article__readmore:hover {
	background: rgba(157, 176, 92, 1);
	transform: translateY(-2px);
	text-decoration: none !important;
}

/* =========================================================
   LAYOUT DU BLOC LATEST POSTS
   ========================================================= */

/* Grille par défaut (≥ 1201px) → 2 colonnes */
.wp-block-latest-posts,
.wp-block-latest-posts__list,
.wp-block-latest-posts ul,
.wp-block-latest-posts ol {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
	width: 100%;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

/* Chaque élément occupe bien sa case */
.wp-block-latest-posts__list > li,
.wp-block-latest-posts li,
.wp-block-latest-posts__post {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* =========================================================
   ÉPINGLE POUR ARTICLES STICKY
   ========================================================= */

/* Conteneur de l'article épinglé avec position relative */
.bg-last-article--sticky {
	position: relative;
}

/* Épingle positionnée au-dessus de l'image */
.bg-last-article__pin {
position: absolute;
  top: 10px;
  left: 10px;
  font-size: 2rem;
  transform: rotate(90deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  pointer-events: none;
  width: 70px;
  height: auto;}

/* === Sous 1200px : 1 article par ligne, horizontal === */
@media (min-width: 769px) and (max-width: 1200px) {
	.wp-block-latest-posts,
	.wp-block-latest-posts__list,
	.wp-block-latest-posts ul,
	.wp-block-latest-posts ol {
		grid-template-columns: 1fr !important;
		gap: 1.5rem;
		width: 100%;
		margin: 0 auto;
		padding: 0;
		list-style: none;
	}

	.bg-last-article {
		width: 100%;
		max-width: 100%;
		margin: 0 auto;
		box-sizing: border-box;
	}

	.bg-last-article__inner {
		display: flex;
		flex-direction: row;
		align-items: stretch;
	}

	/* Ajustement image pour 769-1200px : occupe toute la hauteur */
	.bg-last-article__left {
		flex: 0 0 35%;
		max-width: 35%;
		min-height: 100%;
		position: relative;
	}

	.bg-last-article__left img {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.bg-last-article__right {
		flex: 1;
		padding: 1.25rem;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	
	/* Ajustement épingle pour cette taille */
	.bg-last-article__pin {
		top: 10px;
		left: 15px;
	}
}

/* Ajustement précis entre 992px et 1200px : légère augmentation hauteur globale */
@media (min-width: 992px) and (max-width: 1200px) {
	.bg-last-article {
		min-height: 280px;
	}
	
	.bg-last-article__left {
		min-height: 280px;
	}
}

/* === Mobile (<768px) : 1 article par ligne, image en médaillon rond === */
@media (max-width: 768px) {
	/* 1 article par ligne */
	.wp-block-latest-posts,
	.wp-block-latest-posts__list,
	.wp-block-latest-posts ul,
	.wp-block-latest-posts ol {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 1.5rem;
		width: 100%;
		margin: 0 auto;
		padding: 0;
		list-style: none;
	}

	.bg-last-article {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 1.2rem 1rem;
		width: 100%;
		box-sizing: border-box;
	}

	.bg-last-article__inner {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 100%;
	}

	/* Image médaillon parfaitement ronde et centrée */
	.bg-last-article__left {
		order: -1;
		width: 140px;
		height: 140px;
		min-width: 140px;
		min-height: 140px;
		max-width: 140px;
		max-height: 140px;
		border-radius: 50%;
		overflow: hidden;
		margin: 0 auto 1rem auto;
		box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
		flex: 0 0 140px;
		position: relative;
	}

	.bg-last-article__left img,
	.bg-last-article__left figure,
	.bg-last-article__left figure img {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
		border-radius: 50%;
		display: block;
		margin: 0;
		padding: 0;
	}

	/* Zone texte centrée */
	.bg-last-article__right {
		padding: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.bg-last-article__title {
		font-size: 1.4rem !important;
		line-height: 1.5rem !important;
		margin-bottom: 0.3rem !important;
	}

	.bg-last-article__subtitle {
		font-size: 0.95rem;
		font-weight: 600;
		margin-bottom: 0;
		padding: 0 0 0.6rem 0;
	}

	.bg-last-article__meta {
		font-size: 0.75rem;
		color: rgba(120, 120, 120, 1);
		margin-bottom: 0.8rem;
		text-align: center;
	}

	.bg-last-article__separator {
		top: 0.45rem;
	}

	.bg-last-article__excerpt {
		font-size: 0.95rem;
		line-height: 1.5;
		color: #333;
		margin-bottom: 1rem;
		text-align: justify;
	}

	.bg-last-article__footer {
		margin-top: 0.5rem;
	}
	
	/* Ajustement épingle pour mobile - centrée au-dessus du médaillon */
	.bg-last-article__pin {
		top: 15px;
		left: 60px;
		transform: translateX(-50%) rotate(90deg);
	}
}

/* Centrage global optionnel */
.wp-block-latest-posts,
.wp-block-latest-posts__list {
	max-width: 1200px;
	margin: 0 auto;
}
/* =========================================================
   ARTICLE (LECTURE DE L'ARTICLE) pour le template single.php
   ========================================================= */
.bg-article-site-main {
    max-width: 1200px;
    margin: 0 auto;
}

.bg-article-single {
    background: #fff;
	padding:1rem;
}

/* Ligne 1: Header avec image et titres */
.bg-article-header {
    display: flex;
    align-items: flex-end;
    gap: 30px;
    flex-wrap: wrap;
}

.bg-article-thumbnail {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
}

.bg-article-thumbnail .bg-article-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    display: block;
}

.bg-article-thumbnail .bg-article-no-image {
    width: 200px;
    height: 200px;
    background: #e0e0e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-article-thumbnail .bg-article-no-image::after {
    content: "Pas d'image";
    color: #999;
    font-size: 14px;
}

.bg-article-title-wrapper {
    flex: 1;
    min-width: 250px;
	border-bottom: solid rgba(153,153,153,1) 1px;
	padding: 0 0 1rem 0;
}

.bg-article-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color:rgba(157,176,92,1);
}

.bg-article-subtitle {
    font-size: 18px;
    font-weight: 400;
    color:rgba(157,176,92,0.8);
    margin: 0;
    line-height: 1.5;
}

/* Ligne 2: Meta informations */
.bg-article-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: rgba(153,153,153,1);
    margin-bottom: 30px;
    padding-bottom: 20px;
	justify-content:flex-end;
}

.bg-article-author,
.bg-article-date {
    display: inline-flex;
    align-items: center;
}
.bg-article-separator {
  margin: 0 -0.7rem;
  font-size: 2rem;
  position: relative;
  top: -0.1rem;
}

/*.bg-article-author::after {
    content: "•";
    margin-left: 15px;
    color: #ddd;
}/

/* Contenu de l'article */
.bg-article-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 50px;
}

.bg-article-content p {
    margin-bottom: 1.5em;
}

.bg-article-content h2,
.bg-article-content h3,
.bg-article-content h4 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 600;
    color: #222;
}

.bg-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2em 0;
}

/* Navigation entre articles */
.bg-article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-top: 40px;
    /*border-top: 2px solid #e0e0e0;*/
    margin-top: 50px;
}

.bg-article-nav-previous,
.bg-article-nav-next {
    flex: 1;
    max-width: 45%;
}

.bg-article-nav-next {
    text-align: right;
}

.bg-article-navigation a {
    display: block;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 4px;
    background: #f8f8f8;
}

.bg-article-navigation a:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.bg-article-nav-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 8px;
    font-weight: 600;
}

.bg-article-nav-title {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #222;
}

/* Responsive */
@media (max-width: 768px) {
    .bg-article-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .bg-article-thumbnail {
        width: 100%;
        height: auto;
    }
    
    .bg-article-thumbnail .bg-article-image {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
        object-position: center;
    }
    
    .bg-article-thumbnail .bg-article-no-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
    
    .bg-article-title-wrapper {
        padding: 0 0 1rem 0;
        text-align: center;
        width: 100%;
    }
    
    .bg-article-title {
        font-size: 26px;
    }
    
    .bg-article-subtitle {
        font-size: 16px;
    }
	.bg-article-meta {
		justify-content:center;
	}
	.bg-article-navigation {
        flex-direction: column;
        gap: 20px;
    }
    
    .bg-article-nav-previous,
    .bg-article-nav-next {
        max-width: 100%;
        text-align: left;
    }
    
    .bg-article-content {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .bg-article-site-main {
        padding: 20px 15px;
    }
    
    .bg-article-title {
        font-size: 22px;
    }
    
    .bg-article-subtitle {
        font-size: 15px;
    }
}

/************** FOOTER **************/
.site-footer .footer-t .col-3 {
	width: 33.3%;
	float: left;
	padding-left: 15px;
	padding-right: 15px;
	margin-bottom: 30px;
}
.footer-social {
	text-align: center;
}
.footer-order {
	text-align: center;
}
.footer-social li {
	float: unset!important;
	text-align: center;
}
.footer-img {
	text-align: center;
}
.footer-img a {
	cursor: pointer;
}
.footer-img img {
	max-width: 10rem !important;
}
.fontawesome-icon {
	margin-right: 0.5rem;
}
.footer-t .widget-title {
  padding: 0 0 10px!important;
}
.footer-t .textwidget{
  line-height:1.3rem!important;
}
.site-footer .footer-t .col-3{
	margin-bottom:0;
}
/************** COPYRIGHT **************/
.site-footer .site-info {
	color: #666;
}
/************** AFFICHAGE SMARTPHONE **************/
@media only screen and (min-width: 1025px) {
}
@media only screen and (max-width: 1199px) {
.banner .btn-scroll-down {
	bottom: 2%;
}
}
@media only screen and (max-width: 1024px) {
.home #masthead {
	height: 0px;
	padding: 0px;
}
#menu-opener {
	display: block;
	margin-top: 20px;
}
#menu-opener {
	background: none;
	border: none;
}
.home .site-title, .home .site-description {
	display: none;
}
.site-header .site-branding .site-description {
	color: white;
}
.banner .btn-scroll-down {
	bottom: 2%;
}
.main-navigation ul ul li a {
	margin-left: 20px;
}
}
@media only screen and (max-width: 991px) {
#menu-opener {
	display: block;
	margin-top: 20px;
	margin-left: 20px
}
h2woocommerce-loop-product__title, .woocommerce ul.products li.product .woocommerce-loop-product__title {
	height: 2em;
	line-height: 1em;
	margin: 0;
	padding: 0;
}
.woocommerce ul.products li.product .price {
	font-size: .8em;
}
.woocommerce a.button {
	font-size: .8em;
	text-align: center;
	padding: 1em .3em 1em .3em;
	width: 100%;
}
.footer-t {
	font-size: 0.87rem;
}
}
@media only screen and (max-width: 767px) {
.home #masthead {
	height: auto;
	padding: 25px;
}
.site-branding {
	display: block;
}
#menu-opener {
	margin-left: 0px;
}
#menu-opener::before {
	position: absolute;
	top: 4px;
	left: 50%;
	width: 70%;
	height: 4px;
	border-radius: 0;
	background: #fff;
	content: '';
	-webkit-transform: translateX(-50%);
	-moz-transform: translateX(-50%);
	transform: translateX(-50%);
}
#menu-opener::after {
	position: absolute;
	bottom: 4px;
	left: 50%;
	width: 70%;
	height: 4px;
	border-radius: 0px;
	background: #fff;
	content: '';
	-webkit-transform: translateX(-50%);
	-moz-transform: translateX(-50%);
	transform: translateX(-50%);
}
.home .site-title, .home .site-description {
	opacity: 1;
	display: block;
}
#slider img {
	opacity: 0;
}
.banner .btn-scroll-down {
	bottom: 2%;
}
h2woocommerce-loop-product__title, .woocommerce ul.products li.product .woocommerce-loop-product__title {
	height: 2em;
	line-height: 1em;
	margin: 0;
	padding: 0;
}
.woocommerce ul.products li.product .price {
	font-size: .8em;
}
.woocommerce a.button {
	font-size: .8em;
	padding: 1em .3em 1em .3em;
	width: 100%;
}
.site-footer .footer-t .col-3 {
	width: 100%;
	text-align: center;
}
.site-footer .footer-t .col-3 ul {
	display: flex;
	justify-content: center;
}
}
