/*
Theme Name: Matériel Cuisine Pro
Theme URI: https://materiel-cuisinepro-maroc.ma
Author: Matériel Cuisine Pro Maroc
Description: Thème WooCommerce léger et sur mesure pour le catalogue de matériel de cuisine professionnelle. Sans page builder.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: cuisine-pro
*/

/* ==========================================================================
   Variables et base
   ========================================================================== */
:root {
	--orange: #e8741f;
	--orange-dark: #c75f12;
	--orange-soft: #fdf1e6;
	--ink: #23282d;
	--gray: #6b7075;
	--line: #e6e8ea;
	--bg-soft: #f6f7f8;
	--white: #fff;
	--radius: 10px;
	--container: 1240px;
	--shadow: 0 6px 24px rgba(35, 40, 45, .08);
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--orange-dark); text-decoration: none; }
a:hover { color: var(--orange); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; color: var(--ink); }

p { margin: 0 0 1em; }

ul { margin: 0; padding: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container.narrow, .narrow { max-width: 920px; }

.screen-reader-text, .skip-link:not(:focus) {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; }

.icon { flex: none; }

/* Boutons */
.btn, .button, button.button, input[type="submit"], .wpcf7-submit, .woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 26px;
	border: 2px solid var(--orange);
	border-radius: 999px;
	background: var(--orange);
	color: #fff;
	font: inherit; font-weight: 600; font-size: 14px; letter-spacing: .03em; text-transform: uppercase;
	cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover, .button:hover, input[type="submit"]:hover, .wpcf7-submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover {
	background: var(--orange-dark); border-color: var(--orange-dark); color: #fff;
}
.btn-light { background: #fff; color: var(--orange-dark); border-color: #fff; }
.btn-light:hover { background: var(--orange-soft); color: var(--orange-dark); border-color: var(--orange-soft); }
.btn-whatsapp { background: #25d366; border-color: #25d366; }
.btn-whatsapp:hover { background: #1da851; border-color: #1da851; }

/* ==========================================================================
   Pages et contenu
   ========================================================================== */
.site-main { min-height: 50vh; }
.page-wrap { padding-top: 36px; padding-bottom: 64px; }
.page-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; margin-bottom: .7em; }

.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 26px; margin-top: 1.6em; }
.entry-content h3 { font-size: 21px; margin-top: 1.4em; }
.entry-content h4 { font-size: 18px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .35em; }
.entry-content img { border-radius: var(--radius); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.entry-content iframe { max-width: 100%; border: 0; border-radius: var(--radius); }

.single-thumb { margin: 0 0 28px; }
.single-thumb img { border-radius: var(--radius); width: 100%; }
.post-meta { font-size: 13px; color: var(--gray); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .5em; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-weight: 600; }

/* Cartes d'articles */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card-body { padding: 20px; }
.post-card h3 { font-size: 19px; margin-bottom: .5em; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--orange); }

.pagination { margin-top: 40px; }
.pagination ul, .woocommerce-pagination ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; border: 0 !important; }
.pagination li, .woocommerce-pagination li { border: 0 !important; }
.pagination a, .pagination span, .woocommerce-pagination a, .woocommerce-pagination span {
	display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 600; background: #fff;
}
.pagination .current, .woocommerce-pagination .current { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ==========================================================================
   Accueil
   ========================================================================== */
.home-intro { background: linear-gradient(180deg, var(--orange-soft), #fff); padding: 56px 0 24px; }
.home-intro h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; text-align: center; margin-bottom: .8em; }
.home-intro h2 { font-size: clamp(21px, 2.4vw, 28px); margin-top: 1.8em; padding-left: 16px; border-left: 4px solid var(--orange); }
.home-intro p { color: #3b4147; }

.cat-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding-top: 24px; padding-bottom: 8px; }
.cat-pills a { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 14px; background: #fff; }
.cat-pills a:hover { border-color: var(--orange); background: var(--orange); color: #fff; }

.home-row { padding: 44px 0 8px; }
.row-head { text-align: center; margin-bottom: 24px; }
.row-head h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; margin-bottom: 10px; }
.row-tag { display: inline-block; padding: 4px 18px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 13px; font-weight: 600; }
.row-more { text-align: center; margin-top: 22px; }

.row-scroller { position: relative; }
.row-nav {
	position: absolute; top: 40%; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
	background: #fff; color: var(--ink); box-shadow: var(--shadow); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.row-nav:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.row-prev { left: -14px; transform: rotate(180deg); }
.row-next { right: -14px; }

.home-catalogue { margin-top: 56px; background: var(--ink); color: #fff; }
.home-catalogue .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 44px; padding-bottom: 44px; }
.home-catalogue h2 { color: #fff; font-size: 30px; margin-bottom: .2em; text-transform: uppercase; }
.home-catalogue p { margin: 0; color: #cfd3d6; }

.section-title { text-align: center; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; margin-bottom: 28px; }
.home-blog { padding-top: 56px; }
.home-partners { margin-top: 64px; padding: 56px 0 64px; background: var(--bg-soft); }


.testimonials { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.testimonial { margin: 0; padding: 26px; background: var(--bg-soft); border-radius: var(--radius); border-left: 4px solid var(--orange); }
.testimonial blockquote { margin: 0 0 14px; font-style: italic; }
.testimonial figcaption { font-weight: 700; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-card { padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 16px; }
.contact-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--orange-dark); }
.contact-card p { margin: 0; }
.contact-map iframe { width: 100%; height: 360px; }

.wpcf7 form { display: grid; gap: 14px; }
.wpcf7 label { display: block; font-weight: 600; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea, .woocommerce input.input-text, .woocommerce textarea, .woocommerce select {
	width: 100%; padding: 12px 16px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.wpcf7 input:focus, .wpcf7 textarea:focus, .woocommerce input.input-text:focus { outline: 2px solid var(--orange-soft); border-color: var(--orange); }
.wpcf7 .wpcf7-submit { justify-self: start; }

/* ==========================================================================
   Boutique WooCommerce
   ========================================================================== */
.woocommerce-breadcrumb { font-size: 13px; color: var(--gray); margin-bottom: 20px; }
.woocommerce-breadcrumb a { color: var(--gray); }
.woocommerce-breadcrumb a:hover { color: var(--orange); }
.woocommerce-breadcrumb .sep { margin: 0 8px; }

.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; }
.shop-sidebar { position: sticky; top: 150px; }
.shop-sidebar h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .04em; padding-bottom: 12px; border-bottom: 2px solid var(--orange); }
.cat-tree, .cat-tree ul { list-style: none; }
.cat-tree li { border-bottom: 1px solid var(--line); }
.cat-tree a { display: inline-block; padding: 9px 0; color: var(--ink); }
.cat-tree a:hover, .cat-tree .current-cat > a { color: var(--orange); font-weight: 700; }
.cat-tree .children { padding-left: 14px; font-size: 14px; }
.cat-tree .children li:last-child { border-bottom: 0; }

.woocommerce-products-header__title, .woocommerce .page-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; margin-bottom: .5em; }
.term-description { color: #3b4147; margin-bottom: 24px; }
.woocommerce-result-count { float: left; margin: 0 0 20px; color: var(--gray); font-size: 14px; }
.woocommerce-ordering { float: right; margin: 0 0 20px; }
.woocommerce-ordering select { padding: 9px 14px; font-size: 14px; }

ul.products::before, ul.products::after { display: none !important; content: none !important; }
ul.products {
	list-style: none; clear: both;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px;
}
ul.products li.product {
	position: relative; display: flex; flex-direction: column; margin: 0; padding: 14px 14px 18px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .2s, border-color .2s;
}
ul.products li.product:hover { box-shadow: var(--shadow); border-color: transparent; }
ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1; color: var(--ink); }
ul.products li.product img { width: 100%; aspect-ratio: 1; object-fit: contain; margin-bottom: 12px; }
.loop-cat { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray); margin-bottom: 4px; }
.woocommerce-loop-product__title { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 0 0 6px; }
ul.products li.product .price { color: var(--orange-dark); font-weight: 700; margin-top: auto; }
ul.products li.product .onsale, .onsale {
	position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--orange); color: #fff; border-radius: 999px; padding: 2px 12px; font-size: 12px; font-weight: 700;
}

/* Rangées de l'accueil */
.product-row {
	display: flex !important; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: thin;
}
.product-row li.product { flex: 0 0 232px; scroll-snap-align: start; }

/* Fiche produit */
.single-product div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.single-product div.product > .woocommerce-tabs,
.single-product div.product > .related,
.single-product div.product > .upsells,
.single-product div.product > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce div.product div.images { position: relative; }
.woocommerce-product-gallery__image img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.woocommerce-product-gallery__trigger { position: absolute; top: 12px; right: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); text-indent: -999px; overflow: hidden; }
.flex-control-thumbs { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.flex-control-thumbs img { border: 1px solid var(--line); border-radius: 8px; cursor: pointer; opacity: .7; }
.flex-control-thumbs img.flex-active, .flex-control-thumbs img:hover { opacity: 1; border-color: var(--orange); }

.product_title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.summary .price { font-size: 26px; font-weight: 800; color: var(--orange-dark); margin-bottom: 1em; display: block; }
.woocommerce-product-details__short-description { color: #3b4147; margin-bottom: 1.2em; }
.product_meta { margin-top: 1.4em; padding-top: 1em; border-top: 1px solid var(--line); font-size: 14px; color: var(--gray); display: grid; gap: 4px; }

.variation-chips { margin-bottom: 1em; }
.variation-chips ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.variation-chips li { padding: 5px 16px; border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; }

.quote-box { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 1.4em 0; padding: 22px; background: var(--orange-soft); border-radius: var(--radius); }
.quote-box .quote-phone { flex-basis: 100%; margin: 0; font-size: 14px; }

.woocommerce div.product .woocommerce-tabs ul.tabs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 30px; border-bottom: 1px solid var(--line); margin: 0 0 24px; padding: 0; overflow: visible; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before, .woocommerce div.product .woocommerce-tabs ul.tabs::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { display: block; padding: 12px 0; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--gray); border-bottom: 3px solid transparent; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--orange); border-bottom-color: var(--orange); }
.woocommerce-Tabs-panel h2 { font-size: 22px; }
.woocommerce-Tabs-panel table { width: 100%; border-collapse: collapse; }
.woocommerce-Tabs-panel th, .woocommerce-Tabs-panel td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.woocommerce-Tabs-panel tr:nth-child(odd) { background: var(--bg-soft); }

.related h2, .upsells h2 { font-size: 26px; text-align: center; margin: 48px 0 24px; }

/* Messages, panier, commande, compte */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	list-style: none; padding: 14px 20px; margin: 0 0 24px; border-radius: 8px; background: var(--bg-soft); border-left: 4px solid var(--orange);
}
.woocommerce-error { border-left-color: #c0392b; }
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--radius); }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.woocommerce .cart-collaterals { margin-top: 32px; }
.woocommerce form .form-row { margin-bottom: 14px; }
.woocommerce form .form-row label { display: block; font-weight: 600; margin-bottom: 4px; }
.woocommerce-MyAccount-navigation ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 28px; }
.woocommerce-MyAccount-navigation a { font-weight: 600; color: var(--ink); }
.woocommerce-MyAccount-navigation .is-active a { color: var(--orange); }

/* Favoris et comparateur (YITH) */
.yith-wcwl-add-to-wishlist { margin-top: 10px; font-size: 14px; }
.yith-wcwl-add-to-wishlist a, a.compare { color: var(--ink); font-size: 14px; }
.yith-wcwl-add-to-wishlist a:hover, a.compare:hover { color: var(--orange); }
a.compare.button { background: none; border: 0; padding: 0; color: var(--gray); text-transform: none; font-weight: 500; letter-spacing: 0; }

/* ==========================================================================
   Adaptation tablette et mobile
   ========================================================================== */
@media (max-width: 1100px) {
	.shop-layout { grid-template-columns: 210px 1fr; gap: 28px; }
}

@media (max-width: 860px) {
	.single-product div.product { grid-template-columns: 1fr; gap: 28px; }
	.shop-layout { grid-template-columns: 1fr; }
	.shop-sidebar { position: static; }
	.contact-grid { grid-template-columns: 1fr; }
	.home-catalogue .container { flex-direction: column; text-align: center; }
	.row-nav { display: none; }
}

@media (max-width: 540px) {
	.product-row li.product { flex-basis: 200px; }
	ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.woocommerce-loop-product__title { font-size: 14px; }
}
