/* =========================================================
   Yindo Labs — landing page
   Palette issue du logo : marine #17296B, jaune #FFD400.
   Aucun dégradé : aplats, filets fins, beaucoup de blanc.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Marque */
  --navy: #17296B;
  --navy-dark: #101D4D;
  --navy-light: #2C3F82;
  --yellow: #FFD400;

  /* Thème clair (par défaut) */
  --bg: #FFFFFF;
  --bg-soft: #F6F7FA;
  --surface: #FFFFFF;
  --border: #E3E6EE;
  --border-strong: #C9CEDE;
  --text: #17296B;
  --text-body: #3E4763;
  --text-muted: #666D8A;
  --brand: var(--navy);
  --brand-contrast: #FFFFFF;
  --accent: var(--yellow);

  --maxw: 1080px;
  --radius: 12px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0F1730;
  --bg-soft: #141D3B;
  --surface: #141D3B;
  --border: #253057;
  --border-strong: #35426F;
  --text: #EDF0F7;
  --text-body: #C3C9DC;
  --text-muted: #8F98B5;
  --brand: #FFFFFF;
  --brand-contrast: #17296B;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--text); line-height: 1.2; margin: 0 0 .5rem; font-weight: 600; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }

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

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; }
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 4px; }
:root[data-theme="dark"] :focus-visible { outline-color: var(--yellow); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner { display: flex; align-items: center; gap: 16px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 32px; height: 32px; border-radius: 7px; flex: none; }
.brand-name { color: var(--text); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 30px; }
.nav a {
  position: relative; font-size: .94rem; color: var(--text-muted); font-weight: 500;
  padding: 4px 0; transition: color .2s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--yellow); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: color .2s ease, border-color .2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle { display: none; }

.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

/* ---------- Boutons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px; border-radius: 8px;
  font-size: .94rem; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); }
:root[data-theme="dark"] .btn-primary { background: #fff; color: var(--navy); }
:root[data-theme="dark"] .btn-primary:hover { background: #E6E9F4; }

.btn-outline { color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 96px) 0 clamp(40px, 5vw, 56px); }
.hero-inner { max-width: 660px; }
.hero h1 { margin-bottom: 1.1rem; }
.lead { font-size: 1.06rem; color: var(--text-muted); margin-bottom: 2rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 80px) 0; }
.section-head { margin-bottom: 36px; }
.section-head h2 { margin-bottom: .25rem; }
.section-sub { color: var(--text-muted); margin: 0; font-size: .96rem; }

/* ---------- Cartes projets ---------- */
.projects { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.card {
  display: flex; flex-direction: column;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease;
}
.card:hover { border-color: var(--border-strong); }

.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-title { margin: 0; font-size: 1.18rem; font-weight: 600; }

.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 500; color: var(--text-muted);
  white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.status-test::before { background: var(--yellow); }   /* phase de test */
.status-live::before { background: #2F9E68; }        /* disponible */

.card-tagline { color: var(--text-muted); font-size: .88rem; margin: .3rem 0 .9rem; }
.card-text { font-size: .94rem; margin-bottom: 1.1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1.4rem; }
.tags li {
  font-size: .75rem; color: var(--text-muted);
  padding: 3px 9px; border-radius: 5px;
  background: var(--bg-soft); border: 1px solid var(--border);
}

.card-links {
  display: flex; flex-wrap: nowrap; align-items: center;
  justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border);
}
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .9rem; font-weight: 500; color: var(--text);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.link-arrow { min-width: 0; }
.link-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.link-arrow:hover { border-bottom-color: var(--yellow); }

.link-muted { font-size: .9rem; color: var(--text-muted); transition: color .2s ease; }
.link-muted:hover { color: var(--text); }

/* ---------- Contact ---------- */
.section-contact { border-top: 1px solid var(--border); }
.contact-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.contact-inner h2 { margin-bottom: .2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 44px 0 20px; }
.footer-inner { display: grid; gap: 28px; grid-template-columns: 1.6fr 1fr 1fr; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-logo { width: 28px; height: 28px; border-radius: 6px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; margin: 0 0 2px; }
.footer-links a { font-size: .9rem; color: var(--text-muted); transition: color .2s ease; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: .84rem; color: var(--text-muted); margin: 0; }

/* ---------- Page 404 ---------- */
.notfound { display: flex; align-items: center; min-height: 70vh; }
.notfound-code {
  font-size: .85rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: .6rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .nav-toggle { display: inline-grid; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px 24px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .card { padding: 22px 20px; }
  .card-links { flex-wrap: wrap; justify-content: flex-start; gap: 8px 18px; }
  .actions .btn, .contact-inner .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
