/* ===================================================================
   CV Stanislas Beguin - version ATS
   Une colonne, polices standard, aucun visuel : lisible par les
   logiciels de tri de candidatures (ATS) une fois exporté en PDF.
   =================================================================== */

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

html,
body {
  background: #E9ECF1;
  font-family: Arial, Helvetica, sans-serif;
  color: #111;
  font-variant-ligatures: none; /* évite les ligatures "fi"/"fl" mal lues par certains ATS */
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Bandeau + bascule (identique à la version design) ---------- */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #0F172A;
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  padding: 8px 16px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-tip {
  flex: 1;
  text-align: center;
}

.bar b {
  color: #9DBBFF;
}

.bar .kbd {
  background: rgba(255, 255, 255, .14);
  border-radius: 5px;
  padding: 2px 7px;
  font-weight: 600;
}

.switch {
  display: inline-flex;
  background: rgba(255, 255, 255, .12);
  border-radius: 7px;
  padding: 2px;
  flex-shrink: 0;
}

.switch a {
  padding: 4px 11px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #CBD5E1;
  white-space: nowrap;
}

.switch a:hover {
  color: #fff;
}

.switch a.on {
  background: #fff;
  color: #0F172A;
}

a.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #2563EB;
  color: #fff;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}

a.dl-btn:hover {
  background: #1d4ed8;
}

/* ---------- Document ---------- */
.doc {
  width: 210mm;
  min-height: 297mm;
  margin: 54px auto 40px;
  padding: 16mm 18mm;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
  font-size: 9pt;
  line-height: 1.25;
}

h1 {
  font-size: 18pt;
  font-weight: 700;
  line-height: 1.1;
}

.headline {
  font-size: 11pt;
  font-weight: 700;
  margin-top: 3pt;
}

.contact {
  margin-top: 3pt;
}

h2 {
  font-size: 10pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid #111;
  padding-bottom: 1pt;
  margin: 7pt 0 3pt;
}

.job {
  margin-bottom: 4pt;
}

.job-h {
  display: flex;
  justify-content: space-between;
  gap: 12pt;
}

.job-h .t {
  font-weight: 700;
}

.job-h .d {
  white-space: nowrap;
}

.job-s {
  font-style: italic;
}

ul {
  margin: 1pt 0 0 13pt;
  list-style: disc;
}

ul li {
  margin-bottom: .5pt;
}

ul.skills {
  margin-left: 14pt;
}

/* ---------- Mobile (écran uniquement) ---------- */
@media screen and (max-width: 700px) {
  .bar {
    justify-content: space-between;
    padding: 8px 12px;
  }

  .bar-tip {
    display: none;
  }

  .doc {
    width: 100%;
    min-height: unset;
    margin: 46px 0 0;
    padding: 6mm 5mm 10mm;
    box-shadow: none;
  }

  .job-h {
    flex-direction: column;
    gap: 0;
  }
}

/* ---------- Impression : Ctrl/Cmd + P -> Enregistrer en PDF ---------- */
@page {
  size: A4;
  margin: 0;
}

@media print {
  html,
  body {
    background: #fff;
  }

  .bar {
    display: none;
  }

  .doc {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 9mm 12mm;
    box-shadow: none;
  }

  h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .job {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
