/* Wrapper global de la page typographie */
.typography-page {
  background-color: #f5f7fb;
  padding: 2rem 1rem 3rem;
}

/* Meilleure gestion des espacements sur desktop */
@media (min-width: 992px) {
  .typography-page {
    padding: 3rem 2rem 4rem;
  }
}

/* Bloc d'introduction (hero) */
.typography-page .typo-hero {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 2rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.typography-page .typo-hero .page-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.typography-page .intro-text {
  margin: 0;
  margin-top: 0.75rem;
  color: #4b5563;
  line-height: 1.7;
  font-size: 0.98rem;
}

/* Sections (cartes) */
.typography-page .typo-section {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.75rem 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

/* Header de section */
.typography-page .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.typography-page .section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ff5655;
}

.typography-page .section-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Tables typographiques */
.typography-page .typo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.typography-page .typo-table thead tr {
  background: linear-gradient(90deg, #fdf2f2, #f9fafb);
}

.typography-page .typo-table thead th {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0.75rem 0.75rem;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.typography-page .typo-table tbody tr {
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.typography-page .typo-table tbody tr:last-child {
  border-bottom: none;
}

.typography-page .typo-table tbody td {
  padding: 0.6rem 0.75rem;
  vertical-align: middle;
}

/* Nom de la police */
.typography-page .font-name {
  font-weight: 600;
  color: #111827;
}

/* Exemple de texte (ABC…) */
.typography-page .font-sample {
  display: inline-block;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #111827;
  white-space: normal;
}

/* Icône de téléchargement */
.typography-page .download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background-color: rgba(255, 86, 85, 0.06);
  color: #ff5655;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.typography-page .download-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.typography-page .download-icon:hover {
  background-color: rgba(255, 86, 85, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(248, 113, 113, 0.2);
}

/* ===========================
   Font-family par police
   (Affichage réel dans .font-sample)
   =========================== */

.typography-page .font-sample--scouts {
  font-family: 'ScoutsGTPlanarBold', sans-serif;
}

.typography-page .font-sample--insaniburger {
  font-family: 'Insaniburger', sans-serif;
}

.typography-page .font-sample--circus {
  font-family: 'CircusOfInnocents', sans-serif;
}

.typography-page .font-sample--james {
  font-family: 'James Stroker', cursive;
}

.typography-page .font-sample--poppins {
  font-family: 'Poppins', sans-serif;
}

.typography-page .font-sample--noto {
  font-family: 'NotoSans', sans-serif;
}

.typography-page .font-sample--calibri {
  font-family: 'Calibri', sans-serif;
}

.typography-page .font-sample--arial {
  font-family: 'Arial', sans-serif;
}

.typography-page .font-sample--roboto {
  font-family: 'Roboto', sans-serif;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 767.98px) {
  .typography-page .typo-hero {
    padding: 1.5rem 1.25rem;
  }

  .typography-page .typo-hero .page-title {
    font-size: 1.4rem;
  }

  .typography-page .intro-text {
    font-size: 0.92rem;
  }

  .typography-page .typo-section {
    padding: 1.4rem 1.1rem;
  }

  .typography-page .section-header {
    flex-direction: column;
    gap: 0.35rem;
  }

  .typography-page .typo-table thead {
    display: none; /* on bascule en mode cartes sur mobile */
  }

  .typography-page .typo-table tbody tr {
    display: block;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 0.75rem 0.8rem;
    margin-bottom: 0.7rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  }

  .typography-page .typo-table tbody td {
    display: block;
    border: none;
    padding: 0.2rem 0;
  }

  .typography-page .typo-table tbody td:nth-child(1) {
    margin-bottom: 0.25rem;
  }

  .typography-page .typo-table tbody td:nth-child(2) {
    margin-bottom: 0.35rem;
  }

  .typography-page .download-icon {
    width: 2.3rem;
    height: 2.3rem;
  }

  .typography-page .font-sample {
    font-size: 0.9rem;
    word-break: break-word;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .typography-page .typo-table {
    font-size: 0.9rem;
  }

  .typography-page .font-sample {
    font-size: 0.9rem;
  }
}

/* Badges de section (Visuels / Antontan-taratasy) */
.typography-page .section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.typography-page .badge-visuels {
  background: rgba(255, 86, 85, 0.08);
  color: #ff5655;
}

.typography-page .badge-docs {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
}

/* Petite meta/notice sous les tableaux */
.typography-page .section-meta {
  margin-top: 0.6rem;
  font-size: 0.83rem;
  color: #6b7280;
}

/* Responsive : centrer les badges sur mobile */
@media (max-width: 767.98px) {
  .typography-page .section-header {
    align-items: flex-start;
  }

  .typography-page .section-badge {
    margin-top: 0.35rem;
  }
}
