/* Application technologie — Académie de Bordeaux */

:root {
  --bg: #f0f4ff;
  --bg-alt: #e8eeff;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --border: #cbd5e1;
  --shadow: 0 8px 32px rgba(37, 99, 235, 0.1);
  --radius: 16px;
  --font-sans: "Instrument Sans", system-ui, sans-serif;
  --font-serif: "Literata", Georgia, serif;
  --header-h: 68px;
  --app-network: #2563eb;
  --app-terminal: #7c3aed;
  --app-security: #059669;
  --app-brevet: #b45309;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-alt: #131c31;
  --surface: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: #1e3a5f;
  --border: #334155;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  z-index: 200;
  border-radius: 6px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
}

.logo-text strong {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav a {
  padding: 0.4rem 0.65rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: var(--bg-alt);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  flex-shrink: 0;
}

[data-theme="dark"] .theme-icon--light,
[data-theme="light"] .theme-icon--dark,
:root:not([data-theme]) .theme-icon--dark {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
}

/* Hero */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

.hero-badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 700;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

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

.btn--ghost:hover {
  border-color: var(--text-muted);
}

.btn--sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.hero-stats div {
  margin: 0;
}

.hero-stats dt {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.hero-stats dd {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-panel-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.search-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.search-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.search-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.section--alt {
  background: var(--bg-alt);
  max-width: none;
}

.section--alt > .section-head,
.section--alt > .tabs,
.section--alt > .tab-panels,
.section--alt > .sequences-list,
.section--alt > .links-list,
.section--alt > .net-sim {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.section-head p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

/* Chips & cards */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.chip {
  padding: 0.4rem 0.9rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover,
.chip--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: opacity 0.2s, transform 0.2s;
}

.card.is-hidden {
  display: none;
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.6rem 1.2rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.tab--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-panels {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.tab-panel[hidden] {
  display: none;
}

.level-list {
  margin: 0;
  padding-left: 1.25rem;
}

.level-list li {
  margin-bottom: 0.65rem;
}

/* Tools */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.tool-card h3 {
  margin: 0 0 0.35rem;
}

.tool-card > p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tool-form label {
  display: block;
  font-size: 0.85rem;
  margin: 0.5rem 0 0.25rem;
}

.tool-form input,
.tool-form textarea {
  width: 100%;
  padding: 0.5rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}

.tool-form .btn {
  margin-top: 0.75rem;
}

.tool-output {
  display: block;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg-alt);
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.timer-display {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--accent);
  margin: 0.5rem 0;
}

.timer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.checklist {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  cursor: pointer;
}

/* Sequences */
.sequences-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sequence {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sequence summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.sequence summary::-webkit-details-marker {
  display: none;
}

.sequence summary::before {
  content: "▸ ";
  color: var(--accent);
}

.sequence[open] summary::before {
  content: "▾ ";
}

.sequence-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

.sequence-body ol {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

/* Network simulator (3e) */
.net-sim {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.net-sim__layout {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 280px);
  gap: 1.5rem;
  align-items: start;
}

.net-topology-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.net-topology-label {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.net-topology {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 120px;
}

.net-node {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg);
  min-width: 88px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.net-node--switch {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.net-node.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.net-node-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.net-node-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.net-node-ip,
.net-node-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-family: ui-monospace, monospace;
}

.net-segment {
  flex: 1 1 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 32px;
  max-width: 80px;
}

.net-cable-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.net-cable-line {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  position: relative;
  overflow: visible;
}

.net-segment.is-active .net-cable-line {
  background: var(--accent);
}

.net-packet {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent);
  top: 50%;
  left: 12%;
  transform: translate(-50%, -50%);
  transition: left 0.55s ease-in-out, opacity 0.2s;
  z-index: 5;
  pointer-events: none;
}

.net-packet.is-visible {
  display: block !important;
}

.net-topology[data-packet-at="a"] .net-packet { left: 12%; }
.net-topology[data-packet-at="seg-a"] .net-packet { left: 28%; }
.net-topology[data-packet-at="switch"] .net-packet { left: 50%; }
.net-topology[data-packet-at="seg-b"] .net-packet { left: 72%; }
.net-topology[data-packet-at="b"] .net-packet { left: 88%; }

.net-step-caption {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 2.6em;
}

.net-controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.net-controls-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.net-ip-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.net-ip-grid label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.net-ip-input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}

.net-ip-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.net-ip-input.is-invalid {
  border-color: #c62828;
}

.net-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.net-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.net-terminal-wrap {
  background: #1a0f18;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

[data-theme="dark"] .net-terminal-wrap {
  background: #0d060c;
}

.net-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: color-mix(in srgb, var(--accent) 20%, #1a0f18);
  font-size: 0.8rem;
  color: #fce7f3;
}

.net-terminal {
  margin: 0;
  padding: 1rem;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #fbcfe8;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.net-terminal .line-ok { color: #86efac; }
.net-terminal .line-err { color: #fca5a5; }
.net-terminal .line-info { color: #f9a8d4; }
.net-terminal .line-cmd { color: #fff; font-weight: 600; }

.net-glossary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.net-glossary h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.net-glossary dl {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.net-glossary dt {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

.net-glossary dd {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 800px) {
  .net-sim__layout {
    grid-template-columns: 1fr;
  }

  .net-topology {
    flex-wrap: wrap;
    justify-content: center;
  }

  .net-segment {
    flex: 1 1 100%;
    max-width: none;
    flex-direction: row;
    padding: 0.25rem 0;
  }

  .net-cable-line {
    width: 60%;
  }
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.planning-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.planning-table th,
.planning-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.planning-table th {
  background: var(--bg-alt);
  font-weight: 600;
}

.planning-table tr:last-child td {
  border-bottom: none;
}

/* Links */
.links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.links-list a {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.links-list a:hover {
  background: var(--bg);
}

/* Footer */
.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer code {
  font-size: 0.85em;
  background: var(--bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.footer-meta {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

.footer-credit {
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.75;
}

.app-version {
  position: fixed;
  left: 0.75rem;
  bottom: 0.5rem;
  z-index: 50;
  font-size: 0.7rem;
  font-family: var(--font-sans);
  color: var(--text-muted);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

/* Mobile */
@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    margin-left: 0;
  }

  .nav.is-open {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
    position: relative;
  }

  .theme-toggle {
    order: 2;
  }
}

@media (max-width: 500px) {
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ——— Page d'accueil ——— */

.home-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.home-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.home-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

.home-bg__orb--1 {
  width: 520px;
  height: 520px;
  background: #3b82f6;
  top: -180px;
  right: -120px;
}

.home-bg__orb--2 {
  width: 400px;
  height: 400px;
  background: #8b5cf6;
  bottom: 10%;
  left: -100px;
}

.home-bg__orb--3 {
  width: 300px;
  height: 300px;
  background: #06b6d4;
  top: 45%;
  right: 20%;
  opacity: 0.25;
}

[data-theme="dark"] .home-bg__orb {
  opacity: 0.2;
}

.home-header {
  position: relative;
  z-index: 10;
}

.home-header .header-inner {
  max-width: 1200px;
}

.home-header .logo-mark {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  font-weight: 700;
  font-size: 0.85rem;
}

.home-header .logo-text {
  font-size: 0.95rem;
}

.home-header .logo-text strong {
  color: var(--accent);
}

.home-header__sti {
  margin-left: auto;
  margin-right: 0.5rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 8px;
  background: var(--accent-soft);
  transition: background 0.15s, border-color 0.15s;
}

.home-header__sti:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.home-footer a {
  color: var(--accent);
  font-weight: 500;
}

.home-info__sti-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.home-hero {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}

.home-hero__badge {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 999px;
}

.home-hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.home-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero__lead {
  margin: 0 auto 2rem;
  max-width: 540px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.home-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn--lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-arrow {
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.home-hero__cta:hover .btn-arrow {
  transform: translateY(3px);
}

.home-apps {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.home-apps__head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.home-apps__head h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.75rem;
}

.home-apps__head p {
  margin: 0;
  color: var(--text-muted);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(37, 99, 235, 0.15);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.app-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.app-card--network .app-card__icon {
  background: color-mix(in srgb, var(--app-network) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--app-network) 30%, transparent);
}

.app-card--terminal .app-card__icon {
  background: color-mix(in srgb, var(--app-terminal) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--app-terminal) 30%, transparent);
}

.app-card--security .app-card__icon {
  background: color-mix(in srgb, var(--app-security) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--app-security) 30%, transparent);
}

.app-card--brevet .app-card__icon {
  background: color-mix(in srgb, var(--app-brevet) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--app-brevet) 30%, transparent);
}

.app-card__body {
  flex: 1;
}

.app-card__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.app-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.app-card__desc {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.app-card__desc code {
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  background: var(--bg-alt);
  border-radius: 4px;
}

.app-card__features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.app-card__features li {
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  background: var(--bg-alt);
  border-radius: 999px;
  color: var(--text-muted);
}

.app-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: #fff;
  transition: filter 0.15s, transform 0.15s;
}

.app-card__btn:hover {
  filter: brightness(1.08);
  transform: scale(1.01);
}

.app-card--network .app-card__btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.app-card--terminal .app-card__btn {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.app-card--security .app-card__btn {
  background: linear-gradient(135deg, #059669, #047857);
}

.app-card--brevet .app-card__btn {
  background: linear-gradient(135deg, #d97706, #b45309);
}

.home-info {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.home-info__card {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.home-info__card h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.home-info__card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.home-info__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-info__links a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.home-info__links a:hover {
  text-decoration: underline;
}

.home-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: none;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(8px);
}

@media (max-width: 640px) {
  .home-hero {
    padding-top: 2.5rem;
  }

  .logo-text strong {
    display: block;
  }

  .home-header__sti {
    order: 3;
    width: 100%;
    text-align: center;
    margin: 0.25rem 0 0;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }
}
