/* ==========================================================
   MATHESIS — ENVIRONNEMENTS PÉDAGOGIQUES
   ========================================================== */


/* ==========================================================
   BASE
   ========================================================== */

.pedagogical-section {
  margin: 2.5rem 0;
}

.pedagogical-block {
  --block-accent: #5f6a8e;
  --block-background: #faf9f6;

  position: relative;

  margin: 1.5rem 0;
  padding: 1.35rem 1.5rem;

  background: var(--block-background);

  border: 1px solid
    color-mix(
      in srgb,
      var(--block-accent) 34%,
      transparent
    );

  border-left: 4px solid var(--block-accent);
  border-radius: 8px;

  color: #2e2e2e;
  line-height: 1.65;
}

.pedagogical-block > p:last-child,
.pedagogical-block > ul:last-child {
  margin-bottom: 0;
}


/* ==========================================================
   TITRES ET SYMBOLES
   ========================================================== */

.pedagogical-block__heading {
  display: flex;
  align-items: center;

  gap: 0.6rem;

  margin-bottom: 0.85rem;
}

.pedagogical-block__heading h3 {
  margin: 0;

  font-family: 'Poppins', sans-serif;
  font-size: 1.08rem;
  font-weight: 600;

  color: var(--block-accent);
}

.pedagogical-icon {
  display: inline-flex;

  width: 1.5rem;
  height: 1.5rem;

  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  font-size: 1rem;
  font-weight: 700;
  line-height: 1;

  color: var(--block-accent);
}


/* ==========================================================
   IDÉE CENTRALE
   ========================================================== */

.pedagogical-section:first-child
.pedagogical-block--texte {
  padding: 0.25rem 0 0.25rem 1.25rem;

  background: transparent;

  border: 0;
  border-left: 3px solid #7583a3;
  border-radius: 0;

  font-size: 1.03rem;
}


/* ==========================================================
   INTUITION
   ========================================================== */

.pedagogical-block--intuition {
  --block-accent: #466c91;
  --block-background: #f3f7fb;
}


/* ==========================================================
   DÉFINITION
   ========================================================== */

.pedagogical-block--definition {
  --block-accent: #397a42;
  --block-background: #f3faf3;

  border-left-width: 4px;
}


/* ==========================================================
   PROPRIÉTÉ
   Bloc volontairement léger.
   ========================================================== */

.pedagogical-block--propriete {
  --block-accent: #64707c;
  --block-background: transparent;

  margin: 1.35rem 0;
  padding: 0.5rem 0 0.5rem 1.2rem;

  border: 0;
  border-left: 2px solid var(--block-accent);
  border-radius: 0;
}

.pedagogical-block--propriete
.pedagogical-block__heading {
  margin-bottom: 0.65rem;
}

.pedagogical-block--propriete
.pedagogical-block__heading h3 {
  color: #17263a;
}


/* ==========================================================
   THÉORÈME
   ========================================================== */

.pedagogical-block--theoreme {
  --block-accent: #8b2f2f;
  --block-background: #fcf4f4;

  border-left-width: 4px;
}


/* ==========================================================
   MÉTHODE
   ========================================================== */

.pedagogical-block--methode {
  --block-accent: #aa6828;
  --block-background: #fdf7ef;

  border-left-width: 4px;
}


/* ==========================================================
   EXEMPLE
   Bloc volontairement léger.
   ========================================================== */

.pedagogical-block--exemple {
  --block-accent: #65717e;
  --block-background: transparent;

  margin: 1.25rem 0;
  padding: 0.4rem 0 0.4rem 1.2rem;

  border: 0;
  border-left: 2px solid #9aa4ae;
  border-radius: 0;
}

.pedagogical-block--exemple
.pedagogical-block__heading h3 {
  color: #17263a;
}


/* ==========================================================
   CONTRE-EXEMPLE
   ========================================================== */

.pedagogical-block--contre_exemple {
  --block-accent: #a85b45;
  --block-background: #fcf6f2;
}


/* ==========================================================
   AVERTISSEMENT
   ========================================================== */

.pedagogical-block--avertissement {
  --block-accent: #a67824;
  --block-background: #fdf9ed;
}


/* ==========================================================
   REMARQUE / À RETENIR
   ========================================================== */

.pedagogical-block--remarque {
  --block-accent: #a78628;
  --block-background: #fcf9ee;
}

.pedagogical-section--remember {
  margin-top: 3rem;
}

.pedagogical-section--remember
.pedagogical-block {
  --block-accent: #b18d2f;
  --block-background: #fcf8e9;

  border-width: 1px;
  border-left-width: 4px;
}


/* ==========================================================
   FORMULES
   ========================================================== */

.math-display {
  overflow-x: auto;

  margin: 1.2rem 0;
  padding: 0.5rem 1rem;

  text-align: center;
}

.math-inline {
  white-space: nowrap;
}


/* ==========================================================
   CONDITIONS
   ========================================================== */

.math-conditions {
  margin: 1rem 0;
  padding: 0.75rem 1rem;

  background: rgba(0, 0, 0, 0.025);
  border-radius: 5px;
}

.math-conditions .micro-label {
  margin: 0 0 0.4rem;
}

.math-conditions ul {
  margin: 0;
  padding-left: 1.3rem;
}

.math-conditions li {
  margin: 0.28rem 0;
}


/* ==========================================================
   DÉMONSTRATION REPLIABLE
   ========================================================== */

.mathesis-proof {
  --proof-accent: #41566f;

  margin: 1.25rem 0;

  border-top: 1px solid rgba(65, 86, 111, 0.25);
  border-bottom: 1px solid rgba(65, 86, 111, 0.25);

  background: rgba(248, 249, 251, 0.72);
}

.mathesis-proof summary {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0.9rem 1rem;

  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;

  color: #17314f;

  cursor: pointer;
  list-style: none;
}

.mathesis-proof summary::-webkit-details-marker {
  display: none;
}

.mathesis-proof summary::after {
  content: '⌄';

  margin-left: 1rem;

  font-size: 1.05rem;
  color: #718095;

  transition: transform 0.18s ease;
}

.mathesis-proof[open] summary::after {
  transform: rotate(180deg);
}

.mathesis-proof summary:hover {
  background: rgba(65, 86, 111, 0.05);
}

.mathesis-proof__summary-title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.mathesis-proof
.pedagogical-icon {
  color: var(--proof-accent);
}

.mathesis-proof__content {
  padding: 0.3rem 1rem 1.2rem;

  line-height: 1.65;
}

.proof-steps {
  margin-top: 1rem;
}

.proof-step {
  display: grid;
  grid-template-columns: 2.2rem 1fr;

  gap: 0.8rem;

  margin: 0.95rem 0;
}

.proof-step__number {
  display: flex;

  justify-content: center;
  align-items: flex-start;

  padding-top: 0.2rem;

  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;

  color: #7b8795;
}


/* ==========================================================
   LISTE REGROUPÉE DES ERREURS FRÉQUENTES
   ========================================================== */

.pedagogical-warning-list ul {
  margin: 0.4rem 0 0;
  padding-left: 1.35rem;
}

.pedagogical-warning-list li {
  margin: 0.55rem 0;
}

.pedagogical-warning-list li::marker {
  color: #a67824;
}


/* ==========================================================
   FIN DE LA FICHE / MÉTADONNÉES
   ========================================================== */

.notion-course-end {
  display: grid;
  grid-template-columns: 1fr auto 1fr;

  align-items: center;
  gap: 1rem;

  margin: 3.5rem 0;
}

.notion-course-end span {
  height: 1px;

  background: rgba(10, 45, 82, 0.15);
}

.notion-course-end p {
  margin: 0;

  font-size: 0.72rem;
  font-weight: 600;

  letter-spacing: 0.16em;
  text-transform: uppercase;

  color: #8090a2;
}

.notion-meta-section {
  padding-top: 0.5rem;
}

.notion-meta-heading {
  margin-bottom: 2rem;
}

.notion-meta-heading h2 {
  margin-top: 0.35rem;

  font-size: clamp(2rem, 3.2vw, 3.35rem);
  line-height: 1.05;
}

.notion-meta-section--fallback {
  padding-top: 0;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 700px) {
  .pedagogical-section {
    margin: 2rem 0;
  }

  .pedagogical-block {
    margin: 1.15rem 0;
    padding: 1rem 1.05rem;
  }

  .pedagogical-block--propriete,
  .pedagogical-block--exemple {
    padding: 0.4rem 0 0.4rem 1rem;
  }

  .proof-step {
    grid-template-columns: 1.7rem 1fr;
    gap: 0.5rem;
  }

  .mathesis-proof summary {
    padding: 0.85rem 0.9rem;
  }

  .mathesis-proof__content {
    padding: 0.25rem 0.9rem 1rem;
  }

  .notion-course-end {
    gap: 0.7rem;

    margin: 3rem 0;
  }

  .notion-course-end p {
    font-size: 0.64rem;
  }

  .notion-meta-heading h2 {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }
}

/* ===== Opt-in : notion-page v2.0.0, n'affecte pas le rendu v1 ===== */
.notion-v2-section { scroll-margin-top: 5rem; }
.notion-v2-intention { font-size: 1.02rem; line-height: 1.62; color: #3f5061; }
.notion-v2-item { scroll-margin-top: 5rem; }
.notion-v2-activity {
  margin: 1.3rem 0; padding: 1.3rem; border: 1px solid #a6bacd;
  border-left: 4px solid #375e83; border-radius: .55rem; background: #f2f7fb;
  overflow-wrap:anywhere; scroll-margin-top: 5rem;
}
.notion-v2-activity h3 { margin:.35rem 0 .8rem; font-size:1.13rem; }
.notion-v2-instruction { border-left: 2px solid #7b97aa; padding-left:.7rem; }
.notion-v2-questions { margin:.35rem 0 1rem; padding-left:1.8rem; }
.notion-v2-questions li { padding:.18rem 0; }
.notion-v2-questions code { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.notion-v2-question-target { display:block; font-size:.82rem; color:#38546c; line-height:1.45; margin:.1rem 0 .2rem; }
.notion-v2-question-target--pending { color:#69501e; font-weight:600; }
.notion-v2-unavailable, .notion-v2-warning, .notion-v2-asset-warning {
  padding:.5rem .65rem; background:#fff9e9; color:#604a23;
  border-radius: .35rem; font-size:.94rem;
}
.notion-v2-transition { font-style:italic; font-size:.93rem; color:#38546c; }
.notion-v2-activity-link { display:inline-flex; min-height:44px; padding:.7rem 1rem; align-items:center; }
.notion-v2-figure {margin:1.6rem 0; padding:1rem; background:#fff; border:1px solid #aeb8c6; border-radius:.5rem; }
.notion-v2-figure img { display:block; width:100%; height:auto; max-width:100%; }
.notion-v2-figure figcaption { margin-top:.8rem; font-size:.94rem; color:#374b61; }
.notion-v2-preview-banner { background:#f9edcb; color:#40330c; border:2px solid #bf8d22; padding:1rem; margin:1rem auto; border-radius:.45rem; }
@media (max-width:680px) {
 .notion-v2-activity { padding:.9rem; }
 .notion-v2-figure { padding:.55rem; }
 .notion-v2-section { margin-top:1.3rem; }
}
