/* ===== DIJON — site styles (works for both RTL and LTR via logical properties) ===== */
:root {
  --teal-900: #04323a;
  --teal-800: #02474f;
  --teal-700: #02606a;   /* brand */
  --teal-600: #0a7f8c;
  --teal-500: #0f98a6;
  --teal-100: #dff1f3;
  --teal-50:  #f0f8f9;
  --amber:    #f5a300;
  --amber-d:  #d98e00;
  --ink:      #12262b;
  --muted:    #5a6f75;
  --line:     #dbe6e8;
  --bg:       #ffffff;
  --radius:   14px;
  --shadow:   0 8px 28px rgba(4, 50, 58, .10);
  --shadow-s: 0 2px 10px rgba(4, 50, 58, .08);
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-600); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--teal-900); font-weight: 800; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.muted { color: var(--muted); }
.plain { list-style: none; margin: 0; padding: 0; }
.center-block { text-align: center; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -9999px; top: 0; background: var(--amber); color: #000; padding: 8px 14px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
[dir="rtl"] .icon-flip, [dir="rtl"] .btn .icon:last-child, [dir="rtl"] .more .icon { transform: scaleX(-1); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .75em 1.5em; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer; transition: .2s ease;
  background: var(--teal-700); color: #fff; line-height: 1.2;
}
.btn:hover { background: var(--teal-800); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--amber); color: #1b1300; }
.btn-accent:hover { background: var(--amber-d); color: #1b1300; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { background: transparent; color: var(--teal-700); border-color: var(--teal-700); }
.btn-outline:hover { background: var(--teal-700); color: #fff; }
.btn-sm { padding: .4em 1em; font-size: .9rem; }
.btn-danger { background: #b42318; }
.btn-danger:hover { background: #8e1b12; }

/* ===== Top bar ===== */
.topbar { background: var(--teal-900); color: #cfe6e9; font-size: .88rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #cfe6e9; }
.topbar a:hover { color: #fff; }
.topbar-contact { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-contact a { display: inline-flex; align-items: center; gap: 8px; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a { padding: 2px 12px; border-radius: 999px; font-weight: 600; }
.lang-switch a.on { background: var(--amber); color: #1b1300; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--teal-900); }
.brand img { width: 56px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.55rem; letter-spacing: .08em; color: var(--teal-700); font-weight: 800; }
.brand-text small { font-size: .78rem; color: var(--muted); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) { padding: .5em .85em; border-radius: 8px; color: var(--ink); font-weight: 600; }
.nav a:not(.btn):hover, .nav a.active { color: var(--teal-700); background: var(--teal-50); }
.nav-cta { margin-inline-start: 8px; padding: .55em 1.2em; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--teal-800); cursor: pointer; }
.nav-toggle .icon { width: 28px; height: 28px; }
.nav-toggle .close { display: none; }
.nav-toggle[aria-expanded="true"] .open { display: none; }
.nav-toggle[aria-expanded="true"] .close { display: inline; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 100%);
}
/* Static banner (shown only when no slider slides exist) also fills the visible screen */
.hero { --chrome: 116px; --peek: 120px; min-height: calc(100vh - var(--chrome) - var(--peek)); min-height: calc(100svh - var(--chrome) - var(--peek)); display: flex; align-items: center; }
.hero-inner { padding-block: clamp(40px, 6vw, 80px); }
.hero-ring {
  position: absolute; inset-inline-end: -12%; bottom: -34%;
  width: 760px; height: 420px; border-radius: 50%;
  border: 46px solid rgba(255,255,255,.08); transform: rotate(-14deg);
}
.hero-ring::after {
  content: ""; position: absolute; inset: 70px; border-radius: 50%; border: 22px solid rgba(245,163,0,.22);
}
.hero-inner { position: relative; }
.hero-copy { max-width: 720px; }
.hero h1 { color: #fff; margin-bottom: .45em; }
.lead { font-size: 1.15rem; color: #d7eaed; max-width: 62ch; }
.page-hero .lead { color: var(--muted); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: .85rem; letter-spacing: .04em;
  color: var(--amber); background: rgba(245,163,0,.12); border-radius: 999px; padding: .2em 1em; margin-bottom: 14px;
}
.eyebrow.dark { color: var(--teal-700); background: var(--teal-100); }

/* ===== Slider (images / videos) ===== */
/* Slider height = visible screen height - top bar/header (--chrome, measured by site.js) - --peek.
   --peek is the strip of the next section (the stats row) left visible under the slider so visitors
   see there is more below. Set --peek: 0px for a slider that fills the whole screen. */
.slider { --chrome: 116px; --peek: 120px; position: relative; overflow: hidden; background: var(--teal-900); color: #fff; }
.slides { position: relative; height: calc(100vh - var(--chrome) - var(--peek)); height: calc(100svh - var(--chrome) - var(--peek)); min-height: 380px; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; display: flex; align-items: flex-end; }
.slide.active { opacity: 1; visibility: visible; z-index: 1; }
.slide-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Keep the media clear: only a soft gradient at the bottom, behind the text */
.slide-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,50,58,0) 55%, rgba(4,50,58,.72) 100%); pointer-events: none; }
.slide-inner { position: relative; padding-block: 0 46px; }
.slide .hero-copy { max-width: 540px; }
.slide-title { color: #fff; font-size: clamp(1.3rem, 2.1vw, 1.75rem); line-height: 1.4; margin-bottom: .25em; text-shadow: 0 1px 10px rgba(0,0,0,.55); }
.slide .lead { color: #eef7f8; font-size: clamp(.92rem, 1.2vw, 1.05rem); line-height: 1.6; margin-bottom: .5em; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.slide .hero-actions { margin-top: 8px; }
.slide .btn { padding: .45em 1.1em; font-size: .92rem; }
.slide .btn .icon { width: 1em; height: 1em; }
.s-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5); background: rgba(4,50,58,.5); color: #fff; cursor: pointer; display: grid; place-items: center;
}
.s-nav:hover { background: var(--amber); color: #1b1300; border-color: var(--amber); }
.s-prev { inset-inline-start: 16px; }
.s-next { inset-inline-end: 16px; }
.s-prev .icon { transform: scaleX(-1); }
[dir="rtl"] .s-prev .icon { transform: none; }
[dir="rtl"] .s-next .icon { transform: scaleX(-1); }
.dots { position: absolute; inset-inline: 0; bottom: 16px; z-index: 3; display: flex; justify-content: center; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.dot.on { background: var(--amber); transform: scale(1.25); }
@media (max-width: 600px) { .slider, .hero { --peek: 72px; } .s-nav { display: none; } .slide-inner { padding-block: 0 40px; } .slide .hero-copy { max-width: 100%; } .dots { bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }

/* ===== Stats ===== */
.stats { background: #fff; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 16px; text-align: center; border-inline-end: 1px solid var(--line); }
.stat:last-child { border-inline-end: 0; }
.stat strong { display: inline; font-size: 2.3rem; font-weight: 800; color: var(--teal-700); }
.stat span { display: block; color: var(--muted); font-weight: 600; font-size: .95rem; }

/* ===== Sections ===== */
.section { padding-block: clamp(48px, 7vw, 88px); }
.section.alt { background: var(--teal-50); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.mt { margin-top: 2.2em; }
.mt-xl { margin-top: 64px; }

.card-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-grid.three { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-grid.two { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-s); transition: .2s ease; display: block; color: inherit;
}
a.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--teal-500); color: inherit; }

.service-card { padding: 26px; }
.service-card p { color: var(--muted); font-size: .97rem; }
.service-card .more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--teal-700); }
.icon-badge {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 14px;
  background: var(--teal-100); color: var(--teal-700); margin-bottom: 16px;
}
.icon-badge .icon { width: 28px; height: 28px; }
.icon-badge.sm { width: 48px; height: 48px; }

/* ===== Why us ===== */
.why-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.why p { color: var(--muted); font-size: .97rem; }

/* ===== Project card ===== */
.project-card { overflow: hidden; }
.project-thumb, .project-hero {
  position: relative; display: grid; place-items: center; color: rgba(255,255,255,.9);
  background:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(135deg, var(--teal-800), var(--teal-600));
}
/* Cards: every thumbnail has the same 16:10 shape (images are cropped to fill it) */
.project-thumb { aspect-ratio: 16 / 10; }
.project-thumb .icon { width: 64px; height: 64px; opacity: .85; }
.project-hero { height: 280px; border-radius: var(--radius); margin-bottom: 28px; }
.project-hero .icon { width: 96px; height: 96px; opacity: .85; }
.project-thumb.has-img, .project-hero.has-img { background: var(--teal-100); overflow: hidden; }
.project-thumb.has-img img { width: 100%; height: 100%; object-fit: cover; }
/* Project page: show the main image in its real proportions, never cropped.
   Very tall images are limited to the screen height and centred on a soft background. */
.project-hero.has-img { display: block; height: auto; background: var(--teal-50); border: 1px solid var(--line); }
.project-hero.has-img img { display: block; width: 100%; height: auto; max-height: min(78vh, 720px); object-fit: contain; margin-inline: auto; }
.project-thumb .chip { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; }
.chip { background: var(--amber); color: #1b1300; font-weight: 700; font-size: .78rem; padding: .15em .8em; border-radius: 999px; }
.chip.small { background: var(--teal-100); color: var(--teal-800); }
.project-body { padding: 18px 20px 22px; }
.project-body h3 { margin-bottom: .3em; }
.project-body p { color: var(--muted); font-size: .96rem; margin-bottom: .4em; }
.project-body .meta { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--teal-700); font-weight: 600; }
.project-body .meta .icon { width: 1em; height: 1em; }

/* ===== Process ===== */
.process { background: linear-gradient(135deg, var(--teal-900), var(--teal-700)); color: #fff; }
.process h2, .process h3 { color: #fff; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; }
.steps li { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 24px; }
.steps b { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--amber); color: #1b1300; margin-bottom: 12px; }
.steps p { color: #cfe6e9; margin: 0; font-size: .96rem; }

/* ===== CTA band ===== */
.cta-band { background: var(--amber); }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 40px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .15em; color: #1b1300; }
.cta-band p { margin: 0; color: #3b2a00; }
.cta-band .btn-accent { background: var(--teal-900); color: #fff; }
.cta-band .btn-accent:hover { background: #000; color: #fff; }

/* ===== Page hero ===== */
.page-hero { background: var(--teal-50); border-bottom: 1px solid var(--line); padding-block: clamp(36px, 5vw, 64px); }
.page-hero h1 { margin-bottom: .3em; }
.crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { font-weight: 600; }

/* ===== Layouts ===== */
.two-col { display: grid; gap: 48px; grid-template-columns: 1.2fr 1fr; align-items: center; }
.two-col.top { align-items: start; grid-template-columns: 1fr 1fr; }
.about-visual { background: var(--teal-50); border: 1px solid var(--line); border-radius: 24px; padding: 40px; display: grid; place-items: center; }
.about-visual img { max-width: 320px; }
.mini-stats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 24px; }
.mini-stats strong { display: block; font-size: 1.9rem; color: var(--teal-700); line-height: 1.2; }
.mini-stats span { color: var(--muted); font-weight: 600; font-size: .92rem; }
.triple { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plain-card { padding: 28px; }
.plain-card p { color: var(--muted); margin: 0; }

.detail-grid { display: grid; gap: 40px; grid-template-columns: 1fr 320px; align-items: start; }
.prose-lead { font-size: 1.12rem; color: #29444a; }
.checks { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks .icon { color: #fff; background: var(--teal-600); border-radius: 50%; padding: 4px; width: 26px; height: 26px; margin-top: 2px; }
.side { display: grid; gap: 18px; position: sticky; top: 100px; }
.side-card { padding: 22px; }
.side-list li + li { border-top: 1px solid var(--line); }
.side-list a { display: block; padding: .6em 0; color: var(--ink); font-weight: 600; }
.side-list a:hover, .side-list a.on { color: var(--teal-700); }
.side-card.cta { background: var(--teal-900); border-color: var(--teal-900); }
.side-card.cta h3, .side-card.cta p { color: #fff; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 700; }

/* ===== Filters ===== */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.pill { padding: .35em 1.1em; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 600; font-size: .92rem; background: #fff; }
.pill:hover { border-color: var(--teal-500); color: var(--teal-700); }
.pill.on { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }

/* ===== Contact & forms ===== */
.contact-grid { display: grid; gap: 28px; grid-template-columns: 1.6fr 1fr; align-items: start; }
.form-card, .info-card { padding: clamp(20px, 3vw, 34px); }
.narrow { max-width: 480px; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.field label { font-weight: 700; font-size: .93rem; }
input, select, textarea {
  width: 100%; font: inherit; padding: .7em .9em; border: 1.5px solid #c5d6d9; border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(15,152,166,.18); }
.err { color: #b42318; font-size: .85rem; min-height: 0; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.alert.ok { background: #e6f6ec; color: #0b6b2e; border: 1px solid #b6e3c5; }
.alert.bad { background: #fdecea; color: #912018; border: 1px solid #f5c2bd; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.contact-list .icon { color: var(--amber); margin-top: 4px; }
.info-card .contact-list .icon { color: var(--teal-600); }

/* ===== Admin ===== */
.msg { padding: 18px 20px; margin-bottom: 14px; }
.msg.unread { border-inline-start: 5px solid var(--amber); }
.msg.read { opacity: .8; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.msg-meta { color: var(--muted); font-size: .92rem; margin: 2px 0 10px; }
.msg-body { white-space: pre-wrap; }
.msg-actions { display: flex; gap: 10px; }

/* ===== Error ===== */
.big-code { font-size: clamp(4rem, 14vw, 9rem); color: var(--teal-700); margin: 0; }

/* ===== Footer ===== */
.site-footer { background: var(--teal-900); color: #bcd4d8; padding-top: 56px; }
.site-footer h4 { color: #fff; margin-bottom: 1em; }
.site-footer a { color: #bcd4d8; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr 1.2fr; padding-bottom: 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 12px; }
.logo-chip { background: #fff; border-radius: 12px; padding: 6px; display: inline-grid; }
.logo-chip img { width: 48px; }
.site-footer .plain li { padding: 4px 0; }
.site-footer .contact-list li { padding: 6px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 18px; font-size: .88rem; }

.wa-float {
  position: fixed; inset-inline-end: 18px; inset-block-end: 18px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: #1faa59; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.wa-float:hover { background: #178a47; color: #fff; }
.wa-float .icon { width: 26px; height: 26px; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .two-col, .two-col.top, .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-inline-end: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; inset-inline: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 2px;
    display: none; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav-cta { margin: 8px 0 0; justify-content: center; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
}
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-contact span[dir] { font-size: .82rem; }
  .brand-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
