/* =========================================================
   ABTAL — barre du haut, en-tête, menus et pied de page
   Shared by the new design and the cloned pages: every rule is scoped to .ds-chrome
   (wrappers with display: contents), so it outranks the WordPress theme styles of the
   cloned pages without touching their content.
   ========================================================= */

:root {
  --red: #e2000f;
  --red-dk: #c00812;
  --red-soft: #fde8ea;
  --ink: #1e1f2a;
  --ink-2: #111111;
  --muted: #5a5a5a;
  --line: #e6e6e6;
  --bg-soft: #fafafa;
  --gold-label: #ffdca2;
  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-text: "Red Hat Text", system-ui, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --wrap: 1160px;
}
/* Arabic and Tifinagh letters come from Cairo / Noto Sans Tifinagh, Latin ones stay in Red Hat */
html[lang="ar"] {
  --font-display: "Red Hat Display", "Cairo", system-ui, sans-serif;
  --font-text: "Red Hat Text", "Cairo", system-ui, sans-serif;
  --font-serif: "Cairo", "Red Hat Display", sans-serif;
}
html[lang="zgh"] {
  --font-display: "Red Hat Display", "Noto Sans Tifinagh", system-ui, sans-serif;
  --font-text: "Red Hat Text", "Noto Sans Tifinagh", system-ui, sans-serif;
  --font-serif: "Playfair Display", "Noto Sans Tifinagh", Georgia, serif;
}

.ds-chrome { display: contents; font-family: var(--font-text); color: var(--ink); }
/* the base styles of the new design, inside the chrome only */
:where(.ds-chrome) *, :where(.ds-chrome) *::before, :where(.ds-chrome) *::after { box-sizing: border-box; }
.ds-chrome :is(img, video, iframe) { display: block; max-width: 100%; }
.ds-chrome a, .ds-chrome a:is(:hover, :focus, :visited) { color: inherit; text-decoration: none; }
.ds-chrome button, .ds-chrome button:is(:hover, :focus) { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; cursor: pointer; text-transform: none; box-shadow: none; }
.ds-chrome :is(h1, h2, h3, h4, p) { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }
.ds-chrome :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
.ds-chrome li { margin: 0; }
.ds-chrome input { margin: 0; box-shadow: none; }
.ds-chrome :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- Bandeau défilant ---------- */
.ds-chrome .topbar { background: var(--red-dk); color: #fff; overflow: hidden; height: 44px; display: flex; align-items: center; }
.ds-chrome .tb-track { display: flex; align-items: center; gap: 24px; width: max-content; padding-left: 24px; animation: ticker 32s linear infinite; }
.ds-chrome .topbar:hover .tb-track { animation-play-state: paused; }
.ds-chrome .tb-item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font: 500 12px/1.2 var(--font-text); letter-spacing: .01em; }
.ds-chrome .tb-item svg { opacity: .9; flex: none; }
.ds-chrome a.tb-item:hover { text-decoration: underline; text-underline-offset: 3px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (min-width: 1280px) { .ds-chrome .tb-track { gap: 48px; } }
@media (prefers-reduced-motion: reduce) { .ds-chrome .tb-track { animation: none; } .ds-chrome .topbar { overflow-x: auto; } }

/* ---------- En-tête ---------- */
.ds-chrome .header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.ds-chrome .hd-row { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 8px 6px; }
.ds-chrome .hd-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; color: var(--ink); transition: background-color .2s; }
.ds-chrome .hd-icon:hover { background: #f2f2f2; }
.ds-chrome .hd-logo img { height: 44px; width: auto; }
.ds-chrome .hd-nav, .ds-chrome .hd-desktop-only, .ds-chrome .hd-divider { display: none; }
.ds-chrome .hd-actions { display: flex; align-items: center; }
@media (min-width: 810px) {
  .ds-chrome .hd-row { height: 72px; padding: 8px 16px; }
  .ds-chrome .hd-logo img { height: 52px; }
}
@media (min-width: 1280px) {
  .ds-chrome .hd-row { height: 100px; padding: 0 32px; }
  .ds-chrome .hd-menu { display: none; }
  .ds-chrome .hd-logo img { height: 60px; }
  .ds-chrome .hd-nav { display: flex; align-items: center; gap: 28px; }
  .ds-chrome .hd-link { display: inline-flex; align-items: center; gap: 6px; font: 500 17px/1 var(--font-display); color: var(--ink); transition: opacity .2s; }
  .ds-chrome .hd-link:hover { opacity: .6; }
  .ds-chrome .hd-actions { gap: 22px; }
  .ds-chrome .hd-divider { display: block; width: 1px; height: 32px; background: #bdbdbd; }
  .ds-chrome .hd-desktop-only { display: grid; }
  .ds-chrome .hd-lang { display: inline-flex; align-items: center; gap: 6px; font: 500 17px/1 var(--font-display); }
}
/* Tiroir mobile */
.ds-chrome .drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.ds-chrome .drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.ds-chrome .drawer-panel { position: absolute; top: 0; left: 0; bottom: 0; width: min(320px, 85vw); background: #fff; padding: 16px 20px; transform: translateX(-100%); transition: transform .3s ease; display: flex; flex-direction: column; gap: 24px; }
.ds-chrome .drawer.is-open { pointer-events: auto; }
.ds-chrome .drawer.is-open .drawer-backdrop { opacity: 1; }
.ds-chrome .drawer.is-open .drawer-panel { transform: none; }
.ds-chrome .drawer-top { display: flex; align-items: center; justify-content: space-between; }
.ds-chrome .drawer-top img { height: 42px; width: auto; }
.ds-chrome .drawer-nav { display: flex; flex-direction: column; }
.ds-chrome .drawer-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); font: 600 18px/1.2 var(--font-display); }

/* ---------- Pied de page ---------- */
.ds-chrome .footer { background: var(--bg-soft); border-top: 1px solid #ededed; padding: 44px 24px 28px; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.ds-chrome .ft-cols { width: 100%; display: flex; flex-direction: column; gap: 40px; }
.ds-chrome .ft-brand { display: flex; flex-direction: column; gap: 18px; }
.ds-chrome .ft-brand img { width: 282px; height: auto; }
.ds-chrome .ft-brand p { max-width: 360px; font: 400 17px/1.5 var(--font-text); color: #2b2b2b; }
.ds-chrome .ft-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.ds-chrome .badge { padding: 8px 16px; border-radius: 999px; font: 500 15px/1 var(--font-display); }
.ds-chrome .badge.red { color: var(--red); background: var(--red-soft); border: 1px solid #f7c6cb; }
.ds-chrome .badge.gold { color: #e0a100; background: #fff4d6; border: 1px solid #fbe3a6; }
.ds-chrome .ft-heading { display: inline-flex; flex-direction: column; gap: 8px; margin-bottom: 18px; font: 700 26px/1.1 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.ds-chrome .ft-heading span { width: 64px; height: 3px; background: var(--red); }
.ds-chrome .ft-nav ul { display: flex; flex-direction: column; gap: 12px; }
.ds-chrome .ft-nav a { font: 400 17px/1.4 var(--font-text); color: #555; transition: opacity .2s; }
.ds-chrome .ft-nav a:hover { opacity: .6; }
.ds-chrome .ft-contact li { display: flex; align-items: flex-start; gap: 18px; padding: 14px 0; color: var(--red); }
.ds-chrome .ft-contact li + li { border-top: 1px solid var(--line); }
.ds-chrome .ft-contact div { display: flex; flex-direction: column; gap: 2px; color: #333; font: 400 16px/1.45 var(--font-text); }
.ds-chrome .ft-contact strong { font: 700 18px/1.4 var(--font-display); color: #16213a; }
.ds-chrome .ft-social-title { font: 700 20px/1.4 var(--font-display); color: #16213a; margin-bottom: 16px; }
.ds-chrome .ft-social-row { display: flex; gap: 14px; }
.ds-chrome .ft-social-row a { width: 48px; height: 48px; display: grid; place-items: center; background: #fff; border: 1px solid #e3e3e3; border-radius: 10px; color: #555; transition: background-color .2s; }
.ds-chrome .ft-social-row a:hover { background: #f2f2f2; }
.ds-chrome .ft-bottom { width: 100%; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; font: 400 15px/1.5 var(--font-text); color: #333; }
.ds-chrome .ft-copy { display: flex; flex-direction: column; align-items: center; }
.ds-chrome .ft-copy a { color: var(--red); font: 700 15px/1.5 var(--font-display); }
.ds-chrome .ft-legal { display: flex; align-items: center; gap: 14px; }
.ds-chrome .ft-legal span { width: 1px; height: 18px; background: #bdbdbd; }
@media (min-width: 810px) {
  .ds-chrome .footer { padding: 56px 32px 28px; }
  .ds-chrome .ft-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 44px 32px; }
}
@media (min-width: 1280px) {
  .ds-chrome .footer { padding: 64px 40px 32px; }
  .ds-chrome .ft-cols { display: flex; flex-direction: row; justify-content: space-between; max-width: var(--wrap); }
  .ds-chrome .ft-brand { width: 340px; }
  .ds-chrome .ft-contact { width: 380px; }
  .ds-chrome .ft-bottom { max-width: var(--wrap); flex-direction: row; justify-content: space-between; }
  .ds-chrome .ft-copy { flex-direction: row; gap: 6px; }
}

/* ---------- Menus de l'en-tête ---------- */
.ds-chrome .hd-link.is-active { color: var(--red); }
.ds-chrome .hd-item { position: relative; }
.ds-chrome .hd-menu-panel { display: none; }
@media (min-width: 1280px) {
  .ds-chrome .hd-item.has-menu:hover .hd-menu-panel, .ds-chrome .hd-item.has-menu:focus-within .hd-menu-panel {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: -16px; min-width: 240px; padding: 10px; margin-top: 0;
    background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.12); z-index: 60;
  }
  .ds-chrome .hd-item.has-menu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
  .ds-chrome .hd-menu-panel a { padding: 10px 12px; border-radius: 10px; font: 500 15px/1.25 var(--font-display); color: var(--ink); white-space: nowrap; }
  .ds-chrome .hd-menu-panel a:hover, .ds-chrome .hd-menu-panel a.is-active { background: var(--red-soft); color: var(--red-dk); }
}
.ds-chrome .hd-lang-box { position: relative; }
.ds-chrome .hd-lang-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 160px; display: flex; flex-direction: column; padding: 8px; background: #fff; border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.12); z-index: 60; }
.ds-chrome .hd-lang-menu a { padding: 10px 12px; border-radius: 10px; font: 500 15px/1.2 var(--font-display); }
.ds-chrome .hd-lang-menu a:hover, .ds-chrome .hd-lang-menu a[aria-current] { background: var(--red-soft); color: var(--red-dk); }
.ds-chrome .hd-search { display: flex; align-items: center; gap: 10px; padding: 10px 16px 14px; border-top: 1px solid var(--line); max-width: var(--wrap); margin: 0 auto; }
.ds-chrome .hd-search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font: 400 16px var(--font-text); color: var(--ink); }
.ds-chrome .hd-search input:focus { outline: none; border-color: var(--red); }
.ds-chrome .hd-search-btn { height: 44px; padding: 0 18px; border-radius: 999px; background: var(--red); color: #fff; font: 700 15px var(--font-display); }
.ds-chrome .drawer-panel { overflow-y: auto; }
.ds-chrome .drawer-item { border-bottom: 1px solid var(--line); }
.ds-chrome .drawer-row { display: flex; align-items: center; justify-content: space-between; }
.ds-chrome .drawer-nav .drawer-row a { border-bottom: 0; flex: 1; }
.ds-chrome .drawer-nav a.is-active { color: var(--red); }
.ds-chrome .drawer-toggle { width: 44px; height: 44px; display: grid; place-items: center; }
.ds-chrome .drawer-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ds-chrome .drawer-sub { display: flex; flex-direction: column; padding: 0 0 10px 12px; }
.ds-chrome .drawer-nav .drawer-sub a { padding: 10px 4px; border: 0; font: 500 16px/1.25 var(--font-text); color: var(--muted); }
.ds-chrome .drawer-langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ds-chrome .drawer-langs a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font: 500 14px var(--font-display); }
.ds-chrome .drawer-langs a.is-active { border-color: var(--red); color: var(--red); }

[dir="rtl"] .ds-chrome .topbar { direction: ltr; }
[dir="rtl"] .ds-chrome .tb-item { direction: rtl; }
[dir="rtl"] .ds-chrome .drawer-panel { left: auto; right: 0; transform: translateX(100%); }
[dir="rtl"] .ds-chrome .drawer.is-open .drawer-panel { transform: none; }
[dir="rtl"] .ds-chrome .hd-lang-menu { right: auto; left: 0; }
@media (min-width: 1280px) {
  [dir="rtl"] .ds-chrome .hd-item.has-menu:hover .hd-menu-panel, [dir="rtl"] .ds-chrome .hd-item.has-menu:focus-within .hd-menu-panel { left: auto; right: -16px; }
}
