@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600;700&display=swap');

@page {
  size: A4;
  margin: 2cm 1.5cm;
}

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

body {
  font-family: 'Inter', sans-serif;
  font-size: 11pt;
  line-height: 1.6;
  color: #57534E;
  max-width: 100%;
  padding: 0;
}

/* HEADER */
.doc-header {
  border-bottom: 2px solid #78221F;
  padding-bottom: 16px;
  margin-bottom: 32px;
  page-break-after: avoid;
}
.doc-header .logo {
  font-family: 'DM Serif Display', serif;
  font-size: 14pt;
  color: #78221F;
  margin-bottom: 4px;
}
.doc-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 22pt;
  color: #1C1917;
  line-height: 1.2;
  margin-bottom: 4px;
}
.doc-header .subtitle {
  font-size: 11pt;
  color: #A8A29E;
}

/* HEADINGS */
h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 18pt;
  color: #78221F;
  margin-top: 32px;
  margin-bottom: 16px;
  page-break-after: avoid;
}
h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 16pt;
  color: #1C1917;
  margin-top: 24px;
  margin-bottom: 12px;
  page-break-after: avoid;
}
h3 {
  font-family: 'Inter', sans-serif;
  font-size: 13pt;
  font-weight: 700;
  color: #1C1917;
  margin-top: 20px;
  margin-bottom: 8px;
  page-break-after: avoid;
}

/* TEXT */
p {
  margin-bottom: 10pt;
  text-align: justify;
  hyphens: auto;
}

/* ENCADRÉS */
.encadre {
  background: #F5F0EB;
  border-left: 3px solid #78221F;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 10.5pt;
  page-break-inside: avoid;
}
.encadre.conseil {
  border-left-color: #D4A574;
}
.encadre.important {
  border-left-color: #78221F;
}
.encadre p:last-child { margin-bottom: 0; }
.encadre strong { color: #1C1917; }

/* DOCTRINE ENTRY */
.doctrine-entry {
  margin-bottom: 20px;
  page-break-inside: avoid;
}
.doctrine-entry .auteur {
  font-weight: 700;
  color: #1C1917;
  font-size: 11.5pt;
}
.doctrine-entry .citation {
  background: #F5F0EB;
  border-left: 3px solid #D4A574;
  padding: 10px 14px;
  margin: 8px 0;
  font-style: italic;
  font-size: 10.5pt;
  color: #1C1917;
}
.doctrine-entry .explication { margin: 8px 0; }
.doctrine-entry .integration {
  background: #F5F0EB;
  border-left: 3px solid #78221F;
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 10.5pt;
}
.doctrine-entry .integration::before {
  content: "💡 En copie — ";
  font-weight: 700;
  color: #78221F;
}
.doctrine-entry .source {
  font-size: 9.5pt;
  color: #A8A29E;
  margin-top: 4px;
}

/* JURISPRUDENCE ENTRY */
.jurisprudence-entry {
  margin-bottom: 20px;
  page-break-inside: avoid;
}
.jurisprudence-entry .arret-header {
  font-weight: 700;
  color: #1C1917;
  font-size: 11.5pt;
}
.jurisprudence-entry .arret-meta {
  font-size: 10pt;
  color: #D4A574;
  font-weight: 600;
  margin-bottom: 4px;
}
.jurisprudence-entry .arret-explication { margin: 6px 0; }
.jurisprudence-entry .arret-revirement {
  background: #fee2e2;
  border-left: 3px solid #991B1B;
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 10.5pt;
}
.jurisprudence-entry .arret-revirement::before {
  content: "⚠️ Revirement — ";
  font-weight: 700;
  color: #991B1B;
}

/* NUMÉROS DE SECTION */
.section-number {
  font-family: 'DM Serif Display', serif;
  color: #D4A574;
}

/* FOOTER */
.doc-footer {
  border-top: 1px solid #E8E2DA;
  padding-top: 12px;
  margin-top: 32px;
  font-size: 9pt;
  color: #A8A29E;
  text-align: center;
}

/* PRINT */
@media print {
  body { font-size: 11pt; }
  .doc-header { page-break-after: avoid; }
  h1, h2, h3 { page-break-after: avoid; }
  .doctrine-entry, .jurisprudence-entry { page-break-inside: avoid; }
  .encadre { page-break-inside: avoid; }
}
