/**
 * preview.css
 * Feuilles de styles pour le rendu fidèle du CV canadien et l'impression PDF.
 * Reproduit scrupuleusement le modèle de référence officiel (Chifa BARHOUMI).
 */

.cv-document {
  width: 100%;
  max-width: 816px; /* Format Letter standard (8.5 pouces) */
  margin: 0 auto;
  background: transparent;
}

.cv-page {
  background: #ffffff;
  padding: 48px 56px; /* Marges de 18mm */
  min-height: 1056px; /* Hauteur Letter (11 pouces) */
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  border-radius: 2px;
  color: #111827;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
  font-size: 12.5px;
  position: relative;
}

/* ========================================================
   EN-TÊTE DU CV CANADIEN
   ======================================================== */
.cv-header {
  text-align: center;
  margin-bottom: 18px;
}

.cv-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #000000;
  margin-bottom: 4px;
}

.cv-contact-line {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #374151;
  margin-bottom: 8px;
}

.contact-item a {
  color: inherit;
  text-decoration: none;
}

.cv-target-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-top: 6px;
}

/* ========================================================
   SECTIONS & TITRES CANADIENS
   ======================================================== */
.cv-section {
  margin-top: 16px;
  page-break-inside: auto;
}

.cv-section-title {
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #000000;
  border-bottom: 1.5px solid #000000;
  padding-bottom: 2px;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  page-break-after: avoid;
}

.cv-summary-text {
  text-align: justify;
  line-height: 1.48;
  color: #1f2937;
}

/* ========================================================
   PUCES & COMPÉTENCES
   ======================================================== */
.cv-bullet-list {
  list-style-type: disc;
  padding-left: 20px;
}

.cv-bullet-list li {
  margin-bottom: 3.5px;
  line-height: 1.42;
  color: #1f2937;
}

.cv-sub-skills-block {
  list-style-type: disc;
  margin-top: 4px;
}

.cv-sub-bullet-list {
  list-style-type: circle;
  padding-left: 20px;
  margin-top: 3px;
  margin-bottom: 4px;
}

.cv-sub-bullet-list li {
  margin-bottom: 2px;
}

/* ========================================================
   EXPÉRIENCES PROFESSIONNELLES
   ======================================================== */
.cv-entry {
  margin-bottom: 14px;
  page-break-inside: avoid;
}

.cv-entry-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.cv-entry-title {
  font-weight: 700;
  font-size: 13px;
  color: #111827;
  flex: 1;
}

.cv-entry-date {
  font-size: 12.5px;
  font-style: italic;
  color: #374151;
  text-align: right;
  white-space: nowrap;
}

.cv-entry-company, .cv-entry-institution {
  font-style: italic;
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 5px;
}

/* ========================================================
   ÉDUCATION, FORMATION CONTINUE & RÉFÉRENCES
   ======================================================== */
.cv-equivalency-box {
  margin-top: 3px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #1f2937;
}

.cv-eq-item {
  line-height: 1.35;
}

.cv-cert-item {
  font-size: 12px;
  line-height: 1.42;
  margin-bottom: 6px;
  text-align: justify;
}

.cv-cert-item strong {
  color: #111827;
}

.cv-ref-text {
  font-size: 12.5px;
  color: #374151;
}

/* ========================================================
   IMPRESSION NATIVE (PRINT / PDF BROWSER ENGINE)
   ======================================================== */
@media print {
  @page {
    size: letter portrait;
    margin: 15mm;
  }

  body {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .app-navbar,
  .stepper-container,
  .editor-left-nav,
  .editor-center-col,
  .preview-toolbar,
  .mobile-tabs-bar,
  .toast-container,
  .modal-backdrop {
    display: none !important;
  }

  .main-content {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .editor-workspace-grid {
    display: block !important;
    height: auto !important;
  }

  .preview-right-col {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .preview-scroll-area {
    background: transparent !important;
    padding: 0 !important;
  }

  .cv-document {
    max-width: 100% !important;
    box-shadow: none !important;
  }

  .cv-page {
    box-shadow: none !important;
    padding: 0 !important;
    min-height: auto !important;
    width: 100% !important;
  }

  .cv-entry {
    page-break-inside: avoid;
  }

  .cv-section-title {
    page-break-after: avoid;
  }
}
