/*
Theme Name: Troov
Theme URI: https://troov.ch
Author: Troov
Description: Thème de la boutique Troov : seconde main chinée et neuf original. Compatible WooCommerce.
Version: 1.5.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: troov
*/

:root {
	--ink: #0E1220;
	--blue: #2A3CFF;
	--yellow: #FFD84A;
	--bg: #F1F2F5;
	--white: #FFFFFF;
	--muted: #4A5068;
	--soft: #232842;
	--display: 'Bricolage Grotesque', system-ui, sans-serif;
	--body: 'Instrument Sans', system-ui, sans-serif;
	--mono: 'DM Mono', ui-monospace, monospace;
	--radius: 18px;
	--gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; }
h3 { font-size: 24px; font-weight: 700; }
p { margin: 0 0 1em; }
.screen-reader-text, .skip-link:not(:focus) {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--yellow); padding: 10px 16px; border-radius: 10px; }

.container { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: 820px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* En-tête */
.site-header { border-bottom: 2px solid var(--ink); background: var(--bg); position: relative; z-index: 20; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 32px; letter-spacing: -0.03em; line-height: 1; text-decoration: none; color: var(--ink); }
.brand span { color: var(--blue); }
.custom-logo { max-height: 48px; width: auto; }
.brand-logo { height: 40px; width: auto; display: block; }
.nav-toggle { display: none; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; background: transparent; border: 2px solid var(--ink); border-radius: 999px; padding: 8px 16px; color: var(--ink); cursor: pointer; }
.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.primary-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--blue); }
.cart-link { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; border: 2px solid var(--ink); border-radius: 999px; padding: 8px 16px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.cart-link:hover { background: var(--ink); color: var(--white); }
@media (max-width: 760px) {
	.nav-toggle { display: inline-block; }
	.primary-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 8px; }
	.primary-nav.is-open { display: flex; }
	.primary-nav ul { flex-direction: column; }
}

/* Boutons */
.btn, .button, button.button, input[type=submit], .wp-block-button__link, .woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit {
	display: inline-block; font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.2;
	color: var(--white); background: var(--blue); border: 2px solid var(--blue); border-radius: 14px;
	padding: 14px 24px; text-decoration: none; cursor: pointer;
}
.btn:hover, .button:hover, input[type=submit]:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { filter: brightness(1.12); color: var(--white); background: var(--blue); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--yellow { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.btn--yellow:hover { background: var(--yellow); color: var(--ink); }
.woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--blue); }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=number], textarea, select {
	width: 100%; font-family: var(--body); font-size: 17px; color: var(--ink); background: var(--white);
	border: 2px solid var(--ink); border-radius: 14px; padding: 12px 16px;
}
label { font-weight: 600; }

/* Accueil */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 72px); padding-top: clamp(32px, 6vw, 80px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-title { margin: 0; font-size: clamp(46px, 7.4vw, 108px); line-height: 0.94; letter-spacing: -0.04em; }
.hero-title span { display: block; }
.hero-title .accent { color: var(--blue); }
.hero-lead { max-width: 34em; font-size: 19px; color: var(--soft); margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-tags { position: relative; flex: 1 1 360px; min-width: 0; max-width: 480px; margin: 0 auto; min-height: 500px; }
.tag { position: absolute; width: 62%; display: flex; flex-direction: column; gap: 12px; padding: 64px 24px 24px; border: 2px solid var(--ink); border-radius: 22px; text-decoration: none; color: var(--ink); }
.tag::before { content: ""; position: absolute; left: 50%; top: 18px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.tag--yellow { left: 0; top: 0; background: var(--yellow); transform: rotate(-5deg); }
.tag--blue { left: 36%; top: 150px; background: var(--blue); color: var(--white); transform: rotate(4deg); }
.tag:hover { color: inherit; filter: brightness(1.05); }
.tag-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.tag-name { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -0.03em; }
.tag-text { font-size: 16px; line-height: 1.4; }

.section { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); }
.section--white { background: var(--white); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.more { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.strip { background: var(--ink); color: var(--bg); }
.strip .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; padding-top: 18px; padding-bottom: 18px; font-family: var(--mono); font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; }

/* Articles et pages */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { background: var(--white); border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.card-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.card-date { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--blue); }
.card p { margin: 0; color: var(--soft); font-size: 16px; }
.page-head { padding-top: clamp(32px, 5vw, 64px); padding-bottom: 24px; }
.entry { padding-bottom: clamp(48px, 7vw, 96px); }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content img { border-radius: var(--radius); }
.entry-meta { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.entry-thumb { margin-bottom: 32px; }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.nav-links a, .nav-links span { border: 2px solid var(--ink); border-radius: 12px; padding: 8px 14px; text-decoration: none; color: var(--ink); }
.nav-links .current { background: var(--ink); color: var(--white); }
.notice { background: var(--yellow); border-radius: 12px; padding: 12px 16px; font-size: 15px; font-weight: 600; }

/* Pied de page */
.site-footer { background: var(--ink); color: var(--bg); margin-top: 0; }
.footer-inner { padding-top: 56px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 28px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; }
.site-footer .brand { color: var(--bg); }
.site-footer a { color: var(--bg); }
.site-footer a:hover { color: var(--yellow); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; border-top: 1.5px solid var(--muted); padding-top: 20px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: #B7BCCF; }

/* WooCommerce : grille produits */
.woocommerce ul.products, ul.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product, ul.products li.product { position: relative; width: auto !important; margin: 0 !important; float: none !important; background: var(--white); border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; padding: 0 0 18px; display: flex; flex-direction: column; }
ul.products li.product a { text-decoration: none; color: var(--ink); }
ul.products li.product img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin: 0 0 14px; }
.woocommerce-loop-product__title { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.15; padding: 0 18px; margin: 0 0 6px; }
ul.products li.product .price { display: block; padding: 0 18px; font-family: var(--mono); font-size: 15px; color: var(--ink); margin-bottom: 12px; }
ul.products li.product .button { margin: auto 18px 0; align-self: flex-start; padding: 10px 18px; font-size: 15px; }
.troov-badge { position: absolute; top: 14px; left: 14px; z-index: 2; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; }
.troov-badge--neuf { background: var(--blue); color: var(--white); }
.troov-badge--vendu { background: var(--ink); color: var(--white); }
.woocommerce span.onsale { background: var(--blue); color: var(--white); border-radius: 999px; min-height: 0; min-width: 0; line-height: 1.6; padding: 2px 12px; top: 14px; right: 14px; left: auto; }

/* WooCommerce : fiche produit */
.woocommerce div.product { position: relative; display: flex; flex-wrap: wrap; gap: 32px 48px; padding-bottom: 48px; }
.woocommerce div.product div.images { flex: 1 1 340px; min-width: 0; float: none; width: auto; }
.woocommerce div.product div.images img { border-radius: var(--radius); }
.woocommerce div.product div.summary { flex: 1 1 340px; min-width: 0; float: none; width: auto; }
.woocommerce div.product .product_title { font-size: clamp(30px, 4vw, 48px); }
.woocommerce div.product p.price, .woocommerce div.product span.price { font-family: var(--mono); font-size: 24px; color: var(--ink); }
.woocommerce div.product .woocommerce-tabs, .woocommerce div.product .related, .woocommerce div.product .upsells { flex: 1 1 100%; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; 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 { border: 2px solid var(--ink); border-radius: 999px; background: transparent; margin: 0; padding: 0; }
.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.active { background: var(--ink); }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { display: block; padding: 6px 18px; color: var(--ink); text-decoration: none; font-weight: 600; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--white); }
.woocommerce .quantity .qty { width: 80px; border: 2px solid var(--ink); border-radius: 14px; padding: 12px; }
.woocommerce-breadcrumb { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 32px 0 24px; }
.woocommerce-breadcrumb a { color: var(--muted); }
.woocommerce-products-header h1 { margin-bottom: 16px; }
.woocommerce-result-count, .woocommerce-ordering { margin: 0 0 24px; }
.woocommerce-result-count { float: left; font-family: var(--mono); font-size: 13px; }
.woocommerce-ordering { float: right; }
.woocommerce-ordering select { width: auto; padding: 8px 12px; }
.woocommerce-pagination { clear: both; padding-top: 32px; }
.woocommerce-pagination ul { list-style: none; display: flex; gap: 8px; padding: 0; border: 0; }
.woocommerce-pagination ul li { border: 0; }
.woocommerce-pagination ul li a, .woocommerce-pagination ul li span { border: 2px solid var(--ink); border-radius: 12px; padding: 8px 14px; color: var(--ink); background: transparent; text-decoration: none; }
.woocommerce-pagination ul li span.current { background: var(--ink); color: var(--white); }

/* WooCommerce : messages, panier, commande */
.woocommerce-message, .woocommerce-info, .woocommerce-error { list-style: none; margin: 0 0 24px; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); border-top-color: var(--ink); color: var(--ink); }
.woocommerce-message { background: var(--yellow); }
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { display: none; }
.woocommerce-message .button, .woocommerce-info .button { float: right; margin-left: 16px; padding: 8px 16px; font-size: 15px; }
.woocommerce table.shop_table { border: 2px solid var(--ink); border-radius: 16px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--white); width: 100%; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-top: 1px solid #D8DBE5; padding: 14px 16px; text-align: left; }
.woocommerce table.shop_table thead th { border-top: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.woocommerce table.shop_table img { width: 64px; border-radius: 10px; }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals { float: none; width: 100%; max-width: 480px; margin-left: auto; }
.woocommerce-checkout #payment { background: var(--white); border: 2px solid var(--ink); border-radius: 16px; }
.woocommerce-checkout #payment div.payment_box { background: var(--bg); color: var(--ink); }
.woocommerce form .form-row { padding: 0; margin: 0 0 16px; }
.woocommerce form .form-row label { display: block; margin-bottom: 6px; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.woocommerce-account .woocommerce-MyAccount-navigation a { color: var(--ink); font-weight: 600; text-decoration: none; }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a { color: var(--blue); }

@media (max-width: 760px) {
	.woocommerce-result-count, .woocommerce-ordering { float: none; }
	.woocommerce table.shop_table_responsive tr td::before { font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Formulaire de contact */
.troov-form-wrap { max-width: 640px; }
.troov-form .field { margin-bottom: 18px; }
.troov-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.troov-form .opt { font-weight: 400; color: var(--muted); }
.troov-form input[type=text], .troov-form input[type=email], .troov-form input[type=tel], .troov-form select, .troov-form textarea, .troov-form input[type=file] {
	width: 100%; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--white); font: inherit; color: var(--ink);
}
.troov-form input:focus, .troov-form select:focus, .troov-form textarea:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.troov-form .hint { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.troov-form .file-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.troov-form .file-error { color: #B00020; font-weight: 600; }
.troov-form .field--check { display: flex; gap: 10px; align-items: flex-start; }
.troov-form .field--check input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--blue); }
.troov-form .field--check label { font-weight: 400; margin: 0; }
.troov-form .btn[disabled] { opacity: .6; cursor: wait; }
.troov-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: 14px 18px; border-radius: 12px; border: 2px solid var(--ink); font-weight: 600; margin-bottom: 20px; }
.form-msg--ok { background: var(--yellow); }
.form-msg--error { background: #FFE3E3; border-color: #B00020; color: #7A0016; }

/* Bouton WhatsApp */
.wa-btn {
	position: fixed; right: 18px; bottom: 18px; z-index: 90; display: inline-flex; align-items: center; gap: 8px;
	background: #25D366; color: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 10px 16px 10px 12px;
	font-weight: 700; text-decoration: none; box-shadow: 3px 3px 0 var(--ink);
}
.wa-btn:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }
.wa-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.wa-btn svg { display: block; background: #25D366; border-radius: 50%; }
body.cookie-open .wa-btn { bottom: 150px; }
@media (max-width: 760px) { .wa-label { display: none; } .wa-btn { padding: 10px; } body.cookie-open .wa-btn { bottom: 210px; } }

/* Cookies */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 100; max-width: 760px; margin: 0 auto; background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--ink); }
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 20px; flex-wrap: wrap; }
.cookie-copy { flex: 1 1 320px; }
.cookie-title { font-family: var(--display); font-weight: 800; margin: 0 0 4px; }
.cookie-text { margin: 0 0 4px; font-size: 14px; color: var(--soft); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-cookie-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* Hero avec photo */
.hero-visual { position: relative; flex: 1 1 420px; min-width: 0; max-width: 640px; margin: 0 auto; padding-bottom: 28px; }
.hero-photo { display: block; width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--ink); background: var(--white); }
.hero-visual .tag { width: auto; padding: 14px 20px 14px 20px; gap: 2px; border-radius: 16px; }
.hero-visual .tag::before { display: none; }
.hero-visual .tag-name { font-size: 30px; }
.hero-visual .tag--yellow { left: -14px; top: auto; bottom: 0; transform: rotate(-4deg); }
.hero-visual .tag--blue { left: auto; right: -10px; top: -14px; transform: rotate(4deg); }
@media (max-width: 760px) { .hero-visual .tag--yellow { left: 0; } .hero-visual .tag--blue { right: 0; } .hero-photo { box-shadow: 5px 5px 0 var(--ink); } }
.woocommerce ul.products li.product img, .woocommerce-product-gallery__image img { border-radius: 14px; }
