/* ==========================================================================
   Portfolio Nathan Ogoreck - BTS SIO SISR
   Thème « plan réseau » : fond de plan technique, câbles bleus, voyants d'état.
   ========================================================================== */

/* ---------- 1. Jetons ---------- */
:root {
  --paper: #EEF2F5;      /* fond de plan */
  --surface: #FFFFFF;
  --ink: #13212E;        /* texte principal, en-tête */
  --muted: #5B6B7A;
  --line: #D3DCE4;
  --line-strong: #B8C5D1;
  --cable: #1F5FBF;      /* accent : câble réseau */
  --cable-dark: #174A96;
  --cable-soft: #E3ECF8;
  --ok: #2E9E6B;         /* voyant lien actif */
  --busy: #E3A21A;       /* voyant activité */
  --off: #A9B6C2;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --wrap: 1120px;
  --shadow: 0 1px 2px rgba(19, 33, 46, .06), 0 4px 16px rgba(19, 33, 46, .05);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cable); text-underline-offset: 3px; }
a:hover { color: var(--cable-dark); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; color: var(--ink); }
:focus-visible { outline: 3px solid var(--cable); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { top: 12px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding-top: 56px; padding-bottom: 64px; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- 3. Typographie ---------- */
.h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); font-weight: 700; letter-spacing: -.02em; }
.h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 20px; }
.h3 { font-size: 1.125rem; font-weight: 600; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 62ch; margin-top: 12px; }
.muted { color: var(--muted); margin: 0; }
.h-link { color: inherit; text-decoration: none; }
.h-link:hover { color: var(--cable); text-decoration: underline; }

/* ---------- 4. Boutons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-sm);
  font: 600 .975rem/1.2 var(--sans); text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn .ico { width: 18px; height: 18px; }
.btn-primary { background: var(--cable); color: #fff; }
.btn-primary:hover { background: var(--cable-dark); color: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--cable); color: var(--cable); }
.btn-link { color: var(--cable); padding-left: 4px; padding-right: 4px; }
.btn-link:hover { text-decoration: underline; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- 5. En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-led { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(46, 158, 107, .25); }
.brand-name { font-weight: 700; font-size: 1.05rem; }
.brand-sub { font-family: var(--mono); font-size: .75rem; color: #9FB3C8; padding: 2px 7px; border: 1px solid rgba(255,255,255,.18); border-radius: 4px; }

.nav-list { list-style: none; display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: var(--r-sm);
  color: #C9D6E2; text-decoration: none; font: 500 .95rem/1.2 var(--sans);
  background: none; border: 0; cursor: pointer;
}
.nav-link:hover, .nav-item.is-active > .nav-link { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-item.is-active > .nav-link { box-shadow: inset 0 -2px 0 var(--busy); }
.ico-chevron { width: 16px; height: 16px; transition: transform .2s; }
.has-sub { position: relative; }
.sub {
  list-style: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(19, 33, 46, .18); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.has-sub.open .sub { opacity: 1; visibility: visible; transform: none; }
.has-sub.open .ico-chevron { transform: rotate(180deg); }
.sub-link { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: .95rem; }
.sub-link:hover { background: var(--cable-soft); color: var(--cable-dark); }
.sub-link[aria-current="page"] { color: var(--cable); font-weight: 600; }
.menu-btn { display: none; }

@media (max-width: 960px) {
  .brand-sub { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .08); color: #fff; border: 0; cursor: pointer;
  }
  .menu-btn .ico-close { display: none; }
  .menu-btn[aria-expanded="true"] .ico-open { display: none; }
  .menu-btn[aria-expanded="true"] .ico-close { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); border-top: 1px solid rgba(255,255,255,.08);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav.open { max-height: 80vh; overflow-y: auto; }
  .nav-list { flex-direction: column; align-items: stretch; padding: 8px 20px 20px; gap: 0; }
  .nav-link { padding: 14px 4px; width: 100%; font-size: 1.05rem; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.07); justify-content: space-between; }
  .nav-item.is-active > .nav-link { box-shadow: inset 3px 0 0 var(--busy); padding-left: 12px; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; background: transparent; border: 0; padding: 4px 0 8px 12px; }
  .has-sub.open .sub { display: block; }
  .sub-link { color: #C9D6E2; padding: 10px 8px; }
  .sub-link:hover { background: rgba(255,255,255,.06); color: #fff; }
  .sub-link[aria-current="page"] { color: #fff; }
}

/* ---------- 6. Accueil : héros + topologie ---------- */
.hero {
  background:
    linear-gradient(var(--paper), rgba(238, 242, 245, 0) 120px),
    radial-gradient(circle, rgba(31, 95, 191, .13) 1px, transparent 1.4px) 0 0 / 22px 22px,
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.page-accueil .hero { min-height: calc(100vh - 64px - 150px); display: flex; align-items: center; border-bottom: 0; }
.page-accueil .hero > .wrap { width: 100%; }
.hero-links { display: none; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero-kicker { font-family: var(--mono); font-size: .875rem; color: var(--cable); margin-bottom: 14px; }
.hero-title { font-size: clamp(2.4rem, 4.6vw, 3.5rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.02; }
.hero-sub { font-size: 1.2rem; font-weight: 500; color: var(--muted); margin: 12px 0 22px; }
.hero-intro { max-width: 58ch; }

.topo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 14px; box-shadow: var(--shadow); }
.topo svg { width: 100%; height: auto; display: block; overflow: visible; }
.cable { fill: none; stroke: var(--cable); stroke-width: 2.5; stroke-linejoin: round; }
.cable-wait { stroke: var(--off); stroke-dasharray: 5 6; }
.node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; transition: stroke .15s, fill .15s; }
.node-core rect { fill: var(--ink); stroke: var(--ink); }
.node-core .n-title { fill: #fff; }
.node-core .n-sub { fill: #9FB3C8; }
.node:hover rect, .node:focus-visible rect { stroke: var(--cable); fill: var(--cable-soft); }
.node-core:hover rect, .node-core:focus-visible rect { fill: var(--cable-dark); stroke: var(--cable-dark); }
.node:focus-visible { outline: none; }
.node-wait rect { stroke-dasharray: 4 4; }
.n-title { font: 600 15px var(--mono); fill: var(--ink); }
.n-sm { font-size: 14px; }
.n-sub { font: 400 12px var(--sans); fill: var(--muted); }
.led { stroke: none; }
.led-ok { fill: var(--ok); }
.led-busy { fill: var(--busy); }
.led-off { fill: var(--off); }
.topo-legend { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; font-size: .82rem; color: var(--muted); margin-top: 8px; }
.led-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.led-dot.ok { background: var(--ok); } .led-dot.busy { background: var(--busy); } .led-dot.off { background: var(--off); }

/* Animation unique : les câbles se tracent puis les voyants s'allument */
@media (prefers-reduced-motion: no-preference) {
  .cable { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw .7s ease-out forwards; }
  .cable-wait { stroke-dasharray: 5 6; stroke-dashoffset: 0; opacity: 0; animation: fade .4s ease-out 1.1s forwards; }
  .c1, .c2 { animation-delay: .15s; }
  .c3, .c4 { animation-delay: .6s; }
  .led { opacity: .2; animation: on .25s ease-out forwards; }
  .l0 { animation-delay: .05s; } .l1 { animation-delay: .7s; } .l2 { animation-delay: .75s; }
  .l3 { animation-delay: 1.15s; } .l4 { animation-delay: 1.2s; }
  .led-busy { animation: on .25s ease-out .75s forwards, blink 1.6s steps(2, jump-none) 1.4s infinite; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes on { to { opacity: 1; } }
@keyframes blink { 50% { opacity: .35; } }

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; padding-bottom: 48px; }
}
@media (max-width: 560px) {
  .topo { display: none; }
  .hero-links { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 10px; margin-top: 28px; }
  .hero-links a { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
}

/* Parcours */
.years { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.year { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.year-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.status { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-ok { color: #1E7A51; background: #E3F4EC; }
.status-busy { color: #94650A; background: #FCF1D9; }
.rows { list-style: none; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 22px; text-decoration: none; color: var(--ink); }
.rows li + li .row { border-top: 1px solid var(--line); }
.row:hover { background: var(--cable-soft); }
.row-title { font-weight: 600; }
.row:hover .row-title { color: var(--cable-dark); }
.row-meta { color: var(--muted); font-size: .92rem; text-align: right; }
@media (max-width: 760px) { .years { grid-template-columns: 1fr; } }

/* Veilles + certifs sur l'accueil */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.veille-list { list-style: none; counter-reset: v; margin-top: 18px; }
.veille-list li { counter-increment: v; border-top: 1px solid var(--line); }
.veille-list li:last-child { border-bottom: 1px solid var(--line); }
.veille-list a { display: flex; gap: 14px; padding: 13px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.veille-list a::before { content: counter(v); font-family: var(--mono); color: var(--cable); font-size: .9rem; padding-top: 2px; min-width: 1ch; }
.veille-list a:hover { color: var(--cable); }
.badges-mini { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.badges-mini a { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; padding: 16px 10px; border-radius: var(--r-md); }
.badges-mini a:hover { background: var(--paper); }
.badges-mini img { width: 112px; height: 112px; object-fit: contain; }

/* ---------- 7. En-tête de page ---------- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 40px 0 32px; }
.crumb { font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--cable); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tabs a { padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 99px; text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 500; }
.tabs a:hover { border-color: var(--cable); color: var(--cable); }
.tabs .tab-alt { border-style: dashed; color: var(--muted); }

/* ---------- 8. Projets ---------- */
.semester + .semester { margin-top: 56px; }
.ap-list { list-style: none; border-top: 2px solid var(--ink); }
.ap { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.ap-id { font: 500 1.05rem var(--mono); color: var(--cable); padding-top: 2px; }
.ap-title { font-size: 1.15rem; font-weight: 600; }
.ap-empty .ap-id { color: var(--off); }
.ap-empty .ap-title { color: var(--muted); font-weight: 500; }
.ap-empty .muted { margin-top: 6px; font-size: .95rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tags li { font: 500 .78rem var(--mono); color: var(--cable-dark); background: var(--cable-soft); padding: 3px 9px; border-radius: 4px; }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 20px; margin-top: 16px; }
.docs-label { font-size: .82rem; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.doc {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink); text-decoration: none; font-size: .95rem;
  transition: border-color .15s;
}
.doc:hover { border-color: var(--cable); color: var(--ink); }
.doc-ico { width: 20px; height: 20px; color: var(--muted); flex: none; }
.doc-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.doc-type { font: 500 .72rem var(--mono); color: var(--muted); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; }
.doc-dl { width: 18px; height: 18px; color: var(--cable); flex: none; }

.ctx { margin-top: 14px; }
.ctx summary { cursor: pointer; color: var(--cable); font-weight: 600; font-size: .95rem; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.ctx summary::-webkit-details-marker { display: none; }
.ctx summary::before { content: "+"; font: 600 1rem var(--mono); width: 18px; height: 18px; display: inline-grid; place-items: center; border: 1.5px solid currentColor; border-radius: 4px; line-height: 1; }
.ctx[open] summary::before { content: "−"; }
.ctx[open] summary { margin-bottom: 10px; }
.prose { max-width: 72ch; color: #2A3A49; }
.prose p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .ap { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- 9. État « à venir » ---------- */
.empty { max-width: 560px; margin: 24px auto; text-align: center; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 48px 28px; }
.empty-ico { width: 40px; height: 40px; color: var(--busy); margin: 0 auto 14px; }
.empty .h3 { margin-bottom: 8px; }
.empty p { color: var(--muted); }
.empty .btn { margin-top: 8px; }

/* ---------- 10. Visionneuse PDF ---------- */
.viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); }
.viewer-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--ink); color: #C9D6E2; font-size: .92rem; }
.viewer-frame { display: block; width: 100%; height: min(82vh, 1100px); border: 0; }
.viewer-fallback { padding: 32px 20px; text-align: center; }

/* ---------- 11. Certifications ---------- */
.certs { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.cert { display: flex; align-items: center; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; }
.cert img { width: 140px; height: 140px; object-fit: contain; flex: none; }
.cert .h3 { margin-bottom: 4px; }
@media (max-width: 420px) { .cert { flex-direction: column; text-align: center; } }

/* ---------- 12. Contact ---------- */
.contact { list-style: none; display: grid; gap: 16px; max-width: 640px; }
.contact-item { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; }
.contact-item > div { flex: 1; min-width: 0; }
.contact-ico { width: 46px; height: 46px; border-radius: var(--r-sm); background: var(--cable-soft); color: var(--cable); display: grid; place-items: center; flex: none; }
.contact-label { font-size: .88rem; color: var(--muted); margin: 0 0 2px; }
.contact-value { font-size: 1.15rem; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact-value:hover { color: var(--cable); }
.copy { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 500 .88rem var(--sans); cursor: pointer; }
.copy:hover { border-color: var(--cable); color: var(--cable); }
.copy .ico { width: 16px; height: 16px; }
.copy.done { border-color: var(--ok); color: var(--ok); }
@media (max-width: 480px) { .copy span { display: none; } }

/* ---------- 13. Veilles ---------- */
.veille-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 88px; }
.toc-title { font-weight: 600; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.toc ol { list-style: none; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .93rem; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.current { color: var(--cable); border-left-color: var(--cable); font-weight: 600; }
.veille-main { max-width: 760px; }
.intro-box { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--cable); border-radius: var(--r-md); padding: 26px 28px 12px; }
.intro-box .h3 { margin: 22px 0 10px; }
.veille { padding-top: 56px; }
.veille + .veille { margin-top: 8px; border-top: 1px solid var(--line); }
.veille-num { font: 500 .88rem var(--mono); color: var(--cable); margin-bottom: 8px; }
.veille .h2 { font-size: 1.65rem; }
.veille .h3 { margin: 26px 0 10px; }
.points { padding-left: 1.3em; }
.points li { margin-bottom: 10px; padding-left: 4px; }
.points li::marker { font-family: var(--mono); color: var(--cable); font-weight: 500; }
.gallery { display: grid; gap: 12px; margin-top: 26px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shot { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; aspect-ratio: 4 / 3; }
.shot:hover { border-color: var(--cable); }
.shot img { width: 100%; height: 100%; object-fit: contain; }
.sources { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.sources a { display: inline-block; padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 99px; font-size: .88rem; text-decoration: none; background: var(--surface); }
.sources a:hover { border-color: var(--cable); }
@media (max-width: 900px) {
  .veille-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
}
@media (max-width: 600px) {
  .gallery-3, .gallery-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 14. Pied de page ---------- */
.site-footer { background: var(--ink); color: #9FB3C8; margin-top: 0; }
.footer-in { display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; padding-top: 36px; padding-bottom: 28px; }
.footer-name { color: #fff; font-weight: 700; margin: 0; }
.footer-sub { font-size: .9rem; margin: 2px 0 0; }
.footer-contact { list-style: none; display: grid; gap: 6px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 8px; color: #C9D6E2; text-decoration: none; font-size: .93rem; }
.footer-contact a:hover { color: #fff; }
.footer-contact .ico { width: 17px; height: 17px; }
.footer-copy { grid-column: 1 / -1; font-size: .82rem; border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; margin: 8px 0 0; }
@media (max-width: 640px) { .footer-in { grid-template-columns: 1fr; } }

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

/* ---------- 15. Projets : onglets + fiches ---------- */
.seg { display: inline-flex; gap: 4px; margin-top: 26px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: 600 .95rem var(--sans); cursor: pointer; }
.seg-btn:hover { color: var(--ink); }
.seg-btn[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(19,33,46,.12); }
.seg-count { font: 500 .75rem var(--mono); min-width: 22px; padding: 1px 6px; border-radius: 99px; background: var(--line); color: var(--ink); text-align: center; }
.seg-btn[aria-selected="true"] .seg-count { background: var(--cable); color: #fff; }

.sem-title { font-size: 1.35rem; font-weight: 600; margin-bottom: 20px; }
.js .sem-title { display: none; }
.js .sem[hidden] { display: none; }
.sem + .sem { margin-top: 48px; }
.js .sem + .sem { margin-top: 0; }

.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pcard { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.pcard-wide { grid-column: 1 / -1; border-left: 4px solid var(--cable); }
.pcard-head { display: flex; align-items: flex-start; gap: 14px; }
.pcard-num { flex: none; font: 600 .9rem var(--mono); color: var(--cable-dark); background: var(--cable-soft); border: 1px solid #C7D7EE; padding: 4px 9px; border-radius: 6px; margin-top: 1px; }
.pcard-title { font-size: 1.12rem; font-weight: 600; line-height: 1.35; }
.pcard .tags { margin-top: 0; }
.pcard-ctx { font-size: 1rem; }
.pcard-ctx > p { margin-bottom: 8px; }
.more summary { cursor: pointer; list-style: none; color: var(--cable); font-weight: 600; font-size: .93rem; display: inline-flex; align-items: center; gap: 6px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.more[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.more .more-close, .more[open] .more-open { display: none; }
.more[open] .more-close { display: inline; }
.more[open] summary { margin-bottom: 10px; }
.more p { margin-bottom: 10px; }

.pcard-docs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 4px; }
.pbtn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 8px; font: 600 .93rem var(--sans); text-decoration: none; border: 1.5px solid transparent; transition: background-color .15s, border-color .15s, color .15s; }
.pbtn-ico { width: 18px; height: 18px; }
.pbtn-type { font: 500 .7rem var(--mono); padding: 1px 5px; border-radius: 4px; }
.pbtn-main { background: var(--cable); color: #fff; }
.pbtn-main:hover { background: var(--cable-dark); color: #fff; }
.pbtn-main .pbtn-type { background: rgba(255,255,255,.18); }
.pbtn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.pbtn-ghost:hover { border-color: var(--cable); color: var(--cable); }
.pbtn-ghost .pbtn-type { background: var(--paper); color: var(--muted); }

@media (max-width: 760px) {
  .pgrid { grid-template-columns: 1fr; }
  .pcard { padding: 18px; }
  .seg { display: flex; }
  .seg-btn { flex: 1; justify-content: center; }
}

/* ---------- 16. Page détaillée d'un AP ---------- */
.pcard-title a { color: inherit; text-decoration: none; }
.pcard-title a:hover { color: var(--cable); text-decoration: underline; }
.pcard-more { align-self: center; margin-left: auto; font-weight: 600; font-size: .93rem; color: var(--cable); text-decoration: none; padding: 9px 4px; }
.pcard-more:hover { text-decoration: underline; }
@media (max-width: 600px) { .pcard-more { margin-left: 0; } }

.ap-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ap-sem { color: var(--muted); font-size: .95rem; font-weight: 500; }
.ap-h1 { max-width: 26ch; }
.ap-tags { margin-top: 16px; }
.ap-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.ap-prose { font-size: 1.06rem; max-width: 68ch; }
.ap-prose p { margin-bottom: 1.1em; }
.ap-h2-doc { margin-top: 40px; }
.ap-side { position: sticky; top: 88px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.side-title { font-size: 1rem; font-weight: 600; margin-bottom: 14px; }
.side-docs { display: grid; gap: 10px; }
.side-docs .pbtn { justify-content: flex-start; }
.side-docs .pbtn-type { margin-left: auto; }
.ap-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 64px; }
.pager-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.pager-link:hover { border-color: var(--cable); color: var(--ink); }
.pager-next { text-align: right; }
.pager-dir { font-size: .85rem; color: var(--muted); font-weight: 500; }
.pager-name { font-weight: 600; }
.pager-name b { font-family: var(--mono); color: var(--cable); font-weight: 600; margin-right: 6px; }
@media (max-width: 900px) {
  .ap-layout { grid-template-columns: 1fr; gap: 28px; }
  .ap-side { position: static; order: -1; }
  .side-docs { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (max-width: 600px) { .ap-pager { grid-template-columns: 1fr; } .pager-next { text-align: left; } }

@media (max-width: 600px) { .ap-main .ap-h2-doc, .ap-main .viewer { display: none; } }

/* ---------- 17. Veilles : vue d'ensemble + pages ---------- */
.vintro { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px 30px 12px; }
.vintro .h3 { margin-bottom: 10px; }
.vintro p { color: #2A3A49; }
.vlist-title { margin-top: 48px; }
.vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.vcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.vcard:hover { border-color: var(--cable); color: var(--ink); }
.vcard-img { height: 190px; background: #F6F8FA; border-bottom: 1px solid var(--line); padding: 16px; }
.vcard-img img { width: 100%; height: 100%; object-fit: contain; }
.vcard-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.vcard-num { font: 500 .85rem var(--mono); color: var(--cable); margin: 0 0 6px; }
.vcard-title { font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.vcard-text { color: var(--muted); font-size: .97rem; margin: 10px 0 14px; }
.vcard-more { margin-top: auto; font-weight: 600; font-size: .93rem; color: var(--cable); }
.vcard:hover .vcard-more { text-decoration: underline; }

.v-h1 { max-width: 30ch; }
.v-block { max-width: 920px; }
.v-block + .v-block { margin-top: 52px; }
.v-intro { color: #2A3A49; }
.kpoints { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpoint { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--cable); border-radius: 10px; padding: 20px; }
.kpoint-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--cable-soft); color: var(--cable-dark); font: 600 .95rem var(--mono); margin-bottom: 12px; }
.kpoint-title { font-size: 1.02rem; font-weight: 600; margin-bottom: 8px; }
.kpoint p { color: #2A3A49; font-size: .97rem; margin: 0; }
.vsources { list-style: none; display: grid; gap: 10px; }
.vsources a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); }
.vsources a:hover { border-color: var(--cable); }
.vsources .ico { width: 18px; height: 18px; color: var(--cable); }
.vs-host { font-weight: 600; }
.vs-url { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 860px) {
  .vintro { grid-template-columns: 1fr; gap: 8px; }
  .vgrid { grid-template-columns: 1fr; }
  .kpoints { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .vs-url { display: none; } }

/* Schéma d'accueil (version 4 branches) : textes un peu plus grands */
.topo .n-sm { font-size: 15.5px; }
.topo .n-sub { font-size: 13px; }
.topo .node-core .n-title { font-size: 16px; }
.topo { padding: 22px 20px 14px; }

/* ---------- 18. Bouton retour ---------- */
.back { display: inline-flex; align-items: center; gap: 8px; margin: -8px 0 20px; padding: 7px 14px 7px 10px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: .92rem; text-decoration: none; transition: border-color .15s, color .15s; }
.back .ico { width: 18px; height: 18px; transition: transform .15s; }
.back:hover { border-color: var(--cable); color: var(--cable); }
.back:hover .ico { transform: translateX(-3px); }
