/* ══════════════════════════════════════════════════════════════════════
   Editor templates — document presentation styles
   Loaded AFTER app.css so these override .pe-page-content .tiptap rules
   ══════════════════════════════════════════════════════════════════════ */

/* Force backgrounds to print (browsers strip them by default) */
[class*="pe-tpl-"] h1,
[class*="pe-tpl-"] h2,
[class*="pe-tpl-"] h3,
[class*="pe-tpl-"] blockquote,
[class*="pe-tpl-"] .pe-encart {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* ══════════════════════════════════════════════════════════════════════
   Encart node — base styles (all templates)
   ══════════════════════════════════════════════════════════════════════ */
.pe-encart {
  position: relative;
  border: 1px solid #c8c8c8;
  border-radius: 0 0 30px 0;
  box-shadow: 0 0 6px #c8c8c8;
  padding: 38pt 15pt 15pt;
  margin: 10pt 0;
  counter-increment: encart;
  overflow: visible;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
/* Label banner */
.pe-encart::before {
  content: "Document " counter(encart);
  position: absolute; top: 0; left: 0; right: 0;
  padding: 6pt 10pt;
  font-size: 10pt; font-weight: 600; color: #555;
  border-bottom: 1px solid #c8c8c8;
  border-radius: 5px 0 0 0;
  background: inherit;
}
/* Counter reset on page content */
.pe-page-content, .pe-print-content { counter-reset: titre_level1 encart; }
/* Continuation encarts (split across pages): no banner, reduced top padding */
.pe-encart.pe-encart-cont { counter-increment: none; padding-top: 15pt; }
.pe-encart.pe-encart-cont::before { display: none; }
/* Part A of a split encart: straight bottom edge (no rounded corners, no shadow) — override all templates */
.pe-encart.pe-encart-cut-bottom,
[class*="pe-tpl-"] .pe-encart.pe-encart-cut-bottom { border-radius: 0 !important; box-shadow: none !important; }
/* Color variants */
.pe-encart[data-color="0"] { background-color: #fff; }
.pe-encart[data-color="1"] { background-color: #f4dea2; }
.pe-encart[data-color="2"] { background-color: #c6ea80; }
.pe-encart[data-color="3"] { background-color: #e7b5f9; }
/* Column layouts — CSS columns in editor */
.pe-encart[data-columns="2"] { columns: 2; column-gap: 16pt; column-rule: 2px dotted rgba(0,0,0,.25); }
.pe-encart[data-columns="3"] { columns: 3; column-gap: 12pt; column-rule: 2px dotted rgba(0,0,0,.25); }
.pe-encart > *:first-child { column-span: all; }
.pe-encart.pe-encart-cont > *:first-child { column-span: none; }

/* ── Column block layout (ProseMirror nodes, not CSS columns) ── */
.pe-column-block {
  display: flex;
  gap: 12pt;
  padding: 4pt 0;
}
.pe-column {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
/* Column separator */
.pe-column + .pe-column {
  border-left: 2px dotted rgba(0,0,0,.25);
  padding-left: 8pt;
}
/* Editor only: dashed outline on focused columns */
.pe-page-content .tiptap[contenteditable="true"] .pe-column {
  border: 1px dashed #d0d0d0;
  border-radius: 4pt;
  padding: 4pt;
  margin: -4pt;
}
.pe-page-content .tiptap[contenteditable="true"] .pe-column + .pe-column {
  margin-left: 0;
}

/* — Académique — */
.pe-page-content.pe-tpl-academique,
.pe-print-content.pe-tpl-academique { font-family: Georgia, 'Liberation Serif', serif !important; line-height: 1.8 !important; }
.pe-page-content.pe-tpl-academique h1,
.pe-print-content.pe-tpl-academique h1 { text-align: center; border-bottom: 2px solid #333; padding-bottom: 8px; }
.pe-page-content.pe-tpl-academique h2,
.pe-print-content.pe-tpl-academique h2 { font-variant: small-caps; }
.pe-page-content.pe-tpl-academique p,
.pe-print-content.pe-tpl-academique p { text-indent: 1.5em; }
.pe-tpl-academique .pe-encart { border: 1px solid #999; border-radius: 0; box-shadow: none; }
.pe-tpl-academique .pe-encart::before { background: #333; color: #fff; border-radius: 0; border-bottom: none; }
.pe-tpl-academique .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-academique .pe-encart[data-color="1"] { background-color: #f5f0e8; }
.pe-tpl-academique .pe-encart[data-color="2"] { background-color: #e8eef5; }
.pe-tpl-academique .pe-encart[data-color="3"] { background-color: #f0e8f5; }

/* — Moderne — */
.pe-page-content.pe-tpl-moderne,
.pe-print-content.pe-tpl-moderne { font-family: 'Liberation Sans', sans-serif !important; }
.pe-page-content.pe-tpl-moderne h1,
.pe-print-content.pe-tpl-moderne h1 { color: var(--primary); }
.pe-page-content.pe-tpl-moderne h2,
.pe-print-content.pe-tpl-moderne h2 { color: var(--primary); border-bottom: 3px solid var(--primary); padding-bottom: 4px; display: inline-block; }
.pe-page-content.pe-tpl-moderne h3,
.pe-print-content.pe-tpl-moderne h3 { color: var(--primary-light); }
.pe-page-content.pe-tpl-moderne blockquote,
.pe-print-content.pe-tpl-moderne blockquote { border-left: 4px solid var(--primary); background: #fdf0f5; padding: 12px 16px; border-radius: 0 8px 8px 0; }
.pe-tpl-moderne .pe-encart { border: none; border-radius: 0 0 16px 0; box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.pe-tpl-moderne .pe-encart::before { background: var(--primary, #0b3e66); color: #fff; border-bottom: none; border-radius: 0; }
.pe-tpl-moderne .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-moderne .pe-encart[data-color="1"] { background-color: #e3f2fd; }
.pe-tpl-moderne .pe-encart[data-color="2"] { background-color: #fce4ec; }
.pe-tpl-moderne .pe-encart[data-color="3"] { background-color: #e8f5e9; }

/* — Professionnel — */
.pe-page-content.pe-tpl-professionnel,
.pe-print-content.pe-tpl-professionnel { font-family: Carlito, sans-serif !important; }
.pe-page-content.pe-tpl-professionnel h1,
.pe-print-content.pe-tpl-professionnel h1 { color: var(--bg-dark); border-bottom: 1px solid var(--bg-dark); padding-bottom: 6px; }
.pe-page-content.pe-tpl-professionnel h2,
.pe-print-content.pe-tpl-professionnel h2 { color: var(--bg-dark); }
.pe-page-content.pe-tpl-professionnel blockquote,
.pe-print-content.pe-tpl-professionnel blockquote { border-left: 3px solid var(--bg-dark); background: #f4f6f8; padding: 10px 14px; border-radius: 0 4px 4px 0; }
.pe-tpl-professionnel .pe-encart { border: 1px solid #d0d5da; border-radius: 0 0 8px 0; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.pe-tpl-professionnel .pe-encart::before { background: var(--bg-dark, #1a2332); color: #fff; border-bottom: none; border-radius: 0; }
.pe-tpl-professionnel .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-professionnel .pe-encart[data-color="1"] { background-color: #f4f6f8; }
.pe-tpl-professionnel .pe-encart[data-color="2"] { background-color: #e8f0f8; }
.pe-tpl-professionnel .pe-encart[data-color="3"] { background-color: #f8f0e8; }

/* — Pédagogique — */
.pe-page-content.pe-tpl-pedagogique h1,
.pe-print-content.pe-tpl-pedagogique h1 { color: #217346; }
.pe-page-content.pe-tpl-pedagogique h2,
.pe-print-content.pe-tpl-pedagogique h2 { color: #e67e22; }
.pe-page-content.pe-tpl-pedagogique h3,
.pe-print-content.pe-tpl-pedagogique h3 { color: #2980b9; }
.pe-page-content.pe-tpl-pedagogique blockquote,
.pe-print-content.pe-tpl-pedagogique blockquote { background: #e8f5e9; border-left: 4px solid #4caf50; padding: 10px 14px; border-radius: 0 6px 6px 0; }
.pe-tpl-pedagogique .pe-encart { border: 1px solid #c8e6c9; border-radius: 0 0 16px 0; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.pe-tpl-pedagogique .pe-encart::before { background: #217346; color: #fff; border-bottom: none; border-radius: 0; }
.pe-tpl-pedagogique .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-pedagogique .pe-encart[data-color="1"] { background-color: #fff8e1; }
.pe-tpl-pedagogique .pe-encart[data-color="2"] { background-color: #e8f5e9; }
.pe-tpl-pedagogique .pe-encart[data-color="3"] { background-color: #e3f2fd; }

/* — Éditorial — */
.pe-page-content.pe-tpl-editorial,
.pe-print-content.pe-tpl-editorial { font-family: Georgia, 'Liberation Serif', serif !important; line-height: 1.7 !important; }
.pe-page-content.pe-tpl-editorial h1,
.pe-print-content.pe-tpl-editorial h1 { text-align: center; text-transform: uppercase; letter-spacing: 2px; font-size: 1.6em; }
.pe-page-content.pe-tpl-editorial h2,
.pe-print-content.pe-tpl-editorial h2 { border-top: 2px solid #333; border-bottom: 1px solid #999; padding: 4px 0; text-align: center; font-size: 0.85em; color: #777; text-transform: uppercase; letter-spacing: 1px; }
.pe-page-content.pe-tpl-editorial p:first-of-type::first-letter,
.pe-print-content.pe-tpl-editorial p:first-of-type::first-letter { font-size: 2.8em; font-weight: 700; float: left; margin-right: 4px; line-height: 1; color: #333; }
.pe-tpl-editorial .pe-encart { border: 1px solid #bbb; border-radius: 0; box-shadow: none; }
.pe-tpl-editorial .pe-encart::before { background: #333; color: #fff; border-radius: 0; border-bottom: none; text-transform: uppercase; letter-spacing: 1px; font-size: 11px; }
.pe-tpl-editorial .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-editorial .pe-encart[data-color="1"] { background-color: #faf6f0; }
.pe-tpl-editorial .pe-encart[data-color="2"] { background-color: #f0f0f0; }
.pe-tpl-editorial .pe-encart[data-color="3"] { background-color: #f6f0fa; }

/* — Devoir — */
.pe-page-content.pe-tpl-devoir h1,
.pe-print-content.pe-tpl-devoir h1 { text-align: center; text-transform: uppercase; font-size: 1.3em; margin-bottom: 0.3em; }
.pe-page-content.pe-tpl-devoir h2,
.pe-print-content.pe-tpl-devoir h2 { font-size: 1.1em; border-bottom: 1px solid #333; padding-bottom: 3px; }
.pe-page-content.pe-tpl-devoir blockquote,
.pe-print-content.pe-tpl-devoir blockquote { border-left: 3px solid #e74c3c; background: #fdf2f2; padding: 8px 14px; border-radius: 0 4px 4px 0; }
.pe-tpl-devoir .pe-encart { border: 1px solid #ddd; border-radius: 0 0 8px 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.pe-tpl-devoir .pe-encart::before { background: #e74c3c; color: #fff; border-bottom: none; border-radius: 0; }
.pe-tpl-devoir .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-devoir .pe-encart[data-color="1"] { background-color: #fdf2f2; }
.pe-tpl-devoir .pe-encart[data-color="2"] { background-color: #fff8e1; }
.pe-tpl-devoir .pe-encart[data-color="3"] { background-color: #f2f7fd; }

/* — Exercice — */
.pe-page-content.pe-tpl-exercice h1,
.pe-print-content.pe-tpl-exercice h1 { color: #2980b9; border-bottom: 2px solid #2980b9; padding-bottom: 4px; }
.pe-page-content.pe-tpl-exercice h2,
.pe-print-content.pe-tpl-exercice h2 { color: #2980b9; font-size: 1.05em; }
.pe-page-content.pe-tpl-exercice blockquote,
.pe-print-content.pe-tpl-exercice blockquote { border-left: 3px solid #2980b9; background: #ebf5fb; padding: 8px 14px; border-radius: 0 4px 4px 0; }
.pe-tpl-exercice .pe-encart { border: 1px solid #bdd8eb; border-radius: 0 0 10px 0; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.pe-tpl-exercice .pe-encart::before { background: #2980b9; color: #fff; border-bottom: none; border-radius: 0; }
.pe-tpl-exercice .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-exercice .pe-encart[data-color="1"] { background-color: #ebf5fb; }
.pe-tpl-exercice .pe-encart[data-color="2"] { background-color: #e8f8f5; }
.pe-tpl-exercice .pe-encart[data-color="3"] { background-color: #fef9e7; }

/* — Mémoire — */
.pe-page-content.pe-tpl-memoire,
.pe-print-content.pe-tpl-memoire { font-family: Georgia, 'Liberation Serif', serif !important; line-height: 1.8 !important; }
.pe-page-content.pe-tpl-memoire h1,
.pe-print-content.pe-tpl-memoire h1 { text-align: center; font-size: 1.5em; margin: 1.5em 0 0.5em; }
.pe-page-content.pe-tpl-memoire h2,
.pe-print-content.pe-tpl-memoire h2 { font-variant: small-caps; border-bottom: 1px solid #999; padding-bottom: 4px; }
.pe-page-content.pe-tpl-memoire h3,
.pe-print-content.pe-tpl-memoire h3 { font-style: italic; }
.pe-page-content.pe-tpl-memoire p,
.pe-print-content.pe-tpl-memoire p { text-indent: 2em; text-align: justify; }
.pe-page-content.pe-tpl-memoire blockquote,
.pe-print-content.pe-tpl-memoire blockquote { font-style: italic; border-left: 2px solid #999; padding: 8px 20px; color: #555; }
.pe-tpl-memoire .pe-encart { border: 1px solid #bbb; border-radius: 0; box-shadow: none; }
.pe-tpl-memoire .pe-encart::before { background: #555; color: #fff; border-radius: 0; border-bottom: none; font-variant: small-caps; }
.pe-tpl-memoire .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-memoire .pe-encart[data-color="1"] { background-color: #f8f6f2; }
.pe-tpl-memoire .pe-encart[data-color="2"] { background-color: #f0f0f0; }
.pe-tpl-memoire .pe-encart[data-color="3"] { background-color: #f2f0f6; }

/* — Rapport — */
.pe-page-content.pe-tpl-rapport,
.pe-print-content.pe-tpl-rapport { font-family: Carlito, sans-serif !important; }
.pe-page-content.pe-tpl-rapport h1,
.pe-print-content.pe-tpl-rapport h1 { color: #1a5276; border-bottom: 2px solid #1a5276; padding-bottom: 6px; }
.pe-page-content.pe-tpl-rapport h2,
.pe-print-content.pe-tpl-rapport h2 { color: #1a5276; }
.pe-page-content.pe-tpl-rapport blockquote,
.pe-print-content.pe-tpl-rapport blockquote { background: #d4e6f1; border-left: 4px solid #1a5276; padding: 10px 14px; border-radius: 0 4px 4px 0; }
.pe-tpl-rapport .pe-encart { border: 1.5px solid #1a5276; border-radius: 0 0 8px 0; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.pe-tpl-rapport .pe-encart::before { background: #1a5276; color: #fff; border-bottom: none; border-radius: 0; }
.pe-tpl-rapport .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-rapport .pe-encart[data-color="1"] { background-color: #eaf2f8; }
.pe-tpl-rapport .pe-encart[data-color="2"] { background-color: #d4e6f1; }
.pe-tpl-rapport .pe-encart[data-color="3"] { background-color: #f8eee4; }

/* — Fiche révision — */
.pe-page-content.pe-tpl-fiche h1,
.pe-print-content.pe-tpl-fiche h1 { color: #fff; background: #8e44ad; padding: 6px 14px; border-radius: 6px; text-align: center; font-size: 1.2em; }
.pe-page-content.pe-tpl-fiche h2,
.pe-print-content.pe-tpl-fiche h2 { color: #8e44ad; border-bottom: 2px solid #d2b4de; padding-bottom: 3px; }
.pe-page-content.pe-tpl-fiche blockquote,
.pe-print-content.pe-tpl-fiche blockquote { background: #f5eef8; border-left: 4px solid #8e44ad; padding: 8px 14px; border-radius: 0 6px 6px 0; }
.pe-tpl-fiche .pe-encart { border: 2px solid #d2b4de; border-radius: 0 0 12px 0; box-shadow: 0 1px 6px rgba(142,68,173,.1); }
.pe-tpl-fiche .pe-encart::before { background: #8e44ad; color: #fff; border-bottom: none; border-radius: 0; }
.pe-tpl-fiche .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-fiche .pe-encart[data-color="1"] { background-color: #f5eef8; }
.pe-tpl-fiche .pe-encart[data-color="2"] { background-color: #fef9e7; }
.pe-tpl-fiche .pe-encart[data-color="3"] { background-color: #eaf2f8; }

/* — Lettre — */
.pe-page-content.pe-tpl-lettre,
.pe-print-content.pe-tpl-lettre { font-family: Georgia, 'Liberation Serif', serif !important; line-height: 1.7 !important; }
.pe-page-content.pe-tpl-lettre h1,
.pe-print-content.pe-tpl-lettre h1 { font-size: 1.1em; font-weight: 600; }
.pe-page-content.pe-tpl-lettre p,
.pe-print-content.pe-tpl-lettre p { margin-bottom: 0.8em; }
.pe-tpl-lettre .pe-encart { border: 1px solid #ccc; border-radius: 0 0 4px 0; box-shadow: none; }
.pe-tpl-lettre .pe-encart::before { background: #555; color: #fff; border-bottom: none; border-radius: 0; }
.pe-tpl-lettre .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-lettre .pe-encart[data-color="1"] { background-color: #faf8f5; }
.pe-tpl-lettre .pe-encart[data-color="2"] { background-color: #f5f5f5; }
.pe-tpl-lettre .pe-encart[data-color="3"] { background-color: #f5f8fa; }

/* — Présentation (slides) — */
.pe-page-content.pe-tpl-presentation h1,
.pe-print-content.pe-tpl-presentation h1 { background: linear-gradient(135deg, #0b3e66, #1a73e8); color: #fff; padding: 12px 20px; border-radius: 8px; text-align: center; font-size: 1.4em; }
.pe-page-content.pe-tpl-presentation h2,
.pe-print-content.pe-tpl-presentation h2 { color: #0b3e66; text-align: center; font-size: 1.1em; }
.pe-page-content.pe-tpl-presentation blockquote,
.pe-print-content.pe-tpl-presentation blockquote { background: #f0f2f5; border: none; border-radius: 8px; padding: 12px 16px; text-align: center; }
.pe-tpl-presentation .pe-encart { border: none; border-radius: 0 0 16px 0; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.pe-tpl-presentation .pe-encart::before { background: linear-gradient(135deg, #0b3e66, #1a73e8); color: #fff; border-bottom: none; border-radius: 0; }
.pe-tpl-presentation .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-presentation .pe-encart[data-color="1"] { background-color: #e8f0fa; }
.pe-tpl-presentation .pe-encart[data-color="2"] { background-color: #f0f2f5; }
.pe-tpl-presentation .pe-encart[data-color="3"] { background-color: #e8faf0; }

/* — Compte-rendu — */
.pe-page-content.pe-tpl-cr h1,
.pe-print-content.pe-tpl-cr h1 { text-align: center; text-transform: uppercase; letter-spacing: 1px; font-size: 1.2em; }
.pe-page-content.pe-tpl-cr h2,
.pe-print-content.pe-tpl-cr h2 { font-size: 1.05em; }
.pe-page-content.pe-tpl-cr blockquote,
.pe-print-content.pe-tpl-cr blockquote { background: #f0f2f5; border-left: 3px solid #7f8c8d; padding: 8px 14px; border-radius: 0 4px 4px 0; }
.pe-tpl-cr .pe-encart { border: 1.5px solid #aaa; border-radius: 0 0 6px 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.pe-tpl-cr .pe-encart::before { background: #7f8c8d; color: #fff; border-bottom: none; border-radius: 0; }
.pe-tpl-cr .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-cr .pe-encart[data-color="1"] { background-color: #f5f6f7; }
.pe-tpl-cr .pe-encart[data-color="2"] { background-color: #eaecee; }
.pe-tpl-cr .pe-encart[data-color="3"] { background-color: #f7f2ea; }

/* — Scientifique — */
.pe-page-content.pe-tpl-scientifique,
.pe-print-content.pe-tpl-scientifique { font-family: 'Liberation Serif', serif !important; line-height: 1.6 !important; }
.pe-page-content.pe-tpl-scientifique h1,
.pe-print-content.pe-tpl-scientifique h1 { text-align: center; font-size: 1.4em; margin-bottom: 0.3em; }
.pe-page-content.pe-tpl-scientifique h2,
.pe-print-content.pe-tpl-scientifique h2 { font-size: 1.1em; font-weight: 700; }
.pe-page-content.pe-tpl-scientifique p,
.pe-print-content.pe-tpl-scientifique p { text-align: justify; }
.pe-page-content.pe-tpl-scientifique blockquote,
.pe-print-content.pe-tpl-scientifique blockquote { background: #f8f9fa; border: 1px solid #ddd; border-radius: 4px; padding: 10px 14px; font-style: italic; }
.pe-tpl-scientifique .pe-encart { border: 1px solid #999; border-radius: 0; box-shadow: none; }
.pe-tpl-scientifique .pe-encart::before { background: #444; color: #fff; border-radius: 0; border-bottom: none; letter-spacing: 1px; }
.pe-tpl-scientifique .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-scientifique .pe-encart[data-color="1"] { background-color: #f8f9fa; }
.pe-tpl-scientifique .pe-encart[data-color="2"] { background-color: #f0f0f0; }
.pe-tpl-scientifique .pe-encart[data-color="3"] { background-color: #f5f0e8; }

/* — Minimaliste — */
.pe-page-content.pe-tpl-minimaliste,
.pe-print-content.pe-tpl-minimaliste { font-family: 'Liberation Sans', sans-serif !important; line-height: 2 !important; color: #444; }
.pe-page-content.pe-tpl-minimaliste h1,
.pe-print-content.pe-tpl-minimaliste h1 { font-weight: 300; font-size: 1.8em; letter-spacing: -0.5px; color: #222; }
.pe-page-content.pe-tpl-minimaliste h2,
.pe-print-content.pe-tpl-minimaliste h2 { font-weight: 300; font-size: 1.2em; color: #666; border-bottom: 1px solid #eee; padding-bottom: 4px; }
.pe-page-content.pe-tpl-minimaliste h3,
.pe-print-content.pe-tpl-minimaliste h3 { font-weight: 400; color: #888; }
.pe-page-content.pe-tpl-minimaliste blockquote,
.pe-print-content.pe-tpl-minimaliste blockquote { border-left: 2px solid #ddd; padding: 8px 16px; color: #888; }
.pe-tpl-minimaliste .pe-encart { border: 1px solid #e0e0e0; border-radius: 0; box-shadow: none; }
.pe-tpl-minimaliste .pe-encart::before { background: #888; color: #fff; border-radius: 0; border-bottom: none; font-weight: 400; }
.pe-tpl-minimaliste .pe-encart[data-color="0"] { background-color: #fff; }
.pe-tpl-minimaliste .pe-encart[data-color="1"] { background-color: #fafafa; }
.pe-tpl-minimaliste .pe-encart[data-color="2"] { background-color: #f5f5f5; }
.pe-tpl-minimaliste .pe-encart[data-color="3"] { background-color: #f8f5f0; }

/* — Législatif — reproduit le style written_document legacy Getskills v1 */
.pe-page-content.pe-tpl-legislatif,
.pe-print-content.pe-tpl-legislatif { font-family: 'Liberation Sans', Carlito, sans-serif !important; color: #333; }
/* document_entete_chapitre → h1 : bandeau pleine largeur violet, colle aux bords du papier */
.pe-page-content.pe-tpl-legislatif h1:first-child,
.pe-print-content.pe-tpl-legislatif h1:first-child { background-color: #762a5e; color: #fff !important; padding: 22pt; font-size: 1.8em; font-weight: bold; margin: -20mm -25mm 15pt; border-radius: 0; }
.pe-page-content.pe-tpl-legislatif h1,
.pe-print-content.pe-tpl-legislatif h1 { background-color: #762a5e; color: #fff !important; padding: 15pt 22pt; font-size: 1.8em; font-weight: bold; margin: 0 -25mm 15pt; border-radius: 0; }
/* document_titre_1 → h2 : titre section violet avec compteur orange */
.pe-page-content.pe-tpl-legislatif h2,
.pe-print-content.pe-tpl-legislatif h2 { color: #762a5e; font-size: 1.6em; font-weight: bold; margin-top: 1.2em; margin-bottom: 0.6em; padding: 8pt 0 8pt 52pt; position: relative; counter-increment: titre_level1; }
.pe-page-content.pe-tpl-legislatif h2::before,
.pe-print-content.pe-tpl-legislatif h2::before { content: counter(titre_level1); position: absolute; left: 0; top: 0; background: #f99927; color: #fff; font-size: 0.85em; font-weight: bold; padding: 6pt 12pt; border-radius: 0 0 20px 0; box-shadow: 0 0 6px #c8c8c8; min-width: 15pt; text-align: center; }
/* h3 : sous-titre dans le flux */
.pe-page-content.pe-tpl-legislatif h3,
.pe-print-content.pe-tpl-legislatif h3 { font-size: 1.1em; font-weight: bold; color: #762a5e; }
/* blockquote : style citation */
.pe-page-content.pe-tpl-legislatif blockquote,
.pe-print-content.pe-tpl-legislatif blockquote { border-left: 4pt solid #762a5e; padding: 9pt 15pt; color: #555; font-style: italic; }
/* encart banner: gradient rouge comme legacy */
.pe-page-content.pe-tpl-legislatif .pe-encart::before,
.pe-print-content.pe-tpl-legislatif .pe-encart::before { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); color: #fff; border-bottom: none; border-radius: 5px 0 0 0; }
/* paragraphes : justify comme l'original */
.pe-page-content.pe-tpl-legislatif p,
.pe-print-content.pe-tpl-legislatif p { text-align: justify; font-size: 11pt; }

/* ══════════════════════════════════════════════════════════════════════
   Exercise blocks — per-template styling
   ══════════════════════════════════════════════════════════════════════ */

/* Helper: print backgrounds for exercise blocks in all templates */
[class*="pe-tpl-"] .pe-exercise-block,
[class*="pe-tpl-"] .pe-exo-badge,
[class*="pe-tpl-"] .pe-exo-choices li,
[class*="pe-tpl-"] .pe-exo-choices li .pe-exo-indicator,
[class*="pe-tpl-"] .pe-exo-choices li.pe-exo-correct,
[class*="pe-tpl-"] .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
[class*="pe-tpl-"] .pe-exo-highlight-zone,
[class*="pe-tpl-"] .pe-exo-free-zone {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* — Académique — serif, formal, thin border, classic feel */
.pe-page-content.pe-tpl-academique .pe-exercise-block,
.pe-print-content.pe-tpl-academique .pe-exercise-block { font-family: Georgia, 'Liberation Serif', serif; border: 1.5px solid #999; border-radius: 2px; background: #fdfcfa; }
.pe-page-content.pe-tpl-academique .pe-exo-badge,
.pe-print-content.pe-tpl-academique .pe-exo-badge { border-radius: 2px; background: #333; }
.pe-page-content.pe-tpl-academique .pe-exo-question,
.pe-print-content.pe-tpl-academique .pe-exo-question { color: #222; }
.pe-page-content.pe-tpl-academique .pe-exo-choices li,
.pe-print-content.pe-tpl-academique .pe-exo-choices li { border-radius: 2px; border-color: #ccc; }
.pe-page-content.pe-tpl-academique .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-academique .pe-exo-choices li.pe-exo-correct { background: #eef5ee; border-color: #6a9e6a; }
.pe-page-content.pe-tpl-academique .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-academique .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #6a9e6a; border-color: #6a9e6a; }

/* — Moderne — primary color accent, rounded, contemporary */
.pe-page-content.pe-tpl-moderne .pe-exercise-block,
.pe-print-content.pe-tpl-moderne .pe-exercise-block { border: 2px solid var(--primary, #0b3e66); border-radius: 10px; background: #f0f4f8; }
.pe-page-content.pe-tpl-moderne .pe-exo-badge,
.pe-print-content.pe-tpl-moderne .pe-exo-badge { border-radius: 10px; }
.pe-page-content.pe-tpl-moderne .pe-exo-question,
.pe-print-content.pe-tpl-moderne .pe-exo-question { color: var(--primary, #0b3e66); }
.pe-page-content.pe-tpl-moderne .pe-exo-choices li,
.pe-print-content.pe-tpl-moderne .pe-exo-choices li { border-radius: 8px; border-color: #c8d8e8; background: #fff; }
.pe-page-content.pe-tpl-moderne .pe-exo-choices li .pe-exo-indicator,
.pe-print-content.pe-tpl-moderne .pe-exo-choices li .pe-exo-indicator { border-color: var(--primary, #0b3e66); }
.pe-page-content.pe-tpl-moderne .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-moderne .pe-exo-choices li.pe-exo-correct { background: #e3f0ff; border-color: var(--primary, #0b3e66); }
.pe-page-content.pe-tpl-moderne .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-moderne .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: var(--primary, #0b3e66); border-color: var(--primary, #0b3e66); }
.pe-page-content.pe-tpl-moderne .pe-exo-free-zone,
.pe-print-content.pe-tpl-moderne .pe-exo-free-zone { border-radius: 8px; border-color: #c8d8e8; }
.pe-page-content.pe-tpl-moderne .pe-exo-highlight-zone,
.pe-print-content.pe-tpl-moderne .pe-exo-highlight-zone { background: #b3d4fc; }

/* — Professionnel — corporate dark blue-grey, sharp edges */
.pe-page-content.pe-tpl-professionnel .pe-exercise-block,
.pe-print-content.pe-tpl-professionnel .pe-exercise-block { font-family: Carlito, sans-serif; border: 1.5px solid var(--bg-dark, #1a2332); border-left: 4px solid var(--bg-dark, #1a2332); border-radius: 3px; background: #f8f9fa; }
.pe-page-content.pe-tpl-professionnel .pe-exo-badge,
.pe-print-content.pe-tpl-professionnel .pe-exo-badge { border-radius: 2px; background: var(--bg-dark, #1a2332); }
.pe-page-content.pe-tpl-professionnel .pe-exo-question,
.pe-print-content.pe-tpl-professionnel .pe-exo-question { color: var(--bg-dark, #1a2332); }
.pe-page-content.pe-tpl-professionnel .pe-exo-choices li,
.pe-print-content.pe-tpl-professionnel .pe-exo-choices li { border-radius: 3px; }
.pe-page-content.pe-tpl-professionnel .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-professionnel .pe-exo-choices li.pe-exo-correct { background: #e8eef4; border-color: var(--bg-dark, #1a2332); }
.pe-page-content.pe-tpl-professionnel .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-professionnel .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: var(--bg-dark, #1a2332); border-color: var(--bg-dark, #1a2332); }

/* — Pédagogique — colorful, friendly, green/orange/blue */
.pe-page-content.pe-tpl-pedagogique .pe-exercise-block,
.pe-print-content.pe-tpl-pedagogique .pe-exercise-block { border: 2px solid #4caf50; border-radius: 10px; background: #f1f8e9; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-badge-qcm,
.pe-print-content.pe-tpl-pedagogique .pe-exo-badge-qcm { background: #2980b9; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-badge-qcu,
.pe-print-content.pe-tpl-pedagogique .pe-exo-badge-qcu { background: #217346; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-badge-vf,
.pe-print-content.pe-tpl-pedagogique .pe-exo-badge-vf { background: #e67e22; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-badge-highlight,
.pe-print-content.pe-tpl-pedagogique .pe-exo-badge-highlight { background: #8e44ad; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-badge-free,
.pe-print-content.pe-tpl-pedagogique .pe-exo-badge-free { background: #217346; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-question,
.pe-print-content.pe-tpl-pedagogique .pe-exo-question { color: #2e7d32; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-choices li,
.pe-print-content.pe-tpl-pedagogique .pe-exo-choices li { border-radius: 8px; background: #fff; border-color: #c8e6c9; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-choices li .pe-exo-indicator,
.pe-print-content.pe-tpl-pedagogique .pe-exo-choices li .pe-exo-indicator { border-color: #4caf50; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-pedagogique .pe-exo-choices li.pe-exo-correct { background: #c8e6c9; border-color: #4caf50; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-pedagogique .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #4caf50; border-color: #4caf50; }
.pe-page-content.pe-tpl-pedagogique .pe-exo-highlight-zone,
.pe-print-content.pe-tpl-pedagogique .pe-exo-highlight-zone { background: #a5d6a7; }

/* — Éditorial — serif, elegant, subtle underline */
.pe-page-content.pe-tpl-editorial .pe-exercise-block,
.pe-print-content.pe-tpl-editorial .pe-exercise-block { font-family: Georgia, 'Liberation Serif', serif; border: 1px solid #ccc; border-top: 2px solid #333; border-radius: 0; background: #fefefe; }
.pe-page-content.pe-tpl-editorial .pe-exo-badge,
.pe-print-content.pe-tpl-editorial .pe-exo-badge { border-radius: 0; text-transform: uppercase; letter-spacing: 1px; background: #333; font-size: 9px; }
.pe-page-content.pe-tpl-editorial .pe-exo-choices li,
.pe-print-content.pe-tpl-editorial .pe-exo-choices li { border-radius: 0; border-color: #ddd; }
.pe-page-content.pe-tpl-editorial .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-editorial .pe-exo-choices li.pe-exo-correct { background: #f0f0f0; border-color: #555; }
.pe-page-content.pe-tpl-editorial .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-editorial .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #333; border-color: #333; }
.pe-page-content.pe-tpl-editorial .pe-exo-free-zone,
.pe-print-content.pe-tpl-editorial .pe-exo-free-zone { border-radius: 0; }

/* — Devoir — exam/test style, red accents, structured */
.pe-page-content.pe-tpl-devoir .pe-exercise-block,
.pe-print-content.pe-tpl-devoir .pe-exercise-block { border: 1.5px solid #555; border-radius: 4px; background: #fff; }
.pe-page-content.pe-tpl-devoir .pe-exo-badge,
.pe-print-content.pe-tpl-devoir .pe-exo-badge { background: #c0392b; border-radius: 3px; }
.pe-page-content.pe-tpl-devoir .pe-exo-question,
.pe-print-content.pe-tpl-devoir .pe-exo-question { color: #222; font-weight: 700; }
.pe-page-content.pe-tpl-devoir .pe-exo-points,
.pe-print-content.pe-tpl-devoir .pe-exo-points { color: #c0392b; font-weight: 700; }
.pe-page-content.pe-tpl-devoir .pe-exo-choices li,
.pe-print-content.pe-tpl-devoir .pe-exo-choices li { border-radius: 3px; border-color: #bbb; background: #fff; }
.pe-page-content.pe-tpl-devoir .pe-exo-choices li .pe-exo-indicator,
.pe-print-content.pe-tpl-devoir .pe-exo-choices li .pe-exo-indicator { border-color: #888; }
.pe-page-content.pe-tpl-devoir .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-devoir .pe-exo-choices li.pe-exo-correct { background: #fdecea; border-color: #c0392b; }
.pe-page-content.pe-tpl-devoir .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-devoir .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #c0392b; border-color: #c0392b; }
.pe-page-content.pe-tpl-devoir .pe-exo-free-zone,
.pe-print-content.pe-tpl-devoir .pe-exo-free-zone { border-color: #bbb; border-radius: 3px; }
.pe-page-content.pe-tpl-devoir .pe-exo-free-line,
.pe-print-content.pe-tpl-devoir .pe-exo-free-line { border-color: #ccc; }

/* — Exercice — blue theme, native exercise look */
.pe-page-content.pe-tpl-exercice .pe-exercise-block,
.pe-print-content.pe-tpl-exercice .pe-exercise-block { border: 2px solid #2980b9; border-radius: 8px; background: #ebf5fb; }
.pe-page-content.pe-tpl-exercice .pe-exo-question,
.pe-print-content.pe-tpl-exercice .pe-exo-question { color: #1a5276; }
.pe-page-content.pe-tpl-exercice .pe-exo-choices li,
.pe-print-content.pe-tpl-exercice .pe-exo-choices li { border-color: #aed6f1; background: #fff; }
.pe-page-content.pe-tpl-exercice .pe-exo-choices li .pe-exo-indicator,
.pe-print-content.pe-tpl-exercice .pe-exo-choices li .pe-exo-indicator { border-color: #2980b9; }
.pe-page-content.pe-tpl-exercice .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-exercice .pe-exo-choices li.pe-exo-correct { background: #d4efdf; border-color: #27ae60; }
.pe-page-content.pe-tpl-exercice .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-exercice .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #27ae60; border-color: #27ae60; }
.pe-page-content.pe-tpl-exercice .pe-exo-free-zone,
.pe-print-content.pe-tpl-exercice .pe-exo-free-zone { border-color: #aed6f1; }
.pe-page-content.pe-tpl-exercice .pe-exo-highlight-zone,
.pe-print-content.pe-tpl-exercice .pe-exo-highlight-zone { background: #aed6f1; }

/* — Mémoire — serif, academic, subtle grey borders */
.pe-page-content.pe-tpl-memoire .pe-exercise-block,
.pe-print-content.pe-tpl-memoire .pe-exercise-block { font-family: Georgia, 'Liberation Serif', serif; border: 1px solid #bbb; border-radius: 2px; background: #fcfcfc; }
.pe-page-content.pe-tpl-memoire .pe-exo-badge,
.pe-print-content.pe-tpl-memoire .pe-exo-badge { border-radius: 2px; background: #555; }
.pe-page-content.pe-tpl-memoire .pe-exo-choices li,
.pe-print-content.pe-tpl-memoire .pe-exo-choices li { border-radius: 2px; border-color: #ccc; }
.pe-page-content.pe-tpl-memoire .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-memoire .pe-exo-choices li.pe-exo-correct { background: #eee; border-color: #888; }
.pe-page-content.pe-tpl-memoire .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-memoire .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #555; border-color: #555; }
.pe-page-content.pe-tpl-memoire .pe-exo-free-zone,
.pe-print-content.pe-tpl-memoire .pe-exo-free-zone { border-radius: 2px; }

/* — Rapport — dark navy, solid borders */
.pe-page-content.pe-tpl-rapport .pe-exercise-block,
.pe-print-content.pe-tpl-rapport .pe-exercise-block { font-family: Carlito, sans-serif; border: 2px solid #1a5276; border-radius: 4px; background: #f4f8fb; }
.pe-page-content.pe-tpl-rapport .pe-exo-badge,
.pe-print-content.pe-tpl-rapport .pe-exo-badge { border-radius: 3px; background: #1a5276; }
.pe-page-content.pe-tpl-rapport .pe-exo-question,
.pe-print-content.pe-tpl-rapport .pe-exo-question { color: #1a5276; }
.pe-page-content.pe-tpl-rapport .pe-exo-choices li,
.pe-print-content.pe-tpl-rapport .pe-exo-choices li { border-radius: 4px; border-color: #b8d4e8; }
.pe-page-content.pe-tpl-rapport .pe-exo-choices li .pe-exo-indicator,
.pe-print-content.pe-tpl-rapport .pe-exo-choices li .pe-exo-indicator { border-color: #1a5276; }
.pe-page-content.pe-tpl-rapport .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-rapport .pe-exo-choices li.pe-exo-correct { background: #d4e6f1; border-color: #1a5276; }
.pe-page-content.pe-tpl-rapport .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-rapport .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #1a5276; border-color: #1a5276; }
.pe-page-content.pe-tpl-rapport .pe-exo-highlight-zone,
.pe-print-content.pe-tpl-rapport .pe-exo-highlight-zone { background: #aed6f1; }

/* — Fiche révision — purple theme, playful rounded */
.pe-page-content.pe-tpl-fiche .pe-exercise-block,
.pe-print-content.pe-tpl-fiche .pe-exercise-block { border: 2px solid #8e44ad; border-radius: 10px; background: #faf5fc; }
.pe-page-content.pe-tpl-fiche .pe-exo-badge,
.pe-print-content.pe-tpl-fiche .pe-exo-badge { border-radius: 10px; background: #8e44ad; }
.pe-page-content.pe-tpl-fiche .pe-exo-question,
.pe-print-content.pe-tpl-fiche .pe-exo-question { color: #6c3483; }
.pe-page-content.pe-tpl-fiche .pe-exo-choices li,
.pe-print-content.pe-tpl-fiche .pe-exo-choices li { border-radius: 8px; border-color: #d2b4de; background: #fff; }
.pe-page-content.pe-tpl-fiche .pe-exo-choices li .pe-exo-indicator,
.pe-print-content.pe-tpl-fiche .pe-exo-choices li .pe-exo-indicator { border-color: #8e44ad; }
.pe-page-content.pe-tpl-fiche .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-fiche .pe-exo-choices li.pe-exo-correct { background: #f5eef8; border-color: #8e44ad; }
.pe-page-content.pe-tpl-fiche .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-fiche .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #8e44ad; border-color: #8e44ad; }
.pe-page-content.pe-tpl-fiche .pe-exo-free-zone,
.pe-print-content.pe-tpl-fiche .pe-exo-free-zone { border-color: #d2b4de; border-radius: 8px; }
.pe-page-content.pe-tpl-fiche .pe-exo-highlight-zone,
.pe-print-content.pe-tpl-fiche .pe-exo-highlight-zone { background: #e8daef; }

/* — Lettre — serif, discrete, minimal styling */
.pe-page-content.pe-tpl-lettre .pe-exercise-block,
.pe-print-content.pe-tpl-lettre .pe-exercise-block { font-family: Georgia, 'Liberation Serif', serif; border: 1px solid #ccc; border-radius: 4px; background: #fefefe; }
.pe-page-content.pe-tpl-lettre .pe-exo-badge,
.pe-print-content.pe-tpl-lettre .pe-exo-badge { border-radius: 3px; background: #555; }
.pe-page-content.pe-tpl-lettre .pe-exo-choices li,
.pe-print-content.pe-tpl-lettre .pe-exo-choices li { border-radius: 4px; }

/* — Présentation — gradient accents, centered, bold */
.pe-page-content.pe-tpl-presentation .pe-exercise-block,
.pe-print-content.pe-tpl-presentation .pe-exercise-block { border: none; border-radius: 12px; background: linear-gradient(135deg, #f0f4f8, #e8ecf0); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.pe-page-content.pe-tpl-presentation .pe-exo-badge,
.pe-print-content.pe-tpl-presentation .pe-exo-badge { border-radius: 12px; background: linear-gradient(135deg, #0b3e66, #1a73e8); }
.pe-page-content.pe-tpl-presentation .pe-exo-question,
.pe-print-content.pe-tpl-presentation .pe-exo-question { color: #0b3e66; text-align: center; }
.pe-page-content.pe-tpl-presentation .pe-exo-choices li,
.pe-print-content.pe-tpl-presentation .pe-exo-choices li { border-radius: 10px; border: none; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.pe-page-content.pe-tpl-presentation .pe-exo-choices li .pe-exo-indicator,
.pe-print-content.pe-tpl-presentation .pe-exo-choices li .pe-exo-indicator { border-color: #1a73e8; }
.pe-page-content.pe-tpl-presentation .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-presentation .pe-exo-choices li.pe-exo-correct { background: #e3f0ff; box-shadow: 0 1px 4px rgba(26,115,232,0.15); }
.pe-page-content.pe-tpl-presentation .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-presentation .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #1a73e8; border-color: #1a73e8; }
.pe-page-content.pe-tpl-presentation .pe-exo-free-zone,
.pe-print-content.pe-tpl-presentation .pe-exo-free-zone { border: none; border-radius: 10px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
/* Print fallback: box-shadow doesn't print, use border instead */
@media print {
  .pe-print-content.pe-tpl-presentation .pe-exercise-block { border: 1.5px solid #ccc; box-shadow: none; }
  .pe-print-content.pe-tpl-presentation .pe-exo-choices li { border: 1px solid #e0e0e0; box-shadow: none; }
  .pe-print-content.pe-tpl-presentation .pe-exo-free-zone { border: 1px solid #e0e0e0; box-shadow: none; }
}

/* — Compte-rendu — neutral grey, clean lines */
.pe-page-content.pe-tpl-cr .pe-exercise-block,
.pe-print-content.pe-tpl-cr .pe-exercise-block { border: 1.5px solid #aaa; border-radius: 4px; background: #f9fafb; }
.pe-page-content.pe-tpl-cr .pe-exo-badge,
.pe-print-content.pe-tpl-cr .pe-exo-badge { border-radius: 3px; background: #7f8c8d; }
.pe-page-content.pe-tpl-cr .pe-exo-question,
.pe-print-content.pe-tpl-cr .pe-exo-question { color: #444; }
.pe-page-content.pe-tpl-cr .pe-exo-choices li,
.pe-print-content.pe-tpl-cr .pe-exo-choices li { border-radius: 4px; border-color: #d5d8dc; }
.pe-page-content.pe-tpl-cr .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-cr .pe-exo-choices li.pe-exo-correct { background: #eaecee; border-color: #7f8c8d; }
.pe-page-content.pe-tpl-cr .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-cr .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #7f8c8d; border-color: #7f8c8d; }

/* — Scientifique — serif, bordered, formal look */
.pe-page-content.pe-tpl-scientifique .pe-exercise-block,
.pe-print-content.pe-tpl-scientifique .pe-exercise-block { font-family: 'Liberation Serif', serif; border: 1px solid #999; border-radius: 0; background: #fdfdfd; }
.pe-page-content.pe-tpl-scientifique .pe-exo-badge,
.pe-print-content.pe-tpl-scientifique .pe-exo-badge { border-radius: 0; background: #444; letter-spacing: 1px; }
.pe-page-content.pe-tpl-scientifique .pe-exo-choices li,
.pe-print-content.pe-tpl-scientifique .pe-exo-choices li { border-radius: 0; border-color: #ccc; }
.pe-page-content.pe-tpl-scientifique .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-scientifique .pe-exo-choices li.pe-exo-correct { background: #f0f0f0; border-color: #666; }
.pe-page-content.pe-tpl-scientifique .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-scientifique .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #444; border-color: #444; }
.pe-page-content.pe-tpl-scientifique .pe-exo-free-zone,
.pe-print-content.pe-tpl-scientifique .pe-exo-free-zone { border-radius: 0; }

/* — Minimaliste — thin lines, light, airy */
.pe-page-content.pe-tpl-minimaliste .pe-exercise-block,
.pe-print-content.pe-tpl-minimaliste .pe-exercise-block { font-family: 'Liberation Sans', sans-serif; border: 1px solid #e0e0e0; border-radius: 0; background: #fff; }
.pe-page-content.pe-tpl-minimaliste .pe-exo-badge,
.pe-print-content.pe-tpl-minimaliste .pe-exo-badge { border-radius: 0; background: #888; font-weight: 400; }
.pe-page-content.pe-tpl-minimaliste .pe-exo-question,
.pe-print-content.pe-tpl-minimaliste .pe-exo-question { font-weight: 400; color: #444; }
.pe-page-content.pe-tpl-minimaliste .pe-exo-points,
.pe-print-content.pe-tpl-minimaliste .pe-exo-points { color: #aaa; font-weight: 400; }
.pe-page-content.pe-tpl-minimaliste .pe-exo-choices li,
.pe-print-content.pe-tpl-minimaliste .pe-exo-choices li { border-radius: 0; border-color: #eee; background: #fff; }
.pe-page-content.pe-tpl-minimaliste .pe-exo-choices li .pe-exo-indicator,
.pe-print-content.pe-tpl-minimaliste .pe-exo-choices li .pe-exo-indicator { border-color: #ccc; }
.pe-page-content.pe-tpl-minimaliste .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-minimaliste .pe-exo-choices li.pe-exo-correct { background: #f8f8f8; border-color: #bbb; }
.pe-page-content.pe-tpl-minimaliste .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-minimaliste .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #888; border-color: #888; }
.pe-page-content.pe-tpl-minimaliste .pe-exo-free-zone,
.pe-print-content.pe-tpl-minimaliste .pe-exo-free-zone { border-radius: 0; border-color: #eee; }
.pe-page-content.pe-tpl-minimaliste .pe-exo-highlight-zone,
.pe-print-content.pe-tpl-minimaliste .pe-exo-highlight-zone { background: #f0e68c; }

/* — Législatif — exercise blocks */
.pe-page-content.pe-tpl-legislatif .pe-exercise-block,
.pe-print-content.pe-tpl-legislatif .pe-exercise-block { font-family: 'Liberation Sans', Carlito, sans-serif; border: 1.5px solid #c8c8c8; border-radius: 4px; background: #faf8f5; }
.pe-page-content.pe-tpl-legislatif .pe-exo-badge,
.pe-print-content.pe-tpl-legislatif .pe-exo-badge { border-radius: 4px; background: #762a5e; }
.pe-page-content.pe-tpl-legislatif .pe-exo-question,
.pe-print-content.pe-tpl-legislatif .pe-exo-question { color: #333; }
.pe-page-content.pe-tpl-legislatif .pe-exo-choices li,
.pe-print-content.pe-tpl-legislatif .pe-exo-choices li { border-radius: 4px; border-color: #ccc; background: #fff; }
.pe-page-content.pe-tpl-legislatif .pe-exo-choices li .pe-exo-indicator,
.pe-print-content.pe-tpl-legislatif .pe-exo-choices li .pe-exo-indicator { border-color: #762a5e; }
.pe-page-content.pe-tpl-legislatif .pe-exo-choices li.pe-exo-correct,
.pe-print-content.pe-tpl-legislatif .pe-exo-choices li.pe-exo-correct { background: #f3e8f0; border-color: #762a5e; }
.pe-page-content.pe-tpl-legislatif .pe-exo-choices li.pe-exo-correct .pe-exo-indicator,
.pe-print-content.pe-tpl-legislatif .pe-exo-choices li.pe-exo-correct .pe-exo-indicator { background: #762a5e; border-color: #762a5e; }
.pe-page-content.pe-tpl-legislatif .pe-exo-free-zone,
.pe-print-content.pe-tpl-legislatif .pe-exo-free-zone { border-color: #ccc; border-radius: 4px; }
.pe-page-content.pe-tpl-legislatif .pe-exo-highlight-zone,
.pe-print-content.pe-tpl-legislatif .pe-exo-highlight-zone { background: #e8d4e0; }
