/* positly.fr — feuille de style unique, sans dépendance externe */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --text: #16191d;
  --muted: #5b636e;
  --line: #e3e6ea;
  --accent: #1f5fd0;
  --accent-soft: #eaf0fc;
  --radius: 10px;
  --maxw: 880px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114;
    --bg-alt: #171a1f;
    --text: #e8eaee;
    --muted: #99a1ac;
    --line: #272b31;
    --accent: #6c9bf0;
    --accent-soft: #1a2435;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1114;
  --bg-alt: #171a1f;
  --text: #e8eaee;
  --muted: #99a1ac;
  --line: #272b31;
  --accent: #6c9bf0;
  --accent-soft: #1a2435;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- En-tête ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  gap: 16px;
}

.brand {
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.brand span { color: var(--accent); }

nav { display: flex; gap: 22px; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

nav a:hover { color: var(--text); }

@media (max-width: 640px) {
  nav { display: none; }
}

/* ---------- Sections ---------- */

section { padding: 62px 0; border-bottom: 1px solid var(--line); }

section:last-of-type { border-bottom: 0; }

h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 680;
  margin-bottom: 20px;
}

h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 26px;
}

h3 {
  font-size: 1.08rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

p { margin-bottom: 16px; }

p:last-child { margin-bottom: 0; }

.lead { font-size: 1.12rem; color: var(--muted); max-width: 44em; }

a { color: var(--accent); }

/* ---------- Accueil ---------- */

#accueil { padding-top: 76px; border-bottom: 1px solid var(--line); }

.role {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: 100px;
  margin-bottom: 22px;
  font-weight: 600;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 560;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn:hover { opacity: 0.9; }

/* ---------- Grilles ---------- */

.grid { display: grid; gap: 18px; }

.grid.two { grid-template-columns: repeat(2, 1fr); }

.grid.three { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 720px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg-alt);
}

.card p { color: var(--muted); font-size: 0.96rem; margin-bottom: 0; }

/* ---------- Réalisations ---------- */

.case {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.case:first-of-type { border-top: 0; padding-top: 0; }

.case .who { font-weight: 600; font-size: 0.95rem; }

.case .who small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 2px;
}

.case .what p { color: var(--muted); font-size: 0.97rem; }

.case .what strong { color: var(--text); font-weight: 600; }

@media (max-width: 720px) {
  .case { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Méthode ---------- */

ol.method { list-style: none; counter-reset: step; }

ol.method li {
  counter-increment: step;
  padding: 14px 0 14px 46px;
  position: relative;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.97rem;
}

ol.method li:first-child { border-top: 0; }

ol.method li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 15px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
}

ol.method li strong { color: var(--text); font-weight: 600; }

/* ---------- Outils ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tags span {
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 5px 13px;
  font-size: 0.87rem;
  color: var(--muted);
}

/* ---------- Contact ---------- */

.contact-list { list-style: none; }

.contact-list li { padding: 11px 0; border-top: 1px solid var(--line); font-size: 0.97rem; }

.contact-list li:first-child { border-top: 0; }

.contact-list .label { color: var(--muted); display: inline-block; min-width: 110px; }

/* ---------- Pied de page ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.87rem;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}

footer a { color: var(--muted); }

/* ---------- Pages internes ---------- */

.doc { padding: 50px 0 70px; }

.doc h1 { font-size: 1.7rem; margin-bottom: 26px; }

.doc h2 {
  font-size: 1.02rem;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 28px 0 10px;
}

.doc p, .doc li { color: var(--muted); font-size: 0.96rem; }

.doc ul { padding-left: 20px; margin-bottom: 16px; }

/* ---------- Bande de chiffres ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 34px;
}

.stats div { background: var(--bg); padding: 18px 20px; }

.stats .n {
  display: block;
  font-size: 1.5rem;
  font-weight: 660;
  letter-spacing: -0.02em;
}

.stats .l { font-size: 0.85rem; color: var(--muted); }

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
}

/* ---------- Chronologie ---------- */

.timeline { list-style: none; }

.timeline li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.timeline li:first-child { border-top: 0; }

.timeline .when { color: var(--muted); font-variant-numeric: tabular-nums; }

.timeline .what strong { font-weight: 600; }

.timeline .what span { color: var(--muted); }

@media (max-width: 640px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Logos de références ---------- */

#references { padding: 40px 0 46px; background: var(--bg-alt); }

.logos {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 28px;
  align-items: center;
}

.logos li { display: flex; align-items: center; justify-content: center; height: 64px; }

.logos img {
  max-height: 44px;
  max-width: 150px;
  width: auto;
  height: auto;
  filter: grayscale(1);
  opacity: 0.72;
  transition: filter .2s, opacity .2s;
}

.logos img:hover { filter: none; opacity: 1; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logos img { filter: grayscale(1) invert(1); }
  :root:not([data-theme="light"]) .logos img:hover { filter: invert(1); }
}
:root[data-theme="dark"] .logos img { filter: grayscale(1) invert(1); }
:root[data-theme="dark"] .logos img:hover { filter: invert(1); }

@media (max-width: 640px) {
  .logos { grid-template-columns: repeat(2, 1fr); }
  .logos img { max-height: 36px; max-width: 120px; }
}

/* ---------- Arbre de compétences ---------- */

.tree { position: relative; }

.trunk { text-align: center; position: relative; padding-bottom: 34px; }

.trunk::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 34px;
  background: var(--line);
}

.node.root {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  font-weight: 620;
  font-size: 1.02rem;
}

.node.root svg { width: 20px; height: 20px; fill: currentColor; }

.root-sub { display: block; margin-top: 12px; color: var(--muted); font-size: 0.93rem; }

.branches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
  padding-top: 26px;
}

/* ligne horizontale qui relie les branches au tronc */
.branches::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--line);
}

.branches .node {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 20px 18px;
}

.branches .node::before {
  content: "";
  position: absolute;
  top: -26px;
  left: 50%;
  width: 2px;
  height: 26px;
  background: var(--line);
}

.branches .node svg {
  width: 28px;
  height: 28px;
  fill: var(--accent);
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.branches .node h3 { font-size: 1.02rem; margin-bottom: 10px; }

.branches .node ul { list-style: none; }

.branches .node li {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 4px 0;
  border-top: 1px solid var(--line);
}

.branches .node li:first-child { border-top: 0; padding-top: 0; }

@media (max-width: 860px) {
  .branches { grid-template-columns: repeat(2, 1fr); }
  .branches::before { left: 25%; right: 25%; }
}

@media (max-width: 520px) {
  .branches { grid-template-columns: 1fr; padding-top: 0; gap: 12px; }
  .branches::before, .branches .node::before { display: none; }
  .trunk { padding-bottom: 18px; }
  .trunk::after { display: none; }
}

/* ---------- Réalisations en cartes ---------- */

#chiffres { padding: 30px 0; }

#chiffres .stats { margin-top: 0; }

.cases .case {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 22px;
  border-top: 1px solid var(--line);
}

.cases .case img {
  height: 30px;
  width: auto;
  max-width: 140px;
  display: block;
  margin-bottom: 16px;
  filter: grayscale(1);
  opacity: 0.8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cases .case img { filter: grayscale(1) invert(1); }
}
:root[data-theme="dark"] .cases .case img { filter: grayscale(1) invert(1); }

.cases .case .big {
  display: block;
  font-size: 1.45rem;
  font-weight: 660;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.cases .case p { color: var(--muted); font-size: 0.95rem; }
