/* ======================================================================
   📁 /assets/css/lesson_histoire.css
   ======================================================================
   Styles communs aux leçons d’Histoire SC@LPA
   ====================================================================== */


/* ======================================================================
   1. Headers d’articles
   ====================================================================== */

.histoire-article-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  min-height: 170px;
}

.histoire-article-header-img {
  width: 260px;
  max-width: 40%;
  height: auto;
  flex-shrink: 0;
  background: #fff;
}

.histoire-article-title {
  flex: 1;
  margin: 0;
  font-size: clamp(1.7rem, 2.3vw, 2.35rem);
  line-height: 1.2;
  font-weight: 700;
}


/* ======================================================================
   2. Images internes aux articles
   ====================================================================== */

.histoire-inline-img {
  max-width: 220px;
}


/* ======================================================================
   3. Tooltips enrichis des leçons d’Histoire
   ====================================================================== */

.histoire-tooltip-term {
  cursor: help;
}

.histoire-tooltip .tooltip-inner {
  max-width: 320px;
  text-align: left;
}

.histoire-tooltip .tooltip-inner img {
  display: block;
  margin-top: .45rem;
  background: #fff;
  padding: .15rem;
  border-radius: .25rem;
}


/* ======================================================================
   4. Liens des leçons d’Histoire
   ====================================================================== */

.lesson-section .card-body a:not(.btn):not(.accordion-button),
.lesson-section .alert a:not(.btn):not(.accordion-button) {
  color: #7a2f1b;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 134, 11, 0.35);
  box-shadow: none;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.lesson-section .card-body a:not(.btn):not(.accordion-button)::before,
.lesson-section .alert a:not(.btn):not(.accordion-button)::before {
  content: "❧";
  color: #b8860b;
  font-size: 0.85em;
  margin-right: 0.18em;
  vertical-align: 0.05em;
}

.lesson-section .card-body a:not(.btn):not(.accordion-button):hover,
.lesson-section .card-body a:not(.btn):not(.accordion-button):focus,
.lesson-section .alert a:not(.btn):not(.accordion-button):hover,
.lesson-section .alert a:not(.btn):not(.accordion-button):focus {
  color: #4f1f12;
  border-bottom-color: #b8860b;
  background-color: rgba(255, 248, 220, 0.55);
  border-radius: 0.15rem;
}

.histoire-tooltip-term {
  cursor: help;
  color: #7a2f1b;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dotted rgba(184, 134, 11, 0.75);
}

.histoire-tooltip-term::before {
  content: "✦";
  color: #b8860b;
  font-size: 0.72em;
  margin-right: 0.16em;
  vertical-align: 0.1em;
}

.histoire-tooltip-term:hover,
.histoire-tooltip-term:focus {
  color: #4f1f12;
  border-bottom-style: solid;
  background-color: rgba(255, 248, 220, 0.65);
  border-radius: 0.15rem;
}

/* ======================================================================
   5. Responsive
   ====================================================================== */

@media (max-width: 576px) {
  .histoire-article-header {
    flex-direction: column;
    text-align: center;
    min-height: 0;
  }

  .histoire-article-header-img {
    width: 100%;
    max-width: 320px;
  }

  .histoire-article-title {
    font-size: 1.55rem;
  }
}
