/* Langues du site (fr / en / he) : switcher en pastille (repris d'email36.com, adapte au miel de Métikout)
   + habillage hébreu. ⛔ Le switcher reste à DROITE physiquement, même en hébreu (DOCS/kb/web.md). */

.mk-lang {
    display: flex;
    gap: 4px;
    padding: 4px;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 999px;
    background: rgba(255, 251, 242, 0.96);
    border: 2px solid rgba(242, 169, 0, 0.55);
    box-shadow: 0 6px 22px rgba(46, 29, 107, 0.18), 0 0 26px rgba(242, 169, 0, 0.18);
    direction: ltr;
}

.mk-lang-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #5E5462;
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.mk-lang-btn:hover {
    background: rgba(242, 169, 0, 0.14);
    color: #8A5100;
    transform: translateY(-1px);
}

.mk-lang-btn.active {
    background: linear-gradient(135deg, #F2A900 0%, #FFC94D 100%);
    color: #2B2233;
    box-shadow: 0 4px 14px rgba(242, 169, 0, 0.45);
}

.mk-lang-btn:focus-visible {
    outline: 3px solid #5B3CC4;
    outline-offset: 2px;
}

.mk-lang-flag {
    font-family: 'Noto Color Emoji', 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif;
    font-size: 1.25rem;
    line-height: 1;
}

.mk-lang-code { display: none; }

/* Hébreu : la barre garde « logo à gauche, drapeaux à droite » (règle web.md) ; seul le menu se lit de droite à gauche */
html[dir="rtl"] .header-content { direction: ltr; }
html[dir="rtl"] .nav { direction: rtl; }

/* Dans la barre violette : compact, le drapeau et le nom d'abord */
.mk-lang-header { margin-inline-start: 0.6rem; flex: none; }
.header-content { gap: 0.4rem; }

@media (max-width: 1280px) {
    .mk-lang-header .mk-lang-name { display: none; }
    .mk-lang-header .mk-lang-code { display: inline; }
    .mk-lang-header .mk-lang-btn { padding: 6px 9px; gap: 5px; }
}

@media (max-width: 1100px) {
    .mk-lang-header .mk-lang-btn { padding: 5px 7px; font-size: 0.78rem; }
    .mk-lang-header .mk-lang-flag { font-size: 1.05rem; }
}

/* Téléphone : la barre violette disparaît, la pastille passe sous le logo, centrée */
.mk-lang-mobile { display: none; }

@media (max-width: 768px) {
    .mk-lang-header { display: none; }
    .mk-lang-mobile {
        display: flex;
        position: relative;
        z-index: 2;
        margin: 76px auto -64px;
    }
    .mk-lang-mobile .mk-lang-btn { padding: 8px 14px; font-size: 0.92rem; }
}

/* ---------- Hébreu : titres Fredoka, texte Rubik ---------- */
html[lang="he"] body,
html[lang="he"] .nav a,
html[lang="he"] .dt-btn,
html[lang="he"] .dt-newsletter-input,
html[lang="he"] .dt-newsletter-btn {
    font-family: 'Rubik', 'Segoe UI', Arial, sans-serif;
}

html[lang="he"] h1,
html[lang="he"] h2,
html[lang="he"] .dt-eyebrow,
html[lang="he"] .dt-card-badge,
html[lang="he"] .mobile-logo-text,
html[lang="he"] .dt-newsletter-title,
html[lang="he"] .section-title {
    font-family: 'Fredoka', 'Rubik', 'Segoe UI', Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0;
}

html[lang="he"] .nav a { font-weight: 600; }

/* Le titre de paracha reste en hébreu lettré dans les trois langues */
html[lang="he"] .dt-paracha-he,
html[lang="he"] .dt-card-title-he,
html[lang="he"] .dt-archive-he {
    font-family: "Frank Ruhl Libre", "David", serif;
}
