/* ─────────────────────────────────────────────────────────────────────────
   Feuille du document CV lui-même.
   Les dimensions sont en millimètres : ce que l'aperçu montre est ce que
   l'impression produit, au pixel près. Une page = 210 × 297 mm.
   ───────────────────────────────────────────────────────────────────────── */

.cv {
  --cv-accent: #1B4DFF;
  --cv-ink: #12151B;
  --cv-band: #12151B;
  --cv-muted: #5C6473;
  --cv-line: #E2E6EC;
  --cv-pad: 16mm;

  width: 210mm;
  /* 296 et non 297 : à 297mm pile, l'arrondi sous-pixel du navigateur
     déborde d'un cheveu et fait sortir une deuxième page vide à l'impression. */
  min-height: 296mm;
  background: #fff;
  color: var(--cv-ink);
  font-family: "Inter", "IBM Plex Sans", Helvetica, Arial, sans-serif;
  font-size: 10.2pt;
  line-height: 1.5;
  padding: var(--cv-pad);
  box-sizing: border-box;
  overflow-wrap: break-word;
}

.cv--font-serif .cv-name,
.cv--font-serif .cv-h2,
.cv--font-serif .cv-item-role { font-family: "Newsreader", Georgia, "Times New Roman", serif; }

.cv--compact { --cv-pad: 12mm; font-size: 9.5pt; line-height: 1.42; }

/* ── En-tête ─────────────────────────────────────────────────────────────── */

.cv-header { margin-bottom: 7mm; }
.cv-name { font-size: 22pt; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
.cv-title { color: var(--cv-accent); font-weight: 600; font-size: 11pt; margin-top: 1.5mm; }
.cv-contact {
  display: flex; flex-wrap: wrap; gap: 1mm 4mm;
  font-size: 8.6pt; color: var(--cv-muted); margin-top: 3mm;
}
/* Le séparateur est un vrai caractère écrit par le gabarit, pas un
   pseudo-élément : un pseudo-élément positionné en absolu se retrouve n'importe
   où dans la couche de texte du PDF, et le bloc contact atterrit en fin de
   document. Voir cv-render.js → SEP. */
.cv-sep { color: var(--cv-line); user-select: none; }

.cv-header--plain { border-bottom: 0.4mm solid var(--cv-line); padding-bottom: 5mm; }

/* Bandeau : l'en-tête déborde du padding de page pour toucher les bords. */
.cv-header--banner {
  background: var(--cv-band);
  color: #fff;
  margin: calc(-1 * var(--cv-pad)) calc(-1 * var(--cv-pad)) 8mm;
  padding: 13mm var(--cv-pad) 11mm;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.cv-header--banner .cv-title { color: #fff; opacity: 0.82; }
.cv-header--banner .cv-contact { color: rgba(255, 255, 255, 0.72); }
.cv-header--banner .cv-sep { color: rgba(255, 255, 255, 0.35); }

/* ── Sections ────────────────────────────────────────────────────────────── */

.cv-section { margin-bottom: 6mm; }
.cv-section:last-child { margin-bottom: 0; }

.cv-h2 {
  font-size: 8.4pt;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cv-accent);
  margin: 0 0 2.6mm;
  padding-bottom: 1.4mm;
  border-bottom: 0.3mm solid var(--cv-line);
}

.cv-summary { margin: 0; color: var(--cv-muted); }

.cv-item { margin-bottom: 4.4mm; break-inside: avoid; }
.cv-item:last-child { margin-bottom: 0; }
.cv-item-head { display: flex; justify-content: space-between; gap: 4mm; align-items: baseline; }
.cv-item-role { font-weight: 600; font-size: 10.4pt; }
.cv-item-org { font-weight: 400; }
.cv-item-date { color: var(--cv-muted); font-size: 8.6pt; white-space: nowrap; }
.cv-item-loc, .cv-item-note { color: var(--cv-muted); font-size: 8.8pt; margin-top: 0.6mm; }

.cv-bullets { margin: 1.6mm 0 0; padding-left: 4.6mm; }
.cv-bullets li { margin-bottom: 1.1mm; color: var(--cv-muted); }
.cv-bullets li::marker { color: var(--cv-accent); }

.cv-tags { display: flex; flex-wrap: wrap; gap: 1.8mm; }
.cv-tags span {
  border: 0.3mm solid var(--cv-line);
  border-radius: 1mm;
  padding: 1mm 2.4mm;
  font-size: 8.8pt;
}
.cv-tags--stack { flex-direction: column; gap: 1.2mm; }
.cv-tags--stack span { border: 0; padding: 0; }

.cv-list { list-style: none; margin: 0; padding: 0; }
.cv-list li {
  display: flex; justify-content: space-between; gap: 3mm;
  font-size: 9.2pt; padding: 0.8mm 0;
  border-bottom: 0.2mm solid var(--cv-line);
}
.cv-list li:last-child { border-bottom: 0; }
.cv-list em { font-style: normal; color: var(--cv-muted); font-size: 8.6pt; }

/* ── Chronologie ─────────────────────────────────────────────────────────── */

.cv-item--timeline { display: grid; grid-template-columns: 26mm 1fr; gap: 4mm; }
.cv-rail {
  font-size: 8.4pt; color: var(--cv-muted); padding-top: 0.8mm;
  border-right: 0.3mm solid var(--cv-line); padding-right: 3mm;
}
.cv--timeline .cv-item-head { display: block; }

/* ── Deux colonnes / bande latérale ──────────────────────────────────────── */

.cv-cols { display: grid; grid-template-columns: 58mm 1fr; gap: 9mm; align-items: start; }
.cv--duo .cv-aside-name { font-size: 17pt; font-weight: 600; line-height: 1.1; margin-bottom: 1.5mm; }
.cv--duo .cv-aside-name span { display: block; font-size: 10pt; font-weight: 500; color: var(--cv-accent); margin-top: 1mm; }
.cv--duo .cv-aside .cv-contact { flex-direction: column; gap: 1mm; margin-bottom: 6mm; }
.cv--duo .cv-aside .cv-sep { display: none; }

.cv--sidebar { padding: 0; }
.cv--sidebar .cv-cols { grid-template-columns: 62mm 1fr; gap: 0; min-height: 296mm; }
.cv--sidebar .cv-aside {
  background: var(--cv-band);
  color: #fff;
  padding: 14mm 9mm;
  min-height: 296mm;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.cv--sidebar .cv-main { padding: 14mm 14mm 14mm 11mm; }
.cv--sidebar .cv-aside .cv-h2 { color: #fff; opacity: 0.6; border-bottom-color: rgba(255, 255, 255, 0.18); }
.cv--sidebar .cv-aside .cv-name { font-size: 18pt; }
.cv--sidebar .cv-aside .cv-title { color: #fff; opacity: 0.75; }
.cv--sidebar .cv-aside .cv-contact,
.cv--sidebar .cv-aside .cv-list li,
.cv--sidebar .cv-aside .cv-tags span { color: rgba(255, 255, 255, 0.85); }
.cv--sidebar .cv-aside .cv-sep { display: none; }
.cv--sidebar .cv-aside .cv-contact { flex-direction: column; gap: 1mm; }
.cv--sidebar .cv-aside .cv-list li { border-bottom-color: rgba(255, 255, 255, 0.15); }
.cv--sidebar .cv-aside .cv-list em { color: rgba(255, 255, 255, 0.55); }
.cv--sidebar .cv-header--aside { margin-bottom: 8mm; }

/* ── Impression ──────────────────────────────────────────────────────────── */

@page { size: A4; margin: 0; }

@media print {
  html, body { margin: 0; padding: 0; background: #fff; }
  .no-print { display: none !important; }
  .cv { box-shadow: none; margin: 0; }
}
