/*
 * Readability overrides for HTML-imported pages (e.g. Babylone Outdoor).
 * Adds a gradient scrim + text-shadow so light text stays legible over photos
 * (category tiles, hero). Scoped to the imported markup classes — a no-op on
 * sites without them. Loaded globally in App.razor; `!important` is used because
 * the page's layout CSS is JS-injected AFTER this stylesheet.
 */

/* ── Category tiles ("Six manières d'habiter l'extérieur") ── */
.cat-tile { position: relative !important; }

/* Gradient scrim over the tile photo, beneath the text. */
.cat-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.34) 45%,
      rgba(0, 0, 0, 0.06) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Text rides above the scrim, with a soft halo for any bright spots. */
.cat-tile__txt { position: relative !important; z-index: 2 !important; }
.cat-tile__txt,
.cat-tile__txt * { text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6), 0 0 2px rgba(0, 0, 0, 0.5) !important; }

/* ── Hero headline over photo ── */
.hero .display,
.hero__inner .display,
.hero h1,
.hero__inner h1 { text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.55) !important; }

/* ── HTML-import safety net (was <HeadContent> in HtmlImport.razor) ──
 * Imported pages ship reveal/animation CSS that starts elements hidden and
 * relies on JS to reveal them; if that JS is stripped/blocked the content
 * stays invisible. These overrides force imported content visible.
 * Moved here because Blazor HeadContent is LAST-WRITER-WINS: every HtmlImport
 * writing it clobbered the page's real head content (SEO meta, canonical).
 * NOTE: no blanket opacity:1 on .palladium-html-import — every hybrid node
 * carries that class, so it nuked legitimate design opacity (e.g. Wix vector
 * art faded via opacity:var(--opacity)). Force opacity only on elements that
 * animation libraries start hidden (.reveal, [data-aos], .wow). */
.palladium-html-import{visibility:visible!important}
.palladium-html-import *{visibility:visible!important}
.palladium-html-import .reveal,
.palladium-html-import [data-aos],
.palladium-html-import .wow{opacity:1!important;transform:none!important;animation:none!important;transition:none!important}
.palladium-html-import [data-pb-import-section-id],.palladium-html-import [data-pb-import-section-id] *{visibility:visible!important}

/* ── Tiroir mobile importé (#drawerMobile / .drawer) — filet de style ──
 * Le markup du tiroir vit dans le fragment footer (partagé), mais son CSS
 * d'origine est éparpillé dans le CSS importé PAR PAGE : selon la page il
 * manque l'alignement des chevrons, le glyphe du bouton fermer, ou l'icône
 * logo (l'<img class="logo__mark"> importée n'a parfois PAS de src).
 * Règles douces, sans !important : le CSS de page complet garde la main. */
.drawer .mmenu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer .close-btn {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    padding: 6px 10px;
}

    .drawer .close-btn:empty::before { content: "\2715"; }

.drawer img.logo__mark:not([src]) { display: none; }

/* ── En-tête Babylone : bande cassée 993–1080px ──
 * Le nœud #headerMain porte un STYLE INLINE qui fige la grille desktop
 * (grid-template-columns: 1fr auto 1fr) — le miroir InlineStyle des pages
 * importées. Sous 1080px le burger apparaît (4e item de grille) mais la
 * grille inline reste à 3 colonnes → le bloc favoris/compte/panier passe à
 * la ligne et chevauche la barre de navigation. L'inline bat tout sélecteur,
 * d'où !important (même raison que le filet HTML-import ci-dessus). On
 * reflète les templates des breakpoints du thème (.header__main @1080/@900).
 * Portée : #headerMain.header__main — no-op sur les autres sites. */
@media (max-width: 1080px) {
    #headerMain.header__main {
        grid-template-columns: auto auto minmax(0, 1fr) auto !important;
    }
}

@media (max-width: 900px) {
    #headerMain.header__main {
        grid-template-columns: auto 1fr auto !important;
    }
}
