/* --- RESET PRINT --- */
*,
*::before,
*::after {
  box-shadow: none !important;
  text-shadow: none !important;
  animation: none !important;
  transition: none !important;
  background: transparent !important;
  color: #000000 !important;
}

/* --- PAGE --- */
@page {
  margin: 2cm;
  size: A4 portrait;
}

/* --- TYPOGRAPHIE --- */
body {
  font-size: 12pt;
  line-height: 1.5;
  font-family: Georgia, "Times New Roman", serif;
  color: #000000;
  background: #ffffff;
}

h1 {
  font-size: 24pt;
  margin-bottom: 12pt;
}
h2 {
  font-size: 18pt;
  margin-bottom: 10pt;
}
h3 {
  font-size: 14pt;
  margin-bottom: 8pt;
}

p,
li {
  font-size: 12pt;
  margin-bottom: 6pt;
  orphans: 3;
  widows: 3;
}

/* --- LIENS --- */
a {
  color: #000000 !important;
  text-decoration: underline;
}

a::after {
  content: " (" attr(href) ")";
  font-size: 9pt;
  color: #555555 !important;
  word-break: break-all;
}

/* Pas d'URL pour les ancres et les liens sans intérêt */
a[href^="#"]::after,
a[href^="javascript:"]::after,
a[href^="tel:"]::after {
  content: none;
}

/* --- IMAGES --- */
img {
  max-width: 100% !important;
  page-break-inside: avoid;
}

/* --- MISE EN PAGE --- */

/* Tout repasse en colonne simple */
[class*="flex"],
[class*="grid"],
[class*="features"],
[class*="highlight"],
[class*="gallery"] {
  display: block !important;
}

/* --- SAUTS DE PAGE --- */

/* Ne jamais couper ces éléments */
img,
table,
figure,
blockquote,
pre {
  page-break-inside: avoid;
}

/* Titres toujours avec leur contenu */
h1,
h2,
h3,
h4,
h5,
h6 {
  page-break-after: avoid;
  page-break-inside: avoid;
}

/* Saut avant les grandes sections */
section,
article {
  page-break-before: auto;
}

/* --- ÉLÉMENTS À MASQUER --- */
nav,
header nav,
.main-nav,
.btn-cta,
.social-nav,
footer,
video,
audio,
iframe,
form,
button,
input,
select,
textarea {
  display: none !important;
}

/* --- TABLEAUX --- */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid #cccccc;
  padding: 6pt 8pt;
  text-align: left;
  font-size: 11pt;
}

th {
  background-color: #eeeeee !important;
  font-weight: 700;
}

/* --- CODE --- */
pre,
code {
  font-family: "Courier New", Courier, monospace;
  font-size: 10pt;
  border: 1px solid #cccccc;
  padding: 4pt 6pt;
  page-break-inside: avoid;
  white-space: pre-wrap;
  word-break: break-all;
}
