/* ================================================================
 * MAMS Theme — Design System
 * Moroccan Association of Mathematical Sciences
 * v1.0.0
 * ================================================================ */

/* ---------- 1. VARIABLES ---------- */
:root {
    /* Palette marocaine */
    --r:  #C1272D;   /* Rouge marocain */
    --g:  #006233;   /* Vert marocain */
    --go: #B8922A;   /* Or */
    --d:  #1A1006;   /* Profond */
    --co: #1A3A5C;   /* Cobalt */
    --t:  #B5541A;   /* Terra */

    /* Gris neutres */
    --white:  #FFFFFF;
    --cream:  #FAF7F2;
    --sand:   #F2EDE3;
    --gray-50:  #F8F8F6;
    --gray-100: #ECECE8;
    --gray-200: #D9D9D4;
    --gray-400: #9E9E98;
    --gray-600: #5C5C56;
    --gray-800: #2A2A26;

    /* Typographies */
    --font-ar: 'Amiri', 'Cairo', 'Noto Naskh Arabic', serif;
    --font-en: 'Cormorant Garamond', Georgia, serif;
    --font-ui: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Dimensions */
    --nav-h: 70px;
    --max-w: 1200px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    /* Transitions */
    --t-fast: 0.2s ease;
    --t-mid:  0.4s ease;
    --t-slow: 0.8s ease;

    /* Shadows */
    --sh-sm: 0 2px 8px rgba(0,0,0,0.06);
    --sh-md: 0 8px 24px rgba(26,16,6,0.08);
    --sh-lg: 0 20px 60px rgba(26,16,6,0.15);
}

/* ---------- 2. RESET & BASE ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-ui);
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}
body.lang-ar { direction: rtl; font-family: var(--font-ar), var(--font-ui); }
body.lang-en { direction: ltr; font-family: var(--font-en), var(--font-ui); }

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--g); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--r); }

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5em;
    line-height: 1.2;
    font-weight: 700;
    color: var(--d);
}
body.lang-ar h1, body.lang-ar h2, body.lang-ar h3, body.lang-ar h4, body.lang-ar h5, body.lang-ar h6 { font-family: var(--font-ar); }
body.lang-en h1, body.lang-en h2, body.lang-en h3, body.lang-en h4, body.lang-en h5, body.lang-en h6 { font-family: var(--font-en); letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

.mams-container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.mams-main { min-height: 60vh; padding-top: var(--nav-h); }
body.mams-canvas .mams-main { padding-top: 0; }

/* ---------- 3. LANGUAGE SWITCHING (règle critique) ---------- */
/* Par défaut : tout caché sauf AR */
.mams-en { display: none !important; }
.mams-ar { display: inline; }

/* Quand body a .lang-en : AR caché, EN visible */
body.lang-en .mams-ar { display: none !important; }
body.lang-en .mams-en { display: inline !important; }

/* Pour éléments de type block, on force display:block quand visible */
body.lang-ar p.mams-ar,
body.lang-ar h1.mams-ar, body.lang-ar h2.mams-ar, body.lang-ar h3.mams-ar,
body.lang-ar h4.mams-ar, body.lang-ar h5.mams-ar, body.lang-ar h6.mams-ar,
body.lang-ar div.mams-ar { display: block; }

body.lang-en p.mams-en,
body.lang-en h1.mams-en, body.lang-en h2.mams-en, body.lang-en h3.mams-en,
body.lang-en h4.mams-en, body.lang-en h5.mams-en, body.lang-en h6.mams-en,
body.lang-en div.mams-en { display: block !important; }

/* Switch langue bouton : inverse ce qu'on voit */
.mams-lang-switch .mams-lang-ar { display: none; }
.mams-lang-switch .mams-lang-en { display: inline; }
body.lang-en .mams-lang-switch .mams-lang-ar { display: inline; }
body.lang-en .mams-lang-switch .mams-lang-en { display: none; }

/* ---------- 4. HEADER / NAV ---------- */
.mams-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1000;
    border-bottom: 1px solid rgba(193, 39, 45, 0.08);
    transition: box-shadow var(--t-fast), background var(--t-fast);
}
.mams-header.mams-scrolled { box-shadow: var(--sh-sm); background: rgba(255,255,255,0.95); }
body.mams-canvas .mams-header { display: none; }

.mams-header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Zellige border - bordure décorative */
.mams-zellige-border {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--r) 0, var(--r) 20px,
        var(--go) 20px, var(--go) 40px,
        var(--g) 40px, var(--g) 60px
    );
    opacity: 0.9;
}

/* Logo */
.mams-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-shrink: 0;
}
.mams-logo-wrap .custom-logo-link img,
.mams-logo-wrap img.custom-logo { height: 48px; width: auto; max-width: 48px; }
.mams-logo-text {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 24px;
    color: var(--r);
    letter-spacing: 1px;
}
.mams-logo-text-block {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}
.mams-brand {
    font-size: 13px;
    font-weight: 700;
    color: var(--d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}
body.lang-ar .mams-brand { font-family: var(--font-ar); font-size: 15px; }
body.lang-en .mams-brand { font-family: var(--font-en); }
.mams-tagline {
    font-size: 10px;
    color: var(--go);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Nav list */
.mams-nav { flex: 1; display: flex; justify-content: center; }
.mams-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 28px;
}
.mams-nav-list li { position: relative; }
.mams-nav-list a {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 500;
    color: var(--d);
    padding: 8px 0;
    position: relative;
    transition: color var(--t-fast);
}
.mams-nav-list a::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 0; right: 0;
    height: 2px;
    background: var(--r);
    transform: scaleX(0);
    transition: transform var(--t-mid);
    transform-origin: center;
}
.mams-nav-list a:hover { color: var(--r); }
.mams-nav-list a:hover::after { transform: scaleX(1); }
.mams-nav-list .current-menu-item > a { color: var(--r); }
.mams-nav-list .current-menu-item > a::after { transform: scaleX(1); }

/* Actions header */
.mams-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Lang switch */
.mams-lang-switch {
    background: transparent;
    border: 1.5px solid var(--r);
    color: var(--r);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 13px;
    transition: all var(--t-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mams-lang-switch:hover {
    background: var(--r);
    color: var(--white);
    transform: rotate(360deg);
}

/* CTA button */
.mams-cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--r), #9E1E24);
    color: var(--white) !important;
    border-radius: 100px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 13px;
    transition: all var(--t-fast);
    box-shadow: 0 4px 12px rgba(193, 39, 45, 0.25);
}
.mams-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(193, 39, 45, 0.4);
    color: var(--white) !important;
}

/* Burger */
.mams-burger {
    display: none;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.mams-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--d);
    transition: all var(--t-fast);
}
.mams-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.mams-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mams-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ---------- 5. BOUTONS ---------- */
.mams-el-btn-green,
.mams-el-btn-red,
.mams-el-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 100px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--t-fast);
    line-height: 1;
}

.mams-el-btn-green {
    background: linear-gradient(135deg, var(--g), #004D28);
    color: var(--white) !important;
    box-shadow: 0 4px 12px rgba(0, 98, 51, 0.25);
}
.mams-el-btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 98, 51, 0.4);
    color: var(--white) !important;
}

.mams-el-btn-red {
    background: linear-gradient(135deg, var(--r), #9E1E24);
    color: var(--white) !important;
    box-shadow: 0 4px 12px rgba(193, 39, 45, 0.25);
}
.mams-el-btn-red:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(193, 39, 45, 0.4);
    color: var(--white) !important;
}

.mams-el-btn-outline {
    background: transparent;
    border-color: var(--g);
    color: var(--g) !important;
}
.mams-el-btn-outline:hover {
    background: var(--g);
    color: var(--white) !important;
}

/* ---------- 6. BACKGROUNDS (classes Elementor) ---------- */
.mams-el-dark  { background: linear-gradient(135deg, var(--d) 0%, var(--co) 100%); color: var(--white); }
.mams-el-dark h1, .mams-el-dark h2, .mams-el-dark h3, .mams-el-dark h4, .mams-el-dark h5, .mams-el-dark h6 { color: var(--white); }
.mams-el-green { background: linear-gradient(135deg, var(--g) 0%, #003D20 100%); color: var(--white); }
.mams-el-green h1, .mams-el-green h2, .mams-el-green h3 { color: var(--white); }
.mams-el-gray  { background: var(--gray-50); }

/* ---------- 7. REVEAL ANIMATIONS ---------- */
.mams-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--t-slow);
}
.mams-reveal.mams-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 8. HERO ---------- */
.mams-hero {
    position: relative;
    height: calc(100vh - var(--nav-h));
    min-height: 600px;
    overflow: hidden;
    margin-top: 0;
}
.mams-hero-slides {
    position: absolute;
    inset: 0;
}
.mams-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease;
    transform: scale(1.05);
}
.mams-hero-slide.mams-active {
    opacity: 1;
    animation: kenBurns 8s ease-in-out forwards;
}
@keyframes kenBurns {
    from { transform: scale(1.05); }
    to   { transform: scale(1.15); }
}

.mams-hero-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}
.mams-hero-content {
    max-width: 900px;
    text-align: center;
    color: var(--white);
}
.mams-hero-eyebrow {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--go);
    margin-bottom: 20px;
    font-weight: 600;
}
.mams-hero-title {
    font-size: clamp(32px, 5vw, 60px);
    color: var(--white);
    margin-bottom: 24px;
    line-height: 1.15;
}
.mams-hero-title .mams-ar { font-family: var(--font-ar); }
.mams-hero-title .mams-en { font-family: var(--font-en); }

.mams-hero-sub {
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
.mams-hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.mams-hero-cta .mams-el-btn-outline {
    color: var(--white) !important;
    border-color: var(--white);
}
.mams-hero-cta .mams-el-btn-outline:hover {
    background: var(--white);
    color: var(--d) !important;
}

.mams-hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}
.mams-hero-indicators button {
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    border-radius: 2px;
    transition: background var(--t-fast), width var(--t-fast);
    padding: 0;
}
.mams-hero-indicators button.mams-active {
    background: var(--go);
    width: 60px;
}

/* ---------- 9. SECTIONS ---------- */
.mams-section {
    padding: 80px 0;
}
.mams-section-header {
    text-align: center;
    margin-bottom: 50px;
}
.mams-section-eyebrow {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--r);
    margin-bottom: 12px;
    font-weight: 600;
}
.mams-section-title {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 16px;
}

/* Intro grid (homepage) */
.mams-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.mams-intro-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.mams-stat {
    text-align: center;
    padding: 30px;
    background: var(--cream);
    border-radius: var(--radius);
    border-top: 4px solid var(--r);
}
.mams-stat:nth-child(2) { border-top-color: var(--g); }
.mams-stat:nth-child(3) { border-top-color: var(--go); }
.mams-stat:nth-child(4) { border-top-color: var(--co); }
.mams-stat strong {
    display: block;
    font-family: var(--font-ui);
    font-size: 48px;
    font-weight: 800;
    color: var(--d);
    line-height: 1;
    margin-bottom: 8px;
}
.mams-stat span {
    font-size: 13px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- 10. CAROUSEL ---------- */
.mams-carousel {
    position: relative;
    overflow: hidden;
}
.mams-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform var(--t-mid);
    cursor: grab;
    padding-bottom: 10px;
}
.mams-carousel-track:active { cursor: grabbing; }
.mams-carousel-card {
    flex: 0 0 calc((100% - 48px) / 3);
    min-height: 200px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--sh-md);
    border: 1px solid var(--gray-100);
    transition: all var(--t-fast);
    user-select: none;
}
.mams-carousel-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sh-lg);
    border-color: var(--go);
}
.mams-carousel-card h3 {
    color: var(--d);
    font-size: 22px;
    margin-bottom: 12px;
}
.mams-carousel-card p {
    color: var(--gray-600);
    font-size: 15px;
    margin: 0;
}
.mams-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.mams-carousel-dots button {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--gray-200);
    border: none;
    cursor: pointer;
    transition: all var(--t-fast);
    padding: 0;
}
.mams-carousel-dots button.mams-active {
    background: var(--r);
    width: 30px;
    border-radius: 6px;
}

/* ---------- 11. CTA SECTION ---------- */
.mams-cta-section { text-align: center; }
.mams-cta-section h2 { font-size: clamp(28px, 4vw, 42px); color: var(--white); margin-bottom: 16px; }
.mams-cta-section p { font-size: 18px; color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto 32px; }

/* ---------- 12. NEWSLETTER ---------- */
.mams-newsletter {
    background: linear-gradient(135deg, var(--d) 0%, var(--co) 100%);
    padding: 60px 0;
    color: var(--white);
}
.mams-newsletter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.mams-newsletter-text h3 { color: var(--white); font-size: 28px; margin-bottom: 8px; }
.mams-newsletter-text p { color: rgba(255,255,255,0.8); margin: 0; }
.mams-newsletter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.mams-newsletter-input {
    flex: 1;
    min-width: 200px;
    padding: 14px 20px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 100px;
    font-family: var(--font-ui);
    font-size: 14px;
}
.mams-newsletter-input::placeholder { color: rgba(255,255,255,0.6); }
.mams-newsletter-input:focus { outline: none; border-color: var(--go); background: rgba(255,255,255,0.15); }

/* ---------- 13. FOOTER ---------- */
.mams-footer { background: var(--d); color: rgba(255,255,255,0.8); }
.mams-footer-main { padding: 60px 0 40px; }
.mams-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.mams-footer-col h4, .mams-footer-col h5 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 20px;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.mams-footer-col h4 { font-size: 15px; }
.mams-footer-col p { color: rgba(255,255,255,0.7); font-size: 14px; line-height: 1.7; }
.mams-footer-menu, .mams-footer-contact { list-style: none; margin: 0; padding: 0; }
.mams-footer-menu li, .mams-footer-contact li { margin-bottom: 10px; }
.mams-footer-menu a, .mams-footer-contact a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: color var(--t-fast);
}
.mams-footer-menu a:hover, .mams-footer-contact a:hover { color: var(--go); }

.mams-footer-brand { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.mams-footer-brand .custom-logo-link img { height: 50px; width: auto; }

.mams-footer-social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.mams-footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
    transition: all var(--t-fast);
}
.mams-footer-social a:hover { background: var(--r); transform: translateY(-2px); }

.mams-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    text-align: center;
}
.mams-footer-bottom p {
    margin: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* ---------- 14. PAGE / POST ---------- */
.mams-content, .mams-page-wrap { padding: 40px 20px 80px; }
.mams-page-header { text-align: center; margin-bottom: 40px; padding: 40px 0; }
.mams-page-title { font-size: clamp(32px, 5vw, 48px); color: var(--d); }
.mams-page-content { max-width: 800px; margin: 0 auto; font-size: 17px; line-height: 1.8; }
.mams-fullwidth { width: 100%; }

.mams-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: var(--max-w);
    margin: 0 auto;
}
.mams-post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--sh-md);
    transition: all var(--t-fast);
}
.mams-post-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.mams-post-thumb img { width: 100%; height: 220px; object-fit: cover; }
.mams-post-body { padding: 24px; }
.mams-post-title { font-size: 20px; margin-bottom: 8px; }
.mams-post-title a { color: var(--d); }
.mams-post-title a:hover { color: var(--r); }
.mams-post-meta { font-size: 13px; color: var(--gray-400); margin-bottom: 12px; }
.mams-post-excerpt { font-size: 14px; color: var(--gray-600); margin-bottom: 16px; }

.mams-single-article { padding: 60px 20px; max-width: 800px; }
.mams-single-header { text-align: center; margin-bottom: 30px; }
.mams-single-title { font-size: clamp(28px, 4vw, 42px); }
.mams-single-meta { color: var(--gray-400); font-size: 14px; margin-top: 10px; }
.mams-single-thumb { margin: 30px 0; border-radius: var(--radius); overflow: hidden; }
.mams-single-content { font-size: 17px; line-height: 1.8; }
.mams-single-content h2, .mams-single-content h3 { margin-top: 2em; }

/* 404 */
.mams-404 { text-align: center; padding: 100px 20px; }
.mams-404-code {
    font-size: clamp(100px, 20vw, 200px);
    font-weight: 900;
    background: linear-gradient(135deg, var(--r), var(--go));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin: 0;
}
.mams-404-title { font-size: 32px; margin: 20px 0; }

/* Search */
.mams-search-form { display: flex; gap: 8px; max-width: 400px; }
.mams-search-field { flex: 1; padding: 10px 16px; border: 1px solid var(--gray-200); border-radius: 100px; font-family: var(--font-ui); }
.mams-search-submit { padding: 10px 20px; background: var(--g); color: var(--white); border: none; border-radius: 100px; cursor: pointer; }

/* Pagination */
.pagination, .nav-links { display: flex; gap: 10px; justify-content: center; margin: 40px 0; }
.page-numbers { padding: 10px 16px; border-radius: 8px; background: var(--gray-100); color: var(--d); }
.page-numbers.current { background: var(--r); color: var(--white); }

/* ---------- 15. RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .mams-nav-list { gap: 20px; }
    .mams-nav-list a { font-size: 13px; }
    .mams-brand { font-size: 12px; max-width: 180px; }
    .mams-tagline { display: none; }
}

@media (max-width: 900px) {
    .mams-footer-grid { grid-template-columns: 1fr 1fr; }
    .mams-intro-grid { grid-template-columns: 1fr; gap: 40px; }
    .mams-newsletter-grid { grid-template-columns: 1fr; }
    .mams-carousel-card { flex: 0 0 calc((100% - 24px) / 2); }
}

@media (max-width: 768px) {
    .mams-burger { display: flex; }
    .mams-nav {
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--white);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--t-mid);
        box-shadow: var(--sh-md);
    }
    .mams-nav.mams-open { max-height: 80vh; overflow-y: auto; }
    .mams-nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 0;
    }
    .mams-nav-list li { width: 100%; }
    .mams-nav-list a { padding: 14px 10px; display: block; border-bottom: 1px solid var(--gray-100); }
    .mams-cta-btn { padding: 8px 16px; font-size: 12px; }
    .mams-brand { display: none; }
    .mams-logo-text-block { display: none; }
    .mams-carousel-card { flex: 0 0 100%; }
    .mams-footer-grid { grid-template-columns: 1fr; }
    .mams-intro-stats { grid-template-columns: 1fr 1fr; }
    .mams-section { padding: 60px 0; }
    .mams-hero { min-height: 500px; }
}

@media (max-width: 480px) {
    .mams-intro-stats { grid-template-columns: 1fr; }
    .mams-hero-cta { flex-direction: column; }
    .mams-hero-cta a { width: 100%; }
    .mams-header-actions .mams-cta-btn { display: none; }
}

/* ---------- 16. RTL specifics ---------- */
body.lang-ar { direction: rtl; }
body.lang-ar .mams-nav-list { flex-direction: row-reverse; }
body.lang-ar .mams-footer-social { direction: ltr; }
body.lang-en { direction: ltr; }

/* ---------- 17. ACCESSIBILITÉ ---------- */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px; width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    word-wrap: normal !important;
}
*:focus-visible { outline: 2px solid var(--g); outline-offset: 2px; }

/* ---------- 18. UTILS ---------- */
.mams-text-center { text-align: center; }
.mams-mt-0 { margin-top: 0; }
.mams-mb-0 { margin-bottom: 0; }
.mams-hidden { display: none !important; }
