/* ===== Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Roboto:wght@300;400;500;600;700;900&display=swap');

:root {
  --green-50:  #e6f7d7;
  --green-100: #cfe2dd;
  --green-200: #a8db7b;
  --green-300: #4c956c;
  --green-400: #487a1f;
  --green-500: #3b6d11;
  --green-600: #0f6e56;
  --green-700: #006a4e;
  --green-900: #081c15;

  --red-500:   #c0392b;
  --red-600:   #e62e25;
  --orange:    #d85a30;
  --yellow:    #eac102;
  --gold:      #e9ad3b;
  --blue:      #0071bc;
  --blue-soft: #a2d2e5;

  --ink:       #262626;
  --ink-soft:  #595959;
  --muted:     #6c6e7b;
  --line:      #e9e8e7;
  --bg:        #ffffff;
  --green-brand: #3b6d11;
  --mint-bg:    #f3faf6;
}

/* Content container — pixel-perfect inline block */
.content { width: 1156px; margin: 0 auto; }

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Almarai', 'Roboto', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.45;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Design canvas — pixel-perfect at 1440px */
.canvas { width: 1440px; margin: 0 auto; }

/* ===== Utility text styles ===== */
.font-almarai { font-family: 'Almarai', sans-serif; }
.font-roboto  { font-family: 'Roboto', sans-serif; }

/* ===== Main nav ===== */
.mainnav {
  height: 96px;
  background: transparent;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 80px;
  gap: 36px;
}
.mainnav .logo-block {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 70px;
  flex-shrink: 0;
}
.mainnav .logo-block .crest { height: 70px; width: auto; }
.mainnav .logo-block .divider {
  width: 1px;
  height: 48.24px;
  background: #c9cdc7;
  flex-shrink: 0;
}
.mainnav .logo-block .title-stack { display: flex; flex-direction: column; gap: 2px; }
.mainnav .logo-block .title-ar,
.mainnav .logo-block .title-fr { white-space: nowrap; font-family: 'Almarai', sans-serif; color: var(--ink); line-height: 1.2; }
.mainnav .logo-block .title-ar { direction: rtl; font-size: 14px; font-weight: 700; }
.mainnav .logo-block .title-fr { font-size: 14px; font-weight: 700; letter-spacing: 0.1px; }
.mainnav .nav-links { display: flex; align-items: center; gap: 42px; flex: 1; justify-content: center; }
.mainnav .nav-links a { font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 6px; font-weight: 500; }
.mainnav .nav-links a .chev { width: 10px; height: 6px; }
.mainnav .nav-right { display: flex; align-items: center; gap: 22px; }
.mainnav .lang { display: flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; font-family: 'Almarai', sans-serif; background: transparent; border: none; }
.mainnav .lang .caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--red-500); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 15px; transition: all 0.15s ease; border: none; white-space: nowrap; }
.btn-primary { background: var(--green-brand); color: #fff; }
.btn-primary:hover { background: var(--green-500); }
.btn-outline-red { background: transparent; color: var(--red-500); border: 1.5px solid var(--red-500); }
.btn-outline-red:hover { background: rgba(192,57,43,0.08); }
.btn-outline { background: #fff; color: var(--green-brand); border: 1.5px solid var(--green-brand); }
.btn-outline:hover { background: var(--green-50); }
.btn-on-green-solid { background: #fff; color: var(--green-brand); }
.btn-on-green-ghost { background: transparent; color: #fff; border: 1.5px solid #fff; }
.btn-on-green-ghost:hover { background: rgba(255,255,255,0.1); }

/* ===== Hero ===== */
.hero {
  padding: 16px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
.hero h1 {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 36px;
  line-height: 46px;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 auto;
  text-align: center;
  text-transform: uppercase;
  width: 346px;
  height: 92px;
}
.hero h1 .accent { color: var(--green-brand); display: block; }
.hero .lede {
  width: 525px;
  height: auto;
  margin: 14px auto 0;
  text-align: center;
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 140%;
  letter-spacing: 0;
  color: var(--ink);
}
.hero .cta-row { display: flex; gap: 13px; justify-content: center; margin-top: 16px; }
.hero .cta-row .btn { padding: 11px 21px; font-size: 13.5px; }

.hero-media {
  position: relative;
  margin-top: 16px;
  width: 1700px;
  margin-left: calc(50% - 850px);
  height: 360px;
  overflow: hidden;
}
/* Full-bleed decorative motif — widened to bleed further left & right */
.hero-media .motif-bg {
  position: absolute;
  left: 0;
  top: 12px;
  width: 1700px;
  height: 245px;
  background: url('../assets/bh_video_motif.jpg') center/cover no-repeat;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(to top, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 100%);
}
/* SLOT-based hero frames — clickable carousel */
.hero-media .frame {
  position: absolute;
  border-radius: 34px;
  overflow: hidden;
  background: #d7dddaff center/cover no-repeat;
  z-index: 1;
  transition:
    width  0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    height 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    left   0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    top    0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hero-media .frame[data-slot="center"]     { width: 600px; height: 337px; left: 550px;  top: 12px; z-index: 2; cursor: default; }
.hero-media .frame[data-slot="right-peek"] { width: 495px; height: 277px; left: 1310px; top: 42px; z-index: 1; cursor: pointer; }
.hero-media .frame[data-slot="left-peek"]  { width: 495px; height: 277px; left: -105px; top: 42px; z-index: 1; cursor: pointer; }
.hero-media .frame .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}
.hero-media .frame .play-button { display: none; }
.hero-media .frame[data-slot="center"] .play-button { display: flex; }
.hero-media .frame[data-slot="center"].playing .play-button { opacity: 0; pointer-events: none; }
/* (Right peek now uses the slot-based system above; legacy rule removed) */

.play-button {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  cursor: pointer;
  border: none;
}
.play-button:hover { background: #fff; transform: translate(-50%, -50%) scale(1.05); }
.play-button svg { width: 22px; height: 22px; color: var(--green-600); margin-left: 3px; }

/* (custom zellige patterns removed — using asset JPGs only) */

/* ===== Section spacing ===== */
section { padding: 80px 0; }
section > .content { width: 1156px; margin: 0 auto; padding: 0; }
.section-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.5px;
  color: var(--ink);
  margin: 0 0 8px;
  text-transform: uppercase;
}
.section-sub {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 700px;
}

/* ===== Annonces ===== */
.announcements {
  position: relative;
  background: var(--green-brand);
  color: #fff;
  border-radius: 52px;
  width: 1156px;
  height: 606.87px;
  margin: 0 auto;
  padding: 48px 109.5px 64px 117.5px;   /* aligns ANNONCES with first card */
  overflow: hidden;
}
/* Light/white texture on the green panel — invert the dark JPG and blend */
.announcements .annonces-motif {
  position: absolute;
  left: 0;
  top: 163px;
  width: 1156px;
  height: 360px;
  background: url('../assets/bh_annoces_motif.jpg') center/cover no-repeat;
  filter: invert(1) brightness(1.4) contrast(1.1);
  mix-blend-mode: screen;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
.announcements .head, .announcements .announcement-grid { position: relative; z-index: 1; }
.announcements .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.announcements .head h2 { font-family: 'Almarai', sans-serif; font-weight: 700; font-size: 28px; text-transform: uppercase; letter-spacing: 1.5px; margin: 0; }
.announcements .head .btn-on-green-ghost { padding: 10px 22px; font-size: 14px; font-weight: 700; }
.announcement-grid { display: grid; grid-template-columns: repeat(3, 291px); gap: 32px; }
.announcement-card {
  position: relative;
  background: #ffffff;
  color: var(--ink);
  border-radius: 12px;
  width: 291px;
  height: 388px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}
/* small motif fade bottom-right of each card */
.announcement-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 160px;
  height: 160px;
  background: url('../assets/bh_annoces_motif.jpg') right bottom/cover no-repeat;
  opacity: 0.18;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 100% 100%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
          mask-image: radial-gradient(circle at 100% 100%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
}
.announcement-card > * { position: relative; z-index: 1; }
.announcement-card .tag { display: inline-flex; align-items: center; padding: 6px 16px; border-radius: 999px; font-weight: 600; font-size: 13px; width: fit-content; }
.tag-important { background: #fbeae6; color: var(--red-500); }
.tag-program   { background: #ece9f7; color: #534ab7; }
.tag-important-2 { background: #e1efe4; color: var(--green-brand); }
.announcement-card h3 { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.25; color: var(--ink); }
.announcement-card p  { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.55; flex: 1; }
.announcement-card .link { color: var(--ink); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.announcement-card .link svg { color: var(--red-500); }       /* arrow color = tag color */
.announcement-card.link-purple .link svg { color: #534ab7; }
.announcement-card.link-green  .link svg { color: var(--green-brand); }

/* ===== Services ===== */
.services-section { position: relative; }
.services-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; position: relative; z-index: 1; }
.services-head .controls { display: flex; gap: 10px; }
.services-head .ctrl-btn {
  width: 52.43px;
  height: 52.43px;
  border-radius: 120px;
  background: #fff;
  border: 1px solid #c9cdc7;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.services-head .ctrl-btn svg { width: 12px; height: 12px; display: block; }
.services-head .ctrl-btn:hover { background: var(--green-50); border-color: var(--green-brand); color: var(--green-brand); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; z-index: 1; }
.service-card { border: 1px solid var(--line); border-radius: 18px; padding: 50px 24px 26px; display: flex; flex-direction: column; gap: 12px; transition: all 0.2s; background: #fff; position: relative; }
.service-card:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.06); }
.service-card .icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  position: absolute;
  top: -32px;
  left: 24px;
  background-color: transparent;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.icon-inscription { background-image: url("../assets/fi_Inscription.jpg"); }
.icon-maj         { background-image: url("../assets/fi_Mise%20%C3%A0%20jour.jpg"); }
.icon-revision    { background-image: url("../assets/fi_R%C3%A9vision%20de%20l%27Indice.jpg"); }
.icon-radiation   { background-image: url("../assets/fi_Radiation.jpg"); }
.icon-green  { background: #e8f3ec; color: var(--green-brand); }
.icon-yellow { background: rgba(233,173,59,0.18); color: var(--gold); }
.icon-blue   { background: rgba(0,113,188,0.12); color: var(--blue); }
.icon-red    { background: rgba(192,57,43,0.12); color: var(--red-500); }
.icon-yellow { background: rgba(233,173,59,0.18); color: var(--gold); }
.icon-blue   { background: rgba(0,113,188,0.12); color: var(--blue); }
.icon-red    { background: rgba(192,57,43,0.12); color: var(--red-500); }
.service-card h3 { margin: 0 0 10px; font-size: 20px; font-weight: 800; }
.service-card .lead { margin: 0; font-size: 14px; color: var(--ink); line-height: 1.5; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.service-card .detail { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; flex: 1; }

/* ===== Stats ===== */
.stats {
  position: relative;
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--mint-bg);
  border-radius: 40px;
  padding: 56px 24px;
  overflow: visible;
  align-items: center;
}
.stats .corner {
  position: absolute;
  width: 112px;
  height: 112px;
  background: url('../assets/services_motif.svg') center/contain no-repeat;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}
.stats .corner.tl { left: -28px; top: -28px; }
.stats .corner.br { right: -28px; bottom: -28px; transform: rotate(180deg); }
.stat {
  padding: 0 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 120px;
  background: #c5d6cc;
}
.stat .num {
  font-family: 'Roboto', sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--green-brand);
  line-height: 100%;
  letter-spacing: 0;
  text-transform: uppercase;
}
.stat .lbl { margin-top: 18px; color: var(--ink); font-size: 14px; line-height: 1.4; }

/* ===== Indicator explainer ===== */
.explainer-wrap {
  background: #f3f3f3;
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}
.explainer-wrap::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 520px;
  height: 420px;
  background: url('../assets/bh_annoces_motif.jpg') right bottom/cover no-repeat;
  opacity: 0.22;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 100% 100%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 75%);
          mask-image: radial-gradient(circle at 100% 100%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 75%);
  z-index: 0;
}
.explainer-wrap > section { padding: 0; position: relative; z-index: 1; }
.explainer-wrap .content { width: 1159px; }

.explainer-head { margin-bottom: 56px; }
.explainer-head h2 {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 43px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #081c15;
  margin: 0 0 43px;
}
.explainer-head p {
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  max-width: 1020px;
}

.explainer-cols {
  display: grid;
  grid-template-columns: 524px 1fr;
  column-gap: 24px;
  align-items: start;
}
.explainer-col-title {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #000;
  margin: 0 0 32px;
}

/* LEFT — vertical timeline of 3 steps */
.steps {
  position: relative;
  padding-left: 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 363px;
}
/* Bullet: 43px solid green with white number */
.step .bullet {
  position: absolute;
  left: -69px;
  top: -4px;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: #3b6d11;
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 140%;
  text-align: center;
  z-index: 1;
}
/* Connector between consecutive bullets — no line after the last bullet */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: -48px;
  top: 45px;
  bottom: -34px;
  width: 2px;
  background: #534ab7;
  z-index: 0;
}
.step h3 {
  margin: 0;
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #000;
  line-height: 1.2;
}
.step p {
  margin: 0;
  font-family: 'Almarai', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

/* RIGHT — variables grid (4 cols × 2 rows) */
.variables-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.variable {
  background: #fff;
  border: 1px solid #d7dddaff;
  border-radius: 12px;
  height: 162px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  text-align: center;
}
.variable .v-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.variable .v-icon img { width: 54px; height: 54px; object-fit: contain; }
.variable span {
  font-family: 'Almarai', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.35;
}

/* ===== Programmes sociaux ===== */
.programmes-section .content { width: 1158px; }
.programmes-head h2 {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 43px;
  text-transform: uppercase;
  color: #081c15;
  margin: 0 0 24px;
}
.programmes-head p {
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 56px;
  max-width: 652px;
}

/* 3-item dotted explainer */
.three-dots-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 0 0 56px;
  position: relative;
}
.dot-item { text-align: center; }
.dot-item .dot-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px dashed #3b6d11;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 28px;
  background: #fff;
  position: relative;
  z-index: 1;
}
.dot-item .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b6d11;
}
.dot-item h3 {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #000;
  margin: 0 0 12px;
}
.dot-item p {
  font-family: 'Almarai', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 auto;
  max-width: 263px;
}
/* Solid connector lines between dots */
.three-dots-row::before,
.three-dots-row::after {
  content: "";
  position: absolute;
  top: 17px;
  height: 1.5px;
  background: #3b6d11;
  z-index: 0;
}
.three-dots-row::before { left: calc(16.666% + 22px); width: calc(33.333% - 44px); }
.three-dots-row::after  { left: calc(50% + 22px);     width: calc(33.333% - 44px); }

.programmes-section .divider {
  height: 1px;
  background: var(--line);
  margin: 0 0 48px;
}

/* 4 program cards */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 278px);
  gap: 15px;
  justify-content: space-between;
  position: static;
}
.program-card {
  position: relative;
  background: #fff;
  border: 1px solid #d7dddaff;
  border-radius: 12px;
  padding: 32px;
  width: 278px;
  height: 380px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  text-align: left;
  z-index: 1;
}
.program-card .icon-circle {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.program-card .icon-circle img { width: 43px; height: 43px; object-fit: contain; }

.program-card .tag {
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-size: 14px;
  margin: 0;
}
.program-card h3 {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: #000;
  margin: 0;
  line-height: 1.15;
}
.program-card p {
  font-family: 'Almarai', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  flex: 1;
}
.program-card .link {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #000;
  display: inline-flex; align-items: center; gap: 10px;
}
.program-card .title-block { display: flex; flex-direction: column; gap: 12px; }
.program-card .gap-between { display: flex; flex-direction: column; gap: 20px; flex: 1; }

/* Per-card accent colors */
.program-card.color-red    .tag { color: var(--red-500); }
.program-card.color-red    .link svg { color: var(--red-500); }
.program-card.color-orange .tag { color: var(--orange); }
.program-card.color-orange .link svg { color: var(--orange); }
.program-card.color-purple .tag { color: #534ab7; }
.program-card.color-purple .link svg { color: #534ab7; }
.program-card.color-green  .tag { color: var(--green-600); }
.program-card.color-green  .link svg { color: var(--green-600); }

/* ===== Documents légaux ===== */
.docs-wrap {
  background: var(--green-brand);
  border-radius: 52px;
  width: 1156px;
  height: 549px;
  margin: 0 auto;
  padding: 70px 118px 70px 118px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.docs-wrap .docs-motif {
  position: absolute;
  left: 0;
  top: 189px;
  width: 1156px;
  height: 360px;
  background: url('../assets/bh_annoces_motif.jpg') center/cover no-repeat;
  border-bottom-left-radius: 52px;
  border-bottom-right-radius: 52px;
  filter: invert(1) brightness(1.4) contrast(1.1);
  mix-blend-mode: screen;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}
.docs-wrap .head,
.docs-wrap .docs-grid { position: relative; z-index: 1; }
.docs-wrap .head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 32px;
  margin-bottom: 47px;
}
.docs-wrap .head-text { max-width: 504px; }
.docs-wrap .head h2 {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 43px;
  text-transform: uppercase;
  color: #f6f5f0;
  margin: 0 0 16px;
}
.docs-wrap .head p {
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.4;
  color: #f6f5f0;
  margin: 0;
}
.docs-wrap .head .btn-on-green-ghost { padding: 12px 22px; font-size: 14px; font-weight: 700; white-space: nowrap; }

.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.doc-card {
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 24px;
  height: 262px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.doc-card .icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #f3faf6;
  color: var(--green-brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-card .body { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.doc-card h3 {
  margin: 0;
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #262626;
  line-height: 1.2;
}
.doc-card p {
  margin: 0;
  font-family: 'Almarai', sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: #262626;
  line-height: 1.5;
  flex: 1;
}
.doc-card .link {
  color: #000;
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.doc-card .link .arrow-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
}
.doc-card .link .arrow-go svg { color: #0f6e56; transform: rotate(-90deg); width: 13px; height: 15px; }
/* Re-usable arrow-go used in program & announcement cards too */
.arrow-go { display: inline-flex; align-items: center; justify-content: center; border-radius: 20px; }
.arrow-go svg { transform: rotate(-90deg); width: 13px; height: 15px; }

/* ===== FAQ ===== */
.faq-grid {
  display: grid;
  grid-template-columns: 416px 685px;
  gap: 56px;
  align-items: start;
}
.faq-grid .left h2 {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 43px;
  text-transform: uppercase;
  color: #081c15;
  margin: 0 0 24px;
}
.faq-grid .left p {
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.4;
  color: #262626;
  margin: 0;
}
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: #f3f3f3;
  border-radius: 40px;
  padding: 22px 28px;
  border: none;
}
.faq-item .q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: #262626;
  cursor: pointer;
  user-select: none;
}
.faq-item .q .ic-wrap {
  width: 24px;
  height: 24px;
  border-radius: 90px;
  background: #4c956c1a;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 5px 7px;
  box-sizing: border-box;
  transition: transform 0.25s ease;
}
.faq-item.open .q .ic-wrap { transform: rotate(180deg); }
.faq-item .q .ic-wrap svg { color: #4c956c; width: 12px; height: 8px; display: block; }
.faq-item .a {
  margin-top: 14px;
  font-family: 'Almarai', sans-serif;
  font-weight: 300;
  color: #262626;
  font-size: 14px;
  line-height: 1.55;
  display: none;
}
.faq-item.open .a { display: block; }

/* ===== Help banner (centered, full-width mint section) ===== */
.help-section {
  background: #F3FAF6;
  width: 100%;
  height: 325px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.help-banner {
  background: transparent;
  width: 634px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 43px;
}
.help-banner .text-block { display: flex; flex-direction: column; gap: 24px; align-items: center; }
.help-banner h3 {
  margin: 0;
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 43px;
  color: #081c15;
}
.help-banner p {
  margin: 0;
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-size: 20px;
  color: #262626;
}
.help-banner .btn-faq {
  background: #3b6d11;
  color: #fff;
  border-radius: 46px;
  padding: 16px 32px;
  width: 212px;
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-size: 18px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ===== Footer ===== */
footer { background: #fff; padding: 56px 0 0; border-top: none; }
.footer-inner { width: 1156px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 68px;
  align-items: start;
}
.footer-col .brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.footer-col .brand img { height: 64px; width: auto; }
.footer-col .brand .brand-divider {
  width: 1px;
  height: 48px;
  background: #c9cdc7;
  flex-shrink: 0;
}
.footer-col .brand .ttl {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
}
.footer-col h4 {
  font-family: 'Almarai', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 14px;
  color: #3b6d11;
  text-transform: none;
  letter-spacing: 0;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col li a {
  font-family: 'Almarai', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #000;
}
.footer-col li a:hover { color: var(--green-brand); }
.footer-bottom {
  border-top: 1px solid #b3b3b3;
  margin-top: 44px;
  padding: 22px 0;
  text-align: center;
  color: #3c3c43cc;
  font-family: 'Almarai', sans-serif;
  font-size: 14px;
}

/* ===== Decorative Moroccan pattern (subtle) ===== */
.zellige-bg {
  background-image:
    radial-gradient(circle at 50% 50%, rgba(15,110,86,0.04) 0%, rgba(15,110,86,0.04) 30%, transparent 31%),
    radial-gradient(circle at 100% 100%, rgba(15,110,86,0.04) 0%, rgba(15,110,86,0.04) 30%, transparent 31%),
    radial-gradient(circle at 0% 100%, rgba(15,110,86,0.04) 0%, rgba(15,110,86,0.04) 30%, transparent 31%),
    radial-gradient(circle at 0% 0%, rgba(15,110,86,0.04) 0%, rgba(15,110,86,0.04) 30%, transparent 31%);
  background-size: 80px 80px;
}

/* ======================================================================
   RESPONSIVE
   - 1440+   : exact pixel-perfect design (default rules above)
   - ≤1200  : laptop / narrow desktop. Fluid containers, peek hidden
   - ≤900   : tablet. Grids reduce columns, FAQ stacks
   - ≤600   : phone. Card grids become horizontal sliders, hamburger nav
   ====================================================================== */

/* Hamburger button — hidden on desktop, shown ≤900px */
.hamburger { display: none; }
.mobile-overlay { display: none; }

/* ============================ ≤ 1200 px ============================ */
@media (max-width: 1200px) {
  /* Containers go fluid, capped at the design width */
  .content,
  section > .content,
  .explainer-wrap .content,
  .programmes-section .content { width: 92%; max-width: 1156px; }

  .announcements,
  .docs-wrap,
  .help-banner { width: 92%; max-width: 1156px; }

  .mainnav { padding: 0 24px; }
  footer   { padding: 56px 24px 0; }
  .help-section { padding: 0 24px; }

  /* Hero — drop both peeks, center the active video */
  .hero-media { width: 100%; margin-left: 0; height: auto; padding-bottom: 16px; }
  .hero-media .motif-bg { width: 100%; left: 0; }
  .hero-media .frame[data-slot="right-peek"],
  .hero-media .frame[data-slot="left-peek"] { display: none; }
  .hero-media .frame[data-slot="center"] {
    position: relative;
    width: min(640px, 90%);
    height: auto;
    aspect-ratio: 16 / 9;
    left: 50%;
    transform: translateX(-50%);
    top: 12px;
  }
}

/* ============================ ≤ 900 px ============================ */
@media (max-width: 900px) {
  /* Nav → logo + hamburger */
  .mainnav { height: 80px; padding: 0 16px; gap: 12px; }
  .mainnav .nav-links,
  .mainnav .nav-right .btn,
  .mainnav .nav-right .lang { display: none; }
  .mainnav .nav-right { gap: 0; }
  .hamburger {
    display: flex;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid #c9cdc7;
    background: #fff;
    align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }
  .hamburger span,
  .hamburger span::before,
  .hamburger span::after {
    display: block;
    width: 20px; height: 2px;
    background: var(--ink);
    position: relative;
    transition: transform 0.25s ease, top 0.25s ease;
  }
  .hamburger span::before { content:""; position: absolute; top: -7px; left: 0; width: 20px; }
  .hamburger span::after  { content:""; position: absolute; top: 7px;  left: 0; width: 20px; }

  /* Mobile nav overlay */
  .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 100;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    padding: 80px 24px 24px;
    overflow-y: auto;
  }
  .mobile-overlay.open { transform: translateY(0); }
  .mobile-overlay .close {
    position: absolute; top: 24px; right: 24px;
    width: 36px; height: 36px;
    border: none; background: transparent; cursor: pointer;
    font-size: 28px; color: var(--ink); line-height: 1;
  }
  .mobile-overlay nav { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
  .mobile-overlay nav a {
    padding: 16px 0;
    font-size: 17px; font-weight: 600; color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .mobile-overlay .actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
  .mobile-overlay .actions .btn { width: 100%; }

  /* Hero text adjustments */
  .hero h1 { font-size: 30px; line-height: 38px; width: auto; height: auto; padding: 0 16px; }
  .hero .lede { width: auto; padding: 0 24px; height: auto; }

  /* Grids reduce */
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-grid     { grid-template-columns: repeat(2, 1fr); }
  .programs-grid { grid-template-columns: repeat(2, 1fr); justify-content: stretch; }
  .programs-grid .program-card { width: 100%; height: auto; }
  .announcement-grid { grid-template-columns: 1fr; }
  .announcement-card { width: 100%; height: auto; }
  .variables-grid { grid-template-columns: repeat(3, 1fr); }
  .three-dots-row { grid-template-columns: 1fr; gap: 28px; }
  .three-dots-row::before,
  .three-dots-row::after { display: none; }
  .explainer-cols { grid-template-columns: 1fr; row-gap: 48px; }
  .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); padding: 40px 24px; gap: 32px 0; }
  .stat + .stat::before { display: none; }

  .announcements { padding: 32px; height: auto; }
  .docs-wrap     { padding: 40px 24px; height: auto; }
  .docs-wrap .head { flex-direction: column; align-items: flex-start; gap: 16px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ============================ ≤ 600 px : MOBILE ============================ */
@media (max-width: 600px) {
  body { overflow-x: hidden; }

  /* Hero shrinks further, buttons stack */
  .hero { padding: 8px 0 40px; }
  .hero h1 { font-size: 26px; line-height: 32px; padding: 0 20px; }
  .hero .lede { font-size: 14px; padding: 0 20px; }
  .hero .cta-row { flex-direction: column; align-items: stretch; padding: 0 24px; }

  section { padding: 56px 0; }

  /* ---- HORIZONTAL SLIDERS on mobile ---- */
  /* Generic slider behaviour applied to specific grids */
  .announcement-grid,
  .services-grid,
  .programs-grid,
  .docs-grid {
    grid-template-columns: none;
    display: flex;
    overflow-x: auto;
    overflow-y: visible;
    gap: 16px;
    padding: 24px 16px;
    margin: 0 -16px;            /* extend slider past container so cards bleed to edge */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .announcement-grid::-webkit-scrollbar,
  .services-grid::-webkit-scrollbar,
  .programs-grid::-webkit-scrollbar,
  .docs-grid::-webkit-scrollbar { display: none; }

  .announcement-grid > *,
  .services-grid > *,
  .programs-grid > *,
  .docs-grid > * {
    flex: 0 0 78%;
    scroll-snap-align: center;
    min-width: 0;
  }
  .announcement-card { width: auto; height: auto; min-height: 340px; }
  .service-card      { width: auto; }
  .program-card      { width: auto; height: auto; min-height: 360px; }
  .doc-card          { width: auto; height: auto; min-height: 220px; }

  /* Variables grid: 2 cols on small phones (8 items → 2×4) */
  .variables-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .variable { height: 148px; padding: 14px 8px; }
  .variable span { font-size: 12px; }

  /* Stats stack */
  .stats { grid-template-columns: 1fr; padding: 32px 20px; gap: 28px; border-radius: 28px; }
  .stats .corner { width: 80px; height: 80px; }
  .stat { padding: 0 12px; }
  .stat .num { font-size: 32px; }

  /* Annonces panel */
  .announcements {
    width: 92%;
    padding: 32px 20px;
    border-radius: 32px;
    height: auto;
  }
  .announcements .head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .announcements .head h2 { font-size: 22px; }

  /* Services head: hide nav arrows on mobile (replaced by swipe) */
  .services-head .controls { display: none; }
  .services-head .section-title { font-size: 22px; }

  /* Explainer */
  .explainer-head h2 { font-size: 24px; line-height: 32px; }
  .explainer-head p  { font-size: 15px; }
  .steps { padding-left: 50px; }
  .step .bullet { left: -52px; width: 36px; height: 36px; font-size: 18px; }
  .step:not(:last-child)::before { left: -36px; top: 38px; bottom: -34px; }

  /* Programmes */
  .programmes-head h2 { font-size: 24px; line-height: 32px; }

  /* Docs */
  .docs-wrap { width: 92%; border-radius: 32px; padding: 32px 20px; }
  .docs-wrap .head h2 { font-size: 22px; }

  /* FAQ */
  .faq-grid .left h2 { font-size: 22px; }

  /* Help banner */
  .help-section { height: auto; padding: 48px 24px; }
  .help-banner { width: 100%; gap: 24px; }
  .help-banner h2 { font-size: 22px; }

  /* Footer */
  footer { padding: 40px 20px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { font-size: 12px; padding: 16px 0; }
}

/* ======================================================================
   ANIMATIONS — modern hovers + scroll reveal
   ====================================================================== */

/* ---------- card hover lifts ---------- */
.service-card,
.program-card,
.announcement-card,
.doc-card,
.variable {
  transition:
    transform   0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow  0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.25s ease;
  will-change: transform;
}
.service-card:hover,
.program-card:hover,
.doc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(0,0,0,0.08);
}
.announcement-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.18);
}
.variable:hover {
  transform: translateY(-3px);
  border-color: var(--green-brand);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

/* ---------- "En savoir plus" arrow nudge ---------- */
.link {
  transition: color 0.2s ease, gap 0.25s ease;
}
.link .arrow-go {
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.link:hover .arrow-go { transform: translateX(5px); }
.doc-card .link:hover .arrow-go { transform: translateX(5px); }

/* ---------- nav links underline grow ---------- */
.mainnav .nav-links a {
  position: relative;
  transition: color 0.2s ease;
}
.mainnav .nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--green-brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.mainnav .nav-links a:hover { color: var(--green-brand); }
.mainnav .nav-links a:hover::after { transform: scaleX(1); }
.mainnav .nav-links a:hover .chev path { stroke: var(--green-brand); }

/* ---------- buttons subtle lift ---------- */
.btn {
  transition:
    transform   0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow  0.2s ease,
    background  0.15s ease,
    color       0.15s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(59,109,17,0.28); }
.btn-outline-red:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(192,57,43,0.18); }
.btn-on-green-ghost:hover { transform: translateY(-2px); }

/* ---------- services carousel chevron buttons ---------- */
.services-head .ctrl-btn { transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s; }
.services-head .ctrl-btn:hover { transform: scale(1.08); }

/* ---------- FAQ item hover ---------- */
.faq-item {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item:hover { border-color: var(--green-300); }
.faq-item .q { transition: color 0.2s ease; }
.faq-item:hover .q { color: var(--green-brand); }

/* (Video slider keeps only its original slot-swap easing — no extra animations) */

/* ---------- SCROLL REVEAL ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
[data-reveal].in-view {
  opacity: 1;
  transform: none;
}

/* Stagger children inside a [data-reveal-group] when in-view */
[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity   0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
[data-reveal-group].in-view > * { opacity: 1; transform: none; }
[data-reveal-group].in-view > *:nth-child(1) { transition-delay: 0.00s; }
[data-reveal-group].in-view > *:nth-child(2) { transition-delay: 0.08s; }
[data-reveal-group].in-view > *:nth-child(3) { transition-delay: 0.16s; }
[data-reveal-group].in-view > *:nth-child(4) { transition-delay: 0.24s; }
[data-reveal-group].in-view > *:nth-child(5) { transition-delay: 0.32s; }
[data-reveal-group].in-view > *:nth-child(6) { transition-delay: 0.40s; }
[data-reveal-group].in-view > *:nth-child(7) { transition-delay: 0.48s; }
[data-reveal-group].in-view > *:nth-child(8) { transition-delay: 0.56s; }

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], [data-reveal-group] > * { opacity: 1 !important; transform: none !important; }
}
