/* -------------------------------------------------
   Plaskito — JOURNAL (AR)
   ------------------------------------------------- */

/* Fonts */

/* ===== VARIABLES (gardées uniquement si utilisées) ===== */
:root{
  --primary:var(--color-primary);
  --accent:var(--color-primary);
  --accent-light:var(--color-primary);
  --accent-soft:color-mix(in srgb, var(--color-primary) 12%, transparent);

  --bg:#fff;
  --bg-light:var(--color-sand);
  --text:var(--color-ink);
  --text-muted:var(--color-muted);

  --gray-200:#E5E5E5;

  --container:1380px;
  --container-narrow:1280px;
  --gutter:20px;

  --header-h:75px;
  --link-h:44px;
  --banner-h:40px;
}

/* =========================
        Base / Reset
   ========================= */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}

/* Fix overflow + fond */
html,body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  background:var(--bg);
}

body{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  font-family:"DM Sans",sans-serif;
  font-size:17px;
  line-height:1.75;
  font-weight:400;
  letter-spacing:-.01em;
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}
body.menu-open{overflow:hidden}

main{
  flex:1 0 auto;
  padding-top:calc(var(--header-h) + var(--banner-h));
}
footer{margin-top:auto}

.container{max-width:var(--container); margin:0 auto; padding:0 var(--gutter);}
.container-narrow{max-width:var(--container-narrow); margin:0 auto; padding:0 var(--gutter);}

.section{padding:60px 0; overflow-x:hidden;}
body.has-hero main{padding-top:0}

/* =========================
            Buttons
   ========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  height:45px;
  width:180px;
  padding:0 16px;
  gap:8px;
  cursor:pointer;
  text-decoration:none;
  font-weight:600;
  font-size:.9rem;
  letter-spacing:.3px;
  border-radius:5px;
  color:#fff;
  background:var(--primary);
  border:2.5px solid var(--primary);
  transition:all .25s ease;
}
.btn:hover,.btn:focus{background:var(--color-bg);color:var(--primary);transform:translateY(-1px);}
.btn:active{transform:translateY(0);background:var(--primary);color:#fff;}
.btn.outline{background:transparent;color:var(--primary);border:2.5px solid var(--primary);}
.btn.outline:hover{background:var(--primary);color:#fff;}

/* =========================
         Phase Banner
   ========================= */
.phase-banner{
  position:fixed;
  top:var(--header-h);
  left:0; right:0;
  z-index:10000;
  height:var(--banner-h);
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--color-primary);
  color:#fff;
  line-height:1;
  font-size:.95rem;
  transition:transform .3s,opacity .3s;
}
body.scrolled-nav .phase-banner{transform:translateY(-100%);opacity:0;pointer-events:none;}
.phase-banner a{color:#fff;text-decoration:underline;font-weight:600;text-underline-offset:3px;transition:opacity .2s;}
.phase-banner a:hover{opacity:.85;}

/* =========================
            Header / Nav
   ========================= */
header.nav{
  position:fixed;
  inset:0 0 auto 0;
  height:var(--header-h);
  z-index:10001;
  width:100%;
  max-width:100vw;
  overflow-x:clip;
  background:var(--bg);
  box-shadow:none;
  transition:box-shadow .3s;
}
body.scrolled-nav header.nav{box-shadow:0 6px 18px rgba(0,0,0,.12);}

header.nav .inner{
  height:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 var(--gutter);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

header.nav .logo{
  display:flex;
  align-items:center;
  height:100%;
  margin-right:clamp(32px,6vw,128px);
  transform:translateX(-8px);
}
header.nav .logo img{
  display:block;
  height:calc(var(--header-h) - 28px);
  width:auto;
}

header.nav .links{
  display:flex;
  align-items:center;
  gap:20px;
  height:100%;
  position:relative;
  top:3px;
  margin-left:auto;
}
header.nav .links a{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:var(--link-h);
  padding:0 10px;
  line-height:1;
  font-size:1rem;
  font-weight:400;
  font-family:"DM Sans",sans-serif;
  color:var(--primary);
  text-decoration:none;
  transition:color .2s,transform .2s;
}
header.nav .links a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-3px;
  width:0;
  height:2px;
  background:var(--primary);
  transition:width .25s;
}
header.nav .links a:hover::after,
header.nav .links a:focus::after{width:100%;}

/* =========================
            Burger
   ========================= */
header.nav .nav-toggle{
  display:none;
  width:44px;
  height:44px;
  background:transparent;
  border:none;
  cursor:pointer;
  z-index:10000;
  align-items:center;
  justify-content:center;
}
header.nav .nav-toggle span{
  display:block;
  width:24px;
  height:2px;
  background:var(--primary);
  transition:transform .25s,opacity .2s,background .25s;
}
header.nav .nav-toggle span+span{margin-left:-24px; transform:translateY(6px);}
body.menu-open .nav-toggle span:first-child{transform:translateY(0) rotate(45deg);}
body.menu-open .nav-toggle span:last-child{transform:translateY(0) rotate(-45deg);}

/* =========================
         Mobile menu
   ========================= */
.mobile-menu{
  position:fixed;
  inset:0;
  z-index:9998;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:22px;
  padding:20px;
  background:color-mix(in srgb, var(--color-night) 98%, transparent);
  transform:translateY(-100%);
  transition:transform .28s ease;
}
body.menu-open .mobile-menu{transform:none;}
.mobile-menu a{color:#fff; font-size:1.3rem; font-weight:600; text-decoration:none;}

/* =========================
       Language selector
   ========================= */
.language-separator{
  display:inline-block;
  width:1px;
  height:26px;
  background:transparent;
  margin:0 8px 0 24px;
}
.language-selector{position:relative; display:flex; align-items:center; height:var(--link-h);}

.lang-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  height:var(--link-h);
  padding:0 8px;
  background:transparent;
  border:none;
  color:var(--primary);
  font-weight:400;
  font-size:1rem;
  font-family:"DM Sans",sans-serif;
  cursor:pointer;
  transform:translateY(4px);
  transition:opacity .25s;
}
.lang-toggle:hover{opacity:.9;}

.lang-arrow{width:10px;height:10px;stroke:currentColor;stroke-width:1.6;transition:transform .25s;}
.lang-toggle[aria-expanded="true"] .lang-arrow{transform:rotate(180deg);}

.lang-dropdown{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:120px;
  z-index:1000;
  background:var(--bg);
  box-shadow:0 8px 24px rgba(0,0,0,.15);
  opacity:0;
  visibility:hidden;
  transform:translateY(-8px);
  transition:opacity .25s ease, transform .25s ease;
}
.lang-dropdown[aria-hidden="false"]{opacity:1; visibility:visible; transform:translateY(0);}

.lang-option{
  display:block;
  width:100%;
  padding:12px 20px;
  background:transparent;
  border:none;
  text-align:left;
  text-decoration:none;
  color:var(--primary);
  font-weight:600;
  font-size:.95rem;
  font-family:"DM Sans",sans-serif;
  cursor:pointer;
  transition:background .2s ease;
}
.lang-option:hover,
.lang-option:focus{background:var(--accent-soft); text-decoration:none;}
.lang-option:focus-visible{outline:2px solid var(--accent); outline-offset:2px;}
.lang-option[aria-current="page"]{background:var(--accent-soft);}

/* =========================
  PAGE HEADER
  ========================= */
.page-header{padding:calc(var(--header-h) + 60px) 0 80px;position:relative;color:#fff;background-size:cover;background-position:center;background-repeat:no-repeat}
.page-header .overlay{position:absolute;inset:0;background:rgba(0,0,0,.25);z-index:0}
.page-header .container{position:relative;z-index:1;max-width:var(--container);margin:0 auto;padding:0 var(--gutter);}
.page-header .hero-eyebrow{font-size:14px;color:rgba(255,255,255,.78);font-weight:600;margin-bottom:18px;display:block;font-family:"DM Sans",sans-serif}
.page-header h1{font-size:clamp(2rem,5vw,3.8rem);font-weight:600;line-height:1.1;color:#fff;text-transform:uppercase;letter-spacing:.02em;margin:0}

/* =========================
   FILTERS
   ========================= */
.filters-section{
  padding:20px 0;
  background:var(--bg-light);
  border-bottom:1px solid var(--gray-200);
}
.filters-container{display:flex; gap:16px; flex-wrap:wrap; align-items:center;}

.filter-label{
  font-weight:600;
  color:var(--text);
  font-size:.9rem;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.filter-btn{
  padding:8px 20px;
  background:#fff;
  border:1.5px solid #CDD3E6;   /* bord visible sur la bande bleu clair */
  color:#3F4450;
  border-radius:5px;
  font-family:"DM Sans",sans-serif;
  font-weight:400;
  font-size:.9rem;
  cursor:pointer;
  transition:all .25s ease;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.filter-btn:hover,
.filter-btn.active{
  background:var(--primary);
  color:#fff;
  border-color:var(--primary);
}

/* =========================
   ARTICLES GRID
   ========================= */
.articles-section.is-muted{ display:none !important; }
/* =========================
   A11Y helpers (used by HTML)
   ========================= */
.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;height:1px;
  overflow:hidden;
}
.skip-link:focus{
  top:12px;
  width:auto;height:auto;
  padding:10px 14px;
  background:var(--color-bg);
  color:var(--primary);
  border:2px solid var(--primary);
  border-radius:5px;
  z-index:20000;
}
.sr-only{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}
.articles-section{padding:60px 0 100px;}

.articles-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:32px;
}

/* Carte article : sans cadre ni fond, image 2:1, puis rubrique, titre et date posés sur la page */
.article-card{
  text-decoration:none;
  display:flex;
  flex-direction:column;
}

/* Carte masquée par le filtre de rubrique (assets/js/journal-filters.js) */
.article-card[hidden]{display:none;}

.articles-empty{
  margin:8px 0 0;
  font-size:.95rem;
  color:var(--text-muted);
}

.article-image{
  aspect-ratio:2/1;
  border-radius:5px;
  overflow:hidden;
  background:var(--color-sand);
  position:relative;
}

.article-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .5s ease;
}

/* Survol : seul effet, un léger zoom sur l'image */
.article-card:hover .article-image img{transform:scale(1.04);}

/* Rubrique au-dessus du titre de la carte */
.article-category{
  font-size:.85rem;
  font-weight:500;
  text-transform:uppercase;
  letter-spacing:0;   /* arabe : pas d'interlettrage, il casserait la liaison des lettres */
  color:var(--text-muted);
  margin:0 0 8px;
}

.article-content{padding:20px 0 0;}

.article-title{
  font-size:1.2rem;
  font-weight:700;
  color:var(--text);
  line-height:1.45;
  margin:0;
}

@media (max-width:1024px){
  .articles-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* =========================
   NEWSLETTER CTA
   ========================= */
.newsletter-section{
  background:transparent;
  padding:48px var(--gutter);
  max-width:var(--container);
  margin:0 auto;
}
.newsletter-card{
  background:var(--color-primary);
  color:#fff;
  text-align:center;
  position:relative;
  z-index:1;
  max-width:980px;
  margin:0 auto;
  padding:32px 28px;
  border-radius:5px;
  box-shadow:0 16px 36px rgba(0,0,0,.12);
  overflow:hidden;
}
.newsletter-card::before{
  content:"";
  position:absolute;
  top:-40%;
  right:-8%;
  width:520px;
  height:520px;
  background:none;
  pointer-events:none;
  z-index:-1;
}
.newsletter-content{max-width:640px; margin:0 auto;}
.newsletter-content h2{
  font-size:clamp(2.2rem,3.8vw,3.1rem);
  margin:0 0 12px;
  font-weight:700;
  font-family:"DM Sans",sans-serif;
}
.newsletter-content p{
  font-size:1.05rem;
  opacity:.95;
  margin-bottom:24px;
  line-height:1.75;
}
.newsletter-form{
  display:flex;
  gap:12px;
  max-width:640px;
  margin:0 auto 14px;
  flex-wrap:wrap;
  justify-content:center;
}
.newsletter-form input{
  flex:1;
  min-width:230px;
  padding:10px 14px;
  border:none;
  border-radius:5px;
  font-size:14px;
  font-family:"DM Sans",sans-serif;
  box-shadow:0 1px 4px rgba(0,0,0,.10);
}
.newsletter-form button{
  background:var(--accent-light);
  color:#fff;
  border:none;
  border-radius:5px;
  font-family:"DM Sans",sans-serif;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  padding:10px 20px;
  transition:transform .25s ease, background .25s ease;
  box-shadow:0 3px 8px color-mix(in srgb, var(--color-primary) 30%, transparent);
}
.newsletter-form button:hover,
.newsletter-form button:focus{background:var(--color-bg);color:var(--accent-light);transform:translateY(-1px);}
.newsletter-form button:active{transform:translateY(0);background:var(--color-primary);color:#fff;}

/* =========================
           FOOTER
   ========================= */
footer{
  background:var(--primary);
  color:rgba(255,255,255,.95);
  padding:48px 0 24px;
}
.footer-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:48px;
  max-width:var(--container);
  margin:0 auto 32px;
  padding:0 var(--gutter);
}
.footer-brand{margin-bottom:20px}
.footer-brand h3{color:#fff; font-size:1.3rem; font-weight:600}
.footer-info{display:flex; flex-direction:column; gap:14px; margin-bottom:20px}
.info-item{display:flex; align-items:center; gap:12px}
.info-item svg{width:20px; height:20px; stroke:rgba(255,255,255,.9); fill:none; stroke-width:2; flex-shrink:0}
.info-item span,.info-item a{color:rgba(255,255,255,.95); font-size:.95rem; text-decoration:none; transition:color .2s}
.info-item a:hover{color:#fff}
.footer-social{display:flex; gap:12px}
.footer-social a{
  width:44px; height:44px;
  background:var(--primary);
  border-radius:5px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all .3s;
  text-decoration:none;
  position:relative;
}
.footer-social a:hover{transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,.2)}
.footer-social a svg{width:26px; height:26px; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%)}
.footer-col h4{color:#fff; font-weight:600; margin-bottom:16px; font-size:1.1rem}
.footer-col a{color:rgba(255,255,255,.85); font-size:.95rem; line-height:1.8; text-decoration:none; display:block; margin-bottom:8px; transition:color .2s}
.footer-col a:hover{color:#fff}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.15);
  padding-top:24px;
  text-align:center;
  font-size:.85rem;
  color:rgba(255,255,255,.7);
  max-width:var(--container);
  margin:0 auto;
  padding-inline:var(--gutter);
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (min-width:1025px){
  header.nav .links{display:flex; align-items:center; flex-wrap:nowrap; gap:20px;}
  header.nav .links a{white-space:nowrap; line-height:1.2;}
  .newsletter-content{max-width:none;}
}

@media (max-width:1024px){
  :root{--gutter:12px;}

  header.nav .nav-toggle{display:flex !important; margin-left:auto}
  header.nav .links{display:none !important}

  /* Banner full width, sans selectors inutiles (.banner supprimés) */
  .phase-banner{
    left:0; right:0;
    width:100%;
    padding-left:clamp(8px,2vw,16px);
    padding-right:clamp(8px,2vw,16px);
    text-align:center;
  }
  .phase-banner > .container{
    width:100%;
    max-width:100%;
    padding:0;
    margin:0;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .phase-banner *{text-align:center; margin:0;}
}

@media (max-width:640px){
  /* Containers */
  .container,
  .container-narrow,
  .page-header .container,
  .filters-section .container,
  .articles-section .container,
  .newsletter-section{
    padding-inline:12px !important;
    max-width:100% !important;
    box-sizing:border-box;
  }

  /* Evite double padding latéral */
  .page-header,
  .filters-section,
  .articles-section{padding-inline:0 !important;}

  /* Hero */
  .page-header h1{
    font-size:clamp(1.8rem,6vw,2.4rem) !important;
    line-height:1.1;
    text-align:right; /* ✅ RTL */
  }
  .page-header p{
    font-size:.95rem !important;
    line-height:1.5;
    max-width:90%;
    text-align:right; /* ✅ RTL */
  }

  /* Filters */
  /* Filtres sur une seule ligne qui défile horizontalement : ils ne repoussent plus le contenu sous l'écran */
  .filters-section{padding:14px 0; position:relative;}
  .filters-container{
    flex-direction:row;
    flex-wrap:nowrap;
    align-items:center;
    gap:8px;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    margin-inline:calc(-1 * var(--gutter));
    padding-inline:var(--gutter);
  }
  .filters-container::-webkit-scrollbar{display:none;}
  .filter-label{flex:none; font-size:.8rem;}
  .filter-btn{flex:none; width:auto; padding:7px 14px; font-size:.8rem; white-space:nowrap;}
  /* Dégradé sur le bord gauche : indique que la ligne de filtres défile */
  .filters-section::after{
    content:"";
    position:absolute;
    top:0; left:0; bottom:0;
    width:40px;
    background:linear-gradient(to left, rgba(238,241,253,0), var(--bg-light));
    pointer-events:none;
  }

  /* Articles */
  .articles-grid{grid-template-columns:1fr; gap:24px;}
  .article-content{padding:16px 0 0;}

  /* Newsletter */
  .newsletter-section{padding:32px var(--gutter) 24px; margin-top:-20px; margin-bottom:20px;}
  .newsletter-card{padding:24px 18px;}
  .newsletter-content h2{font-size:clamp(1.6rem,5vw,2.1rem); margin-bottom:10px;}
  .newsletter-content p{font-size:.95rem; margin-bottom:18px; line-height:1.6;}
  .newsletter-form{gap:10px; margin:0 auto 12px;}
  .newsletter-form input{min-width:200px; padding:8px 12px; font-size:13px;}
  .newsletter-form button{padding:8px 16px; font-size:13px;}

  /* Footer */
  .footer-grid{grid-template-columns:1fr; gap:24px; padding-inline:12px !important;}
}

/* ===== Utilities ===== */
.animate-on-scroll{will-change:transform,opacity;}

/* =========================================================
   AR FIXES — JOURNAL (RTL + header + content + footer)
   ========================================================= */
/* ── Account icon ── */
.acct-icon-wrap{position:relative; display:flex; align-items:center; margin-left:4px;}
.acct-icon-btn{background:none; border:none; cursor:pointer; color:var(--primary); padding:8px; border-radius:8px; transition:background .15s; display:flex; align-items:center;}
.acct-icon-wrap:hover .acct-icon-btn{background:var(--bg-light);}
.acct-dropdown{position:absolute; top:100%; right:0; background:var(--color-bg); border-radius:8px; box-shadow:0 4px 20px rgba(0,0,0,.12); min-width:190px; padding:16px 0 8px; opacity:0; pointer-events:none; transform:translateY(6px); transition:opacity .18s,transform .18s; z-index:10002;}
.acct-icon-wrap:hover .acct-dropdown{opacity:1; pointer-events:auto; transform:translateY(0);}
.acct-drop-name{padding:10px 16px 8px; font-size:.82rem; font-weight:600; color:var(--text); border-bottom:1px solid var(--color-sand); margin:0 0 4px;}
.acct-drop-item{display:block; width:100%; padding:9px 16px; font-size:.85rem; color:var(--text); text-decoration:none; cursor:pointer; background:none; border:none; text-align:right; font-family:"DM Sans",sans-serif; transition:background .15s; box-sizing:border-box;}
.acct-drop-item:hover{background:var(--color-sand);}
.acct-drop-so{color:var(--color-muted);}

/* ── Cart icon ── */
.cart-icon-btn{position:relative; background:none; border:none; cursor:pointer; color:var(--primary); padding:4px; border-radius:6px; transition:background .15s; display:flex; align-items:center;}
.cart-icon-btn:hover{background:var(--bg-light);}
.cart-badge{position:absolute; top:0px; right:0px; width:16px; height:16px; background:#e53935; color:#fff; font-size:9px; font-weight:700; border-radius:50%; display:flex; align-items:center; justify-content:center; line-height:1;}
.cart-badge.hidden{display:none;}

html[lang="ar"][dir="rtl"],
body[lang="ar"][dir="rtl"],
[dir="rtl"]{
  direction:rtl;
}

/* Header AR (ordre + stabilité) */
html[lang="ar"][dir="rtl"] header.nav .inner,
[dir="rtl"] header.nav .inner{
  direction:ltr !important;
  justify-content:flex-start !important;
  gap:20px !important;
}
html[lang="ar"][dir="rtl"] header.nav .logo,
[dir="rtl"] header.nav .logo{
  order:99 !important;
  margin-left:auto !important;
  margin-right:0 !important;
  transform:none !important;
}
html[lang="ar"][dir="rtl"] header.nav .links,
[dir="rtl"] header.nav .links{
  order:4 !important;
  margin:0 !important;
  direction:rtl !important;
}
html[lang="ar"][dir="rtl"] header.nav .language-separator,
[dir="rtl"] header.nav .language-separator{
  display:none !important;
}
html[lang="ar"][dir="rtl"] header.nav .language-selector,
[dir="rtl"] header.nav .language-selector{
  order:0 !important;
  margin:0 !important;
  direction:ltr !important;
}
html[lang="ar"][dir="rtl"] header.nav .lang-toggle,
[dir="rtl"] header.nav .lang-toggle{
  direction:ltr !important;
  flex-direction:row-reverse !important;
}

/* RTL: account and cart icon positions */
html[lang="ar"][dir="rtl"] header.nav .acct-icon-wrap,
body[lang="ar"][dir="rtl"] header.nav .acct-icon-wrap,
[dir="rtl"] header.nav .acct-icon-wrap{order:3 !important; margin:0 !important;}

html[lang="ar"][dir="rtl"] header.nav .cart-icon-btn,
body[lang="ar"][dir="rtl"] header.nav .cart-icon-btn,
[dir="rtl"] header.nav .cart-icon-btn{order:2 !important; margin:0 !important;}

/* Dropdown ancrage (AR) */
html[lang="ar"][dir="rtl"] header.nav .lang-dropdown,
body[lang="ar"][dir="rtl"] header.nav .lang-dropdown{
  left:0 !important;
  right:auto !important;
  text-align:right !important;
}
/* RTL: account dropdown opens rightward */
html[lang="ar"][dir="rtl"] header.nav .acct-dropdown,
body[lang="ar"][dir="rtl"] header.nav .acct-dropdown,
[dir="rtl"] header.nav .acct-dropdown{left:0 !important; right:auto !important;}

html[lang="ar"][dir="rtl"] header.nav .lang-option,
[dir="rtl"] header.nav .lang-option{
  text-align:right !important;
}

/* Hero align RTL */
html[lang="ar"] .page-header,
:root:dir(rtl) .page-header,
[dir="rtl"] .page-header{direction:rtl;}
html[lang="ar"] .page-header h1,
html[lang="ar"] .page-header p,
html[lang="ar"] .page-header .hero-eyebrow,
:root:dir(rtl) .page-header h1,
:root:dir(rtl) .page-header p,
:root:dir(rtl) .page-header .hero-eyebrow,
[dir="rtl"] .page-header h1,
[dir="rtl"] .page-header p,
[dir="rtl"] .page-header .hero-eyebrow{
  text-align:right !important;
  text-align-last:right !important;
}

/* Filters RTL */
html[lang="ar"] .filters-container,
:root:dir(rtl) .filters-container,
[dir="rtl"] .filters-container{direction:rtl;}
html[lang="ar"] .filter-label,
:root:dir(rtl) .filter-label,
[dir="rtl"] .filter-label{
  text-align:right !important;
  text-align-last:right !important;
}

/* Articles RTL */
html[lang="ar"] .articles-section,
:root:dir(rtl) .articles-section,
[dir="rtl"] .articles-section{direction:rtl;}
html[lang="ar"] .article-meta,
:root:dir(rtl) .article-meta,
[dir="rtl"] .article-meta{direction:rtl;}
html[lang="ar"] .article-title,
html[lang="ar"] .article-excerpt,
:root:dir(rtl) .article-title,
:root:dir(rtl) .article-excerpt,
[dir="rtl"] .article-title,
[dir="rtl"] .article-excerpt{
  direction:rtl;
  text-align:justify;
  text-align-last:right !important;
}
html[lang="ar"] .article-date,
:root:dir(rtl) .article-date,
[dir="rtl"] .article-date{text-align:right;}

/* Footer RTL */
html[lang="ar"] footer,
:root:dir(rtl) footer,
[dir="rtl"] footer{direction:rtl;}
html[lang="ar"] .footer-col,
:root:dir(rtl) .footer-col,
[dir="rtl"] .footer-col{text-align:right;}
html[lang="ar"] .info-item,
:root:dir(rtl) .info-item,
[dir="rtl"] .info-item{direction:rtl;}

/* Tablet/Mobile order: LANGUE → separator → burger à gauche, logo à droite */
@media (max-width:1024px){
  html[lang="ar"][dir="rtl"] header.nav .inner,
  [dir="rtl"] header.nav .inner{
    direction:ltr !important;
    justify-content:flex-start !important;
  }

  html[lang="ar"][dir="rtl"] header.nav .links,
  [dir="rtl"] header.nav .links{display:none !important;}

  html[lang="ar"][dir="rtl"] header.nav .language-selector,
  [dir="rtl"] header.nav .language-selector{
    order:0 !important;
    margin:0 !important;
    direction:ltr !important;
  }
  html[lang="ar"][dir="rtl"] header.nav .language-separator,
  [dir="rtl"] header.nav .language-separator{
    display:none !important;
  }
  html[lang="ar"][dir="rtl"] header.nav .nav-toggle,
  [dir="rtl"] header.nav .nav-toggle{
    display:flex !important;
    order:2 !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
  html[lang="ar"][dir="rtl"] header.nav .logo,
  [dir="rtl"] header.nav .logo{
    order:99 !important;
    margin-left:auto !important;
    margin-right:0 !important;
    transform:none !important;
  }
}

@media (max-width:640px){
  html[lang="ar"][dir="rtl"] header.nav .language-separator,
  [dir="rtl"] header.nav .language-separator{
    display:none !important;
  }
}

.cart-icon-btn svg,.acct-icon-btn svg{width:25px;height:25px;stroke-width:1.2;}

/* Newsletter messages (success / error) — shown by /assets/js/newsletter-form.js */
.newsletter-msg{
  display:none;
  max-width:640px;
  margin:18px auto 0;
  text-align:center;
  font-family:"DM Sans",sans-serif;
  font-weight:400;
  letter-spacing:0;
  line-height:1.5;
}
.newsletter-msg.show{display:block;}
/* Mention sous le formulaire : fréquence + désinscription */
.newsletter-legal{
  font-size:.8rem !important;
  line-height:1.5;
  color:rgba(255,255,255,.75);
  margin:14px auto 0 !important;
  max-width:640px;
}
.newsletter-success{color:rgba(255,255,255,.95);}
.newsletter-error{color:rgba(255,255,255,.9);}
