/* ===================================================================
   Marsa Works Sarl — Feuille de styles
   Palette océan : bleus profonds + cyan/turquoise
   =================================================================== */

:root {
  --navy-900: #07203b;
  --navy-800: #0a2540;
  --navy-700: #0d3b66;
  --blue-600: #1d6fa5;
  --cyan-500: #00b4d8;
  --cyan-400: #48cae4;
  --cyan-300: #90e0ef;
  --sand-50: #f5f9fc;
  --sand-100: #eef4f9;
  --ink: #11202e;
  --ink-soft: #44586a;
  --white: #ffffff;
  --line: #e2ebf2;

  --grad-hero: radial-gradient(1200px 600px at 80% -10%, #1d6fa5 0%, transparent 60%),
               linear-gradient(160deg, #0a2540 0%, #0d3b66 55%, #07314f 100%);
  --grad-accent: linear-gradient(135deg, #00b4d8 0%, #0d3b66 100%);

  --shadow-sm: 0 2px 8px rgba(10, 37, 64, 0.08);
  --shadow-md: 0 12px 30px rgba(10, 37, 64, 0.12);
  --shadow-lg: 0 24px 60px rgba(7, 32, 59, 0.22);

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;

  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--blue-600); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  color: var(--navy-800);
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-800);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--cyan-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-accent);
  background-origin: border-box;
  background-clip: border-box;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 180, 216, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0, 180, 216, 0.45); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--navy-800);
}
.brand img { border-radius: 12px; box-shadow: var(--shadow-sm); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-text small { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan-500); font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: .35rem; }
.main-nav a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .96rem;
  color: var(--navy-800);
  padding: 10px 14px;
  border-radius: 10px;
  transition: background .2s ease, color .2s ease;
}
.main-nav a:hover { background: var(--sand-100); color: var(--navy-700); }
.main-nav .nav-cta {
  background: var(--grad-accent);
  color: #fff;
  margin-left: .4rem;
  box-shadow: 0 8px 18px rgba(0, 180, 216, 0.3);
}
.main-nav .nav-cta:hover { color: #fff; transform: translateY(-1px); }

/* ---------- Language switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--sand-100);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-left: .5rem;
}
.lang-btn {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--navy-800);
  background: transparent;
  border: 0;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.7); }
.lang-btn.is-active {
  background: var(--navy-700);
  color: #fff;
  box-shadow: 0 4px 10px rgba(13, 59, 102, 0.25);
}
.lang-btn:focus-visible {
  outline: 2px solid var(--cyan-500);
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--navy-800);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--grad-hero);
  color: #fff;
  overflow: hidden;
  padding: clamp(80px, 14vw, 150px) 0 clamp(120px, 16vw, 180px);
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.bubble {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.45), rgba(144,224,239,.12));
  opacity: .5;
  animation: rise linear infinite;
}
.b1 { left: 8%;  width: 18px; height: 18px; animation-duration: 16s; }
.b2 { left: 28%; width: 30px; height: 30px; animation-duration: 22s; animation-delay: 3s; }
.b3 { left: 52%; width: 12px; height: 12px; animation-duration: 13s; animation-delay: 1s; }
.b4 { left: 71%; width: 24px; height: 24px; animation-duration: 19s; animation-delay: 6s; }
.b5 { left: 88%; width: 16px; height: 16px; animation-duration: 24s; animation-delay: 2s; }
@keyframes rise {
  0%   { transform: translateY(0) scale(.6); opacity: 0; }
  15%  { opacity: .6; }
  100% { transform: translateY(-115vh) scale(1.1); opacity: 0; }
}

.hero-inner { position: relative; max-width: 820px; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan-300);
  background: rgba(144, 224, 239, 0.12);
  border: 1px solid rgba(144, 224, 239, 0.3);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5.4vw, 3.9rem);
  font-weight: 800;
  margin-bottom: 1.1rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 640px;
  margin-bottom: 2rem;
}
.hero-sub strong { color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
}
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--font-head); font-size: 1.55rem; font-weight: 800; color: var(--cyan-300); }
.hero-facts span { font-size: .9rem; color: rgba(255, 255, 255, 0.75); }

.hero-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(60px, 9vw, 120px);
  display: block;
}
.hero-waves path { fill: var(--white); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { background: var(--sand-50); }

.section-eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan-500);
  margin-bottom: .6rem;
}
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 700; }
.section-head { max-width: 680px; margin: 0 auto 3rem; text-align: center; }
.section-intro { color: var(--ink-soft); font-size: 1.08rem; }

.lead { font-size: 1.12rem; color: var(--ink-soft); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.link-arrow {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--cyan-500);
  display: inline-flex;
  gap: .4rem;
  align-items: center;
}
.link-arrow span { transition: transform .2s ease; }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Feature list (expertise) ---------- */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.feature-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-list li:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-ic {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  border-radius: 12px;
  background: var(--sand-100);
}
.feature-list h3 { font-size: 1.08rem; margin-bottom: .15rem; }
.feature-list p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card-ic {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--grad-accent);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  box-shadow: 0 10px 22px rgba(0, 180, 216, 0.32);
}
.card-ic svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.2rem; margin-bottom: .8rem; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card ul li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .55rem;
  color: var(--ink-soft);
  font-size: .96rem;
}
.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan-400);
}

/* ---------- Stats ---------- */
.stats { background: var(--navy-800); color: #fff; padding: clamp(48px, 7vw, 80px) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat { padding: 1rem; }
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1;
  background: linear-gradient(120deg, #fff, var(--cyan-300));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { color: rgba(255, 255, 255, 0.75); font-size: .98rem; }

/* ---------- Projects ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.project:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy-800);
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.project:hover .project-media img { transform: scale(1.05); }
.project-body {
  display: flex;
  flex-direction: column;
  padding: 1.8rem;
}
.project-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-600);
  background: var(--sand-100);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.project h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.project p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

.clients { margin-top: 3rem; text-align: center; }
.clients-title {
  display: block;
  font-family: var(--font-head);
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
.clients ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .8rem 1rem;
}
.clients li {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--navy-700);
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Formation ---------- */
.formation-wrap {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
.ticks { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 2rem; color: var(--ink-soft); }
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-accent);
  border-radius: 50%;
}
.formation-card {
  background: var(--grad-hero);
  color: #fff;
  border-radius: 24px;
  padding: 2.6rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.fc-num { display: block; font-family: var(--font-head); font-weight: 800; font-size: 3.4rem; color: var(--cyan-300); line-height: 1; }
.fc-label { display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .85rem; color: rgba(255,255,255,.8); margin-top: .4rem; }
.fc-divider { height: 1px; background: rgba(255, 255, 255, 0.2); margin: 1.4rem auto; width: 60%; }
.formation-card p { margin: 0; color: rgba(255, 255, 255, 0.85); }

/* ---------- Contact ---------- */
.contact-grid { align-items: start; }
.contact-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.2rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-ic {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  border-radius: 12px;
  background: var(--sand-100);
}
.contact-label { display: block; font-family: var(--font-head); font-weight: 600; color: var(--navy-800); font-size: .95rem; }
.contact-list a { color: var(--ink-soft); }
.contact-list a:hover { color: var(--cyan-500); }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .92rem; margin-bottom: .4rem; color: var(--navy-800); }
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--sand-50);
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--cyan-400);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.14);
}
.field textarea { resize: vertical; }
.form-note { font-size: .85rem; color: var(--ink-soft); margin: .8rem 0 0; text-align: center; }

/* Honeypot anti-spam field — hidden from real users */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Contact form status message */
.form-status {
  margin: 1rem 0 0;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 500;
  text-align: center;
}
.form-status.is-pending {
  background: var(--sand-100);
  color: var(--ink-soft);
}
.form-status.is-success {
  background: #e6f7ee;
  color: #18794e;
  border: 1px solid #b6e7cd;
}
.form-status.is-error {
  background: #fdecec;
  color: #b42318;
  border: 1px solid #f5c2c0;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, 0.78); padding-top: 3.5rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.brand-light { color: #fff; }
.brand-light .brand-text strong { color: #fff; }
.footer-brand p { margin-top: 1rem; max-width: 36ch; font-size: .96rem; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-col a { display: block; color: rgba(255, 255, 255, 0.72); padding: 4px 0; font-size: .96rem; }
.footer-col a:hover { color: var(--cyan-300); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.4rem 24px;
  font-size: .88rem;
}
.footer-bottom p { margin: 0; }
.footer-tag { color: rgba(255, 255, 255, 0.5); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards, .projects { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .formation-wrap { grid-template-columns: 1fr; }
  .formation-card { order: -1; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 1rem 24px 1.4rem;
    transform: translateY(-130%);
    transition: transform .3s ease;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 14px 12px; font-size: 1.05rem; }
  .main-nav .nav-cta { margin: .4rem 0 0; text-align: center; }
}

@media (max-width: 560px) {
  .cards, .projects, .stats-grid { grid-template-columns: 1fr; }
  .hero-facts { gap: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
