/* =====================================================================
 * Fichier : assets/css/pages/marken.css
 * Projet  : Brennholz Shop24
 * Rôle    : Styles propres à la page des marques (marken.php) :
 *           en-tête, marques mises en avant, index A–Z, recherche,
 *           grille des marques, fiche détaillée d'une marque (logo,
 *           faits, description, catégories, produits, autres marques),
 *           page 404 et texte éditorial.
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 1. En-tête (liste et fiche)
 * ------------------------------------------------------------------- */
.mk-hero::before { z-index: 0; }
.mk-hero-embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mk-hero-inner { position: relative; z-index: 2; }
.mk-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.5rem, 4vw, 4rem); align-items: end; margin-top: 1rem; }
.mk-hero-text h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); animation: hfk-fade-up .7s var(--hfk-ease) both; }
.mk-hero-text h1 span { display: block; background: var(--hfk-grad-fire-h); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mk-hero-text p { animation: hfk-fade-up .7s .12s var(--hfk-ease) both; }
.mk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 0; padding: 0; list-style: none; animation: hfk-fade-up .7s .22s var(--hfk-ease) both; }
.mk-stats li { min-width: 120px; padding: .9rem 1.1rem; background: rgba(255, 255, 255, .07); border-top: 3px solid var(--hfk-flame); transition: background .3s, transform .3s var(--hfk-ease); }
.mk-stats li:hover { background: rgba(255, 255, 255, .12); transform: translateY(-4px); }
.mk-stats li:nth-child(2) { border-color: var(--hfk-amber); }
.mk-stats li:nth-child(3) { border-color: var(--hfk-forest); }
.mk-stats strong { display: block; font-family: var(--hfk-font-head); font-size: 2.1rem; line-height: 1; color: #fff; }
.mk-stats span { font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: #D5DADF; }

/* Fiche d'une marque */
.mk-detail-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; margin-top: 1.2rem; }
.mk-detail-logo { width: 220px; height: 220px; background: #fff; padding: 10px; box-shadow: var(--hfk-shadow-lg); }
.mk-detail-logo img { width: 100%; height: 100%; object-fit: contain; }
.mk-detail-logo .img-ph { min-height: 0; }
.mk-detail-text h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); animation: hfk-fade-up .7s var(--hfk-ease) both; }
.mk-detail-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.3rem; padding: 0; list-style: none; }
.mk-detail-facts li { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; background: rgba(255, 255, 255, .08); color: #fff; font-size: .9rem; font-weight: 600; }
.mk-detail-facts li i { color: var(--hfk-amber); }
.mk-detail-facts li.is-hot { background: var(--hfk-ember); }
.mk-detail-facts li.is-hot i { color: #fff; }
.mk-detail-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ---------------------------------------------------------------------
 * 2. Marques mises en avant
 * ------------------------------------------------------------------- */
.mk-featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.3rem; }
.mk-feature { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hfk-border); transition: transform .4s var(--hfk-ease), box-shadow .4s var(--hfk-ease), border-color .3s; }
.mk-feature::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--hfk-grad-fire-h); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--hfk-ease); }
.mk-feature:hover { transform: translateY(-8px); box-shadow: var(--hfk-shadow-lg); border-color: transparent; }
.mk-feature:hover::after { transform: scaleX(1); }
.mk-feature-logo { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--hfk-placeholder); }
.mk-feature-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 1rem; transition: transform .6s var(--hfk-ease); }
.mk-feature-logo .img-ph { transition: transform .6s var(--hfk-ease); }
.mk-feature:hover .mk-feature-logo img, .mk-feature:hover .mk-feature-logo .img-ph { transform: scale(1.06); }
.mk-feature-body { flex: 1; display: flex; flex-direction: column; padding: 1.2rem 1.3rem 1.3rem; }
.mk-feature-body h3 { margin: .3rem 0 .5rem; font-size: 1.3rem; }
.mk-feature-body h3 a { color: var(--hfk-charcoal); }
.mk-feature-body h3 a:hover { color: var(--hfk-flame-dark); }
.mk-feature-body p { flex: 1; font-size: .92rem; color: var(--hfk-muted); }
.mk-feature-body footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .8rem; border-top: 1px dashed var(--hfk-border); font-size: .88rem; }
.mk-feature-body footer strong { font-family: var(--hfk-font-head); font-size: 1.15rem; color: var(--hfk-flame-dark); }
.mk-country { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hfk-forest-dark); }

/* ---------------------------------------------------------------------
 * 3. Index A–Z, recherche, grille
 * ------------------------------------------------------------------- */
.mk-directory { scroll-margin-top: var(--hfk-header-h, 80px); }
.mk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; padding: .9rem 1rem; background: #fff; border-left: 4px solid var(--hfk-flame); box-shadow: var(--hfk-shadow-xs); }
.mk-search { position: relative; flex: 1; min-width: 220px; }
.mk-search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--hfk-muted); pointer-events: none; transition: color .25s; }
.mk-search input { width: 100%; height: 48px; padding: 0 .9rem 0 2.6rem; border: 1px solid var(--hfk-border); border-radius: 0; background: var(--hfk-cream); outline: 0; font-weight: 500; transition: border-color .25s, box-shadow .25s, background .25s; }
.mk-search input:focus { border-color: var(--hfk-flame); background: #fff; box-shadow: 0 0 0 3px rgba(34, 166, 75, .15); }
.mk-search:focus-within i { color: var(--hfk-flame); }
.mk-count { margin: 0; font-size: .9rem; color: var(--hfk-muted); }
.mk-count strong { font-family: var(--hfk-font-head); font-size: 1.2rem; color: var(--hfk-flame-dark); }

.mk-az { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1rem 0 2rem; }
.mk-az a, .mk-az span { width: 38px; height: 38px; display: grid; place-items: center; font-family: var(--hfk-font-head); font-weight: 700; font-size: .95rem; }
.mk-az a { background: var(--hfk-charcoal); color: #fff; transition: background .25s, transform .25s var(--hfk-ease-bounce); }
.mk-az a:hover, .mk-az a.is-active { background: var(--hfk-flame); color: #fff; transform: translateY(-3px); }
.mk-az a.is-off { background: var(--hfk-border); color: var(--hfk-muted); pointer-events: none; }
.mk-az span { color: #C8BDB2; background: #fff; border: 1px solid var(--hfk-border); }

.mk-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.2rem; }
.mk-group { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 1.2rem; scroll-margin-top: calc(var(--hfk-header-h, 80px) + 1rem); }
.mk-group[hidden] { display: none; }
.mk-group-letter { margin: 0; width: 70px; height: 70px; display: grid; place-items: center; background: var(--hfk-grad-fire); color: #fff; font-size: 2.2rem; position: sticky; top: calc(var(--hfk-header-h, 80px) + 1rem); }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.mk-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hfk-border); transition: transform .35s var(--hfk-ease), box-shadow .35s var(--hfk-ease), border-color .3s; }
.mk-card[hidden] { display: none; }
.mk-card:hover { transform: translateY(-5px); box-shadow: var(--hfk-shadow); border-color: var(--hfk-flame); }
.mk-card.is-match { animation: mk-pop .45s var(--hfk-ease) both; }
@keyframes mk-pop { from { opacity: 0; transform: scale(.96); } }
.mk-card-logo { display: block; height: 120px; overflow: hidden; background: var(--hfk-placeholder); }
.mk-card-logo img { width: 100%; height: 100%; object-fit: contain; padding: .8rem; background: #fff; }
.mk-card-logo .img-ph { min-height: 0; }
.mk-card-body { flex: 1; padding: 1rem 1.1rem .6rem; }
.mk-card-body h4 { margin: 0 0 .25rem; font-size: 1.15rem; }
.mk-card-body h4 a { color: var(--hfk-charcoal); }
.mk-card-body h4 a:hover { color: var(--hfk-flame-dark); }
.mk-star { font-size: .8rem; color: var(--hfk-amber); vertical-align: middle; }
.mk-card-body p { margin: .4rem 0 0; font-size: .88rem; line-height: 1.55; color: var(--hfk-muted); }
.mk-card-foot { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; border-top: 1px solid var(--hfk-border); font-size: .86rem; }
.mk-card-foot > span { margin-right: auto; color: var(--hfk-muted); }
.mk-card-foot strong { font-family: var(--hfk-font-head); color: var(--hfk-charcoal); }
.mk-card-shop { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; background: var(--hfk-cream); color: var(--hfk-flame-dark); border: 1px solid var(--hfk-border); transition: background .25s, color .25s; }
.mk-card-shop:hover { background: var(--hfk-flame); color: #fff; }
.mk-card-more { display: inline-flex; align-items: center; gap: .35rem; height: 36px; padding: 0 .8rem; background: var(--hfk-charcoal); color: #fff; font-weight: 600; transition: background .25s; }
.mk-card-more i { transition: transform .25s var(--hfk-ease); }
.mk-card-more:hover { background: var(--hfk-flame); color: #fff; }
.mk-card-more:hover i { transform: translateX(3px); }
.mk-empty[hidden] { display: none; }
.mk-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1rem; }

/* ---------------------------------------------------------------------
 * 4. Fiche : description, encart, produits, autres marques
 * ------------------------------------------------------------------- */
.mk-about { overflow-x: clip; }
.mk-about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.mk-about-side { position: sticky; top: calc(var(--hfk-header-h, 80px) + 1rem); padding: 1.5rem; background: var(--hfk-cream); border-top: 4px solid var(--hfk-flame); }
.mk-about-side h3 { font-size: 1.1rem; margin: 0 0 .8rem; }
.mk-about-side h3 + dl { margin-bottom: 1.4rem; }
.mk-about-side dl { margin: 0; }
.mk-about-side dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--hfk-border); }
.mk-about-side dt { font-weight: 500; color: var(--hfk-muted); }
.mk-about-side dd { margin: 0; font-weight: 700; color: var(--hfk-charcoal); text-align: right; overflow-wrap: anywhere; }
.mk-cat-links { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.mk-cat-links a { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; background: #fff; border: 1px solid var(--hfk-border); color: var(--hfk-charcoal); font-size: .86rem; font-weight: 600; transition: background .25s, color .25s, border-color .25s, transform .25s var(--hfk-ease); }
.mk-cat-links a i { color: var(--hfk-flame); transition: color .25s; }
.mk-cat-links a:hover { background: var(--hfk-flame); border-color: var(--hfk-flame); color: #fff; transform: translateY(-2px); }
.mk-cat-links a:hover i { color: #fff; }
.mk-products-more { margin: 1.8rem 0 0; text-align: center; }
.mk-others-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; }
.mk-other { display: flex; align-items: center; gap: .9rem; padding: .7rem; background: #fff; border: 1px solid var(--hfk-border); color: var(--hfk-text); transition: border-color .25s, transform .3s var(--hfk-ease), box-shadow .3s; }
.mk-other:hover { border-color: var(--hfk-flame); transform: translateY(-3px); box-shadow: var(--hfk-shadow-sm); color: var(--hfk-text); }
.mk-other-logo { width: 64px; height: 64px; flex: 0 0 64px; overflow: hidden; background: var(--hfk-placeholder); }
.mk-other-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mk-other-logo .img-ph { min-height: 0; }
.mk-other-logo .img-ph i { font-size: 1.3rem; }
.mk-other-text { flex: 1; min-width: 0; }
.mk-other-text strong { display: block; font-family: var(--hfk-font-head); color: var(--hfk-charcoal); }
.mk-other-text small { color: var(--hfk-muted); }
.mk-other > i { color: var(--hfk-flame); opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s var(--hfk-ease); }
.mk-other:hover > i { opacity: 1; transform: none; }

/* 404 */
.mk-missing-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 1.2rem 0 1.5rem; padding: 0; list-style: none; }
.mk-missing-list a { display: inline-block; padding: .4rem .8rem; border: 1px solid var(--hfk-border); color: var(--hfk-charcoal); font-weight: 600; transition: background .25s, color .25s; }
.mk-missing-list a:hover { background: var(--hfk-flame); color: #fff; }
.mk-missing .empty-state p { max-width: 640px; margin-left: auto; margin-right: auto; color: var(--hfk-muted); }

/* ---------------------------------------------------------------------
 * 5. Texte éditorial
 * ------------------------------------------------------------------- */
.mk-editorial { overflow-x: clip; }
.mk-editorial-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.mk-editorial-cta { position: sticky; top: calc(var(--hfk-header-h, 80px) + 1rem); padding: 1.8rem 1.6rem; background: var(--hfk-grad-night); color: #E6E9EC; }
.mk-editorial-cta h3 { color: #fff; font-size: 1.35rem; }
.mk-editorial-cta p { color: #D5DADF; font-size: .94rem; }
.mk-editorial-icon { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 1rem; background: var(--hfk-grad-fire); color: #fff; font-size: 1.3rem; animation: hfk-float 3.5s ease-in-out infinite; }
.mk-editorial-phone { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: .9rem; color: var(--hfk-amber); font-family: var(--hfk-font-head); font-weight: 700; font-size: 1.1rem; }
.mk-editorial-phone:hover { color: #fff; }

/* ---------------------------------------------------------------------
 * 6. Adaptation aux écrans
 * ------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .mk-hero-grid, .mk-about-grid, .mk-editorial-grid { grid-template-columns: minmax(0, 1fr); }
    .mk-about-side, .mk-editorial-cta { position: static; }
}
@media (max-width: 767.98px) {
    .mk-detail-grid { grid-template-columns: minmax(0, 1fr); }
    .mk-detail-logo { width: 140px; height: 140px; }
    .mk-group { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
    .mk-group-letter { position: static; width: 52px; height: 52px; font-size: 1.6rem; }
    .mk-az { flex-wrap: nowrap; overflow-x: auto; margin-left: -1rem; margin-right: -1rem; padding: 0 1rem .4rem; scrollbar-width: thin; }
    .mk-az a, .mk-az span { flex: 0 0 36px; width: 36px; height: 36px; }
}
@media (max-width: 575.98px) {
    .mk-stats li { min-width: 0; padding: .7rem .7rem; }
    .mk-stats strong { font-size: 1.6rem; }
    .mk-stats span { font-size: .66rem; letter-spacing: .02em; }
    .mk-grid, .mk-others-list { grid-template-columns: minmax(0, 1fr); }
    .mk-detail-actions .btn { width: 100%; }
    .mk-count { flex: 0 0 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .mk-editorial-icon { animation: none; }
}