/* Python 3.14.7 pour MorphOS — même structure que le site de Medusa,
   palette Python (bleu / jaune) accordée à celle de Medusa */
:root {
  --bg: #f3f6f9;
  --bg-soft: #e6edf4;
  --card: #ffffff;
  --ink: #0f2235;
  --muted: #4c6075;
  --line: #d2dde8;
  --green: #16314f;        /* bandeaux (nom repris de Medusa) */
  --green-2: #1f4f84;
  --sage: #5d7a95;
  --gold: #d9a722;         /* jaune Python */
  --gold-soft: #fbf0cc;
  --blue: #2c66a6;         /* bleu Python */
  --blue-soft: #dce9f7;
  --on-dark: #eef3f9;
  --on-dark-muted: #b6c6d8;
  --radius: 16px;
  --wrap: 1040px;
  --font-title: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1520;
    --bg-soft: #0f1d2b;
    --card: #132536;
    --ink: #e6eef6;
    --muted: #a8b9ca;
    --line: rgba(200, 220, 240, 0.14);
    --gold: #f0c84a;
    --gold-soft: rgba(240, 200, 74, 0.16);
    --blue: #7db4ec;
    --blue-soft: rgba(125, 180, 236, 0.14);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); }
a:hover { text-decoration-thickness: 2px; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--gold-soft);
  color: var(--ink);
  white-space: nowrap;
}

pre {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: #0f2235;
  color: #e6eef6;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-x: auto;
  border: 1px solid var(--line);
}

pre code { background: none; padding: 0; color: inherit; white-space: pre; font-size: inherit; }
pre .c { color: #8fa7bf; }          /* commentaires */
pre .k { color: #f0c84a; }          /* mots-clés / commandes */
pre .s { color: #9fd0a6; }          /* chaînes */

.wrap {
  width: min(var(--wrap), calc(100% - 32px));
  margin-inline: auto;
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--gold); color: #1d1606; padding: 0.4rem 0.8rem; border-radius: 6px; }

/* En-tête : bandeau bleu nuit, logo rond et nom en capitales romaines */
.topbar {
  background: var(--green);
  color: var(--on-dark);
  border-bottom: 3px solid var(--gold);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--on-dark);
  text-decoration: none;
}

.logo-link img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: #fff;
}

.logo-link span {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
}

.topnav { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.topnav a {
  color: var(--on-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

.topnav a:hover { background: rgba(255, 255, 255, 0.1); }

.topnav .nav-cta { background: var(--gold); color: #1d1606; }
.topnav .nav-cta:hover { background: #ecc243; }

/* Héros en deux colonnes : logo à gauche, texte à droite */
.hero {
  background:
    linear-gradient(135deg, rgba(22, 49, 79, 0.06) 0 40%, transparent 40%),
    var(--bg-soft);
  padding: 56px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: center;
}

.hero-logo {
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 0 0 4px var(--gold-soft), 0 18px 40px rgba(15, 34, 53, 0.18);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-title);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: 0.05em;
  color: var(--green-2);
}

.hero h1 small {
  display: block;
  font-size: 0.45em;
  letter-spacing: 0.12em;
  color: var(--muted);
}

@media (prefers-color-scheme: dark) {
  .hero h1 { color: var(--gold); }
}

.hero-lead { margin: 0 0 1.5rem; font-size: 1.15rem; color: var(--muted); max-width: 54ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-gold { background: var(--gold); color: #1d1606; }
.btn-gold:hover { background: #ecc243; }

.btn-line { border-color: var(--green-2); color: var(--green-2); }
.btn-line:hover { background: var(--green-2); color: #fff; }

.btn-small { padding: 0.45rem 0.9rem; font-size: 0.92rem; }

@media (prefers-color-scheme: dark) {
  .btn-line { border-color: var(--on-dark-muted); color: var(--on-dark); }
}

.hero-meta { margin: 1rem 0 0; font-size: 0.9rem; color: var(--muted); }

.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.badges li {
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

/* Sections */
.block { padding: 64px 0; }
.block-soft { background: var(--bg-soft); }

.block-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: 0.05em;
  color: var(--ink);
}

.block-intro { margin: 0 0 2rem; color: var(--muted); max-width: 64ch; }

/* Cartes de fonctionnalités */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  border-top: 4px solid var(--sage);
}

.card:nth-child(3n+2) { border-top-color: var(--blue); }
.card:nth-child(3n) { border-top-color: var(--gold); }

.card-icon { font-size: 1.6rem; line-height: 1; margin-bottom: 0.6rem; }

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

/* Tableau des chemins */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--bg-soft); }
tr:last-child td { border-bottom: none; }

/* Colonnes texte + code */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 36px;
  align-items: start;
}

.showcase > * { min-width: 0; }
.showcase p { color: var(--muted); }
.showcase ul { color: var(--muted); padding-left: 1.15rem; }
.showcase li { margin-bottom: 0.4rem; }

/* Installation en 4 étapes */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
}

.steps li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 52px 18px 18px;
  counter-increment: step;
  font-size: 0.95rem;
  color: var(--muted);
  min-width: 0;
}

.steps li code { white-space: normal; word-break: break-word; }

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 14px;
  left: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-weight: 700;
}

.steps strong { display: block; color: var(--ink); margin-bottom: 0.25rem; }

.note {
  margin: 1.5rem 0 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--gold-soft);
  border-left: 5px solid var(--gold);
  color: var(--ink);
  font-size: 0.95rem;
}

/* Téléchargement : bandeau bleu nuit */
.download {
  background: var(--green);
  color: var(--on-dark);
  padding: 56px 0;
}

.download .block-title { color: var(--gold-soft); }
.download .block-intro { color: var(--on-dark-muted); margin-bottom: 1.5rem; }
.download a:not(.btn) { color: #f0c84a; }

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(251, 240, 204, 0.22);
  min-width: 0;
}

.dl-card h3 { margin: 0; font-size: 1.15rem; color: #fff; }
.dl-card p { margin: 0; font-size: 0.9rem; color: var(--on-dark-muted); }

.dl-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(251, 240, 204, 0.16);
}

.dl-file span { font-family: var(--mono); font-size: 0.85rem; color: #fff; overflow-wrap: anywhere; }
.dl-file small { display: block; color: var(--on-dark-muted); font-family: var(--font-body); }

.hashes { margin-top: 1.8rem; }
.hashes summary { cursor: pointer; font-weight: 700; color: var(--gold-soft); }
.hashes pre { margin-top: 0.8rem; background: rgba(0, 0, 0, 0.25); border-color: rgba(251, 240, 204, 0.18); font-size: 0.78rem; }

/* Prérequis et infos */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  min-width: 0;
}

.panel h3 { margin: 0 0 0.6rem; font-size: 1.1rem; }
.panel ul { margin: 0; padding-left: 1.15rem; color: var(--muted); }
.panel li { margin-bottom: 0.45rem; }
.panel li strong { color: var(--ink); }
.panel li code { white-space: normal; }

/* Pied de page */
.footer {
  border-top: 3px solid var(--gold);
  background: var(--bg-soft);
  padding: 28px 0 36px;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer p { margin: 0.2rem 0; }
.footer-small { font-size: 0.8rem; }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .hero-logo { width: 200px; margin-inline: auto; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .badges { justify-content: center; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
}

pre { max-width: 100%; }

@media (max-width: 600px) {
  code { white-space: normal; overflow-wrap: anywhere; }
  pre code { white-space: pre; overflow-wrap: normal; }
  .topbar-inner { flex-direction: column; padding: 10px 0; }
  .topnav { justify-content: center; }
  .cards, .steps, .two-col { grid-template-columns: 1fr; }
  .block { padding: 44px 0; }
  th, td { padding: 0.5rem 0.7rem; }
}

@media (prefers-color-scheme: dark) {
  .steps li::before { background: var(--gold); color: #1d1606; }
}

/* Nouveautés */
.releases { display: grid; gap: 18px; }

.release {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--sage);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.release:first-child { border-left-color: var(--gold); }

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-bottom: 0.5rem;
}

.release-head h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.release-tag {
  padding: 0.1rem 0.7rem;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
}

.release ul { margin: 0; padding-left: 1.15rem; color: var(--muted); }
.release li { margin-bottom: 0.35rem; }
