/* ===== SpaceView — Marketing & Production ===== */
:root {
  --navy: #0d1b45;
  --navy-2: #13275f;
  --blue: #0a5cff;
  --blue-2: #2f7bff;
  --ink: #1b2440;
  --muted: #5b6480;
  --bg-alt: #f3f6fd;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(13, 27, 69, .10);
}

html { scroll-behavior: smooth; }
body {
  font-family: "Cairo", "Montserrat", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
}
html[lang="fr"] body { font-family: "Montserrat", "Cairo", system-ui, sans-serif; }

h1, h2, h3 { font-weight: 800; }
.text-muted-2 { color: var(--muted); line-height: 1.9; }

/* ---------- Brand ---------- */
.brand-mark {
  display: inline-block;
  width: 36px; height: 48px;
  background: url("../../spaceview.jpeg") no-repeat;
  background-size: 120px 120px;
  background-position: -42px -22px;
  mix-blend-mode: multiply;
}
.brand-word {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .5px;
  color: var(--navy);
  direction: ltr;
}
.brand-word span { color: var(--blue); }
.brand-word-light { color: #fff; font-size: 1.6rem; }

/* ---------- Buttons ---------- */
.btn-brand {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .6rem 1.4rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(10, 92, 255, .35);
  transition: transform .2s, background .2s;
}
.btn-brand:hover { background: var(--blue-2); color: #fff; transform: translateY(-2px); }
.btn-outline-light { border-radius: 50px; font-weight: 700; padding: .6rem 1.4rem; }
.btn-lg.btn-brand, .btn-lg.btn-outline-light { padding: .8rem 1.8rem; }
.btn-lang {
  border: 1.5px solid #d5ddf0;
  border-radius: 50px;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
}
.btn-lang:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Navbar ---------- */
.navbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  padding: .7rem 0;
  transition: box-shadow .3s, padding .3s;
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(13, 27, 69, .08); padding: .4rem 0; }
.navbar .nav-link {
  color: var(--ink);
  font-weight: 600;
  margin: 0 .35rem;
  position: relative;
}
.navbar .nav-link.active, .navbar .nav-link:hover { color: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 150px 0 110px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, #0b3fb0 100%);
  color: #fff;
  overflow: hidden;
}
.hero-glow {
  position: absolute; inset: auto -10% -40% auto;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(47, 123, 255, .45), transparent 65%);
  pointer-events: none;
}
.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9fc0ff;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  padding: .35rem .9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}
.eyebrow-dark { color: var(--blue); background: rgba(10, 92, 255, .08); border-color: rgba(10, 92, 255, .15); }
.hero-title { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.3; }
.hero-lead { font-size: 1.1rem; color: #cdd8f5; line-height: 1.9; max-width: 600px; margin-top: 1rem; }
.hero-card {
  background: #fff;
  border-radius: 28px;
  padding: 1rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  transform: rotate(-2deg);
  animation: float 6s ease-in-out infinite;
}
.hero-card img { border-radius: 20px; }
@keyframes float {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-14px); }
}
.hero-socials a, .footer-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 1.15rem;
  margin-inline-end: .5rem;
  transition: background .2s, transform .2s;
  text-decoration: none;
}
.hero-socials a:hover, .footer-socials a:hover { background: var(--blue); transform: translateY(-3px); }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--navy); margin-bottom: 1rem; line-height: 1.4; }

.value-card {
  height: 100%;
  background: #fff;
  border: 1px solid #e6ebf7;
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform .25s, box-shadow .25s;
}
.value-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.value-card i { font-size: 1.8rem; color: var(--blue); }
.value-card h3 { font-size: 1.05rem; margin: .8rem 0 .3rem; color: var(--navy); }
.value-card p { font-size: .92rem; color: var(--muted); margin: 0; }

.service-card {
  height: 100%;
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 18px rgba(13, 27, 69, .05);
  border-bottom: 4px solid transparent;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--blue); }
.service-icon {
  width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--navy-2));
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
}
.service-card h3 { font-size: 1.25rem; color: var(--navy); }
.service-card p { color: var(--muted); line-height: 1.8; margin: 0; }

/* ---------- Extra services ---------- */
.section-dark {
  background: radial-gradient(circle at 20% 0%, #1a3b9c 0%, var(--navy) 55%);
  color: #fff;
}
.extra-card {
  position: relative;
  height: 100%;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  transition: background .25s, transform .25s;
  overflow: hidden;
}
.extra-card:hover { background: rgba(255, 255, 255, .1); transform: translateY(-6px); }
.extra-card i { font-size: 2.2rem; color: #7fb0ff; }
.extra-card h3 { font-size: 1.3rem; margin: 1rem 0 .6rem; }
.extra-card p { color: #c5d2f2; line-height: 1.9; margin: 0; }
.extra-num {
  position: absolute;
  top: 1rem; inset-inline-end: 1.4rem;
  font-family: "Montserrat", sans-serif;
  font-size: 3rem; font-weight: 800;
  color: rgba(255, 255, 255, .07);
}
.extra-summary { color: #dfe7fb; font-size: 1.15rem; max-width: 760px; margin-inline: auto; line-height: 1.9; }

/* ---------- Bandeau animé ---------- */
.marquee-wrap {
  overflow: hidden;
  margin-top: -2.2rem;
  padding: 1.5rem 0 2rem;
  position: relative;
  z-index: 2;
}
.marquee {
  overflow: hidden;
  background: var(--blue);
  color: #fff;
  padding: 1rem 0;
  transform: rotate(-1.5deg);
  margin: 0 -3%;
  box-shadow: 0 12px 30px rgba(10, 92, 255, .3);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-track span {
  white-space: nowrap;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .5px;
  padding-inline-end: .5rem;
}
@keyframes marquee { to { transform: translateX(-50%); } }
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------- Portfolio ---------- */
.portfolio { padding-top: 70px; }
.text-gradient {
  background: linear-gradient(90deg, var(--blue), #6aa3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pf-lead { max-width: 640px; margin-inline: auto; }

.pf-filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
  margin: 0 auto 2.5rem;
}
.pf-filters button {
  border: 1.5px solid #d5ddf0;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  border-radius: 50px;
  padding: .55rem 1.2rem;
  transition: all .25s;
}
.pf-filters button:hover { border-color: var(--blue); color: var(--blue); }
.pf-filters button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 8px 20px rgba(13, 27, 69, .25);
}

/* grille mosaïque (bento) */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  grid-auto-flow: dense;
  gap: 16px;
}
.pf-big  { grid-column: span 2; grid-row: span 2; }
.pf-wide { grid-column: span 2; }
.pf-tall { grid-row: span 2; }

.pf-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: var(--navy);
  isolation: isolate;
}
.pf-grid:not(.in-view) .pf-item { opacity: 0; }
.pf-grid.in-view .pf-item {
  animation: pf-in .6s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: var(--d, 0ms);
}
.pf-item.is-hidden { display: none; }
@keyframes pf-in {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.pf-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .5s;
}
.pf-item:hover img, .pf-item:focus-visible img { transform: scale(1.08); filter: brightness(.8); }

.pf-overlay {
  position: absolute; inset: auto 0 0 0;
  padding: 1.1rem 1.2rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: .45rem;
  background: linear-gradient(to top, rgba(8, 16, 42, .92), rgba(8, 16, 42, 0));
  color: #fff;
  transform: translateY(25%);
  opacity: .0;
  transition: transform .45s, opacity .45s;
}
.pf-item:hover .pf-overlay, .pf-item:focus-visible .pf-overlay { transform: none; opacity: 1; }
@media (hover: none) { .pf-overlay { transform: none; opacity: 1; } }
.pf-chip {
  font-size: .75rem;
  font-weight: 700;
  background: rgba(10, 92, 255, .85);
  padding: .25rem .7rem;
  border-radius: 50px;
}
.pf-title { font-weight: 800; font-size: 1.05rem; line-height: 1.4; }
.pf-big .pf-title { font-size: 1.35rem; }

.pf-play {
  position: absolute; top: 50%; left: 50%;
  width: 68px; height: 68px;
  margin: -34px 0 0 -34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--blue);
  font-size: 2rem;
  z-index: 1;
  transition: transform .3s;
}
.pf-play::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .8);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { to { transform: scale(1.7); opacity: 0; } }
.pf-big .pf-play { width: 88px; height: 88px; margin: -44px 0 0 -44px; font-size: 2.6rem; }
.pf-item:hover .pf-play { transform: scale(1.1); }

@media (max-width: 991.98px) {
  .pf-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
}
@media (max-width: 575.98px) {
  .pf-grid { grid-auto-rows: 150px; gap: 10px; }
  .pf-wide { grid-column: span 2; }
  .pf-title { font-size: .9rem; }
  .pf-big .pf-title { font-size: 1.05rem; }
  .pf-chip { display: none; }
}

/* lightbox */
.pf-lb {
  position: fixed; inset: 0;
  z-index: 2000;
  background: rgba(5, 10, 28, .94);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 70px 80px 90px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.pf-lb.open { opacity: 1; visibility: visible; }
.pf-lb-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.pf-lb-stage img, .pf-lb-stage video {
  max-width: 100%; max-height: 100%;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  animation: lb-in .4s cubic-bezier(.2, .7, .2, 1);
}
@keyframes lb-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.pf-lb-close, .pf-lb-nav {
  position: absolute;
  border: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.3rem;
  transition: background .2s;
}
.pf-lb-close:hover, .pf-lb-nav:hover { background: var(--blue); }
.pf-lb-close { top: 16px; inset-inline-end: 16px; }
.pf-lb-nav { top: 50%; margin-top: -26px; }
.pf-lb-prev { inset-inline-start: 16px; }
.pf-lb-next { inset-inline-end: 16px; }
[dir="rtl"] .pf-lb-nav i { display: inline-block; transform: scaleX(-1); }
.pf-lb-caption {
  position: absolute; bottom: 24px; left: 0; right: 0;
  text-align: center;
  color: #fff;
  font-weight: 700;
  padding: 0 16px;
}
.pf-lb-caption small { color: #8ea3da; margin-inline-start: .6rem; font-weight: 500; }
@media (max-width: 767.98px) {
  .pf-lb { padding: 64px 10px 90px; }
  .pf-lb-nav { top: auto; bottom: 16px; margin: 0; }
  .pf-lb-caption { bottom: 80px; }
}

/* ---------- Clients (carrousel) ---------- */
.clients-count { color: var(--blue); }
.ref-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.ref-nav { display: flex; gap: .6rem; }
.ref-arrow {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1.5px solid #d5ddf0;
  background: #fff;
  color: var(--navy);
  font-size: 1.1rem;
  transition: background .2s, color .2s, border-color .2s;
}
.ref-arrow:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* aligne le début du carrousel sur le .container Bootstrap, les cartes débordent à droite/gauche */
.ref-track {
  --cw: 100vw;
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 10px max(16px, calc((100vw - var(--cw)) / 2 + 12px)) 30px;
  scroll-padding-inline: max(16px, calc((100vw - var(--cw)) / 2 + 12px));
  scrollbar-width: none;
}
.ref-track::-webkit-scrollbar { display: none; }
@media (min-width: 576px)  { .ref-track { --cw: 540px; } }
@media (min-width: 768px)  { .ref-track { --cw: 720px; } }
@media (min-width: 992px)  { .ref-track { --cw: 960px; } }
@media (min-width: 1200px) { .ref-track { --cw: 1140px; } }
@media (min-width: 1400px) { .ref-track { --cw: 1320px; } }

.ref-card {
  flex: 0 0 clamp(240px, 72vw, 280px);
  scroll-snap-align: start;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(13, 27, 69, .06);
  transition: transform .3s, box-shadow .3s;
}
.ref-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

/* image avec bord inférieur en biais (comme la maquette) */
.ref-media {
  position: relative;
  height: 290px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blue) 0%, var(--navy-2) 60%, var(--navy) 100%);
  transform: skewY(-6deg);
  transform-origin: top left;
}
[dir="rtl"] .ref-media { transform: skewY(6deg); transform-origin: top right; }
.ref-media-inner {
  position: absolute;
  inset: -34px 0;
  transform: skewY(6deg);
}
[dir="rtl"] .ref-media-inner { transform: skewY(-6deg); }
.ref-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(26px) saturate(1.6);
  transform: scale(1.3);
  opacity: .45;
  mix-blend-mode: screen;
}
.ref-img {
  position: absolute;
  inset: 55px 22px;
  width: calc(100% - 44px); height: calc(100% - 110px);
  object-fit: contain;
  border-radius: 14px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .25));
  transition: transform .4s;
}
.ref-card:hover .ref-img { transform: scale(1.06); }

.ref-body {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: .8rem;
  padding: 1rem 1.2rem 1.2rem;
}
.ref-text { min-width: 0; }
.ref-text h3 {
  font-size: 1rem;
  color: var(--navy);
  margin: 0 0 .25rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ref-text span { font-size: .85rem; color: var(--muted); }
.ref-btn {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border: none;
  border-radius: 13px;
  background: var(--blue);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 6px 16px rgba(10, 92, 255, .35);
  transition: background .2s, transform .2s;
}
.ref-btn:hover { background: var(--navy); transform: translateY(-2px); }
[dir="rtl"] .ref-btn i, [dir="rtl"] .ref-arrow i { display: inline-block; transform: scaleX(-1); }

.ref-modal {
  position: relative;
  border: none;
  border-radius: 24px;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}
.ref-modal .btn-close { position: absolute; top: 1rem; inset-inline-end: 1rem; }
.ref-modal img { max-width: 100%; max-height: 60vh; object-fit: contain; border-radius: 16px; }
.ref-modal h5 { color: var(--navy); font-weight: 800; }
.ref-modal span { color: var(--muted); }

/* ---------- Contact ---------- */
.contact-box {
  background: var(--bg-alt);
  border-radius: 28px;
  padding: clamp(1.5rem, 4vw, 3.5rem);
}
.social-card {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.8rem 1rem;
  text-decoration: none;
  color: var(--navy);
  box-shadow: 0 4px 18px rgba(13, 27, 69, .06);
  transition: transform .25s, box-shadow .25s;
}
.social-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); color: var(--navy); }
.social-card i { font-size: 2.2rem; }
.social-card span { font-size: .85rem; color: var(--muted); }
.contact-line {
  display: flex; align-items: center; gap: .9rem;
  height: 100%;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: var(--navy);
  box-shadow: 0 4px 18px rgba(13, 27, 69, .06);
  transition: transform .25s, box-shadow .25s;
  min-width: 0;
}
.contact-line:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--navy); }
.contact-line small { display: block; color: var(--muted); font-size: .8rem; }
.contact-line strong { display: block; font-size: 1rem; overflow-wrap: anywhere; }
.contact-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--navy-2));
  color: #fff;
  font-size: 1.3rem;
}
.sc-facebook i { color: #1877f2; }
.sc-instagram i { color: #e1306c; }
.sc-tiktok i { color: #000; }
.sc-linkedin i { color: #0a66c2; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #b9c6ea; padding: 40px 0; }
.footer-contact a { color: #b9c6ea; text-decoration: none; font-size: .9rem; }
.footer-contact a:hover { color: #fff; }
.footer-tag { font-size: .75rem; letter-spacing: 3px; text-transform: uppercase; color: #8ea3da; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; bottom: 22px; inset-inline-end: 22px;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--blue); color: #fff;
  box-shadow: 0 8px 20px rgba(10, 92, 255, .4);
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
  text-decoration: none;
  z-index: 1000;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { color: #fff; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  translate: 0 30px;
  transition: opacity .7s ease, translate .7s ease, transform .25s, box-shadow .25s, border-color .25s, background .25s;
}
.reveal.visible { opacity: 1; translate: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-card, .marquee-track, .pf-play::before, .pf-grid.in-view .pf-item { animation: none; }
  .pf-grid:not(.in-view) .pf-item { opacity: 1; }
  .reveal { opacity: 1; translate: none; transition: none; }
}

@media (max-width: 991.98px) {
  .hero { padding: 120px 0 80px; text-align: center; }
  .hero .d-flex { justify-content: center; }
  .hero-lead { margin-inline: auto; }
  .hero-card { max-width: 380px; margin: 0 auto; }
  .navbar-collapse { padding-top: .8rem; }
  .section { padding: 70px 0; }
}
