/* --------------------------------------------------------------------------
   CV — Jason Gatte
   Feuille autonome : aucune dépendance, imprimable en A4.
   -------------------------------------------------------------------------- */

:root {
  --ink: #101828;
  --muted: #5b6577;
  --line: #e3e8f0;
  --line-strong: #cfd6e2;
  --accent: #1d6fe0;
  --accent-2: #00a8e8;
  --accent-soft: #eef5ff;
  --paper: #ffffff;
  --bg: #eef2f8;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Barre d'outils (écran uniquement) */

.cv-toolbar {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toolbar-back {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.btn:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.05);
}

/* Feuille */

.cv-sheet {
  max-width: 980px;
  margin: 0 auto 48px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.13);
}

.cv-sheet::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 65%, #7c3aed);
}

.cv-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 38px 44px 26px;
  background:
    radial-gradient(circle at 88% 8%, rgba(0, 168, 232, 0.14), transparent 42%),
    linear-gradient(180deg, #f6faff, #ffffff);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4.6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.name-last {
  color: var(--accent);
}

.role {
  margin: 8px 0 0;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 650;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 6px 12px;
  border: 1px solid #c9dcf8;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #124a9c;
  font-size: 0.78rem;
  font-weight: 650;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
}

.contact li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink);
}

.contact .label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact a {
  color: var(--ink);
}

.monogram {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.portrait {
  display: block;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  object-fit: cover;
  object-position: center;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.14);
}

/* Chiffres clés */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
  list-style: none;
}

.facts li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 0;
}

.facts li + li {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.facts strong {
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.facts span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 550;
}

/* Corps */

.cv-body {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.9fr);
}

.cv-main {
  padding: 8px 44px 36px;
  counter-reset: project;
}

.cv-aside {
  padding: 28px 30px 36px 28px;
  border-left: 1px solid var(--line);
  background: #f8fafd;
}

.section + .section {
  margin-top: 24px;
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section h2::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.raid-box {
  padding: 12px 14px;
  border: 1px solid #c9dcf8;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: #f2f8ff;
}

.raid-box h2 {
  margin-bottom: 6px;
}

.raid-role {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.raid-box p:last-child {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.section p {
  margin: 0;
}

/* Expériences */

.job {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.job:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.job-date {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.job h3,
.formation h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
}

.job-org {
  margin: 1px 0 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.job p:last-child {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.83rem;
}

/* Projets */

.project {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  counter-increment: project;
}

.project:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.project h3::before {
  content: counter(project, decimal-leading-zero);
  margin-right: 7px;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  vertical-align: 2px;
}

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.project h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
}

.method {
  flex: 0 0 auto;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.method--hand {
  border-color: #cbbdf3;
  color: #5b3fa8;
}

.method--ai {
  border-color: #b9e2f2;
  color: #0b6b8c;
}

.project p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.project-link {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 600;
}

.note {
  margin-top: 10px !important;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  font-style: italic;
}

/* Colonne latérale */

.skill-group {
  padding-left: 10px;
  border-left: 2px solid #e7effb;
}

.skill-group + .skill-group {
  margin-top: 12px;
}

.skill-group h3 {
  margin: 0 0 5px;
  font-size: 0.76rem;
  font-weight: 700;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 550;
}

.chips--muted li {
  border-style: dashed;
  color: var(--muted);
}

.small {
  color: var(--muted);
  font-size: 0.76rem;
}

.formation {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.formation:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.formation p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.78rem;
}

.plain-list li + li {
  margin-top: 5px;
}

.plain-list strong {
  color: var(--ink);
  font-weight: 650;
}

.cv-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 44px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

.cv-footer p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 820px) {
  .cv-toolbar {
    padding: 16px;
  }

  .cv-sheet {
    margin: 0 12px 28px;
    border-radius: 14px;
  }

  .cv-header {
    flex-direction: column-reverse;
    gap: 18px;
    padding: 26px 24px 22px;
  }

  .monogram {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 1.2rem;
  }

  .portrait {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .cv-body {
    grid-template-columns: 1fr;
  }

  .cv-main,
  .cv-aside {
    padding: 22px 24px 26px;
  }

  .cv-aside {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .cv-footer {
    flex-direction: column;
    padding: 14px 24px 18px;
  }
}

@media (max-width: 520px) {
  .toolbar-actions .btn-ghost {
    display: none;
  }

  .contact {
    flex-direction: column;
    gap: 4px;
  }

  .facts {
    grid-template-columns: 1fr;
    padding: 0 24px;
  }

  .facts li + li {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .job {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* --------------------------------------------------------------------------
   Impression — A4, une page si possible
   -------------------------------------------------------------------------- */

@page {
  size: A4;
  margin: 10mm;
}

@media print {
  body {
    background: #fff;
    font-size: 9pt;
    line-height: 1.34;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print {
    display: none !important;
  }

  .cv-sheet {
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .cv-header {
    flex-direction: row;
    gap: 20px;
    padding: 0 0 10px;
    background: #fff;
    border-bottom: 2px solid var(--accent);
  }

  .cv-sheet::before {
    height: 4px;
  }

  .facts {
    padding: 0;
    background: #fff;
  }

  .facts li {
    padding: 4px 0;
  }

  .facts li + li {
    padding-left: 10px;
  }

  .facts strong {
    font-size: 9.5pt;
  }

  .facts span {
    font-size: 6.8pt;
  }

  .eyebrow {
    font-size: 7pt;
    margin-bottom: 3px;
  }

  h1 {
    font-size: 24pt;
  }

  .role {
    margin-top: 3px;
    font-size: 11pt;
  }

  .availability {
    margin-top: 7px;
    padding: 3px 8px;
    font-size: 7.5pt;
    background: #fff;
  }

  .contact {
    margin-top: 8px;
    gap: 3px 16px;
    font-size: 8pt;
  }

  .contact .label {
    font-size: 6.4pt;
  }

  .monogram {
    width: 62px;
    height: 62px;
    border: 1.5px solid var(--accent);
    border-radius: 14px;
    background: #fff;
    color: var(--accent);
    font-size: 17pt;
  }

  .portrait {
    width: 62px;
    height: 62px;
    border: 1.5px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: none;
  }

  .cv-body {
    grid-template-columns: minmax(0, 1.62fr) minmax(0, 0.95fr);
  }

  .cv-main {
    padding: 8px 0 0;
  }

  .cv-aside {
    padding: 10px 0 0 14px;
    border-top: 0;
    border-left: 1px solid var(--line);
    background: #fff;
  }

  .section + .section {
    margin-top: 8px;
  }

  .section h2 {
    margin-bottom: 5px;
    font-size: 7.4pt;
    gap: 6px;
  }

  .section h2::before {
    width: 5px;
    height: 5px;
  }

  .job {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 9px;
    padding: 3px 0;
    break-inside: avoid;
  }

  .job-date {
    font-size: 7.2pt;
  }

  .job h3,
  .project h3,
  .formation h3 {
    font-size: 9pt;
  }

  .job-org {
    font-size: 7.6pt;
  }

  .job p:last-child,
  .project p {
    margin-top: 2px;
    font-size: 8pt;
  }

  .project {
    padding: 3px 0;
    break-inside: avoid;
  }

  .project h3::before {
    font-size: 5.8pt;
    margin-right: 5px;
  }

  .method {
    font-size: 5.8pt;
    padding: 0 5px;
  }

  .project-link {
    font-size: 7.4pt;
  }

  .note {
    margin-top: 6px !important;
    padding-top: 5px;
    font-size: 6.9pt;
  }

  .skill-group {
    padding-left: 7px;
  }

  .skill-group + .skill-group {
    margin-top: 7px;
  }

  .skill-group h3 {
    margin-bottom: 3px;
    font-size: 7.6pt;
  }

  .chips {
    gap: 3px;
  }

  .chips li {
    padding: 1px 5px;
    font-size: 6.8pt;
  }

  .small {
    font-size: 7pt;
  }

  .formation {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 7px;
    padding: 5px 0;
    break-inside: avoid;
  }

  .formation p {
    font-size: 7pt;
  }

  .plain-list {
    font-size: 7.2pt;
  }

  .plain-list li + li {
    margin-top: 2px;
  }

  .cv-footer {
    display: none;
  }
}
