/* TOCLIC Offres & Relances – en-tête du site et menu mobile */

/* L'en-tête d'origine reste dans la page (mesure de sa hauteur) mais n'est plus visible. */
body.tco-header-on .et-l--header,
body.tco-header-on #main-header,
body.tco-header-on #top-header { visibility: hidden !important; pointer-events: none !important; }
/* Les pages réservaient la place de l'ancien en-tête, posé par-dessus le contenu. */
body.tco-header-on #et-main-area { margin-top: calc(-1 * var(--tco-old-hd, 93px)); }

.tco-hd,
.tco-hdp {
	--tco-accent: #fbb416;
	--tco-ink: #1f1a17;
	--tco-text: #4a413b;
	--tco-muted: #6b615a;
	--tco-line: #f1eae1;
	font-family: "Open Sans", Arial, sans-serif;
	color: var(--tco-ink);
	line-height: 1.4;
	text-align: left;
}
.tco-hd {
	position: sticky;
	top: calc(var(--tco-banner-h, 0px) + var(--wp-admin--admin-bar--height, 0px));
	z-index: 9980;
	background: #fff;
	box-shadow: 0 10px 30px rgba(60, 40, 20, .06);
}
.tco-hd a { text-decoration: none; }
.tco-hd__in { width: 92%; max-width: 1200px; margin: 0 auto; }
.tco-hd__skip { position: absolute; left: -9999px; top: 0; padding: 10px 14px; background: var(--tco-ink); color: #fff !important; z-index: 2; }
.tco-hd__skip:focus { left: 8px; top: 8px; }

/* ---------- Bande du haut ---------- */
.tco-hd__band { max-height: 40px; overflow: hidden; background: #fbf8f3; border-bottom: 1px solid var(--tco-line); transition: max-height .25s ease, border-color .25s ease; }
.tco-hd__info { display: flex; justify-content: flex-end; gap: 24px; height: 38px; align-items: center; font-size: 13.5px; }
.tco-hd__info a { padding: 8px 0; color: var(--tco-muted) !important; transition: color .15s; }
.tco-hd__info a:hover,
.tco-hd__info a[aria-current="page"] { color: var(--tco-ink) !important; }

/* ---------- Ligne principale ---------- */
.tco-hd__main { position: relative; }
.tco-hd__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 24px; height: 92px; transition: height .25s ease; }
.tco-hd__logo { display: inline-flex; align-items: center; justify-self: start; align-self: center; color: var(--tco-ink) !important; }
.tco-hd__logo img { display: block; width: auto; height: 68px; max-width: 220px; object-fit: contain; transition: height .25s ease; }
.tco-hd__logo img[hidden] { display: none; }
.tco-hd__logo-text { font-size: 18px; font-weight: 700; }
.tco-hd__burger { display: none; }

.tco-hd__nav { display: flex; }
.tco-hd__nav ul { display: flex; align-items: stretch; gap: 36px; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.tco-hd__item { display: flex; align-items: center; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.tco-hd__link { padding: 12px 0; color: var(--tco-ink) !important; font-size: 16px; font-weight: 700; white-space: nowrap; box-shadow: inset 0 -3px 0 transparent; transition: box-shadow .15s; }
.tco-hd__item:hover > .tco-hd__link,
.tco-hd__link:focus-visible,
.tco-hd__link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--tco-accent); }

.tco-hd__tools { display: flex; align-items: center; justify-self: end; gap: 6px; }
.tco-hd__account,
.tco-hd__cart { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; border-radius: 999px; color: var(--tco-ink) !important; font-size: 14px; font-weight: 700; transition: background-color .15s; }
.tco-hd__account:hover { background: #f7f3ee; }
.tco-hd__cart.has-items { padding: 0 14px 0 12px; background: #fff1cc; }
.tco-hd__cart:hover { background: #ffe9ad; }
.tco-hd__cart-amount .screen-reader-text { display: none; }
.tco-hd__cart-count { display: none; }
.tco-hd :focus-visible,
.tco-hdp :focus-visible { outline: 3px solid var(--tco-accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Sous-menu : produits les plus vendus ---------- */
.tco-hd__mega {
	position: absolute;
	top: 100%;
	left: 50%;
	width: min(860px, 92vw);
	transform: translateX(-50%) translateY(6px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.tco-hd__item.has-mega:hover > .tco-hd__mega,
.tco-hd__item.has-mega:focus-within > .tco-hd__mega,
.tco-hd__item.has-mega.is-open > .tco-hd__mega { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%); transition-delay: .08s, .08s, .08s; }
.tco-hd__item.is-closed > .tco-hd__mega { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.tco-hd__mega-in { padding: 18px 18px 14px; border: 1px solid rgba(60, 40, 20, .07); border-top: 0; border-radius: 0 0 22px 22px; background: #fff; box-shadow: 0 1px 2px rgba(60, 40, 20, .04), 0 22px 44px rgba(60, 40, 20, .14); }
.tco-hd__mega-title { margin: 0 10px 8px !important; padding: 0 !important; color: #9a8f86; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tco-hd__mega-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.tco-hd__mega-list li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.tco-hd__mega-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 16px; color: var(--tco-ink) !important; transition: background-color .15s; }
.tco-hd__mega-card:hover { background: #fbf8f3; }
.tco-hd__mega-img { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #f4ece0; }
.tco-hd__mega-img img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; }
.tco-hd__mega-name { margin-top: 2px; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.tco-hd__mega-price { color: var(--tco-muted); font-size: 13px; }
.tco-hd__mega-price strong { color: var(--tco-ink); font-size: 14px; }
.tco-hd__mega-price .screen-reader-text { display: none; }
.tco-hd__mega-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 10px 10px 0; padding-top: 12px; border-top: 1px solid var(--tco-line); color: var(--tco-muted); font-size: 14px; }
.tco-hd__mega-all { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--tco-accent); color: var(--tco-ink) !important; font-weight: 700; }
.tco-hd__mega-all:hover { filter: brightness(.96); }

/* ---------- Au défilement : une seule ligne, plus fine ---------- */
.tco-hd.is-compact { box-shadow: 0 10px 30px rgba(60, 40, 20, .09); }
.tco-hd.is-compact .tco-hd__band { max-height: 0; border-color: transparent; }
.tco-hd.is-compact .tco-hd__row { height: 62px; }
.tco-hd.is-compact .tco-hd__logo img { height: 42px; }

/* ---------- Tablette et mobile : barre compacte ---------- */
.tco-hdp[hidden] { display: none; }
@media (max-width: 1100px) {
	.tco-hd__band,
	.tco-hd__nav { display: none; }
	.tco-hd__in { width: 100%; padding: 0 8px; box-sizing: border-box; }
	.tco-hd__row,
	.tco-hd.is-compact .tco-hd__row { height: 60px; gap: 8px; align-items: center; }
	.tco-hd__burger { display: inline-flex; align-items: center; justify-content: center; justify-self: start; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--tco-ink); cursor: pointer; }
	.tco-hd__logo { justify-self: center; }
	.tco-hd__logo img,
	.tco-hd.is-compact .tco-hd__logo img { height: 44px; max-width: 160px; }
	.tco-hd__tools { gap: 0; }
	.tco-hd__cart.has-items { padding: 0; background: transparent; }
	.tco-hd__cart-amount { display: none; }
	.tco-hd__cart-count { display: block; position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--tco-ink); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
}

/* ---------- Panneau de menu ---------- */
.tco-hdp { position: fixed; inset: 0; z-index: 99996; }
.tco-hdp__overlay { position: absolute; inset: 0; background: rgba(31, 26, 23, .45); opacity: 0; transition: opacity .25s ease; }
.tco-hdp__panel { position: absolute; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column; width: min(330px, 88vw); border-radius: 0 22px 22px 0; background: #fff; box-shadow: 12px 0 40px rgba(31, 26, 23, .18); transform: translateX(-104%); transition: transform .28s ease; outline: none; }
.tco-hdp.is-open .tco-hdp__overlay { opacity: 1; }
.tco-hdp.is-open .tco-hdp__panel { transform: none; }
.tco-hdp__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 12px 20px; border-bottom: 1px solid var(--tco-line); }
.tco-hdp__head .tco-hd__logo img { height: 40px; max-width: 150px; }
.tco-hdp__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: #f7f3ee; color: var(--tco-ink); cursor: pointer; }
.tco-hdp__nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 18px 10px 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tco-hdp__label { margin: 0 !important; padding: 0 14px 6px !important; color: #9a8f86; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tco-hdp a { text-decoration: none; }
.tco-hdp__big { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px; border-radius: 14px; color: var(--tco-ink) !important; font-size: 17px; font-weight: 700; }
.tco-hdp__big svg { width: 18px; height: 18px; color: #9a8f86; }
.tco-hdp__big[aria-current="page"],
.tco-hdp__big:active { background: #fff8e5; }
.tco-hdp__sep { height: 1px; margin: 14px 14px; border: 0; background: var(--tco-line); }
.tco-hdp__small { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--tco-text) !important; font-size: 15px; }
.tco-hdp__small[aria-current="page"] { color: var(--tco-ink) !important; font-weight: 700; }
.tco-hdp__foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; padding: 14px 20px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--tco-line); }
.tco-hdp__foot a { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; background: #f7f3ee; color: var(--tco-ink) !important; font-size: 14px; font-weight: 700; }
html.tco-hdp-open { overflow: hidden; }
/* Le bouton flottant du panier ne recouvre pas le bas du panneau. */
html.tco-hdp-open .tco-sidecart-fab { display: none !important; }

@media (prefers-reduced-motion: reduce) {
	.tco-hd__band, .tco-hd__row, .tco-hd__logo img, .tco-hd__mega, .tco-hdp__overlay, .tco-hdp__panel { transition: none !important; }
}
