/* ============================================
   LANGUAGE GUIDE — COMPONENTS
============================================ */

/* ── Section container ── */
.lang-section {
  margin-bottom: 20px;
}

.lang-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.lang-section-kanji {
  font-family: 'Noto Serif JP', serif;
  font-size: 40px;
  font-weight: 300;
  color: rgba(15,21,53,0.08);
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
  text-align: center;
}

.lang-section-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}

.lang-section-jp {
  font-family: 'Noto Serif JP', serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--text-light);
  margin-top: 2px;
}

/* ── Pronunciation block ── */
.lang-prono {
  padding-left: 62px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prono-rule {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.prono-rule-label {
  font-weight: 600;
  color: var(--navy);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 90px;
  padding-top: 2px;
  flex-shrink: 0;
}

.prono-rule-text em {
  font-style: italic;
  color: var(--gold);
}

/* ── Numbers grid ── */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding-left: 62px;
  margin-bottom: 12px;
}

.number-chip {
  background: var(--white);
  border: 1px solid rgba(15,21,53,0.1);
  border-radius: 6px;
  padding: 12px 8px;
  text-align: center;
}

.number-digit {
  font-family: 'Shippori Mincho', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.number-romaji {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: var(--text-light);
  margin-top: 4px;
  line-height: 1.3;
}

.number-jp {
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--navy);
  margin-top: 3px;
  line-height: 1;
}

/* ── Phrase table ── */
.phrase-table {
  width: 100%;
  border-collapse: collapse;
  margin-left: 62px;
  width: calc(100% - 62px);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  margin-bottom: 10px;
}

.phrase-table thead tr {
  background: var(--navy);
  color: var(--white);
}

.phrase-table thead th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.phrase-table tbody tr {
  border-bottom: 0.5px solid rgba(0,0,0,0.07);
}

.phrase-table tbody tr:nth-child(even) {
  background: rgba(15,21,53,0.025);
}

.phrase-table tbody tr.phrase-row--alert {
  background: rgba(200,75,49,0.05);
}

.phrase-table tbody tr.phrase-row--alert td:first-child {
  color: var(--vermillion);
  font-weight: 600;
}

.phrase-table td {
  padding: 8px 12px;
  color: var(--text);
  vertical-align: middle;
  line-height: 1.4;
}

/* Phonétique column */
.phrase-table td:nth-child(2) {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--navy);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.phrase-table td:nth-child(2) strong {
  font-weight: 700;
  color: var(--navy);
}

.phrase-table td:nth-child(2) em {
  font-style: italic;
  font-weight: 300;
  color: var(--text-light);
}

/* Romaji column */
.phrase-table td:nth-child(3),
.phrase-table th:nth-child(3) {
  font-style: italic;
  color: var(--text-light);
  font-weight: 400;
}

/* Japonais column */
.phrase-table td:nth-child(4) {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--text-light);
}

/* ── Callout notes ── */
.lang-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  line-height: 1.5;
  margin-left: 62px;
  margin-top: 10px;
}

.lang-note.info {
  background: rgba(15,21,53,0.05);
  border-left: 2.5px solid var(--navy);
  color: var(--text);
}

.lang-note.gold {
  background: rgba(201,150,58,0.08);
  border-left: 2.5px solid var(--gold);
  color: #6b5010;
}

.lang-note.warn {
  background: rgba(200,75,49,0.06);
  border-left: 2.5px solid var(--vermillion);
  color: var(--vermillion);
}

/* ── Script cards ── */
.script-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-left: 62px;
  margin-bottom: 12px;
}

.script-card {
  background: var(--white);
  border: 1px solid rgba(15,21,53,0.1);
  border-radius: 8px;
  padding: 16px;
}

.script-card-name {
  font-family: 'Shippori Mincho', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.script-card-sample {
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 300;
  color: rgba(15,21,53,0.35);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  line-height: 1;
}

.script-card-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--text);
  line-height: 1.55;
}

.script-card-desc em {
  font-style: italic;
  color: var(--navy);
}

/* ============================================
   MOBILE
============================================ */
@media (max-width: 640px) {
  .lang-prono,
  .numbers-grid,
  .script-grid,
  .lang-note { padding-left: 0; margin-left: 0; }

  .phrase-table { margin-left: 0; width: 100%; }

  /* Masquer la colonne romaji sur mobile — la phonétique suffit */
  .phrase-table .col-romaji { display: none; }

  .numbers-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }

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

  .prono-rule { flex-direction: column; gap: 2px; }
  .prono-rule-label { min-width: unset; }

  .phrase-table thead th { font-size: 9px; padding: 6px 8px; }
  .phrase-table td { padding: 7px 8px; font-size: 11px; }
  .phrase-table td:nth-child(4) { font-size: 12px; }
}

@media (max-width: 380px) {
  .numbers-grid { grid-template-columns: repeat(5, 1fr); }
  .number-digit { font-size: 18px; }
  .number-romaji { font-size: 8px; }
}
