/* ============================================================
   MENOTECH — Feuille de style partagée
   Palette : Bleu nuit #0B132B · Bleu électrique #2563E9 · Cyan #06B4D2
   Police  : Clash Display (Fontshare)
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&display=swap');

/* ---------- Variables ---------- */
:root {
  --ink:        #0B132B;
  --ink-soft:   #3a4a6b;
  --paper:      #FFFFFF;
  --paper-dim:  #F0F4FF;
  --blue:       #2563E9;
  --blue-dark:  #1d4ed8;
  --cyan:       #06B4D2;
  --cyan-dark:  #0891B2;
  --line:       rgba(11,19,43,0.10);
  --line-dark:  rgba(255,255,255,0.13);
  --radius:     6px;
  --maxw:       1680px;
  --gutter:     clamp(20px, 4vw, 72px);
  --nav-h:      80px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Clash Display', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5 {
  font-family: 'Clash Display', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.015em;
}
p  { margin: 0; }
a  { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 100px 0; }
@media (max-width: 640px) { section { padding: 64px 0; } }

/* ---------- Typography helpers ---------- */
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.75rem, 2.8vw, 2.4rem); }
.section-head p  { margin-top: 18px; font-size: 1.05rem; color: var(--ink-soft); line-height: 1.7; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary  { background: var(--blue);  color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-outline   { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline-light:hover { background: rgba(255,255,255,0.10); border-color: #fff; }
.btn-cyan { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.btn-cyan:hover { background: var(--cyan-dark); border-color: var(--cyan-dark); }

/* ---------- Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  height: var(--nav-h);
  display: flex; align-items: center;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; width: 100%;
}
.nav-logo { display: flex; align-items: center; flex: none; }
.nav-logo svg { height: 62px; width: auto; }
.nav-links {
  display: flex; align-items: center; gap: 8px;
}
.nav-links a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink-soft);
  padding: 7px 14px; border-radius: var(--radius);
  transition: color .15s, background .15s;
}
.nav-links a:hover  { color: var(--ink); background: var(--paper-dim); }
.nav-links a.active { color: var(--blue); font-weight: 600; }
.nav-cta { display: flex; gap: 10px; align-items: center; flex: none; }
.nav-lang-mobile { display: none; }

/* Hamburger */
.nav-burger {
  display: none; flex: none;
  width: 42px; height: 42px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0;
}
.nav-burger svg { width: 20px; height: 20px; color: var(--ink); }
.mobile-nav {
  display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(11,19,43,0.10);
  padding: 20px 0 28px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 13px var(--gutter); font-size: 1rem;
  color: var(--ink); font-weight: 500;
  border-bottom: 1px solid var(--line);
  transition: color .15s;
}
.mobile-nav a:last-of-type { border-bottom: none; }
.mobile-nav a:hover { color: var(--blue); }
.mobile-nav .mobile-ctas { padding: 18px var(--gutter) 0; display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-inner { gap: 0; justify-content: space-between; }
  .site-header { overflow: visible; }
  /* Lang switch flottant entre logo et hamburger */
  .nav-lang-mobile { display: flex; align-items: center; margin-left: auto; margin-right: 12px; }
}
@media (max-width: 420px) {
  .nav-logo svg { height: 38px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: #060c1a;
  color: rgba(255,255,255,0.65);
  padding: 64px 0 32px;
}
.footer-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { max-width: 300px; }
.footer-brand svg { height: 70px; width: auto; margin-bottom: 18px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; color: rgba(255,255,255,0.5); }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h5 {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: rgba(255,255,255,0.85); margin-bottom: 16px;
}
.footer-col li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-col a, .footer-col button {
  background: none; border: none; padding: 0;
  color: rgba(255,255,255,0.55); font-family: inherit; font-size: inherit;
  transition: color .15s;
}
.footer-col a:hover, .footer-col button:hover { color: var(--cyan); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-top: 28px; font-size: 0.82rem; color: rgba(255,255,255,0.35);
}
@media (max-width: 680px) {
  .footer-cols { gap: 36px; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Cards & shared components ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.card-icon {
  width: 44px; height: 44px;
  background: rgba(37,99,233,0.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  margin-bottom: 20px;
  flex: none;
}
.card-icon svg { width: 22px; height: 22px; }

/* ---------- Stat badges ---------- */
.stat-badge {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  padding: 20px 28px; border-radius: var(--radius);
  background: var(--paper-dim); border: 1px solid var(--line);
}
.stat-badge .num {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700; color: var(--blue); line-height: 1;
}
.stat-badge .label { font-size: 0.85rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Divider ---------- */
.divider { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Visually hidden ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Page hero (dark) ---------- */
.page-hero {
  background: var(--ink);
  color: #fff;
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 75% 40%, rgba(37,99,233,0.22) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero .kicker { color: var(--cyan); }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 3.8vw, 3rem); max-width: 22ch; margin-top: 8px; }
.page-hero p.lede { margin-top: 20px; font-size: 1.08rem; color: rgba(255,255,255,0.72); max-width: 52ch; line-height: 1.75; }

/* ---------- Inline CTA banner ---------- */
.cta-band {
  background: var(--blue);
  color: #fff;
  padding: 72px 0;
  text-align: center;
}
.cta-band h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); color: #fff; max-width: 20ch; margin: 0 auto; }
.cta-band p  { margin-top: 16px; color: rgba(255,255,255,0.80); font-size: 1.05rem; max-width: 48ch; margin-left: auto; margin-right: auto; }
.cta-band .actions { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 40px;
}
@media (max-width: 520px) { .form-card { padding: 24px; } }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.84rem; margin-bottom: 8px; color: rgba(255,255,255,0.70); }
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: #fff;
  font-family: inherit; font-size: 0.95rem;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.35); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--cyan); outline-offset: 1px;
}
.field select option { background: #1a2540; color: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.form-note  { font-size: 0.80rem; color: rgba(255,255,255,0.40); margin-top: 14px; }
.form-success { display: none; margin-top: 16px; font-size: 0.9rem; color: var(--cyan); font-weight: 500; }
.form-error   { display: none; margin-top: 16px; font-size: 0.9rem; color: #f87171; }

/* ---------- Active nav helper ---------- */
[data-page="home"]     .nav-home     { color: var(--blue) !important; font-weight: 600; }
[data-page="services"] .nav-services { color: var(--blue) !important; font-weight: 600; }
[data-page="about"]    .nav-about    { color: var(--blue) !important; font-weight: 600; }
[data-page="contact"]  .nav-contact  { color: var(--blue) !important; font-weight: 600; }

/* ---------- Language globe button ---------- */
.lang-globe {
  position: relative; flex: none;
}
.lang-globe-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: none; border: none; border-radius: 50%;
  cursor: pointer; padding: 0;
  color: var(--ink-soft);
  transition: color .15s, background .15s;
}
.lang-globe-btn:hover { color: var(--ink); background: var(--paper-dim); }
.lang-globe-btn svg { width: 20px; height: 20px; display: block; }

.lang-dropdown {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(11,19,43,0.10);
  min-width: 120px; z-index: 200; overflow: hidden;
}
.lang-globe.open .lang-dropdown { display: block; }
.lang-dropdown button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px;
  background: none; border: none; cursor: pointer;
  font-size: 0.88rem; font-weight: 500; font-family: inherit;
  color: var(--ink-soft); text-align: left;
  transition: background .12s, color .12s;
}
.lang-dropdown button:hover { background: var(--paper-dim); color: var(--ink); }
.lang-dropdown button.lang-btn--active { color: var(--blue); font-weight: 700; }
.lang-dropdown button + button { border-top: 1px solid var(--line); }

/* Mobile: même globe dans nav-lang-mobile */
.nav-lang-mobile .lang-globe-btn { color: var(--ink); }

/* Legacy .lang-switch / .lang-btn — conservé pour compatibilité éventuelle */
.lang-switch { display: none; }
.lang-btn { display: none; }

/* Mobile lang switch */
.mobile-lang { padding: 16px var(--gutter) 0; }
.mobile-lang .lang-switch { border-color: var(--line); }

/* ---------- Responsive — full audit ---------- */

/* Grids: 2-col → 1-col on tablet */
@media (max-width: 900px) {
  .grid-2col { grid-template-columns: 1fr !important; gap: 40px !important; }
  .grid-3col { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .grid-4col { grid-template-columns: 1fr 1fr !important; }
}

/* Nav height adapts so tall logo fits */
@media (max-width: 980px) {
  :root { --nav-h: 72px; }
  .nav-logo svg { height: 48px; }
}

/* Small phones */
@media (max-width: 640px) {
  :root { --nav-h: 64px; }
  .nav-logo svg { height: 40px; }

  section { padding: 56px 0; }
  .page-hero { padding: 64px 0 56px; }
  .page-hero h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); }

  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-cols  { gap: 32px; }
  .footer-brand { max-width: 100%; }
  .footer-brand svg { height: 54px; }

  .cta-band { padding: 52px 0; }

  /* Hero grids */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
  /* 4-col result grid → 1 col */
  div[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr !important;
  }
  /* Service cards 2-col → 1-col */
  div[style*="grid-template-columns:1fr 1fr"][style*="gap:20px"] {
    grid-template-columns: 1fr !important;
  }
  /* Section service grids */
  div[style*="grid-template-columns:1fr 1.1fr"],
  div[style*="grid-template-columns:1.1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
  .btn { padding: 12px 18px; font-size: 0.88rem; }
  .card { padding: 22px; }
}

/* Very small */
@media (max-width: 380px) {
  :root { --nav-h: 58px; }
  .nav-logo svg { height: 34px; }
}

/* ============================================================
   Menu Services déroulant (desktop)
   ============================================================ */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown > a { padding-right: 4px; }
.nav-dd-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; margin-left: -2px;
  background: none; border: none; border-radius: var(--radius);
  color: var(--ink-soft);
  transition: color .15s, background .15s;
}
.nav-dd-toggle:hover { color: var(--ink); background: var(--paper-dim); }
.nav-dd-toggle svg { width: 14px; height: 14px; transition: transform .2s ease; }
.nav-dropdown.open .nav-dd-toggle svg,
.nav-dropdown:hover .nav-dd-toggle svg { transform: rotate(180deg); }
.nav-dd-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  padding-top: 14px;           /* zone de survol continue */
  min-width: 360px; z-index: 150;
}
.nav-dropdown:hover .nav-dd-menu,
.nav-dropdown:focus-within .nav-dd-menu,
.nav-dropdown.open .nav-dd-menu { display: block; }
.nav-dd-menu-inner {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(11,19,43,0.14);
  padding: 8px;
}
.nav-links .nav-dd-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 14px; border-radius: var(--radius);
  font-size: 0.92rem; font-weight: 500; color: var(--ink);
}
.nav-links .nav-dd-menu a:hover { background: var(--paper-dim); color: var(--blue); }
.nav-dd-sep { height: 1px; background: var(--line); margin: 6px 8px; }
.tag-soon {
  flex: none;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cyan-dark); background: rgba(6,180,210,0.12);
  padding: 3px 8px; border-radius: 99px;
}

/* Sous-liens du menu mobile */
.mobile-nav a.sub {
  padding-left: calc(var(--gutter) + 22px);
  font-size: 0.93rem; font-weight: 400; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* ============================================================
   Accueil — héro + tableau de bord Power BI
   ============================================================ */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: clamp(32px, 4vw, 72px);
  align-items: center;
}
.hero-dashboard {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
/* L'iframe dépasse de 40 px vers le bas ; le conteneur (overflow:hidden) masque la barre « Microsoft Power BI » */
.hero-dashboard iframe { width: 100%; height: calc(100% + 40px); border: 0; display: block; }
.hero-dashboard > svg { width: 100%; height: 100%; max-width: none; }
/* Écran de chargement : recouvre l'iframe puis disparaît en fondu */
.dashboard-loader {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: #111827;
  opacity: 1; transition: opacity 0.5s ease;
}
.dashboard-loader img { width: min(260px, 45%); height: auto; }
.dashboard-loader.is-hidden { opacity: 0; pointer-events: none; }
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-dashboard { aspect-ratio: 4 / 3; }
}

/* ============================================================
   Pages "bientôt disponible"
   ============================================================ */
.soon-card {
  max-width: 760px;
  background: var(--paper-dim); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(28px, 4vw, 48px);
}
.soon-card .tag-soon { font-size: 0.74rem; padding: 5px 12px; }
.soon-card h2 { margin-top: 18px; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.soon-card p  { margin-top: 14px; color: var(--ink-soft); line-height: 1.75; }
.soon-card .actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }

.svc-soon-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
@media (max-width: 760px) { .svc-soon-grid { grid-template-columns: 1fr; } }
.svc-soon-card { display: block; transition: transform .15s, box-shadow .15s; }
.svc-soon-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(11,19,43,0.10); }

.svc-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
@media (max-width: 1000px) { .svc-home-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px)  { .svc-home-grid { grid-template-columns: 1fr; } }
