﻿/* ===== Polices hébergées localement (licence SIL OFL, voir fonts/LICENSE-*.txt) ===== */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/space-grotesk-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
}

/* ===== Variables ===== */
:root {
  --accent: #0E7C86;
  --accent-light: #7DD3C8;
  --navy: #0F1B2D;
  --navy-deep: #0A1422;
  --navy-card: #16263B;
  --bg: #F5F7FA;
  --white: #FFFFFF;
  --text: #12202F;
  --text-soft: #33445A;
  --muted: #4A5A6C;
  --border: #DCE3EB;
  --on-dark: #C3CEDB;
  --radius: 16px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
a { color: #0B6670; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
ul { list-style: none; margin: 0; padding: 0; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.muted { color: var(--muted); }
.accent { color: var(--accent-light); }
.lead { font-size: 19px; line-height: 1.6; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--white); color: var(--text); padding: 8px 16px; border-radius: 8px; z-index: 10;
}
.skip-link:focus { left: 8px; }

/* ===== Boutons ===== */
.btn {
  display: inline-block; padding: 14px 24px; border-radius: 10px;
  font-size: 16px; font-weight: 600; text-align: center;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-outline { border: 1px solid #4A6178; color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ===== En-tête ===== */
.site-header { background: var(--navy); }
.header-inner {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 20px;
}
.logo {
  font-family: var(--font-display); font-weight: 700; font-size: 24px;
  color: var(--white); letter-spacing: -0.5px;
}
.logo span { color: var(--accent-light); }
.logo:hover { text-decoration: none; }
.main-nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; font-weight: 500; }
.main-nav a { color: #D6DEE8; }

/* ===== Hero ===== */
.hero { background: var(--navy); color: var(--white); padding: 48px 0 88px; }
.hero-inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -1.5px; }
.hero .lead { color: var(--on-dark); max-width: 560px; }
.pill {
  align-self: flex-start; font-family: var(--font-mono); font-size: 13px;
  color: var(--accent-light); border: 1px solid #2F4A5E; border-radius: 999px; padding: 6px 14px;
}
.featured {
  flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px;
  background: var(--navy-card); border: 1px solid #2F4A5E; border-radius: var(--radius); padding: 24px;
}
.featured h2 { font-size: 28px; line-height: 1.15; }
.featured p { color: var(--on-dark); line-height: 1.55; }
.link-accent { color: var(--accent-light); font-weight: 600; }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section h2 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -1px; }
.section-white { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head {
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: flex-end; justify-content: space-between; margin-bottom: 32px;
}
.section-head p { margin-top: 8px; font-size: 17px; }
#projets { padding-bottom: 24px; }

/* ===== Filtres ===== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters[hidden] { display: none; }
.filter {
  cursor: pointer; font-family: var(--font-body); font-size: 15px; font-weight: 600;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  background: var(--white); color: var(--text); border: 1px solid #B8C4D1;
}
.filter.is-active { background: var(--accent); color: var(--white); border-color: var(--accent); }

/* ===== Cartes projets ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
}
.card[hidden] { display: none; }
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(15, 27, 45, 0.12);
  border-color: var(--accent);
}
.card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.card-top .mono { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.card h3 { font-size: 26px; letter-spacing: -0.5px; }
.card p { color: var(--text-soft); line-height: 1.55; flex-grow: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; background: #EEF2F6; color: var(--text-soft); border-radius: 6px; padding: 4px 8px; }
.card-link { font-weight: 600; font-size: 15px; }

.badge { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 4px 10px; }
.badge-free { background: #DDF3EE; color: #0B5A52; }
.badge-wip { background: #E6E9FB; color: #2A3A9E; }
.badge-tbd { background: #FCE9D2; color: #6B3600; } 
.badge-payant { background: #F7E2E3; color: #CA191A; }

/* ===== Actualités ===== */
.news {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin: 32px 0;
}
.news-item { border-top: 3px solid var(--accent); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.news-item time { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.news-item h3 { font-size: 20px; line-height: 1.3; }

/* ===== À propos ===== */
.about-intro { max-width: 720px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.about-intro p { font-size: 18px; line-height: 1.65; color: var(--text-soft); }
.about-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.about-card { background: var(--bg); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.about-card h3 { font-size: 22px; }
.about-card p { color: var(--text-soft); line-height: 1.55; }
.social { display: flex; flex-wrap: wrap; gap: 16px; font-size: 15px; font-weight: 600; }

/* ===== Contact ===== */
.contact { background: var(--navy); color: var(--white); padding: 72px 0; }
.contact-inner { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: space-between; }
.contact-inner > div:first-child { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; }
.contact h2 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -1px; }
.contact .lead { font-size: 18px; color: var(--on-dark); }
.contact-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.contact-actions span { font-size: 15px; color: var(--on-dark); }

/* ===== Pied de page ===== */
.site-footer { background: var(--navy-deep); color: #9FB0C3; padding: 24px 0; font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; text-align: center; }
.site-footer a { color: #9FB0C3; }

/* ===== Mobile ===== */
@media (max-width: 600px) {
  .hero { padding-bottom: 56px; }
  .section, .contact { padding: 48px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .card:hover, .card:focus-within { transform: none; }
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 800; letter-spacing: -.055em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(94,234,212,.45); background: rgba(94,234,212,.08); border-radius: 10px; color: var(--cyan); font-family: 'DM Mono', monospace; font-size: .85rem; letter-spacing: -.08em; }
.brand-accent { color: var(--cyan); }