/*
 * Mega-Ique — Styles de base du thème enfant.
 * Surcharge légère d'Astra en s'appuyant sur les variables de charte (variables.css).
 * Garder ce fichier sobre/B2B (CLAUDE.md §4 ton corporate).
 */

/* ---------- Typographie ---------- */
body,
.ast-container {
	font-family: var(--mq-font-body);
	color: var(--mq-color-text);
}

h1, h2, h3,
.entry-title,
.site-title {
	font-family: var(--mq-font-heading);
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--mq-color-text);
}

h4, h5, h6 {
	font-family: var(--mq-font-sub);
	font-weight: 600;
}

/* ---------- Liens & accents ---------- */
a {
	color: var(--mq-color-primary);
}
a:hover,
a:focus {
	color: var(--mq-blue-dark);
}

/* ---------- Boutons (charte : bleu principal, rouge secondaire) ---------- */
.mq-btn,
.wp-block-button__link,
.ast-button,
button.menu-toggle {
	background-color: var(--mq-color-primary);
	color: var(--mq-white);
	border-radius: var(--mq-radius);
}
.mq-btn:hover,
.wp-block-button__link:hover {
	background-color: var(--mq-blue-dark);
	color: var(--mq-white);
}

.mq-btn--secondary {
	background-color: var(--mq-color-secondary);
}
.mq-btn--secondary:hover {
	background-color: var(--mq-red-dark);
}

.mq-btn--accent {
	background-color: var(--mq-color-accent);
	color: var(--mq-black);
}

/* ---------- Utilitaires couleur ---------- */
.mq-text-primary   { color: var(--mq-color-primary); }
.mq-text-secondary { color: var(--mq-color-secondary); }
.mq-text-accent    { color: var(--mq-color-accent); }
.mq-bg-primary     { background-color: var(--mq-color-primary); color: var(--mq-white); }
.mq-bg-muted       { background-color: var(--mq-gray-light); }

/* ============================================================
   TOP BAR (contacts + langue + réseaux) — modèle agabre.de
   ============================================================ */
.mq-topbar { background: #f39200; color: rgba(255,255,255,.95); font-family: var(--mq-font-sub); font-size: .85rem; position: relative; z-index: 200; }
.mq-topbar__inner { max-width: 1200px; margin-inline: auto; padding: .5rem clamp(1.2rem, 4vw, 2.5rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mq-topbar__contact { list-style: none; display: flex; flex-wrap: wrap; gap: 1.4rem; margin: 0; padding: 0; }
.mq-topbar__contact a { color: rgba(255,255,255,.95); text-decoration: none; }
.mq-topbar__contact a:hover { color: #fff; text-decoration: underline; }
.mq-topbar__hours { color: rgba(255,255,255,.8); }
.mq-topbar__loc { display: inline-flex; align-items: center; gap: .35rem; color: rgba(255,255,255,.9); }
.mq-topbar__loc svg { width: 13px; height: 13px; flex: none; }
@media (max-width: 1100px) { .mq-topbar__loc { display: none; } }
.mq-topbar__right { display: flex; align-items: center; gap: 1rem; }
.mq-topbar__cart { position: relative; display: inline-flex; align-items: center; color: rgba(255,255,255,.95); transition: color .15s ease; }
.mq-topbar__cart:hover { color: #fff; }
.mq-topbar__cart svg { width: 20px; height: 20px; }
.mq-cart-count { position: absolute; top: -7px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: var(--mq-red); color: #fff; font-size: .64rem; font-weight: 700; line-height: 1; }

/* Icône panier dans le menu principal (header collant). */
.main-header-menu .mq-menu-cart, .ast-builder-menu .mq-menu-cart { display: flex; align-items: center; }
.main-header-menu .mq-menu-cart > a, .ast-builder-menu .mq-menu-cart > a { position: relative; display: inline-flex; align-items: center; color: #1c2a37; padding-inline: .4rem; }
.main-header-menu .mq-menu-cart > a:hover, .ast-builder-menu .mq-menu-cart > a:hover { color: var(--mq-blue); }
.mq-menu-cart svg { width: 23px; height: 23px; }

/* Panier flottant — visible au scroll sur mobile dès qu'il y a un article */
.mq-floatcart { position: fixed; right: 18px; bottom: 18px; z-index: 300; width: 56px; height: 56px; border-radius: 50%; background: var(--mq-blue); color: #fff; display: none; place-items: center; box-shadow: 0 12px 30px rgba(56,182,255,.5); transition: transform .15s ease, background-color .15s ease; }
.mq-floatcart.is-visible { display: grid; }
.mq-floatcart:hover { transform: translateY(-3px); background: var(--mq-blue-dark); color: #fff; }
.mq-floatcart svg { width: 24px; height: 24px; }
.mq-floatcart .mq-cart-count { top: -3px; right: -3px; }
/* Sur desktop, le panier du menu suffit : on masque le flottant. */
@media (min-width: 922px) { .mq-floatcart { display: none !important; } }

/* Sélecteur de langue (modèle agabre.de) */
.mq-lang { position: relative; }
.mq-lang > summary {
	list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem;
	padding: .3rem .7rem; border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
	color: #fff; font-weight: 600; font-size: .82rem; transition: background-color .15s ease, border-color .15s ease;
}
.mq-lang > summary::-webkit-details-marker { display: none; }
.mq-lang > summary:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
.mq-lang__chev { width: 14px; height: 14px; transition: transform .2s ease; }
.mq-lang[open] .mq-lang__chev { transform: rotate(180deg); }
/* Drapeau du sélecteur selon la langue active */
.mq-lang__fr, .mq-lang__gb { display: inline-flex; }
.mq-lang__gb { display: none; }
.mq-lang.is-en .mq-lang__fr { display: none; }
.mq-lang.is-en .mq-lang__gb { display: inline-flex; }
.mq-flag { width: 20px; height: 14px; border-radius: 3px; overflow: hidden; display: inline-flex; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset; }
.mq-flag svg { width: 100%; height: 100%; display: block; }
.mq-lang__menu {
	position: absolute; top: calc(100% + .5rem); right: 0; z-index: 50;
	list-style: none; margin: 0; padding: .3rem; min-width: 160px;
	background: #fff; border-radius: 11px; box-shadow: 0 16px 40px rgba(20,32,43,.22);
}
.mq-lang__menu li { margin: 0; }
.mq-lang__menu a {
	display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 7px;
	color: #1c2a37; text-decoration: none; font-size: .88rem; font-weight: 600;
}
.mq-lang__menu a:hover { background: #f1f6fb; color: var(--mq-blue); }

.mq-topbar__social { color: rgba(255,255,255,.9); display: inline-flex; }
.mq-topbar__social svg { width: 18px; height: 18px; }
.mq-topbar__social:hover { color: #fff; }
@media (max-width: 600px) {
	.mq-topbar__hours { display: none; }
	.mq-topbar__inner { justify-content: center; }
}

/* GTranslate : engine chargé hors écran (init du moteur sans UI parasite) */
.mq-gt-engine,
.gtranslate_wrapper,
.gt_float_switcher,
#gt_float_wrapper { position: fixed !important; left: -9999px !important; top: 0 !important; bottom: auto !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
/* Neutralise la barre/overlay Google Translate */
.goog-te-banner-frame, .skiptranslate { display: none !important; }
body { top: 0 !important; }
#goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* ============================================================
   HEADER (charte : fond blanc, fine barre d'accent de marque)
   ============================================================ */

/* Fine ligne d'accent de marque (relie la top bar orange au corps bleu). */
.site-header::before {
	content: "";
	display: block;
	height: 3px;
	background: linear-gradient(90deg, #f39200, #ffbf00 30%, var(--mq-blue) 75%, #6fc8ff);
}

/* Header : fond blanc, collant, ombre douce. */
.site-header {
	background-color: #fff;
	box-shadow: 0 6px 24px rgba(20, 32, 43, 0.06);
	position: sticky;
	top: 0;
	z-index: 99;
}

/* Resserre la hauteur du bandeau d'en-tête + fond blanc plein. */
.site-header .ast-primary-header-bar,
.site-header .main-header-bar,
.ast-primary-header-bar,
.main-header-bar { padding-block: .35rem; background-color: #fff; }

/* Logo. */
.site-header .custom-logo-link img,
.ast-site-identity .custom-logo-link img {
	max-height: 46px;
	width: auto;
	transition: transform .2s ease;
}
.site-header .custom-logo-link:hover img { transform: translateY(-1px); }

/* Le logo contient déjà le nom : on masque le titre/desc texte (doublon). */
.site-header .site-title,
.site-header .site-description {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Menu principal : typo moderne + soulignement animé. */
.main-header-menu .menu-link,
.ast-builder-menu .menu-link {
	font-family: var(--mq-font-sub);
	font-weight: 600;
	font-size: .96rem;
	letter-spacing: .005em;
	color: #1c2a37;
	position: relative;
}
/* Soulignement animé — uniquement sur les items de 1er niveau. */
.main-header-menu > .menu-item > .menu-link::after,
.ast-builder-menu > .menu-item > .menu-link::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: .35rem;
	height: 2px; margin-inline: auto;
	width: 0;
	background: var(--mq-blue);
	border-radius: 2px;
	transition: width .22s ease;
}
.main-header-menu > .menu-item:hover > .menu-link::after,
.main-header-menu > .current-menu-item > .menu-link::after,
.main-header-menu > .current-menu-ancestor > .menu-link::after,
.ast-builder-menu > .menu-item:hover > .menu-link::after,
.ast-builder-menu > .current-menu-item > .menu-link::after,
.ast-builder-menu > .current-menu-ancestor > .menu-link::after {
	width: 60%;
}
.main-header-menu .menu-link:hover,
.main-header-menu .current-menu-item > .menu-link,
.ast-builder-menu .menu-link:hover,
.ast-builder-menu .current-menu-item > .menu-link {
	color: var(--mq-blue);
}

/* Sous-menu déroulant (desktop) — panneau blanc moderne. */
.main-header-menu .sub-menu,
.ast-builder-menu .sub-menu {
	background: #fff;
	border: 1px solid var(--mq-gray-light);
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba(20, 32, 43, .14);
	padding: .4rem;
	min-width: 230px;
}
.main-header-menu .sub-menu .menu-link,
.ast-builder-menu .sub-menu .menu-link {
	border-radius: 8px;
	padding: .55rem .8rem;
	font-size: .92rem;
}
.main-header-menu .sub-menu .menu-link:hover,
.ast-builder-menu .sub-menu .menu-link:hover {
	background: var(--mq-gray-light);
	color: var(--mq-blue);
}


/* ============================================================
   FOOTER custom (vitrine pro, modèle ohb-ds) — le footer Astra est masqué
   ============================================================ */
.site-footer { display: none !important; }

.mq-footer { background: linear-gradient(170deg, #1d2150, #14163a); color: rgba(255,255,255,.82); font-family: var(--mq-font-body); }
.mq-footer__inner {
	max-width: 1200px; margin-inline: auto; padding: clamp(3rem, 6vw, 4.5rem) clamp(1.2rem, 4vw, 2.5rem) 2.5rem;
	display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: clamp(2rem, 4vw, 3.5rem);
}
.mq-footer__brand p { color: rgba(255,255,255,.8); line-height: 1.65; margin: 1rem 0 1.3rem; font-size: .95rem; max-width: 360px; }
.mq-footer__logo { font-family: var(--mq-font-heading); font-weight: 800; font-size: 1.5rem; color: #fff; text-decoration: none; letter-spacing: -0.01em; }
.mq-footer__logo span { color: var(--mq-yellow); }
.mq-footer__social { display: flex; gap: .7rem; }
.mq-footer__social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; transition: background-color .2s ease, color .2s ease, transform .15s ease; }
.mq-footer__social a:hover { background: #fff; color: #1d2150; transform: translateY(-2px); }
.mq-footer__social svg { width: 19px; height: 19px; }
.mq-footer__col h3 { font-family: var(--mq-font-sub); font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin: 0 0 1.1rem; }
.mq-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.mq-footer__col a { color: rgba(255,255,255,.82); text-decoration: none; font-size: .95rem; transition: color .15s ease, padding-left .15s ease; }
.mq-footer__col a:hover { color: var(--mq-yellow); padding-left: 3px; }
.mq-footer__contact p { color: rgba(255,255,255,.82); line-height: 1.6; margin: 0 0 .9rem; font-size: .95rem; }
.mq-footer__contact strong { color: #fff; }

.mq-footer__bar { border-top: 1px solid rgba(255,255,255,.18); }
.mq-footer__bar-inner { max-width: 1200px; margin-inline: auto; padding: 1.2rem clamp(1.2rem, 4vw, 2.5rem); display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; justify-content: space-between; font-size: .88rem; color: rgba(255,255,255,.72); }
.mq-footer__legal { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.mq-footer__legal a { color: rgba(255,255,255,.82); text-decoration: none; }
.mq-footer__legal a:hover { color: var(--mq-yellow); }

@media (max-width: 900px) {
	.mq-footer__inner { grid-template-columns: 1fr 1fr; }
	.mq-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
	.mq-footer__inner { grid-template-columns: 1fr; }
	.mq-footer__bar-inner { justify-content: center; text-align: center; }
}
