/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */


/* ========================================
   PAGE PANIER
======================================== */


/* Bouton appliquer code promo */
button[name="apply_coupon"] {
	background-color: #f2f2f2 !important;
	border-color: #f2f2f2 !important;
	color: #333333 !important;
}

button[name="apply_coupon"]:hover {
	background-color: #e5e5e5 !important;
	border-color: #e5e5e5 !important;
	color: #222222 !important;
}

/* Bouton "Voir le panier" du mini-panier */
.woocommerce-mini-cart__buttons a.button.wc-forward:not(.checkout) {
	background: #ffffff !important;
	color: #30A111 !important;
	border: 2px solid #30A111 !important;
	border-radius: 999px !important;
}

/* Survol */
.woocommerce-mini-cart__buttons a.button.wc-forward:not(.checkout):hover {
	background: #30A111 !important;
	color: #ffffff !important;
	border-color: #30A111 !important;
}

/* =========================================================
   MODES DE LIVRAISON — DESIGN MANGA SHIELD
   WooCommerce + Fluid Checkout
========================================================= */


/*
 * Retire l'encadrement global de Fluid Checkout
 * et sépare les modes de livraison.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method.shipping-method__options {
	display: flex !important;
	flex-direction: column !important;
	gap: 10px !important;

	margin: 0 !important;
	padding: 0 !important;

	border: 0 !important;
	border-radius: 0 !important;
	overflow: visible !important;

	background: transparent !important;
}


/*
 * Chaque mode de livraison.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
li.shipping-method__option {
	display: block !important;

	margin: 0 !important;
	padding: 0 !important;

	border: 0 !important;
	background: transparent !important;
}


/*
 * Carte cliquable du mode de livraison.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
li.shipping-method__option
label.shipping-method__option-label {
	box-sizing: border-box !important;

	display: block !important;
	width: 100% !important;

	margin: 0 !important;
	padding: 14px 16px 14px 42px !important;

	border: 1px solid #d9dde0 !important;
	border-radius: 12px !important;

	background-color: #ffffff !important;
	color: #111111 !important;

	font-size: 14px !important;
	line-height: 1.4 !important;

	cursor: pointer !important;

	transition:
		border-color 0.15s ease,
		background-color 0.15s ease !important;
}


/*
 * Empêche Fluid Checkout de retirer la bordure
 * sur la dernière méthode.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
li.shipping-method__option:last-child
label.shipping-method__option-label {
	border: 1px solid #d9dde0 !important;
}


/*
 * Méthode survolée.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
li.shipping-method__option
label.shipping-method__option-label:hover {
	border-color: #9ca6a9 !important;
	background-color: #ffffff !important;
}


/*
 * Méthode sélectionnée.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
li.shipping-method__option
input.shipping_method:checked
+ label.shipping-method__option-label {
	border-color: #0c5b52 !important;
	background-color: #f1f7f6 !important;
	color: #111111 !important;

	box-shadow: none !important;
}


/*
 * Conserve le design sélectionné au survol.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
li.shipping-method__option
input.shipping_method:checked
+ label.shipping-method__option-label:hover {
	border-color: #0c5b52 !important;
	background-color: #f1f7f6 !important;
}


/*
 * Ligne contenant le nom de la livraison et le prix.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
.shipping-method__option-label-wrapper {
	display: flex !important;
	align-items: flex-start !important;
	justify-content: space-between !important;
	gap: 16px !important;

	width: 100% !important;
}


/*
 * Nom du mode de livraison.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
.shipping-method__option-text {
	flex: 1 1 auto !important;

	font-weight: 700 !important;
	line-height: 1.35 !important;

	color: #111111 !important;
}


/*
 * Prix aligné à droite.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
.shipping-method__option-price {
	flex: 0 0 auto !important;

	width: auto !important;
	min-width: 65px !important;

	margin: 0 !important;

	font-weight: 700 !important;
	line-height: 1.35 !important;
	text-align: right !important;

	color: #111111 !important;
}


/*
 * Force également le montant et le symbole € en gras.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
.shipping-method__option-price .amount,

body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
.shipping-method__option-price .woocommerce-Price-currencySymbol {
	font-weight: 700 !important;
}


/*
 * Description située sous le nom de la livraison.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
.shipping-method__option-description {
	display: block !important;

	width: 100% !important;

	margin: 4px 0 0 !important;
	padding: 0 !important;

	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.45 !important;

	color: #202124 !important;
}


/*
 * Position de la puce radio.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
li.shipping-method__option
label.shipping-method__option-label::before {
	top: 16px !important;
	left: 15px !important;
	right: auto !important;
}


/*
 * Position de la coche intérieure.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
li.shipping-method__option
label.shipping-method__option-label::after {
	top: 16px !important;
	left: 15px !important;
	right: auto !important;
}


/*
 * Couleur de la puce sélectionnée.
 */
body.woocommerce-checkout.has-fluid-checkout
ul#shipping_method
li.shipping-method__option
input.shipping_method:checked
+ label.shipping-method__option-label::before {
	border-color: #0c5b52 !important;
	background-color: #0c5b52 !important;
}


/*
 * Adaptation pour les petits écrans.
 */
@media screen and (max-width: 480px) {

	body.woocommerce-checkout.has-fluid-checkout
	ul#shipping_method
	li.shipping-method__option
	label.shipping-method__option-label {
		padding: 13px 13px 13px 40px !important;

		font-size: 13.5px !important;
	}

	body.woocommerce-checkout.has-fluid-checkout
	ul#shipping_method
	.shipping-method__option-label-wrapper {
		gap: 10px !important;
	}

	body.woocommerce-checkout.has-fluid-checkout
	ul#shipping_method
	.shipping-method__option-price {
		min-width: 58px !important;
	}

	body.woocommerce-checkout.has-fluid-checkout
	ul#shipping_method
	.shipping-method__option-description {
		font-size: 13px !important;
		line-height: 1.45 !important;
	}

	body.woocommerce-checkout.has-fluid-checkout
	ul#shipping_method
	li.shipping-method__option
	label.shipping-method__option-label::before,

	body.woocommerce-checkout.has-fluid-checkout
	ul#shipping_method
	li.shipping-method__option
	label.shipping-method__option-label::after {
		top: 15px !important;
		left: 14px !important;
	}
}


/*
 * Force l'affichage des descriptions de livraison
 * avec Fluid Checkout.
 */
body.woocommerce-checkout.has-fluid-checkout
.shipping-method__option-description {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;

	width: 100% !important;
	height: auto !important;

	margin: 5px 0 0 !important;
	padding: 0 !important;

	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.45 !important;

	color: #202124 !important;
	white-space: normal !important;
}


/* ==========================================================
   MONDIAL RELAY — NOUVELLE VERSION
========================================================== */


/* ----------------------------------------------------------
   BOUTON CHOISIR UN POINT DE RETRAIT
---------------------------------------------------------- */

body.woocommerce-checkout
button.wms_pickup_open_modal_mondial_relay[wms-pickup-modal-id] {

	-webkit-appearance: none !important;
	appearance: none !important;

	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;

	width: auto !important;
	min-height: 46px !important;

	margin: 12px 0 !important;
	padding: 12px 24px !important;

	background: #7a1631 !important;
	background-image: none !important;

	color: #ffffff !important;

	border: 2px solid #7a1631 !important;
	border-radius: 999px !important;

	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;

	text-transform: none !important;
	text-decoration: none !important;

	box-shadow:
		0 4px 12px rgba(122, 22, 49, 0.30) !important;

	cursor: pointer !important;

	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.15s ease;
}


/* Survol */
body.woocommerce-checkout
button.wms_pickup_open_modal_mondial_relay[wms-pickup-modal-id]:hover {

	background: #5f1025 !important;
	border-color: #5f1025 !important;

	color: #ffffff !important;

	transform: translateY(-1px);

	box-shadow:
		0 5px 14px rgba(122, 22, 49, 0.35) !important;
}


/* Navigation clavier */
body.woocommerce-checkout
button.wms_pickup_open_modal_mondial_relay[wms-pickup-modal-id]:focus-visible {

	outline: none !important;

	box-shadow:
		0 0 0 3px rgba(122, 22, 49, 0.18),
		0 4px 12px rgba(122, 22, 49, 0.30) !important;
}

/* ==========================================================
   MONDIAL RELAY — MOBILE
   Liste des points de retrait
========================================================== */

@media screen and (max-width: 699px) {

	/*
	 * Le conteneur carte / liste devient notre référence
	 * pour positionner la liste.
	 */
	.MRW-Results {
		position: relative !important;
	}


	/*
	 * Carte toujours sur toute la largeur.
	 */
	.MRW-Results .MRW-Map {
		width: 100% !important;
		max-width: 100% !important;

		margin-left: 0 !important;
	}


	/*
	 * Lorsque la liste est ouverte,
	 * elle recouvre entièrement la carte.
	 */
	.MRW-Results .MRW-RList:not(.Hide) {

		position: absolute !important;

		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;

		z-index: 1000 !important;

		width: 100% !important;
		max-width: none !important;
		height: 100% !important;

		padding: 10px !important;

		background: #ffffff !important;

		overflow-y: auto !important;
		overflow-x: hidden !important;

		box-sizing: border-box !important;
	}


	/*
	 * Liste fermée.
	 */
	.MRW-Results .MRW-RList.Hide {
		display: none !important;
	}


	/*
	 * Le bouton vert reste accessible au-dessus
	 * de la liste et de la carte.
	 */
	.MRW-Results .MRW-ShowList {

		z-index: 1100 !important;
	}
}

/* ==========================================================
   MONDIAL RELAY — MOBILE
   Suppression visuelle du header + croix flottante
========================================================== */

@media screen and (max-width: 699px) {

	/* ------------------------------------------------------
	   CONTENEUR PRINCIPAL DE LA MODALE
	------------------------------------------------------ */

	.wc-backbone-modal-main:has(.MRW-Results) {
		position: relative !important;
	}


	/* ------------------------------------------------------
	   HEADER RENDU INVISIBLE
	------------------------------------------------------ */

	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header {

		position: absolute !important;

		top: 0 !important;
		left: 0 !important;
		right: 0 !important;

		height: 0 !important;
		min-height: 0 !important;

		margin: 0 !important;
		padding: 0 !important;

		border: 0 !important;
		background: transparent !important;

		overflow: visible !important;

		/* Le header ne bloque plus les clics */
		pointer-events: none !important;

		z-index: 2000 !important;
	}


	/* ------------------------------------------------------
	   BOUTON FERMER FLOTTANT
	------------------------------------------------------ */

	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close {

		position: absolute !important;

		top: 10px !important;
		right: 10px !important;

		display: flex !important;
		align-items: center !important;
		justify-content: center !important;

		width: 34px !important;
		height: 34px !important;

		margin: 0 !important;
		padding: 0 !important;

		background: #ffffff !important;

		border: 0 !important;
		border-radius: 999px !important;

		box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18) !important;

		font-size: 0 !important;
		line-height: 0 !important;

		overflow: hidden !important;

		cursor: pointer !important;

		/* Le bouton reste cliquable */
		pointer-events: auto !important;

		z-index: 2100 !important;
	}


	/* ------------------------------------------------------
	   CROIX DESSINÉE EN CSS
	------------------------------------------------------ */

	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close::before,

	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close::after {

		content: "" !important;

		position: absolute !important;

		top: 50% !important;
		left: 50% !important;

		width: 14px !important;
		height: 2px !important;

		background: #5f6368 !important;

		border-radius: 2px !important;

		transform-origin: center !important;
	}


	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close::before {

		transform: translate(-50%, -50%) rotate(45deg) !important;
	}


	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close::after {

		transform: translate(-50%, -50%) rotate(-45deg) !important;
	}


	/* ------------------------------------------------------
	   HOVER / ACTIVE
	------------------------------------------------------ */

	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close:hover,

	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close:active {

		background: #f3f4f6 !important;
	}


	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close:hover::before,

	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close:hover::after,

	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close:active::before,

	.wc-backbone-modal-main:has(.MRW-Results)
	> .wc-backbone-modal-header
	.modal-close:active::after {

		background: #202124 !important;
	}
}

/* ==========================================================
   MONDIAL RELAY — MOBILE
   Carte + popup du point relais
========================================================== */

@media screen and (max-width: 699px) {

	/* ------------------------------------------------------
	   HAUTEUR ADAPTATIVE DE LA CARTE
	------------------------------------------------------ */

	.MRW-Results .MRW-Map {
		width: 100% !important;

		height: clamp(350px, 50vh, 410px) !important;
		min-height: 350px !important;
		max-height: 410px !important;
	}


	/* ------------------------------------------------------
	   POPUP LEAFLET
	------------------------------------------------------ */

	.MRW-Results .leaflet-popup-content-wrapper {
		border-radius: 10px !important;
	}

	.MRW-Results .leaflet-popup-content {
		width: auto !important;
		max-width: 310px !important;

		margin: 12px !important;

		font-size: 12px !important;
		line-height: 1.4 !important;
	}


	/* ------------------------------------------------------
	   BOUTON VOIR LES HORAIRES
	------------------------------------------------------ */

	.MRW-Results .ms-mr-hours-toggle {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;

		width: 100% !important;

		margin: 8px 0 4px !important;
		padding: 9px 10px !important;

		background: #f5f5f5 !important;
		color: #333333 !important;

		border: 1px solid #e1e1e1 !important;
		border-radius: 6px !important;

		font-family: inherit !important;
		font-size: 12px !important;
		font-weight: 600 !important;

		box-shadow: none !important;

		cursor: pointer !important;
	}


	.MRW-Results .ms-mr-hours-toggle:hover,
	.MRW-Results .ms-mr-hours-toggle:active {
		background: #eeeeee !important;
	}


	/* Flèche */
	.MRW-Results .ms-mr-hours-toggle-icon {
		margin-left: 10px;

		font-size: 14px;
	}


	/* ------------------------------------------------------
	   HORAIRES MASQUÉS
	------------------------------------------------------ */

	/* Masque tous les tableaux horaires repliés */
	.MRW-Results table.PR-Hours[hidden] {
		display: none !important;
}


	/* ------------------------------------------------------
	   TABLEAU DES HORAIRES OUVERT
	------------------------------------------------------ */

	.MRW-Results .ms-mr-hours-table {
		width: 100% !important;

		margin-top: 6px !important;

		font-size: 11px !important;

		border-collapse: collapse !important;
	}


	.MRW-Results .ms-mr-hours-table td {
		padding: 4px 6px !important;

		line-height: 1.3 !important;
	}
}

/* ==========================================================
   MONDIAL RELAY — MOBILE
   Popup point relais compact et sans débordement
========================================================== */

@media screen and (max-width: 699px) {

	/* ------------------------------------------------------
	   POPUP LEAFLET
	------------------------------------------------------ */

	.MRW-Results .leaflet-popup {
		max-width: 270px !important;
	}


	/*
	 * On ne force PAS la largeur du wrapper.
	 * Il s'adapte à la largeur du contenu.
	 */
	.MRW-Results .leaflet-popup-content-wrapper {
		max-width: 270px !important;

		border-radius: 10px !important;

		box-sizing: border-box !important;
	}


	/*
	 * C'est le contenu que l'on dimensionne.
	 */
	.MRW-Results .leaflet-popup-content {
		width: 245px !important;
		max-width: calc(100vw - 110px) !important;

		margin: 12px !important;
		padding: 0 18px 0 0 !important;

		box-sizing: border-box !important;

		font-size: 12px !important;
		line-height: 1.4 !important;

		overflow: hidden !important;
	}


	/* ------------------------------------------------------
	   CONTENU INTERNE MONDIAL RELAY
	------------------------------------------------------ */

	.MRW-Results .leaflet-popup-content *,
	.MRW-Results .leaflet-popup-content *::before,
	.MRW-Results .leaflet-popup-content *::after {
		box-sizing: border-box !important;
	}


	/*
	 * Empêche les différents blocs du widget
	 * de conserver une largeur supérieure au popup.
	 */
	.MRW-Results .leaflet-popup-content div,
	.MRW-Results .leaflet-popup-content table {
		max-width: 100% !important;
	}


	/* ------------------------------------------------------
	   NOM DU POINT RELAIS
	------------------------------------------------------ */

	.MRW-Results .leaflet-popup-content .PR-Name {
		width: 100% !important;
		max-width: 100% !important;

		white-space: normal !important;

		overflow-wrap: anywhere !important;
		word-break: normal !important;
	}


	/* ------------------------------------------------------
	   BOUTON VOIR LES HORAIRES
	------------------------------------------------------ */

	.MRW-Results .ms-mr-hours-toggle {
		width: 100% !important;
		max-width: 100% !important;

		box-sizing: border-box !important;

		white-space: normal !important;
	}


	.MRW-Results .ms-mr-hours-toggle-label {
		min-width: 0 !important;

		white-space: normal !important;

		overflow-wrap: break-word !important;
	}


	/* ------------------------------------------------------
	   HORAIRES
	------------------------------------------------------ */

	.MRW-Results table.PR-Hours {
		width: 100% !important;
		max-width: 100% !important;

		table-layout: fixed !important;

		box-sizing: border-box !important;
	}


	/* ------------------------------------------------------
	   CROIX
	------------------------------------------------------ */

	.MRW-Results .leaflet-popup-close-button {
		top: 5px !important;
		right: 5px !important;

		display: flex !important;
		align-items: center !important;
		justify-content: center !important;

		width: 24px !important;
		height: 24px !important;

		padding: 0 !important;

		background: #ffffff !important;
		color: #555555 !important;

		border-radius: 50% !important;

		font-size: 20px !important;
		line-height: 1 !important;

		z-index: 20 !important;
	}
}

/* ==========================================================
   MONDIAL RELAY — BOUTON "LIVRER ICI"
========================================================== */

.wms_pickup_modal_mondial_relay
.wms_mondial_relay_sidebar
.wms_select_pickup_point_button {

	width: 100% !important;
	padding: 14px 20px !important;

	background: #7a1631 !important;
	color: #ffffff !important;

	border: none !important;
	border-radius: 6px !important;

	cursor: pointer !important;

	font-size: 15px !important;
	font-weight: 600 !important;
	text-align: center !important;

	box-shadow:
		0 2px 4px rgba(122, 22, 49, 0.20) !important;

	margin: 0 auto !important;

	transition:
		background-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.15s ease !important;
}


/* Survol */
.wms_pickup_modal_mondial_relay
.wms_mondial_relay_sidebar
.wms_select_pickup_point_button:hover {

	background: #5f1025 !important;
	color: #ffffff !important;

	box-shadow:
		0 4px 8px rgba(122, 22, 49, 0.25) !important;

	transform: translateY(-1px);
}


/* Clic */
.wms_pickup_modal_mondial_relay
.wms_mondial_relay_sidebar
.wms_select_pickup_point_button:active {

	background: #4f0d1e !important;

	transform: translateY(0);
}


/* Navigation clavier */
.wms_pickup_modal_mondial_relay
.wms_mondial_relay_sidebar
.wms_select_pickup_point_button:focus-visible {

	outline: none !important;

	box-shadow:
		0 0 0 3px rgba(122, 22, 49, 0.18),
		0 2px 4px rgba(122, 22, 49, 0.20) !important;
}

/* ==========================================================
   LOGO MANGA SHIELD - FLUID CHECKOUT
========================================================== */

/*
 * Taille générale du logo.
 * Cette règle sert principalement pour la version desktop.
 */
body.has-fluid-checkout
.fc-checkout-header
.fc-checkout__branding img {

    /* Largeur du logo sur ordinateur */
    width: 500px !important;

    /* Supprime les limitations de taille de Fluid Checkout */
    max-width: 500px !important;
    max-height: none !important;

    /* Conserve les proportions originales du logo */
    height: auto !important;
}


/* ==========================================================
   DESKTOP UNIQUEMENT
   À partir de 768 px
========================================================== */

@media (min-width: 768px) {

    /*
     * Centre le contenu du bloc de branding.
     */
    body.has-fluid-checkout
    .fc-checkout-header
    .fc-checkout__branding {
        text-align: center !important;
    }

    /*
     * Centre précisément l'image du logo
     * à l'intérieur du bloc Fluid Checkout.
     */
    body.has-fluid-checkout
    .fc-checkout-header
    .fc-checkout__branding img {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* ==========================================================
   MOBILE UNIQUEMENT
   Jusqu'à 767 px
========================================================== */

@media (max-width: 767px) {

    /*
     * Logo volontairement plus petit sur mobile.
     *
     * Ancienne largeur : 280 px
     * Réduction de 20 % : 224 px
     *
     * Aucun centrage n'est ajouté afin de conserver
     * le positionnement mobile natif de Fluid Checkout.
     */
    body.has-fluid-checkout
    .fc-checkout-header
    .fc-checkout__branding img {
        width: 190px !important;
        max-width: 190px !important;
        max-height: none !important;
        height: auto !important;
    }
}