/* ============================================
   Styles des modèles de CV - rendu écran et impression
   ============================================ */

.cv-doc {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: white;
  color: #1a1a1a;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 10.5pt;
  line-height: 1.45;
  padding: 18mm 16mm;
  box-sizing: border-box;
}

@media screen and (max-width: 900px) {
  .cv-doc {
    width: 100%;
    min-height: auto;
    padding: 14mm 12mm;
    font-size: 10pt;
  }
}

.cv-doc h1, .cv-doc h2, .cv-doc h3, .cv-doc h4 {
  font-family: 'Fraunces', Georgia, serif;
  margin: 0;
  color: #111;
  letter-spacing: -0.01em;
}

.cv-doc p { margin: 0; }
.cv-doc ul { margin: 0; padding-left: 18px; }
.cv-doc li { margin-bottom: 3px; }
.cv-doc a { color: inherit; text-decoration: none; }

/* ============================================
   Modèle 1 : CLASSIQUE (sobre, 1 colonne)
   ============================================ */
.cv-classic .cv-name {
  font-size: 28pt;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1;
}

.cv-classic .cv-title {
  font-size: 12pt;
  color: #555;
  font-weight: 500;
  margin-bottom: 8px;
}

.cv-classic .cv-contacts {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 9.5pt;
  color: #444;
  border-bottom: 2px solid #111;
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.cv-classic .cv-section {
  margin-bottom: 16px;
}

.cv-classic .cv-section h2 {
  font-size: 11pt;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
  margin-bottom: 10px;
  font-weight: 800;
}

.cv-classic .cv-entry {
  margin-bottom: 12px;
}

.cv-classic .cv-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.cv-classic .cv-entry-head h3 { font-size: 11pt; font-weight: 700; }
.cv-classic .cv-entry-head .cv-date { font-size: 9.5pt; color: #666; font-weight: 500; }
.cv-classic .cv-entry-sub { font-size: 10pt; color: #444; font-style: italic; margin-bottom: 4px; }

.cv-classic .cv-skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

.cv-classic .cv-skills-grid > span {
  font-size: 9.5pt;
  padding: 2px 0;
}

/* ============================================
   Modèle 2 : MODERNE (2 colonnes, accent couleur)
   ============================================ */
.cv-modern {
  display: grid;
  grid-template-columns: 70mm 1fr;
  padding: 0;
  min-height: 297mm;
}

.cv-modern .cv-aside {
  background: #1F2933;
  color: #F0EDE6;
  padding: 16mm 10mm;
}

.cv-modern .cv-main {
  padding: 16mm 12mm;
}

.cv-modern .cv-photo-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E63A5F, #F39200);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 32pt;
  font-weight: 700;
  color: white;
}

.cv-modern .cv-aside h1 {
  font-size: 17pt;
  text-align: center;
  color: #F0EDE6;
  margin-bottom: 4px;
}

.cv-modern .cv-aside .cv-title {
  text-align: center;
  font-size: 9.5pt;
  color: #F39200;
  margin-bottom: 18px;
  letter-spacing: 0.05em;
}

.cv-modern .cv-aside h2 {
  font-size: 9.5pt;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #F39200;
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(240, 237, 230, 0.2);
}

.cv-modern .cv-aside .cv-contacts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 9pt;
  word-break: break-word;
}

.cv-modern .cv-aside .cv-skills li {
  font-size: 9.5pt;
  list-style: none;
  margin-bottom: 4px;
  padding-left: 12px;
  position: relative;
}

.cv-modern .cv-aside .cv-skills li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #F39200;
}

.cv-modern .cv-aside ul { padding-left: 0; list-style: none; }

.cv-modern .cv-main h1 {
  display: none;
}

.cv-modern .cv-main h2 {
  font-size: 13pt;
  color: #1F2933;
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 2px solid #F39200;
}

.cv-modern .cv-main .cv-section { margin-bottom: 14px; }

.cv-modern .cv-main .cv-entry { margin-bottom: 10px; }
.cv-modern .cv-main .cv-entry-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1px; }
.cv-modern .cv-main .cv-entry-head h3 { font-size: 11pt; font-weight: 700; }
.cv-modern .cv-main .cv-entry-head .cv-date { font-size: 9pt; color: #666; }
.cv-modern .cv-main .cv-entry-sub { font-size: 10pt; color: #1F2933; font-weight: 500; margin-bottom: 3px; }

/* ============================================
   Modèle 3 : MINIMALISTE (très épuré)
   ============================================ */
.cv-minimal {
  font-family: 'Outfit', sans-serif;
}

.cv-minimal .cv-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ddd;
}

.cv-minimal .cv-name {
  font-size: 24pt;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.cv-minimal .cv-title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 12pt;
  color: #777;
  margin-bottom: 10px;
  font-weight: 400;
}

.cv-minimal .cv-contacts {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 9pt;
  color: #555;
}

.cv-minimal .cv-contacts span::before {
  content: "·";
  margin-right: 14px;
  color: #aaa;
}

.cv-minimal .cv-contacts span:first-child::before { content: ""; margin: 0; }

.cv-minimal .cv-section {
  margin-bottom: 18px;
}

.cv-minimal .cv-section h2 {
  font-size: 9.5pt;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: #888;
  margin-bottom: 12px;
  text-align: center;
}

.cv-minimal .cv-entry {
  margin-bottom: 14px;
  padding-left: 0;
}

.cv-minimal .cv-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1px;
}

.cv-minimal .cv-entry-head h3 { font-size: 11pt; font-weight: 600; }
.cv-minimal .cv-entry-head .cv-date {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 9.5pt;
  color: #888;
}
.cv-minimal .cv-entry-sub { font-size: 10pt; color: #555; margin-bottom: 4px; }
.cv-minimal .cv-entry ul { margin-top: 4px; }

.cv-minimal .cv-skills-flow {
  text-align: center;
  font-size: 10pt;
  line-height: 1.8;
}

.cv-minimal .cv-skills-flow span:not(:last-child)::after {
  content: " / ";
  color: #ccc;
  margin: 0 4px;
}

/* ============================================
   Modèle 4 : COULEUR (coloré, dynamique - pour profils créatifs/jeunes)
   ============================================ */
.cv-colorful .cv-header {
  background: linear-gradient(135deg, #E63A5F 0%, #F39200 100%);
  color: white;
  padding: 18mm 14mm 14mm;
  margin: -18mm -16mm 16mm;
}

.cv-colorful .cv-name {
  font-size: 28pt;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1;
}

.cv-colorful .cv-title {
  font-size: 13pt;
  font-weight: 500;
  margin-bottom: 14px;
  opacity: 0.95;
}

.cv-colorful .cv-contacts {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 9.5pt;
  font-weight: 500;
}

.cv-colorful .cv-section {
  margin-bottom: 14px;
}

.cv-colorful .cv-section h2 {
  font-size: 12pt;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cv-colorful .cv-section h2::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: #E63A5F;
}

.cv-colorful .cv-section:nth-child(3) h2::before { background: #1F8FE0; }
.cv-colorful .cv-section:nth-child(4) h2::before { background: #3BB54A; }
.cv-colorful .cv-section:nth-child(5) h2::before { background: #F39200; }

.cv-colorful .cv-entry { margin-bottom: 10px; }
.cv-colorful .cv-entry-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.cv-colorful .cv-entry-head h3 { font-size: 11pt; font-weight: 700; }
.cv-colorful .cv-entry-head .cv-date {
  font-size: 9pt;
  background: #1F2933;
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
}
.cv-colorful .cv-entry-sub { font-size: 10pt; color: #1F8FE0; font-weight: 600; margin-bottom: 3px; }

.cv-colorful .cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cv-colorful .cv-tags span {
  display: inline-block;
  padding: 3px 10px;
  background: #FFF1C7;
  color: #8C6800;
  border-radius: 999px;
  font-size: 9pt;
  font-weight: 600;
}

/* ============================================
   Empty state CV (avant remplissage)
   ============================================ */
.cv-empty {
  padding: 60px 20px;
  text-align: center;
  color: #aaa;
  background: repeating-linear-gradient(45deg, #fafafa, #fafafa 10px, #f0f0f0 10px, #f0f0f0 20px);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}

.cv-empty p { font-size: 13pt; max-width: 36ch; }

/* ============================================
   Impression
   ============================================ */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html, body {
    margin: 0;
    padding: 0;
    background: white;
  }

  body * { visibility: hidden; }
  .cv-doc, .cv-doc * { visibility: visible; }

  .cv-doc {
    position: absolute;
    left: 0;
    top: 0;
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    box-shadow: none;
    border: none;
  }

  .site-header, .site-footer, .gen-sidebar, .gen-form,
  .cv-template-picker, .gen-actions, .gen-preview-toggle,
  .toast, .modal-backdrop, .cv-preview-wrap > h3 {
    display: none !important;
  }

  .cv-preview-wrap {
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: white !important;
    margin: 0 !important;
  }

  .cv-preview-frame {
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
  }
}
