:root {
  --bg: #fff;
  --fg: #000;
  --accent: #00796b;
  --footer-bg: #111;
  --footer-text: #eee;
}

[data-theme="dark"] {
  --bg: #121212;
  --fg: #eee;
  --accent: #80cbc4;
  --footer-bg: #1e1e1e;
  --footer-text: #ccc;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}


/* SECTIONS GENERAL */
section {
  margin: 4rem 0;
}

.section-title, .zones-section h2, .vision-section h2, .agences-section h2, .stories-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-subtitle, .zones-section p, .vision-section p, .agences-section p, .stories-section p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}



/* === ROTATING HERO =================================================== */
.hero-slider {
  position: relative;
  min-height: 720px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
}

/* Dark overlay so text pops */
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

/* Re-use the typography rules from earlier  */
.hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  z-index: 2;
  padding: 0 1rem;
}

.hero-heading   { font-family: "Libre Baskerville", serif;
                  font-size: clamp(2.5rem, 5vw + 1rem, 4.2rem);
                  margin: 0; font-weight: 700; }

.hero-subheading{ font-family: "Libre Baskerville", serif;
                  font-style: italic;
                  font-size: clamp(1.25rem, 2vw + .8rem, 2.2rem);
                  margin: 0 0 1.8rem; }

.hero-cta       { background:#1154b5; color:#fff; padding:.9rem 2rem;
                  text-decoration:none; font-family:"Almarai",sans-serif;
                  font-weight:600; border-radius:4px; }

.hero-cta:hover { background:#0d4596; }

/* --- dots ------------------------------------------------------------ */
.slider-dots {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .6rem;
  z-index: 3;
}

.slider-dots button {
  width: .9rem; height: .9rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.4);
  cursor: pointer;
}

.slider-dots button.active {
  background: #fff;
}

/* Responsive: shrink hero height on small screens */
@media (max-width:600px){ .hero-slider{min-height:420px;} }

/* RESPONSIVENESS */
@media (max-width: 768px) {
  .hero-section{
    flex-direction: column;
    text-align: center;
  }

  .hero-right, .hero-left,
  .vision-text, .vision-image,
  .story-content, .story-image {
    flex: 1 1 100%;
  }

  .agences-list {
    justify-content: center;
  }
}

/* ----------------------------------------------------------
   1. Let the first section (your hero) sit flush
      against the navbar, but keep spacing after it.
   ---------------------------------------------------------- */
section:first-of-type  { margin-top: 0; }

/* ----------------------------------------------------------
   2. Make sure the hero is tall enough to replace what we
      removed and isn’t clipped behind the sticky bar.
      (var(--nav-h) = 76 px from the navbar sheet)
   ---------------------------------------------------------- */
.hero-slider{
  /* touch the navbar */
  margin-top: 0;

  /* always at least full-viewport height minus navbar,
     but never shorter than 500 px or taller than 720 px */
  min-height: clamp(500px, calc(100vh - var(--nav-h)), 720px);
}

/* optional: if you want the picture centred on the *visible*
   area rather than the whole hero, nudge the background down
   a bit so nobody’s forehead is hidden by the bar */
.slide{ background-position:center top; }

/* ----------------------------------------------------------
   3. Blue-only palette (your hero file still listed green)
      — keep everything on brand.
   ---------------------------------------------------------- */
:root{
  --accent:#0050c8;           /* blue */
}
[data-theme="dark"]{
  --accent:#0050c8;           /* same blue in dark mode */
}




    /* ------------  Mission STYLES  -------------- */
   
/* ===== Tokens / Dark mode ===== */
:root{
  --accent:     #1154b5;            /* primary blue for button */
  --accent-dim: #0d4596;            /* darker blue on hover */
  --fg:         #111;
  --muted:      rgb(0 0 0 / .65);
  --bg:         #f5f7fa;
  --card:       #ffffff;
  --border:     rgb(0 0 0 / .10);
  --shadow:     0 10px 28px rgb(0 0 0 / .08);

  --radius-12:  12px;
  --radius-16:  16px;
  --w-max:      1100px;
}
[data-theme="dark"]{
  --fg:     #eee;
  --muted:  rgb(255 255 255 / .62);
  --bg:     #0e0e0f;
  --card:   #171717;
  --border: rgb(255 255 255 / .12);
  --shadow: 0 8px 24px rgb(0 0 0 / .35);
}

/* ===== Section shell (more space around content) ===== */
.fg-mission{
  color: var(--fg);
  background:
    radial-gradient(1200px 320px at 50% -18%, color-mix(in srgb, var(--accent) 18%, transparent), transparent),
    linear-gradient(180deg, rgb(0 0 0 / .03), transparent 60%);
  padding: clamp(3rem, 7vw, 5rem) 1.5rem clamp(3rem, 7vw, 5rem);
}
[data-theme="dark"] .fg-mission{
  background:
    radial-gradient(1200px 320px at 50% -18%, color-mix(in srgb, var(--accent) 20%, transparent), transparent),
    linear-gradient(180deg, rgb(255 255 255 / .04), transparent 60%);
}

.mission-hero{
  max-width: var(--w-max);
  margin: 0 auto clamp(2rem, 4vw, 2.5rem);
  text-align: center;
}

/* H2 per your spec */
.mission-title{
  font-size: clamp(2.2rem, 4vw + 1rem, 3.5rem);
  font-weight: 800;
  color: var(--fg);                 /* theme-aware text */
  margin: 0 0 3rem;
}

.mission-lead{
  max-width: 58rem;
  margin: 0 auto;
  font-size: clamp(1rem, 1.2vw, 1.075rem);
  line-height: 1.85;
  color: var(--fg);
}

.mission-cta{ margin-top: 1.6rem; }

/* Button now BLUE */
.btn-primary{
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 1.35rem;
  border-radius: var(--radius-12);
  text-decoration: none;
  font-weight: 800;
  color: #fff;
  background: var(--accent);        /* #1154b5 */
  border: 1px solid transparent;
  transition: background .22s ease, transform .05s ease;
}
.btn-primary:hover,
.btn-primary:focus-visible{ background: var(--accent-dim); } /* darker blue */
.btn-primary:active{ transform: translateY(1px); }

/* ===== Pillars grid ===== */
.mission-grid{
  max-width: var(--w-max);
  margin: clamp(2rem, 4vw, 2.5rem) auto 0;   /* added spacing */
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: repeat(3, minmax(0,1fr));
}
@media (max-width: 980px){
  .mission-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .mission-grid{ grid-template-columns: 1fr; }
}

.mission-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-16);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.1rem;
  display: grid;
  gap: .6rem;
}
.mission-card h3{
  font-size: 1.08rem;
  margin: 0;
}
.mission-card p{
  margin: 0;
  color: var(--fg);
  line-height: 1.65;
  font-size: .99rem;
}
.card-icon{
  width: 48px; height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 80%, var(--bg));
  display: grid; place-items: center;
  border: 1px solid var(--border);
  margin-bottom: .25rem;
}
.card-icon svg{ width: 22px; height: 22px; fill: var(--accent); }

/* ===== Values (chips) ===== */
.mission-values{
  max-width: var(--w-max);
  margin: clamp(1.8rem, 4vw, 2.6rem) auto 0;  /* added spacing */
  display: flex; gap: .7rem; flex-wrap: wrap;
  justify-content: center;
}
.chip{
  display: inline-flex; align-items: center;
  padding: .5rem .85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--border);
}







/* ===== NOS PRODUITS ================================================== */
.products-section{
  padding: 4rem 1rem;
  text-align: center;
}

/* ---- titles ---- */
.products-title{
  font-size: clamp(2.2rem, 4vw + 1rem, 3.5rem);
  font-weight: 800;
  color: var(--fg); /* text color based on the theme */
  margin-bottom: 3rem;
}

/* ---- grid ---- */
.products-grid{
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 1080px;
  margin: 0 auto;
}

/* ---- individual card ---- */
.product-card{
  padding: 0 1.25rem 3.5rem;
  transition: transform .35s ease, box-shadow .35s ease;
}

/* headline */
.product-card h3{
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent); /* accent color based on the theme */
  margin: 1.5rem 0 1rem;
}

/* body copy */
.product-card p{
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--fg); /* text color based on the theme */
  max-width: 26ch;
  margin: 0 auto;
}

/* icon wrapper */
.product-icon{
  width: 160px;
  height: 160px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: var(--card-bg); /* background color based on the theme */
  border-radius: 8px;
  transition: transform .35s ease;
}

.product-icon img{ width: 72px; height: auto; }

/* hover / focus */
.product-card:hover,
.product-card:focus-within{
  transform: translateY(-6px);
  box-shadow: 0 16px 24px rgb(0 0 0 / .08);
}
.product-card:hover .product-icon,
.product-card:focus-within .product-icon{
  transform: translateY(-8px) scale(1.05);
}

/* responsive tweak */
@media (max-width: 600px){
  .product-card{ padding-bottom: 2.5rem; }
}

/* ====== THEME-SPECIFIC TOKENS ======================================= */
/* light default */
:root{
  --card-bg: #fafafa;
  --fg: black; /* light mode text color */
  --accent: blue; /* light mode accent color */
}

/* dark override */
[data-theme="dark"]{
  --card-bg: #1e1e1e; /* dark grey tile */
  --fg: white; /* dark mode text color */
  --accent: #ff6347; /* dark mode accent color (example: light red/orange) */
}




/* ------------- IMPACT METRICS BANNER -------------------------------- */
.impact-section {
  position: relative;
  color: #fff;
  padding: 6rem 1rem 5rem;
  background-size: cover;
  background-position: center;
  text-align: center;
  overflow: hidden;
}

/* dark overlay */
.impact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.impact-heading {
  position: relative;
  font-family: "Libre Baskerville", serif;
  font-size: clamp(2.3rem, 5vw + 1rem, 3.8rem);
  font-weight: 800;
  margin-bottom: 4rem;
  z-index: 1;
}

/* metric cards grid */
.metrics-grid {
  position: relative;
  display: grid;
  gap: 3rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 1100px;
  margin: 0 auto;
  z-index: 1;
}

.metric-card {
  padding: 2.5rem 1.25rem 3.5rem;
  backdrop-filter: blur(4px) brightness(0.9);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(60px) scale(0.92);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.metric-icon {
  width: 110px;
  height: 110px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: #fff7f2;
  display: grid;
  place-items: center;
}

.metric-icon i {
  font-size: 2.4rem;
  color: #0d3f8f; /* blue */
}

.metric-value {
  font-family: "Libre Baskerville", serif;
  font-size: 2.4rem;
  font-weight: 800;
  margin: 0.5rem 0;
}

.metric-title {
  font-family: "Libre Baskerville", serif;
  font-weight: 700;
  margin: 0 0 1rem;
}

.metric-desc {
  font-family: "Almarai", sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 28ch;
  margin: 0 auto;
}

/* .show class added by JS */
.metric-card.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* responsive spacing */
@media (max-width: 600px) {
  .metric-card {
    padding: 2.5rem 1rem 3rem;
  }
}



/* === FAQ ACCORDION ================================================== */
.faq-section {
  max-width: 900px;
  margin: 5rem auto;
  padding: 0 1rem;
  font-family: "Libre Baskerville", serif;
}

/* ---- FAQ Title ---- */
.faq-title {
  text-align: center;
  font-size: clamp(2.2rem, 5vw + 1rem, 3.8rem);
  font-weight: 800;
  margin-bottom: 2.5rem;
  color: var(--fg); /* text color based on the theme */
}

/* ---- each item ---- */
.faq-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color); /* border color based on the theme */
}

/* ---- clickable header ---- */
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: clamp(1.15rem, 1.2vw + .9rem, 1.6rem);
  background: none;
  border: none;
  padding: 1.3rem 0;
  color: var(--fg); /* text color based on the theme */
  text-align: left;
  cursor: pointer;
}

.faq-question i {
  font-size: 1.1rem;
  margin-left: 1rem;
  transition: transform 0.35s ease;
  color: var(--icon-color); /* icon color based on the theme */
}

/* ---- answer panel ---- */
.faq-answer {
  font-family: "Almarai", sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.55s ease;
  padding-right: 2rem; /* ensure text doesn't clash with icon */
  color: var(--fg); /* text color based on the theme */
}

.faq-item.open .faq-answer {
  max-height: 500px; /* sufficiently large to reveal content */
  margin-bottom: 1.7rem;
}

.faq-item.open .faq-question i {
  transform: rotate(45deg); /* plus → minus visual */
}

/* ---- icon transitions ---- */
.faq-icon {
  font-size: 1.4rem;
  line-height: 1;
  transition: transform .35s ease;
  color: var(--icon-color); /* icon color based on the theme */
}

/* rotate the + to look like − */
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* responsive tweaks */
@media (max-width: 600px) {
  .faq-question { padding: 1rem 0; }
  .faq-answer { padding-right: 0; }
}

/* ====== THEME-SPECIFIC TOKENS ======================================= */
/* light default */
:root {
  --fg: black; /* light mode text color */
  --icon-color: #111; /* light mode icon color */
  --border-color: #c7c7c7; /* light mode border color */
}

/* dark override */
[data-theme="dark"] {
  --fg: white; /* dark mode text color */
  --icon-color: white; /* dark mode icon color */
  --border-color: #555; /* dark mode border color */
}



/* ========= BLOG / CERTIFICATIONS SECTION — DYNAMIC ============ */
.blog-section{
  padding:4rem 1rem;
  background:var(--bg);
  color:var(--fg);
  overflow:hidden;                 /* hide off-canvas cards */
}

.blog-inner{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.blog-head{ text-align:center; margin-bottom:2.5rem; }
.blog-title{
  font-size:clamp(2rem,4vw + .5rem,3rem);
  font-weight:800;
  margin:.25rem 0 .6rem;
}
.blog-lead{
  font-size:1.05rem;
  line-height:1.6;
  max-width:60ch;
  margin:0 auto;
}

/* ---- auto-scrolling, pause on hover/focus ---- */
.blog-track{
  display:flex; gap:1.8rem;
  animation:scroll-left 40s linear infinite;
  will-change:transform;
}
.blog-track:hover,
.blog-track:focus-within{ animation-play-state:paused; }

@keyframes scroll-left{
  0%   { transform:translateX(0); }
  100% { transform:translateX(calc(-50% - .9rem)); } /* scroll width/2 */
}

/* ---- card float / tilt ---- */
.blog-card{
  flex:none;
  width:clamp(220px,28vw,320px);
  aspect-ratio:4/3;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 8px 18px rgb(0 0 0 / .12);
  animation:float 6.5s ease-in-out infinite;
  transform-origin:center;
}
@keyframes float{
  0%  { transform:translateY(0)   rotate(0deg);  }
  50% { transform:translateY(-10px) rotate(2.5deg); }
 100% { transform:translateY(0)   rotate(0deg);  }
}
.blog-card:nth-child(odd){ animation-delay:1.5s; }
.blog-card:nth-child(3n){  animation-delay:3s;   }

.blog-card img{
  width:100%; height:100%; object-fit:cover;
}

/* ---- CTA ---- */
.blog-more{
  display:inline-block;
  margin-top:2.8rem;
  background:var(--accent);
  color:#fff;
  padding:.9rem 2.2rem;
  font:600 1rem/1 var(--font-main);
  text-decoration:none;
  border-radius:8px;
  transition:background .25s ease,transform .2s ease;
}
.blog-more:hover{
  background:var(--accent-dim);
  transform:translateY(-2px);
}

/* ---- responsive tweak ---- */
@media(max-width:600px){
  .blog-lead{ font-size:.95rem; }
}

/* ---------- helper: duplicate cards for seamless scroll ------ */
/* Put this at the end so it overrides earlier width */
.blog-track::after{
  content:"";
  flex:none;
  width:1.8rem;                /* gap compensation */
}
.blog-track > *{
  flex:none;
}
.blog-track > *:nth-child(-n+10){      /* clone first 10 cards */
  order:1;                              /* so they appear after originals */
}





