/* RNP · base, header, footer and the homepage design switch, in the original www.rnp.ma palette.
   The homepage designs (E, B, C) live in home-*.css; inner pages in pages.css. */
@font-face {
  font-family: "Roboto";
  src: url("../assets/fonts/roboto.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Almarai";
  src: url("../assets/fonts/almarai-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Almarai";
  src: url("../assets/fonts/almarai-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  /* The portal's green (#008344) taken a little darker, its gold, red and greys. */
  --green: #00753d;
  --green-hover: #006635;
  --deep-green: #006b37;
  --green-band: linear-gradient(180deg, #006b37 0%, #005c2f 100%);
  --gold: #e7ac46;
  --gold-soft: #fbf0dc;
  --gold-line: #ead6ad;
  --red: #c1272d;
  --ink: #191919;
  --text: #3c3c3c;
  --muted: #5f5f5f;
  --line: #e1e1e1;
  --surface: #fff;
  --paper: #fff;
  --grey-bg: #f7f7f7;
  --head-bg: #fdf7ed;               /* rgba(231, 172, 70, .1) on white: the portal's hero tint */
  --mint: #fdf7ed;                  /* legacy name kept for pages.css: now the gold tint */
  --accent-light: #e7ac46;          /* highlight on green surfaces */
  --hairline: #e1e1e1;
  --card-shadow: 0 18px 46px rgba(0, 0, 0, .06);
  --section-shadow: 0 20px 52px rgba(0, 0, 0, .08);
  --tint-green: brightness(0) saturate(100%) invert(27%) sepia(96%) saturate(1180%) hue-rotate(135deg) brightness(88%) contrast(101%);
  --font: "Roboto", Arial, sans-serif;
  --font-ar: "Almarai", Arial, sans-serif;
  --container: 1240px;
  --gutter: clamp(20px, 4.2vw, 64px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  scrollbar-color: var(--deep-green) #f2f2f2;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; scroll-padding-block-start: 24px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-width: 0; font-family: var(--font); -webkit-font-smoothing: antialiased; }
html[lang="ar"], html[lang="ar"] body { font-family: var(--font-ar); }
::selection { color: #fff; background: var(--green); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button, input, select, textarea { color: inherit; font: inherit; caret-color: var(--green); }
button, a, summary { -webkit-tap-highlight-color: rgba(0, 117, 61, .1); }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; opacity: .6; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
[hidden], .is-hidden { display: none !important; }
.sr-only, .section-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; inset-block-start: 12px; inset-inline-start: 12px; z-index: 100; padding: 12px 20px; color: #fff; background: var(--deep-green); border-radius: 10px; transform: translateY(-180%); text-decoration: none; font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.container { width: min(calc(100% - var(--gutter) * 2), var(--container)); margin-inline: auto; }
.link-icon { flex: 0 0 auto; width: 18px; height: 18px; }
.text-accent { color: var(--green); }
.text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--green-hover); font-size: 15px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link .link-icon { transition: transform .2s var(--ease); }
.text-link:hover .link-icon { transform: translateX(3px); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 52px; padding: 13px 24px; border: 1px solid transparent; border-radius: 999px; font-size: 15px; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; transition: background .2s, box-shadow .2s, transform .2s var(--ease); }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 10px 22px rgba(0, 107, 55, .2); }
.button-primary:hover { color: #fff; background: var(--green-hover); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0, 107, 55, .26); }
.button-secondary { color: var(--deep-green); border: 1.5px solid var(--green); background: #fff; }
.button-secondary:hover { background: var(--head-bg); border-color: var(--green); transform: translateY(-2px); }
.button-light { color: var(--deep-green); background: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .12); }
.button-light:hover { color: var(--deep-green); background: var(--head-bg); transform: translateY(-2px); }
.button-primary .link-icon { filter: brightness(0) invert(1); }

/* Header: logo, menu with dropdowns, tracking action, search and language */
.site-header { position: relative; z-index: 20; background: #fff; border-block-end: 1px solid var(--line); }
.header-inner { width: min(calc(100% - 6vw), 1380px); min-height: 96px; display: flex; align-items: center; gap: 26px; margin-inline: auto; }
.brand-link { display: inline-flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
.brand-logo { width: 250px; height: auto; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 1.45vw, 24px); margin-inline-start: auto; }
.nav-link { position: relative; padding-block: 14px; color: var(--text); font-size: 14.5px; font-weight: 600; line-height: 1.2; letter-spacing: .1px; text-decoration: none; white-space: nowrap; }
.nav-link::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 6px; height: 2px; border-radius: 3px; background: var(--green); transform: scaleX(0); transform-origin: center; transition: transform .2s var(--ease); }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--green); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.header-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 20px; border-radius: 999px; color: #fff; background: var(--green); box-shadow: 0 10px 22px rgba(0, 107, 55, .2); font-size: 14px; font-weight: 700; line-height: 1.25; text-decoration: none; white-space: nowrap; transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.header-cta:hover { background: var(--green-hover); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(0, 107, 55, .26); }
.search-link { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--green); background: #fff; transition: border-color .2s, background .2s; }
.search-link:hover { border-color: var(--gold-line); background: var(--gold-soft); }
.search-link .link-icon { width: 18px; height: 18px; }
.language-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 58px; min-height: 44px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: #fff; font-size: 14px; font-weight: 700; line-height: 1.1; text-decoration: none; transition: border-color .18s ease, background .18s ease; }
.language-link::after { content: ""; border-inline: 4px solid transparent; border-block-start: 5px solid var(--gold); }
.language-link[lang="ar"] { font-family: var(--font-ar); }
.language-link[lang="fr"] { font-family: var(--font); }
.language-link:hover { border-color: var(--gold-line); background: var(--gold-soft); }
.menu-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--deep-green); background: #fff; font-size: 13px; font-weight: 700; }

/* Footer: logo, three columns with red rules, full-width grey copyright bar */
.site-footer { padding-block: 56px 0; background: #fff; border-block-start: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.25fr 1fr; align-items: start; gap: 48px; padding-block: 0 44px; }
.footer-brand .brand-logo { width: 240px; margin-inline-start: -12px; }
.footer-brand > p { max-width: 260px; margin-block-start: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.footer-column h3 { margin-block-end: 14px; color: var(--text); font-size: 17px; font-weight: 700; line-height: 1.4; }
.footer-column h3::after { content: ""; display: block; width: 32px; height: 3px; margin-block-start: 10px; border-radius: 2px; background: var(--red); }
.footer-column ul { display: grid; gap: 10px; padding: 0; list-style: none; }
.footer-link { color: var(--muted); font-size: 15px; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
.footer-link:hover { color: var(--green); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 28px; padding-block: 20px 24px; color: var(--muted); background: #f5f5f5; box-shadow: 0 0 0 100vmax #f5f5f5; clip-path: inset(0 -100vmax); }
.footer-bottom p { font-size: 14px; }
.footer-bottom .text-link { color: var(--green); font-size: 14px; }
.footer-bottom .link-icon { width: 15px; height: 15px; transform: rotate(-90deg); }
.footer-bottom .text-link:hover .link-icon { transform: rotate(-90deg) translateY(-2px); }

/* Homepage designs: one panel is shown, chosen by html[data-design] (set by design.js before paint) */
[data-design-panel] { display: none; }
html:not([data-design]) [data-design-panel="e"],
html[data-design="e"] [data-design-panel="e"],
html[data-design="b"] [data-design-panel="b"],
html[data-design="c"] [data-design-panel="c"] { display: block; }

/* The design switch: a small A · B · C toggle at the bottom centre of every page */
.design-switch { position: fixed; z-index: 60; inset-inline-start: 50%; inset-block-end: 16px; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(25, 25, 25, .88); box-shadow: 0 10px 26px rgba(0, 0, 0, .25); transform: translateX(-50%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html[dir="rtl"] .design-switch { transform: translateX(50%); }
.design-switch a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 800; line-height: 1; text-decoration: none; transition: background .2s, color .2s; }
.design-switch a:hover { background: rgba(255, 255, 255, .14); }
.design-switch a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html:not([data-design]) .design-switch a[data-design-choice="e"],
html[data-design="e"] .design-switch a[data-design-choice="e"],
html[data-design="b"] .design-switch a[data-design-choice="b"],
html[data-design="c"] .design-switch a[data-design-choice="c"] { color: var(--ink); background: var(--gold); }
body { padding-block-end: 0; }
.footer-bottom { padding-block-end: 64px; }   /* room for the switch above the copyright line */

@media (min-width: 1021px) and (max-width: 1360px) {
  .header-cta { display: none; }
  .header-inner { gap: 20px; }
  .main-nav { gap: 20px; }
}
@media (max-width: 1200px) {
  .brand-logo { width: 235px; }
  .header-inner { min-height: 96px; gap: 18px; }
  .main-nav { gap: 15px; }
  .nav-link { font-size: 13px; }
  .footer-grid { gap: 28px; }
}
@media (max-width: 1020px) {
  .header-inner { flex-wrap: wrap; justify-content: space-between; padding-block: 8px; }
  .header-actions { margin-inline-start: auto; }
  .header-cta { display: none; }
  .main-nav { order: 3; width: 100%; flex-basis: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 8px 28px; margin-inline: 0; padding-block: 12px; border-block-start: 1px solid var(--line); }
  .js .main-nav { display: none; }
  .js.nav-open .main-nav { display: flex; }
  .js .menu-toggle { display: inline-flex; }
  .nav-link { font-size: 15px; padding-block: 10px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
  .footer-brand { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
  .footer-brand > p { margin-block-start: 0; }
}
@media (max-width: 680px) {
  :root { --gutter: 21px; }
  .header-inner { width: calc(100% - 28px); min-height: 86px; gap: 8px; }
  .brand-logo { width: 184px; }   /* logo, search, language and menu on one row at 390px */
  .header-actions { gap: 7px; }
  .search-link { width: 40px; height: 40px; }
  .language-link { min-width: 44px; min-height: 40px; padding: 8px 10px; font-size: 12px; }
  .language-link::after { display: none; }
  .menu-toggle { width: 40px; min-height: 40px; padding: 9px; justify-content: center; }
  .menu-toggle .menu-label { display: none; }
  .main-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; padding: 12px 8px; }
  .js.nav-open .main-nav { display: grid; }
  .nav-link { padding-block: 13px; font-size: 14px; white-space: normal; }
  .site-footer { padding-block-start: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 25px 22px; padding-block: 15px 30px; }
  .footer-brand { display: block; }
  .footer-brand .brand-logo { width: 230px; margin-inline-start: -12px; }
  .footer-column h3 { margin-block-end: 10px; font-size: 16px; }
  .footer-link { display: inline-flex; align-items: center; min-height: 40px; font-size: 14.5px; }
  .footer-column ul { gap: 2px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer-bottom p { font-size: 12.5px; }
}
@media (max-width: 370px) {
  :root { --gutter: 17px; }
  .header-inner { width: calc(100% - 22px); gap: 5px; }
  .brand-logo { width: 180px; }
  .header-actions { gap: 5px; }
  .search-link { display: none; }
  .language-link { min-width: 42px; padding-inline: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .button, .header-cta, .search-link, .design-switch { border: 1px solid ButtonText; }
}
@media print {
  :root { color: #000; background: #fff; }
  .site-header, .footer-bottom, .design-switch { display: none !important; }
  .container { width: 100%; }
}
