/* ===== Mon activité GitHub (page Projets, onglet Présentation) =====
   Rempli par js/github.js depuis github.json (écrit par le serveur, voir serveur/github/). */
.gh[hidden], .subtab[hidden] { display: none; }
.gh { margin-top: 44px; }
.gh-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 18px; }
.gh-head .section-title { margin: 0; }
.gh-live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border: 2px solid var(--ink); border-radius: 999px;
  background: #fff; font: 700 12.5px var(--body);
}
.gh-live i { width: 9px; height: 9px; border-radius: 50%; background: #1fb86a; box-shadow: 0 0 0 2px var(--ink); animation: gh-pulse 2s ease-in-out infinite; }
@keyframes gh-pulse { 50% { opacity: .35; } }
.gh .stats { margin-bottom: 0; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.gh .stat span span { display: inline; margin: 0; }
@media (max-width: 520px) { .gh .stat b { font-size: 34px; } }
.gh .stat:nth-child(odd) { transform: rotate(-.6deg); }
.gh .stat:nth-child(even) { transform: rotate(.5deg); }

/* Feuille d'intercalaire avec son onglet */
.gh-sheet { position: relative; margin-top: 48px; border: var(--line); background: #fff; box-shadow: 7px 7px 0 var(--ink); min-width: 0; }
.gh-tag {
  position: absolute; left: 18px; top: -34px;
  padding: 8px 14px 9px; border: var(--line); border-bottom: 0; border-radius: 8px 8px 0 0;
  background: var(--k, var(--yellow));
  font: italic 900 12.5px/1 var(--display); text-transform: uppercase;
}
.gh-body { padding: 18px; }

/* Calendrier */
.gh-cal-scroll { overflow-x: auto; padding: 6px 8px 8px 2px; }
.gh-cal { display: grid; grid-template-rows: 16px repeat(7, 13px); grid-auto-flow: column; grid-auto-columns: 13px; gap: 3px; width: max-content; }
.gh-cal .m { font: 700 11px/16px var(--body); color: var(--ink-soft); white-space: nowrap; }
.gh-cal .d, .gh-legend .d { display: inline-block; width: 13px; height: 13px; border: 1.5px solid var(--ink); border-radius: 3px; background: #fff; }
.gh-cal .d.x { visibility: hidden; }
.gh .d[data-l="1"] { background: #fff1ad; }
.gh .d[data-l="2"] { background: var(--yellow); }
.gh .d[data-l="3"] { background: var(--orange); }
.gh .d[data-l="4"] { background: var(--red); }
.gh-cal .d:hover { outline: 2.5px solid var(--ink); outline-offset: 1px; }
/* Animation : les carrés se peignent semaine après semaine (js/github.js lance .play à l'arrivée à l'écran) */
.gh-cal-wrap { position: relative; width: max-content; }
.gh-cal.play .d:not([data-l="0"]) { animation: gh-paint .45s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--w) * 22ms + var(--r) * 12ms); }
@keyframes gh-paint { 0% { background: #fff; transform: scale(.4) rotate(-20deg); } 60% { transform: scale(1.35) rotate(6deg); } }
.gh-cal .d.gh-top { position: relative; z-index: 1; }
.gh-cal.play .d.gh-top { animation: gh-paint .45s cubic-bezier(.3, 1.6, .5, 1) backwards, gh-star 1.6s ease-in-out infinite; animation-delay: calc(var(--w) * 22ms), calc(var(--w) * 22ms + .5s); }
@keyframes gh-star { 50% { transform: scale(1.3); box-shadow: 0 0 0 3px var(--yellow), 0 0 0 5.5px var(--ink); } }
.gh-sweep { position: absolute; top: 14px; bottom: 0; left: 0; width: 3px; border-radius: 2px; background: var(--ink); opacity: 0; pointer-events: none; }
.gh-sweep.play { animation: gh-sweep var(--dur, 1.6s) linear forwards; }
@keyframes gh-sweep { 0% { left: 0; opacity: 1; } 95% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.gh-replay {
  margin-right: 12px; padding: 4px 10px;
  border: 2px solid var(--ink); border-radius: 4px; background: var(--yellow); color: var(--ink);
  font: italic 900 11.5px/1 var(--display); text-transform: uppercase; cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.gh-replay:hover, .gh-replay:focus-visible { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.gh-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 12px; font: 600 13px var(--body); color: var(--ink-soft); }
.gh-foot-l { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 0; }
.gh-tip { min-height: 1.4em; font-weight: 700; color: var(--ink); }
.gh-legend { display: inline-flex; align-items: center; gap: 4px; }

.gh-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 34px; }
@media (max-width: 860px) { .gh-cols { grid-template-columns: 1fr; } }

/* Derniers commits */
.gh-commits { list-style: none; margin: 0; padding: 0; }
.gh-commits li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline;
  padding: 11px 0; border-bottom: 2px dashed rgba(23, 20, 31, .25);
}
.gh-commits li:last-child { border-bottom: 0; }
.gh-repo {
  padding: 3px 8px; border: 2px solid var(--ink); border-radius: 4px; background: var(--k, #fff);
  font: italic 900 11px/1 var(--display); text-transform: uppercase; white-space: nowrap;
}
.gh-msg { font: 600 14.5px/1.4 var(--body); overflow-wrap: anywhere; }
.gh-msg.secret { font-style: italic; color: var(--ink-soft); }
.gh-when { font: 600 12.5px var(--body); color: var(--ink-soft); white-space: nowrap; }
.gh-sha { grid-column: 2 / 4; font: 500 11.5px ui-monospace, Consolas, monospace; color: var(--ink-soft); }
@media (max-width: 520px) {
  .gh-commits li { grid-template-columns: minmax(0, 1fr) auto; }
  .gh-commits .gh-repo { grid-column: 1 / 3; justify-self: start; }
  .gh-sha { grid-column: 1 / 3; }
}

/* Dépôts */
.gh-repos { display: grid; gap: 14px; }
.gh-card { display: block; padding: 14px 16px; border: var(--line); background: #fff; box-shadow: 4px 4px 0 var(--ink); text-decoration: none; color: inherit; }
.gh-card:nth-child(odd) { transform: rotate(-.4deg); }
a.gh-card:hover, a.gh-card:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.gh-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gh-card h3 { margin: 0; font: italic 900 17px/1.1 var(--display); text-transform: uppercase; text-shadow: -2px 2px 0 var(--k, var(--yellow)); }
.gh-priv { padding: 2px 6px; border: 2px solid var(--ink); background: var(--ink); color: #fff; font: 700 10.5px var(--body); letter-spacing: .06em; text-transform: uppercase; }
.gh-card p { margin: 6px 0 10px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.gh-bar { display: flex; height: 10px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.gh-bar span + span { border-left: 2px solid var(--ink); }
.gh-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font: 600 12.5px var(--body); color: var(--ink-soft); }
.gh-meta i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border: 1.5px solid var(--ink); border-radius: 50%; }

/* Bip commente */
.gh-bip { display: flex; gap: 12px; align-items: center; margin-top: 30px; }
.gh-bip svg { flex: none; }
.gh-bubble { padding: 10px 14px; border: var(--line); border-radius: 14px; background: #fff; font: 700 14px/1.4 var(--body); box-shadow: 3px 3px 0 var(--ink); }
.gh .btn { margin-top: 24px; }

@media (prefers-reduced-motion: reduce) { .gh-live i, .gh-cal.play .d, .gh-sweep.play { animation: none !important; } .gh-replay { display: none; } }
@media print { .gh { display: none; } }
