/* Minimalist Myelink homepage styles */

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.4px;
}
.site-nav a {
  color: var(--fg);
  text-decoration: none;
  margin-left: 16px;
  opacity: 0.9;
}
.site-nav a:hover { color: var(--accent); opacity: 1; }
.site-nav .app-entry { color: var(--accent); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; }

.site-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px clamp(16px, 3vw, 36px) 80px;
  flex: 1;
}
.section { padding: 48px 0; border-bottom: 1px dashed var(--line); }
.section:last-child { border-bottom: 0; }
.section h1, .section h2 { line-height: 1.2; margin: 0 0 12px; }
.section p { margin: 0 0 16px; color: var(--muted); }

/* Central hero for accroche */
.hero { text-align: center; }

.bullets { margin: 8px 0 0 0; padding-left: 18px; color: var(--fg); }

.apps-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.app-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
}
.app-card h3 { margin: 0 0 6px; }
.app-card p { margin: 0 0 12px; color: var(--muted); }
.app-card--placeholder { opacity: 0.8; }

.btn {
  display: inline-block;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 9999px;
}
.btn:hover {
  border-color: var(--accent);
  background: rgba(110,231,183,0.08);
}

.app-card--link { display: block; text-decoration: none; color: inherit; }


/* Enhancements for minimalist centered hero and accessibility */
html { scroll-behavior: smooth; }

.hero {
  text-align: center;
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vh, 64px) 0;
}
.hero-inner { max-width: 820px; margin: 0 auto; }
.hero h1 {
  font-family: "Space Grotesk", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial;
  font-size: clamp(36px, 6.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.subtitle { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); margin: 4px 0 20px; }
.cta-group { display: flex; justify-content: center; gap: 12px; }

.btn { transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 120ms ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(110,231,183,0.35), 0 0 0 6px rgba(110,231,183,0.2); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}

/* Reveal services only when targeted */
.services { display: none; }
.services:target { display: block; scroll-margin-top: 80px; }

/* Utilities */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.4px;
}
.site-nav a {
  color: var(--fg);
  text-decoration: none;
  margin-left: 16px;
  opacity: 0.9;
}
.site-nav a:hover { color: var(--accent); opacity: 1; }
.site-nav .app-entry { color: var(--accent); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; }

.site-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px clamp(16px, 3vw, 36px) 80px;
  flex: 1;
}
.section { padding: 48px 0; border-bottom: 1px dashed var(--line); }
.section:last-child { border-bottom: 0; }
.section h1, .section h2 { line-height: 1.2; margin: 0 0 12px; }
.section p { margin: 0 0 16px; color: var(--muted); }

/* Central hero for accroche */
.hero { text-align: center; }

.bullets { margin: 8px 0 0 0; padding-left: 18px; color: var(--fg); }

.apps-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.app-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
}
.app-card h3 { margin: 0 0 6px; }
.app-card p { margin: 0 0 12px; color: var(--muted); }
.app-card--placeholder { opacity: 0.8; }

.btn {
  display: inline-block;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 9999px;
}
.btn:hover {
  border-color: var(--accent);
  background: rgba(110,231,183,0.08);
}

.app-card--link { display: block; text-decoration: none; color: inherit; }


/* Enhancements for minimalist centered hero and accessibility */
html { scroll-behavior: smooth; }

.hero {
  text-align: center;
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vh, 64px) 0;
}
.hero-inner { max-width: 820px; margin: 0 auto; }
.hero h1 {
  font-family: "Space Grotesk", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial;
  font-size: clamp(36px, 6.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.subtitle { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); margin: 4px 0 20px; }
.cta-group { display: flex; justify-content: center; gap: 12px; }

.btn { transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 120ms ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(110,231,183,0.35), 0 0 0 6px rgba(110,231,183,0.2); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}

/* Reveal services only when targeted */
.services { display: none; }
.services:target { display: block; scroll-margin-top: 80px; }

/* Utilities */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Service cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.card .icon { width: 24px; height: 24px; display: inline-block; margin-bottom: 8px; filter: invert(1) brightness(1.2); opacity: 0.9; }
.card h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.3; font-weight: 400; }
.card p { margin: 0; color: var(--muted); }

/* Extended hero subtitle/description */
.hero .subtitle-extended {
  font-size: clamp(13px, 1.8vw, 16px);
  font-style: italic;
  color: var(--muted);
  line-height: 1.65;
  max-width: 72ch;
  margin: 6px auto 24px;
}

.footer { background: var(--bg); color: var(--fg); text-align: center; padding: 1.5rem 2rem; font-size: 0.9rem; margin-top: auto; position: relative; z-index: 1; }
/* Social footer */
.footer .social { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 0 0 6px; }
.footer .social-link { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9999px; text-decoration: none; transition: border-color 160ms ease, background-color 160ms ease, transform 120ms ease, opacity 160ms ease; opacity: 0.9; }
.footer .social-link:hover, .footer .social-link:focus-visible { border-color: var(--accent); background: rgba(110,231,183,0.08); transform: translateY(-1px); opacity: 1; outline: none; }
.footer .social-link img { width: 18px; height: 18px; filter: invert(1) brightness(1.2); display: block; }
.footer .copyright { color: var(--muted); font-size: 0.82rem; margin: 6px 0 0; }


/* Hero meta tags/badges */
.meta-tags { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 6px 0 10px; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: clamp(11px, 1.4vw, 12px);
  color: var(--muted);
  background: transparent;
  letter-spacing: 0.2px;
}


/* Sections visible by default (override any previous hide rules) */
.services, .applications { display: block; }


/* Section and app-card title weights (lighter for minimalist hierarchy) */
.section h2 { font-weight: 400; }
.app-card h3 { font-weight: 400; }


/* Section spacing: remove separators and unify vertical rhythm */
.section { padding: clamp(40px, 6vh, 72px) 0; border: 0; }
.section:last-child { border: 0; }
/* Ensure no extra gaps caused by previous definitions */
.section + .section { margin-top: 0; }


/* Icon color accents per service card — line color only (no background) */
.cards .card .icon {
  /* ensure no background pill styles */
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
/* Base icon is white; override with per-card color filters */
.cards .card:nth-child(1) .icon { /* Optimisation / OR — blue */
  filter: invert(32%) sepia(83%) saturate(2458%) hue-rotate(216deg) brightness(93%) contrast(101%);
}
.cards .card:nth-child(2) .icon { /* Chatbots — purple */
  filter: invert(24%) sepia(88%) saturate(4118%) hue-rotate(265deg) brightness(92%) contrast(102%);
}
.cards .card:nth-child(3) .icon { /* Recommandation — amber */
  filter: invert(71%) sepia(67%) saturate(3517%) hue-rotate(3deg) brightness(99%) contrast(101%);
}
.cards .card:nth-child(4) .icon { /* Ingestion/traitement — emerald */
  filter: invert(55%) sepia(93%) saturate(402%) hue-rotate(116deg) brightness(95%) contrast(88%);
}
.cards .card:nth-child(5) .icon { /* ML/RL — rose */
  filter: invert(59%) sepia(39%) saturate(6400%) hue-rotate(321deg) brightness(102%) contrast(96%);
}
.cards .card:nth-child(6) .icon { /* Computer Vision — cyan */
  filter: invert(50%) sepia(75%) saturate(533%) hue-rotate(151deg) brightness(94%) contrast(90%);
}


/* Hero spacing and title weight overrides */
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 3vh, 24px);
}
.hero h1 { font-weight: 600; margin: 0; }
.hero .subtitle,
.hero .meta-tags,
.hero .subtitle-extended { margin: 0; }


/* Applications infotip */
.applications .info-tip {
  font-size: clamp(11px, 1.4vw, 13px);
  color: var(--muted);
  margin: 4px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.applications .info-tip::before {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

/* Minimalist top-to-bottom dark gradient background for company home (dark mode) */
html.theme-dark body {
  background-color: var(--bg); /* solid fallback */
  background-image: linear-gradient(to bottom, #111318 0%, #0e0f12 45%, #0b0c10 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}


/* Final spacing fix: ensure even spacing similar to Harvest */
.section { scroll-margin-top: 80px; }
.hero { min-height: unset; }


/* Compact hero spacing overrides */
.hero {
  min-height: unset; /* ensure no forced viewport height */
  padding-block: clamp(16px, 3vh, 36px);
}
.hero-inner {
  gap: clamp(8px, 2vh, 16px);
}
/* Reduce top padding of the section following hero to tighten rhythm */
.hero + .section {
  padding-top: clamp(16px, 2vh, 28px);
}
