.custom-numbered-block {
  margin: 1em 0;
  padding: 0.8em 1em;
  border-left: 4px solid #555;
  background-color: #f8f8f8;
}

.custom-numbered-block > p:first-child {
  margin-top: 0;
}

.custom-numbered-block > p:first-child strong {
  font-size: 1.05em;
}



/* ========== Navigation entre chapitres (colorée) ========== */
.chap-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8em;
  margin-top: 3em;
  padding: 1.1em 1.2em;
  border-radius: 14px;
  background: linear-gradient(120deg, #e8f7f2, #eaf4fd, #fdf0f0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* 3 zones égales : gauche / centre / droite */
.chap-nav p { margin: 0; flex: 1 1 0; min-width: 160px; }
.chap-nav p:nth-child(1) { text-align: left; }
.chap-nav p:nth-child(2) { text-align: center; }
.chap-nav p:nth-child(3) { text-align: right; }

/* Boutons colorés */
.chap-nav a {
  display: inline-block;
  padding: 0.5em 1.2em;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.chap-nav a.prev { background: linear-gradient(135deg, #5bc0de, #2a9fd8); } /* bleu */
.chap-nav a.home { background: linear-gradient(135deg, #78c2ad, #4aa58b); } /* vert minty */
.chap-nav a.next { background: linear-gradient(135deg, #f3969a, #e66a6f); } /* corail */

.chap-nav a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
  filter: brightness(1.07);
}

/* Flèches animées + icône du menu central */
.chap-nav a.prev::before,
.chap-nav a.next::after {
  display: inline-block;
  font-size: 1.2em;
  vertical-align: middle;
  transition: transform 0.2s ease;
}
.chap-nav a.prev::before { content: "⟵"; margin-right: 0.5em; }
.chap-nav a.next::after  { content: "⟶"; margin-left: 0.5em; }
.chap-nav a.prev:hover::before { transform: translateX(-5px); }
.chap-nav a.next:hover::after  { transform: translateX(5px); }
.chap-nav a.home::before { content: "📚 "; }





/* ===== Icônes vectorielles en filigrane sur les cartes ===== */
.card-home {
  position: relative;
  overflow: hidden;
}

.card-home::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 92px;
  height: 92px;
  background: no-repeat center / contain;
  opacity: 0.16;          /* intensité du filigrane */
  pointer-events: none;
}

/* MPSI : symbole somme */
.grid > :nth-child(1) .card-home::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f42c1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 5H7l6 7-6 7h11'/%3E%3C/svg%3E");
}

/* MP : intégrale */
.grid > :nth-child(2) .card-home::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f42c1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 4c-2.5 0-4 1.7-4 4v8c0 2.3-1.5 4-4 4'/%3E%3C/svg%3E");
}

/* PCSI : atome */
.grid > :nth-child(3) .card-home::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a9fd8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='1.8'/%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.8'/%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.8' transform='rotate(60 12 12)'/%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.8' transform='rotate(-60 12 12)'/%3E%3C/svg%3E");
}

/* PSI : engrenage */
.grid > :nth-child(4) .card-home::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a9fd8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.2 2.2M16.9 16.9l2.2 2.2M19.1 4.9l-2.2 2.2M7.1 16.9l-2.2 2.2'/%3E%3C/svg%3E");
}

/* TSI 1re : processeur */
.grid > :nth-child(5) .card-home::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8590c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Crect x='10' y='10' width='4' height='4'/%3E%3Cpath d='M12 2v4M12 18v4M2 12h4M18 12h4'/%3E%3C/svg%3E");
}

/* TSI 2e : curseurs de réglage */
.grid > :nth-child(6) .card-home::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8590c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3Ccircle cx='9' cy='6' r='2'/%3E%3Ccircle cx='15' cy='12' r='2'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3C/svg%3E");
}

/* ECT 1re : diagramme en barres */
.grid > :nth-child(7) .card-home::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2320a17a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16M7 20v-6M12 20V8M17 20v-9'/%3E%3C/svg%3E");
}

/* ECT 2e : courbe de croissance */
.grid > :nth-child(8) .card-home::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2320a17a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l6-6 4 4 8-8'/%3E%3Cpath d='M14 7h7v7'/%3E%3C/svg%3E");
}

/* ECS 1re : mallette */
.grid > :nth-child(9) .card-home::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9534f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='12' rx='2'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2M3 13h18'/%3E%3C/svg%3E");
}

/* ECS 2e : banque */
.grid > :nth-child(10) .card-home::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9534f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-6 9 6'/%3E%3Cpath d='M5 9v10M19 9v10M9 12v5M12 12v5M15 12v5'/%3E%3Cpath d='M3 20h18'/%3E%3C/svg%3E");
}



.justify {
  text-align: justify;
  hyphens: auto;
}
