/* =====================================================
   HORLOGE BUDGETAIRE FRANCE - PAGE PEDAGOGIQUE v1.0 - 2026-08-10 17:45 UTC
   Deploiement: /home/horloge-budgetaire/public/page-pedagogie.css
   Objet: styles additionnels pour comprendre-la-dette.html /
          understanding-the-debt.html. Ne redefinit AUCUN token deja
          present dans style.css (charge en second, apres style.css).
   Historique:
     v1.0 - 2026-08-10 - creation initiale (iceberg, accordeon,
            selecteur de langue, methodologie, formulaire feedback)
   ===================================================== */

/* ─── LANGUE SWITCH ─── */
.lang-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.lang-switch a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  transition: all 0.2s;
}
.lang-switch a:hover,
.lang-switch a.active {
  background: rgba(255,255,255,0.15);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* ─── INTRO / CHAPO ─── */
.pedago-intro {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.pedago-intro .eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,162,39,0.1);
  border: 1px solid rgba(201,162,39,0.3);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.pedago-intro h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.pedago-intro p {
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ─── SECTION GENERIQUE ─── */
.pedago-section {
  max-width: 900px;
  margin: 0 auto 3.5rem;
}
.pedago-section .section-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--mid-gray);
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}
.pedago-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
}
.pedago-section .lead {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 1.4rem;
  line-height: 1.7;
}
.pedago-section p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: var(--text);
}
.pedago-analogy {
  background: var(--off-white);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.5rem;
  margin: 1.4rem 0;
  font-size: 0.98rem;
  color: var(--text-light);
}
.pedago-analogy strong { color: var(--navy); }

/* ─── ICEBERG (element signature) ─── */
.iceberg-wrap {
  background: linear-gradient(180deg, #e8f0fa 0%, #e8f0fa 38%, var(--navy) 38%, var(--navy-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 0;
  margin: 2rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}
.iceberg-waterline {
  position: absolute;
  left: 0; right: 0;
  top: 38%;
  border-top: 2px dashed rgba(255,255,255,0.5);
  z-index: 2;
}
.iceberg-waterline span {
  position: absolute;
  right: 1.2rem;
  top: -1.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--navy-mid);
  background: rgba(255,255,255,0.85);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}
.iceberg-block {
  position: relative;
  z-index: 3;
  padding: 1.4rem 1.8rem;
}
.iceberg-block.visible { padding-top: 1.8rem; }
.iceberg-block.hidden { padding-bottom: 2rem; }
.iceberg-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.iceberg-block.visible .iceberg-label { color: var(--navy-mid); }
.iceberg-block.hidden .iceberg-label { color: var(--gold-light); }
.iceberg-value {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 2.3rem;
  line-height: 1;
}
.iceberg-block.visible .iceberg-value { color: var(--navy); }
.iceberg-block.hidden .iceberg-value { color: white; }
.iceberg-desc {
  font-size: 0.9rem;
  max-width: 480px;
  margin-top: 0.5rem;
}
.iceberg-block.visible .iceberg-desc { color: var(--text-light); }
.iceberg-block.hidden .iceberg-desc { color: rgba(255,255,255,0.75); }

/* ─── COURBES SIMPLES (r vs g) ─── */
.rg-chart {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.rg-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.rg-legend-item { display: flex; align-items: center; gap: 0.4rem; }
.rg-legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ─── GLOSSAIRE ACCORDEON ─── */
.glossary { max-width: 900px; margin: 0 auto 3.5rem; }
.glossary-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.7rem;
  overflow: hidden;
}
.glossary-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 1.3rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.glossary-question:hover { background: var(--off-white); }
.glossary-question .chevron {
  transition: transform 0.2s;
  color: var(--gold);
  flex-shrink: 0;
}
.glossary-item.open .glossary-question .chevron { transform: rotate(180deg); }
.glossary-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.glossary-item.open .glossary-answer { max-height: 400px; }
.glossary-answer-inner {
  padding: 0 1.3rem 1.1rem;
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ─── METHODOLOGIE ─── */
.methodo-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
  font-size: 0.88rem;
}
.methodo-table th {
  background: var(--navy);
  color: white;
  text-align: left;
  padding: 0.7rem 1rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
}
.methodo-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--light-gray);
  color: var(--text);
  vertical-align: top;
}
.methodo-table tr:last-child td { border-bottom: none; }
.methodo-table td.periodicite {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--navy-mid);
  white-space: nowrap;
}

/* ─── BIBLIOGRAPHIE / SOURCES ─── */
.biblio-list { max-width: 900px; margin: 0 auto 3.5rem; }
.biblio-item {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--light-gray);
}
.biblio-item:last-child { border-bottom: none; }
.biblio-marker {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  width: 2rem;
}
.biblio-body a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}
.biblio-body a:hover { color: var(--red); border-color: var(--red); }
.biblio-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--mid-gray);
  margin-top: 0.2rem;
}

/* ─── FORMULAIRE FEEDBACK (prive, lu 1x/mois) ─── */
.feedback-box {
  max-width: 700px;
  margin: 0 auto 3.5rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}
.feedback-box h3 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.feedback-box p {
  color: var(--text-light);
  font-size: 0.92rem;
  margin-bottom: 1.2rem;
}
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: left;
}
.feedback-form textarea,
.feedback-form input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.92rem;
  resize: vertical;
}
.feedback-form textarea { min-height: 100px; }
.feedback-form button {
  align-self: flex-start;
  background: var(--navy);
  color: white;
  border: none;
  padding: 0.65rem 1.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.feedback-form button:hover { background: var(--navy-mid); }
.feedback-status {
  font-size: 0.85rem;
  margin-top: 0.6rem;
  min-height: 1.2rem;
}
.feedback-status.ok { color: var(--green); }
.feedback-status.err { color: var(--red); }
.feedback-note {
  font-size: 0.75rem;
  color: var(--mid-gray);
  margin-top: 1rem;
}

/* ─── RESPONSIVE (5 breakpoints obligatoires) ─── */
@media (max-width: 1100px) {
  .pedago-intro h1 { font-size: 2.1rem; }
}
@media (max-width: 900px) {
  .iceberg-value { font-size: 1.9rem; }
  .pedago-section h2 { font-size: 1.45rem; }
}
@media (max-width: 768px) {
  .pedago-intro h1 { font-size: 1.8rem; }
  .rg-legend { gap: 1rem; }
}
@media (max-width: 640px) {
  .iceberg-block { padding: 1.1rem 1.2rem; }
  .iceberg-value { font-size: 1.6rem; }
  .glossary-question { font-size: 0.9rem; padding: 0.85rem 1rem; }
  .feedback-box { padding: 1.4rem; }
}
@media (max-width: 400px) {
  .pedago-intro h1 { font-size: 1.5rem; }
  .pedago-intro .eyebrow { font-size: 0.65rem; }
  .biblio-item { flex-direction: column; gap: 0.3rem; }
}
