/* lalogo.ma — Arabic (RTL) and Tamazight (Tifinagh) typography + right-to-left layout for Arabic.
   Loaded after main.css via site.extraCss. Latin pages use Roboto; the other scripts are served per unicode-range. */
@font-face { font-family: 'Noto Sans Arabic'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('/assets/fonts/noto-sans-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Noto Sans Tifinagh'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/noto-sans-tifinagh.woff2') format('woff2'); unicode-range: U+2D30-2D7F, U+0301-0302, U+0304, U+0306-0307, U+0309, U+0323, U+0331, U+25CC; }

/* ---------- Arabic: script ---------- */
html:lang(ar) { --font: 'Noto Sans Arabic', 'Roboto', 'Segoe UI', Tahoma, 'Geeza Pro', Arial, sans-serif; }
html:lang(ar) body { font-size: 17px; line-height: 1.9; }
html:lang(ar) *, html:lang(ar) *::before, html:lang(ar) *::after { letter-spacing: 0 !important; } /* letter-spacing breaks the joining of Arabic letters */
html:lang(ar) .eyebrow, html:lang(ar) .mega__title, html:lang(ar) .filter__title, html:lang(ar) .footer__title, html:lang(ar) .pcard__cat, html:lang(ar) .product__series, html:lang(ar) .keyspecs dt, html:lang(ar) .ccard-contact small, html:lang(ar) .project-list__sector, html:lang(ar) .socials--big a { text-transform: none; font-size: .9rem; }
html:lang(ar) h1, html:lang(ar) h2, html:lang(ar) h3, html:lang(ar) h4 { line-height: 1.55; }
html:lang(ar) .btn { line-height: 1.5; }
/* Latin fragments inside Arabic text (model codes, units, the wordmark) keep the Latin font */
html:lang(ar) .pcard__model, html:lang(ar) .product__model, html:lang(ar) .logo, html:lang(ar) [lang='fr'], html:lang(ar) [lang='en'] { font-family: 'Roboto', Arial, sans-serif; }

/* ---------- Tamazight (ⵜⴰⵎⴰⵣⵉⵖⵜ): Tifinagh is written left-to-right ---------- */
html:lang(zgh) { --font: 'Noto Sans Tifinagh', 'Roboto', 'Noto Sans Arabic', system-ui, Arial, sans-serif; }
html:lang(zgh) body { line-height: 1.8; }
html:lang(zgh) *, html:lang(zgh) *::before, html:lang(zgh) *::after { letter-spacing: 0 !important; }
html:lang(zgh) h1, html:lang(zgh) h2, html:lang(zgh) h3, html:lang(zgh) h4 { line-height: 1.4; font-weight: 700; }
html:lang(zgh) .eyebrow, html:lang(zgh) .mega__title, html:lang(zgh) .filter__title, html:lang(zgh) .footer__title, html:lang(zgh) .pcard__cat, html:lang(zgh) .product__series, html:lang(zgh) .keyspecs dt { text-transform: none; }

/* ---------- Arabic: right-to-left layout ---------- */
[dir='rtl'] ul, [dir='rtl'] ol { padding-left: 0; padding-right: 1.2em; }
[dir='rtl'] .skip { left: auto; right: -999px; }
[dir='rtl'] .skip:focus { right: 8px; }
[dir='rtl'] .note { border-left: 0; border-right: 3px solid var(--c-accent); padding-left: 0; padding-right: 12px; }
[dir='rtl'] .badge { right: auto; left: -4px; }
[dir='rtl'] .lang__menu { right: auto; left: 0; }
[dir='rtl'] .search input { padding: 10px 16px 10px 44px; }
[dir='rtl'] .search button { right: auto; left: 4px; }
[dir='rtl'] .search__results strong { margin-right: 0; margin-left: 6px; }
[dir='rtl'] .header__actions { margin-left: 0; margin-right: auto; }
[dir='rtl'] .mega { left: auto; right: 0; }
[dir='rtl'] .mega__featured { border-left: 0; padding-left: 0; border-right: 1px solid var(--c-line); padding-right: 24px; }
[dir='rtl'] .hero__overlay { background: linear-gradient(260deg, rgba(11,53,80,.94) 0%, rgba(11,53,80,.82) 45%, rgba(20,80,110,.55) 100%); }
[dir='rtl'] .hero__media { transform: rotate(1.5deg); }
[dir='rtl'] .page-hero::before { background: linear-gradient(270deg, rgba(11,53,80,.95), rgba(11,53,80,.7)); }
[dir='rtl'] .breadcrumbs li + li::before { content: '‹'; margin-right: 0; margin-left: 6px; }
[dir='rtl'] .chip span { margin-left: 0; margin-right: 4px; }
[dir='rtl'] .prose blockquote { border-left: 0; border-right: 4px solid var(--c-accent); border-radius: 8px 0 0 8px; }
[dir='rtl'] .prose th, [dir='rtl'] .prose td, [dir='rtl'] .spec__table tbody th, [dir='rtl'] .vcard { text-align: right; }
[dir='rtl'] .value { border-left: 0; border-right: 4px solid var(--c-accent); border-radius: var(--radius) 0 0 var(--radius); }
[dir='rtl'] .vcard__no { margin-right: 0; margin-left: 8px; }
[dir='rtl'] .form__hp { left: auto; right: -9999px; }
[dir='rtl'] .floating { right: auto; left: 18px; }
[dir='rtl'] .cookie { left: auto; right: 18px; }
[dir='rtl'] .drawer__panel { right: auto; left: 0; transform: translateX(-100%); }
[dir='rtl'] .drawer.is-open .drawer__panel { transform: none; }
[dir='rtl'] .drawer__list li { padding: 6px 12px 6px 6px; }
[dir='rtl'] .lightbox__close { right: auto; left: 16px; }
[dir='rtl'] .lightbox__nav--prev { left: auto; right: 14px; transform: translateY(-50%) scaleX(-1); }
[dir='rtl'] .lightbox__nav--next { right: auto; left: 14px; transform: translateY(-50%) scaleX(-1); }
[dir='rtl'] .ic--flip { transform: scaleX(-1); }
/* phone numbers, e-mail addresses and technical values keep left-to-right order */
[dir='rtl'] a[href^='tel:'], [dir='rtl'] a[href^='mailto:'] { direction: ltr; unicode-bidi: isolate; display: inline-block; }
[dir='rtl'] .pcard__specs li, [dir='rtl'] .keyspecs dd, [dir='rtl'] .model-strip__seg strong, [dir='rtl'] .search__results strong, [dir='rtl'] .pcard__model, [dir='rtl'] .product__model { unicode-bidi: plaintext; }
[dir='rtl'] .spec .table-scroll, [dir='rtl'] .spec__table, [dir='rtl'] .spec__table td, [dir='rtl'] .spec__table th { direction: ltr; }
[dir='rtl'] .spec__table tbody th { text-align: left; }
[dir='rtl'] input[type='tel'], [dir='rtl'] input[type='email'] { direction: ltr; text-align: right; }
[dir='rtl'] .logo, [dir='rtl'] .logo__svg { direction: ltr; }
[dir='rtl'] .counter__value { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 1100px) {
  [dir='rtl'] .nav { right: auto; left: 0; transform: translateX(-100%); }
  [dir='rtl'] .nav.is-open { transform: none; }
  [dir='rtl'] .nav__head { padding: 12px 20px 12px 12px; }
}
@media (max-width: 640px) {
  [dir='rtl'] .lightbox__nav--prev { right: 4px; left: auto; }
  [dir='rtl'] .lightbox__nav--next { left: 4px; right: auto; }
  [dir='rtl'] .floating { left: 12px; right: auto; }
  [dir='rtl'] .cookie { right: 12px; left: 12px; }
}

/* ---------- lalogo.ma components ---------- */
.floating__btn--call { background: #1e8a52; }
.topbar__link bdi { font-weight: 600; }
.regions { align-items: stretch; }
.region { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.region h3 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; margin-bottom: .5em; }
.region h3 .ic { color: var(--c-accent-text); flex: none; }
.region p { margin: 0 0 12px; font-size: .95rem; color: var(--c-text); }
.region__tags { list-style: none; margin: 0; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 6px; }
.region__tags li { font-size: .78rem; background: var(--c-primary-soft); color: var(--c-primary); border-radius: 999px; padding: 3px 10px; font-weight: 600; }
.region .more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.prose-wrap { max-width: 900px; }
.project-list__source { font-size: .72rem; font-weight: 600; color: var(--c-muted); border: 1px solid var(--c-line); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }

/* compliance cards without a scanned document (standards / test reports available on request) */
.cert--doc { cursor: default; }
.cert__badge { display: flex; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 4 / 3; border-radius: 8px; background: linear-gradient(135deg, var(--c-primary-soft), #fff); color: var(--c-primary); font-weight: 700; font-size: .95rem; border: 1px dashed var(--c-line); }
.cert__badge .ic { width: 28px; height: 28px; color: var(--c-accent); }

/* visible "last updated" line at the end of every indexed page (mirrors sitemap lastmod / dateModified) */
.updated { margin: 0 auto 8px; padding-top: 12px; color: var(--c-muted); font-size: .8rem; text-align: end; }
.cat-compare { margin-top: 28px; }

/* grid children must be allowed to shrink, otherwise a wide comparison table stretches the catalog column past the viewport on phones */
.catalog > * { min-width: 0; }
.cat-compare .table-scroll { max-width: 100%; }
