/* ==========================================================================
   En-tête et pied de page : design moderne
   ========================================================================== */

.primary-nav .drawer-only, .primary-nav .drawer-head { display: none; }

.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; }

/* ---------- Barre d'informations ---------- */
.topbar { background: #171b1f; color: #c9ced2; font-size: 13px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 40px; }
.topbar-msg { display: flex; align-items: center; gap: 8px; margin: 0; }
.topbar .icon { width: 16px; height: 16px; color: var(--orange); }
.topbar-links { list-style: none; display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; }
.topbar-links a { display: inline-flex; align-items: center; gap: 7px; color: #e6e9eb; transition: color .2s; }
.topbar-links a:hover { color: #ffb36b; }

/* ---------- En-tête principal ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.site-header.is-scrolled { box-shadow: 0 10px 34px rgba(20, 24, 27, .09); }

.header-main { display: flex; align-items: center; gap: 28px; min-height: 84px; transition: min-height .25s; }
.is-scrolled .header-main { min-height: 66px; }

.site-branding { flex: none; }
.site-branding img, .custom-logo { width: auto; max-height: 68px; transition: max-height .25s; }
.is-scrolled .custom-logo { max-height: 50px; }
.site-title { font-size: 20px; font-weight: 800; color: var(--ink); }

.primary-nav { flex: 1; display: flex; justify-content: center; }
.primary-nav .menu { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.primary-nav .menu > li { position: relative; }
.primary-nav .menu > li > a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 10px 15px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink); transition: background .2s, color .2s; }
.primary-nav .menu > li > a:hover,
.primary-nav .menu > li.current-menu-item > a,
.primary-nav .menu > li:hover > a { background: var(--orange-soft); color: var(--orange-dark); }
.primary-nav .menu > li.menu-item-has-children > a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .6; }

.primary-nav .sub-menu { display: none; list-style: none; position: absolute; left: 50%; top: calc(100% + 6px); z-index: 70; min-width: 280px; margin: 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 22px 54px rgba(20, 24, 27, .16); transform: translateX(-50%); }
.primary-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.primary-nav .menu > li:hover > .sub-menu, .primary-nav .menu > li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { display: block; padding: 10px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: #30363b; }
.primary-nav .sub-menu a:hover { background: var(--orange-soft); color: var(--orange-dark); }

.header-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--bg-soft); color: var(--orange); }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.header-cta { margin-left: 10px; white-space: nowrap; }
.header-cta .icon { width: 16px; height: 16px; }

.nav-toggle { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--bg-soft); color: var(--ink); cursor: pointer; }

/* ---------- Bandeau des catégories ---------- */
.header-rail { background: #fff; border-top: 1px solid var(--line); }
.rail-inner { display: flex; align-items: center; gap: 16px; min-height: 58px; }

.cat-menu { position: relative; flex: none; }
.cat-toggle { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s; }
.cat-toggle:hover, .cat-menu.is-open .cat-toggle { background: var(--orange); }
.cat-toggle .icon { width: 18px; height: 18px; }
.cat-toggle .icon-chevron { width: 15px; height: 15px; transform: rotate(90deg); transition: transform .2s; }
.cat-menu.is-open .cat-toggle .icon-chevron { transform: rotate(-90deg); }

.mega { display: none; position: absolute; top: calc(100% + 12px); left: 0; z-index: 80; width: min(1080px, calc(100vw - 40px)); padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 70px rgba(20, 24, 27, .2); }
.cat-menu.is-open .mega { display: block; }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 28px; }
.mega-top { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.mega-top:hover strong { color: var(--orange-dark); }
.mega-thumb { flex: none; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; overflow: hidden; border-radius: 12px; background: var(--orange-soft); color: var(--orange); font-weight: 800; }
.mega-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mega-top strong { display: block; font-size: 15px; line-height: 1.25; }
.mega-top small { color: var(--gray); font-size: 12.5px; }
.mega-sub { list-style: none; display: grid; gap: 2px; margin: 8px 0 0 62px; padding: 0; }
.mega-sub a { font-size: 13.5px; color: #4a5056; }
.mega-sub a:hover { color: var(--orange-dark); }
.mega-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.mega-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.mega-all .icon { width: 18px; height: 18px; }

.rail-links { flex: 1; display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rail-links::-webkit-scrollbar { display: none; }
.rail-links a { flex: none; padding: 8px 13px; border-radius: 999px; font-size: 14px; font-weight: 500; color: #3b4147; white-space: nowrap; transition: background .2s, color .2s; }
.rail-links a:hover { background: var(--bg-soft); color: var(--orange-dark); }

.product-search { flex: none; display: flex; align-items: center; width: 290px; padding: 3px 3px 3px 18px; background: var(--bg-soft); border: 1px solid transparent; border-radius: 999px; transition: border-color .2s, background .2s; }
.product-search:focus-within { background: #fff; border-color: var(--orange); }
.product-search input[type="search"] { flex: 1; min-width: 0; padding: 8px 0; border: 0; background: transparent; font: inherit; font-size: 14px; outline: none; }
.product-search button { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--orange); color: #fff; cursor: pointer; transition: background .2s; }
.product-search button:hover { background: var(--orange-dark); }
.product-search .icon { width: 18px; height: 18px; }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: 64px; background: #171b1f; color: #aeb6bc; }

.footer-cta { position: relative; margin-top: -1px; background: linear-gradient(115deg, var(--orange) 0%, #d1590f 100%); color: #fff; }
.footer-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-top: 40px; padding-bottom: 40px; }
.footer-cta h2 { margin: 0 0 6px; color: #fff; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; }
.footer-cta p { margin: 0; color: #ffe9d6; }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }
.footer-cta .btn .icon { width: 18px; height: 18px; }

.footer-main { padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-col h2 { margin: 0 0 18px; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.footer-menu { list-style: none; display: grid; gap: 11px; margin: 0; padding: 0; font-size: 15px; }
.footer-menu-2col { grid-template-columns: 1fr 1fr; }
.footer-site a, .footer-main a { color: #aeb6bc; transition: color .2s; }
.footer-main a:hover { color: #ffb36b; }

.footer-logo { display: inline-block; margin-bottom: 18px; padding: 10px 14px; background: #fff; border-radius: 14px; }
.footer-logo img { width: auto; max-height: 64px; }
.footer-brand p { margin: 0 0 18px; max-width: 360px; font-size: 15px; line-height: 1.7; }
.footer-contact { list-style: none; display: grid; gap: 12px; margin: 0; padding: 0; font-size: 15px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 12px; }
.footer-contact .icon { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--orange); }

.footer-news { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 32px; margin-bottom: 44px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); border-radius: 18px; }
.footer-news h2 { margin: 0 0 4px; color: #fff; font-size: 18px; }
.footer-news p { margin: 0; font-size: 14.5px; }
.footer-news .mc4wp-form { flex: 1; max-width: 480px; }
.footer-news .mc4wp-form-fields { display: flex; align-items: center; gap: 10px; }
.footer-news .mc4wp-form-fields p { margin: 0; }
.footer-news .mc4wp-form-fields p:first-child { flex: 1; min-width: 0; }
.footer-news .mc4wp-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.footer-news .mc4wp-response { margin-top: 10px; font-size: 14px; }
.footer-news input[type="email"] { width: 100%; min-width: 0; padding: 13px 20px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(255, 255, 255, .06); color: #fff; font: inherit; }
.footer-news input[type="email"]::placeholder { color: #8a949b; }
.footer-news input[type="email"]:focus { outline: none; border-color: var(--orange); }
.footer-news input[type="submit"] { padding: 13px 24px; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #aeb6bc; transition: color .2s; }
.footer-bottom a:hover { color: #ffb36b; }
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; }

.to-top { position: fixed; right: 18px; bottom: 112px; z-index: 55; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; box-shadow: 0 10px 28px rgba(20, 24, 27, .3); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, background .2s, visibility .25s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--orange); }
.to-top .icon { width: 20px; height: 20px; }

/* ---------- Tablette ---------- */
@media (max-width: 1180px) {
	.hide-lg { display: none; }
	.product-search { width: 230px; }
	.primary-nav .menu > li > a { padding: 10px 11px; }
	.footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
	.footer-grid .footer-col:nth-of-type(5) { display: none; }
}

/* ---------- Mobile : menu en tiroir ---------- */
@media (max-width: 960px) {
	.hide-md { display: none; }
	.site-header { background: #fff; backdrop-filter: none; }
	.header-main { gap: 10px; min-height: 66px; }
	.site-branding { margin-right: auto; }
	.site-branding img, .custom-logo { max-height: 52px; }
	.nav-toggle { display: inline-flex; }
	.header-cta, .hide-sm { display: none; }

	.nav-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(20, 24, 27, .55); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
	.nav-open .nav-overlay { opacity: 1; visibility: visible; }
	body.nav-open { overflow: hidden; }
	body.nav-open .ht-ctc, body.nav-open .to-top { display: none; }

	.primary-nav { position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; display: flex; flex-direction: column; justify-content: flex-start; width: min(88vw, 380px); overflow-y: auto; padding: 0 20px 28px; background: #fff; box-shadow: 0 0 60px rgba(20, 24, 27, .35); transform: translateX(-105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
	.nav-open .primary-nav { transform: none; }
	.primary-nav .drawer-only { display: block; }
	.primary-nav .product-search.drawer-only { display: flex; }
	.primary-nav .drawer-actions.drawer-only { display: grid; }
	.primary-nav .drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 14px; font-size: 18px; }
	.nav-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg-soft); color: var(--ink); cursor: pointer; }
	.primary-nav .product-search { width: 100%; margin-bottom: 14px; }

	.primary-nav .menu { flex-direction: column; align-items: stretch; gap: 0; }
	.primary-nav .menu > li > a { display: flex; padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 16px; }
	.primary-nav .menu > li > a:hover, .primary-nav .menu > li:hover > a, .primary-nav .menu > li.current-menu-item > a { background: none; }
	.primary-nav .menu > li.current-menu-item > a { color: var(--orange-dark); }
	.primary-nav .menu > li.menu-item-has-children > a::after { display: none; }
	.primary-nav .sub-menu { display: block; position: static; min-width: 0; padding: 4px 0 8px 14px; border: 0; box-shadow: none; transform: none; background: none; }
	.primary-nav .sub-menu::before { display: none; }
	.primary-nav .sub-menu a { padding: 9px 4px; font-size: 15px; }

	.drawer-cats h2 { margin: 24px 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); }
	.drawer-cats ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; }
	.drawer-cats a { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); color: var(--ink); font-size: 14px; font-weight: 600; }
	.drawer-cats small { color: var(--gray); font-weight: 500; }
	.drawer-actions { display: grid; gap: 10px; margin-top: 26px; }
	.drawer-actions .btn { width: 100%; }
	.drawer-phone { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; font-size: 18px; font-weight: 800; color: var(--ink); }
	.drawer-phone .icon { color: var(--orange); }

	.rail-inner { min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
	.cat-menu, .rail-links { display: none; }
	.header-rail .product-search { width: 100%; }

	.footer-cta-inner { flex-direction: column; align-items: flex-start; }
	.footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
	.footer-grid .footer-brand { grid-column: 1 / -1; }
	.footer-grid .footer-col:nth-of-type(5) { display: block; }
	.footer-news { flex-direction: column; align-items: flex-start; }
	.footer-news .mc4wp-form { max-width: none; width: 100%; }
}

@media (max-width: 560px) {
	.topbar-links li:not(:first-child):not(:nth-child(3)) { display: none; }
	.topbar-msg span { display: none; }
	.topbar .container { justify-content: center; }
	.footer-grid { grid-template-columns: 1fr; }
	.footer-bottom-inner { flex-direction: column; text-align: center; }
	.footer-cta-actions { width: 100%; }
	.footer-cta-actions .btn { flex: 1; }
	.to-top { bottom: 100px; right: 14px; }
}
