/*
 * ============================================================
 * cours.css — Feuille de style commune aux cours CPGE
 * ============================================================
 * Usage : dans chaque fichier HTML, remplacer le bloc <style>
 * par : <link rel="stylesheet" href="../../assets/cours.css">
 * (adapter le chemin relatif selon la profondeur du fichier)
 *
 * Arborescence cible :
 *   cours-cpge/
 *   ├── assets/cours.css        ← ce fichier
 *   ├── maths/arithmetique/arithmetique-cpge.html
 *   ├── maths/inegalites/inegalites-cpge.html
 *   └── index.html
 *
 * Pour modifier un style globalement : éditer ce fichier.
 * Pour surcharger localement dans un cours : ajouter un
 * <style> après le <link> dans le fichier HTML concerné.
 * ============================================================
 */
:root {
      --bleu: #1a3a5c;
      --bleu-clair: #2d6a9f;
      --rouge: #c0392b;
      --vert: #1e7e4a;
      --orange: #d35400;
      --gris-clair: #f4f6f8;
      --gris-bordure: #ccd3db;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: "Palatino Linotype", Palatino, Georgia, serif;
      font-size: 15px;
      line-height: 1.75;
      color: #1a1a1a;
      background: white;
      max-width: 860px;
      margin: 0 auto;
      padding: 30px 40px 60px;
    }

    /* TITRE */
    .titre-chapitre {
      text-align: center;
      border-top: 3px solid var(--bleu);
      border-bottom: 3px solid var(--bleu);
      padding: 18px 0;
      margin-bottom: 30px;
    }
    .titre-chapitre h1 {
      font-size: 2em;
      color: var(--bleu);
      letter-spacing: 2px;
      text-transform: uppercase;
    }
    .titre-chapitre .sous-titre {
      font-size: 0.95em;
      color: #555;
      margin-top: 6px;
      font-style: italic;
    }

    /* SECTIONS */
    h2 {
      font-size: 1.3em;
      color: white;
      background: var(--bleu);
      padding: 8px 16px;
      margin: 36px 0 16px;
      letter-spacing: 1px;
    }
    h3 {
      font-size: 1.1em;
      color: var(--bleu-clair);
      border-bottom: 1px solid var(--bleu-clair);
      padding-bottom: 4px;
      margin: 24px 0 12px;
    }

    p { margin: 8px 0; }

    ul, ol { margin: 8px 0 8px 28px; }
    li { margin: 5px 0; }

    /* BLOCS */
    .definition, .proposition, .theoreme, .corollaire, .exemple, .exercice, .methode, .remarque, .complement {
      border-left: 4px solid;
      padding: 10px 16px;
      margin: 16px 0;
      border-radius: 0 4px 4px 0;
    }
    .definition   { border-color: var(--bleu);       background: #eef3f8; }
    .proposition  { border-color: var(--bleu-clair); background: #f0f6fc; }
    .theoreme     { border-color: var(--rouge);      background: #fdf0ef; }
    .corollaire   { border-color: var(--orange);     background: #fdf4ec; }
    .exemple      { border-color: var(--vert);       background: #f0faf4; }
    .exercice     { border-color: #7d3c98;           background: #f8f2fb; }
    .methode      { border-color: var(--orange);     background: #fef9f0; }
    .remarque     { border-color: #888;              background: #f8f8f8; }
    .complement   { border-color: #2e86c1;           background: #eaf4fb; border-style: dashed; }

    .bloc-titre {
      font-weight: bold;
      font-size: 1em;
      margin-bottom: 6px;
    }
    .definition .bloc-titre   { color: var(--bleu); }
    .proposition .bloc-titre  { color: var(--bleu-clair); }
    .theoreme .bloc-titre     { color: var(--rouge); }
    .corollaire .bloc-titre   { color: var(--orange); }
    .exemple .bloc-titre      { color: var(--vert); }
    .exercice .bloc-titre     { color: #7d3c98; }
    .methode .bloc-titre      { color: var(--orange); }
    .remarque .bloc-titre     { color: #666; }
    .complement .bloc-titre   { color: #2e86c1; }

    .attention {
      border-left: 4px solid var(--rouge);
      background: #fff5f5;
      padding: 10px 16px;
      margin: 14px 0;
    }
    .attention::before {
      content: "⚠ ";
      font-weight: bold;
      color: var(--rouge);
    }

    /* TABLES */
    table {
      border-collapse: collapse;
      margin: 14px auto;
      font-size: 0.95em;
    }
    th, td {
      border: 1px solid var(--gris-bordure);
      padding: 7px 18px;
      text-align: left;
    }
    th { background: #dde6f0; font-weight: bold; }

    /* CODE */
    pre {
      background: #1e1e2e;
      color: #cdd6f4;
      font-family: "Courier New", monospace;
      font-size: 0.88em;
      padding: 14px 18px;
      border-radius: 6px;
      margin: 12px 0;
      overflow-x: auto;
    }
    code { color: #89b4fa; }

    /* SOURCE LABEL */
    .source {
      font-size: 0.78em;
      color: #888;
      font-style: italic;
      text-align: right;
      margin-top: 4px;
    }

    /* DIVISION EUCLIDIENNE tableau */
    .div-table {
      font-family: monospace;
      display: inline-block;
      margin: 10px auto;
    }
    .div-table td {
      border: none;
      padding: 2px 8px;
      text-align: right;
    }
    .div-table .diviseur {
      border-left: 2px solid #333;
    }

    /* RÉSULTAT — encadré bilan à la fin d'une démonstration */
    .result-box {
      border: 2px solid var(--bleu);
      border-radius: 4px;
      background: #eef3fa;
      text-align: center;
      padding: 10px 20px;
      margin: 14px auto;
      max-width: 520px;
      font-size: 1.05em;
    }

    /* ÉTAPE — label intermédiaire dans une preuve */
    .etape {
      margin: 10px 0 6px 0;
      font-weight: bold;
      color: var(--bleu-clair);
    }

    /* SEPARATEUR */
    hr { border: none; border-top: 1px solid var(--gris-bordure); margin: 32px 0; }

    /* PRINT */
    @media print {
      body { padding: 10px 20px; font-size: 13px; }
      h2 { font-size: 1.1em; }
      * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    }
  
  .fil-rouge {
    border-left: 4px solid #8e44ad;
    background: #f5eef8;
    padding: 10px 16px;
    margin: 12px 0;
    border-radius: 0 4px 4px 0;
  }
  .fil-rouge .fr-titre {
    font-weight: bold;
    color: #8e44ad;
    font-size: 0.95em;
    margin-bottom: 6px;
  }
  .fil-rouge a { color: #8e44ad; }

/* ── Classes utilisées dans les cours de démonstration ──────────── */

.preuve {
  margin: 4px 0 12px 16px;
  padding: 8px 14px;
  border-left: 2px solid var(--gris-bordure);
  color: #333;
  font-size: 0.96em;
}

.preuve-label {
  font-style: italic;
  font-weight: bold;
  color: #555;
  display: block;
  margin-bottom: 4px;
}

.cqfd {
  text-align: right;
  font-size: 1.1em;
  color: #888;
  display: block;
  margin-top: 4px;
}

.feynman {
  border-left: 4px solid #27ae60;
  background: #f0faf4;
  padding: 8px 14px;
  margin: 10px 0;
  font-size: 0.93em;
  color: #1a4a2a;
  border-radius: 0 4px 4px 0;
}

/* SOLUTION — corrigé d'exercice, discret pour ne pas attirer l'œil */
.solution {
  border-left: 3px solid #b0b8c1;
  background: #f5f6f7;
  padding: 10px 16px;
  margin: 8px 0 16px 0;
  border-radius: 0 4px 4px 0;
  color: #4a4a4a;
  font-size: 0.93em;
}

.solution .bloc-titre {
  color: #7a8a96;
  font-weight: bold;
  font-size: 0.95em;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.solution p,
.solution li {
  color: #555;
}

.solution .etape {
  color: #7a8a96;
  font-weight: bold;
}

.solution .result-box {
  border-color: #b0b8c1;
  background: #eef0f2;
  color: #3a4a56;
}

