@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --primary-color: #10263d;
  --secondary-color: #21405e;
  --accent-color: #c89446;
  --accent-soft: rgba(200, 148, 70, 0.18);
  --light-bg: #f3f5f8;
  --border-color: rgba(16, 38, 61, 0.1);
  --text-color: #243244;
  --muted-text: #5d6b7b;
  --light-text: #fff;
  --border-radius: 28px;
  --box-shadow: 0 24px 70px rgba(13, 28, 45, 0.12);
}

body {
  font-family: 'Manrope', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 24px;
  color: var(--text-color);
  background:
    radial-gradient(circle at top left, rgba(200, 148, 70, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(56, 103, 214, 0.12), transparent 24%),
    linear-gradient(180deg, #eef2f7 0%, #f8fafc 52%, #eef2f7 100%);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 38, 61, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 38, 61, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 75%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 75%);
  pointer-events: none;
}

.container {
  max-width: 980px;
  margin: 24px auto 48px;
  background-color: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.7);
  overflow: hidden;
  position: relative;
}

header {
  background:
    radial-gradient(circle at 20% 20%, rgba(200, 148, 70, 0.22), transparent 24%),
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.12), transparent 18%),
    linear-gradient(135deg, #10263d 0%, #183553 58%, #21405e 100%);
  color: var(--light-text);
  padding: 44px 38px 40px;
  text-align: center;
  position: relative;
  overflow: visible;
  isolation: isolate;
}

header::before,
header::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  z-index: -1;
}

header::before {
  width: 180px;
  height: 180px;
  top: -60px;
  right: 70px;
  background: rgba(200, 148, 70, 0.18);
}

header::after {
  width: 220px;
  height: 220px;
  left: -60px;
  bottom: -90px;
  background: rgba(255, 255, 255, 0.06);
}

header h1 {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2.45rem, 4vw, 3.15rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.02;
  text-wrap: balance;
}

header p {
  margin: 14px auto 0;
  max-width: 720px;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.01em;
}

.content {
  padding: 34px;
}

section {
  margin-top: 24px;
  padding: 26px 28px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(244, 247, 251, 0.92)
  );
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(16, 38, 61, 0.06);
}

h2 {
  color: var(--primary-color);
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 18px;
  font-family: 'Manrope', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 14px;
}

h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-color), rgba(16, 38, 61, 0.08));
}

h3 {
  color: var(--secondary-color);
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 700;
}

.profile-summary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(243, 245, 248, 0.94)),
    var(--light-bg);
  padding: 26px 28px;
  border: 1px solid rgba(200, 148, 70, 0.18);
  border-left: 6px solid var(--accent-color);
  border-radius: 24px;
  margin-bottom: 22px;
  font-size: 1rem;
  box-shadow: 0 12px 28px rgba(16, 38, 61, 0.08);
}

.experience {
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(16, 38, 61, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(16, 38, 61, 0.05);
}

.experience:last-child {
  margin-bottom: 0;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.job-title {
  font-weight: 800;
  color: var(--secondary-color);
  font-size: 1.08rem;
}

.company {
  font-weight: 800;
  color: var(--primary-color);
}

.period {
  color: var(--muted-text);
  font-size: 0.9rem;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.period::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-color);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

ul {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
  margin-bottom: 0;
}

ul li {
  margin-bottom: 10px;
  padding-left: 22px;
  position: relative;
  color: var(--text-color);
}

ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-color), #dca55d);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.skills-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin-bottom: 0;
  table-layout: fixed;
}

.skills-table th {
  text-align: left;
  padding: 0 14px 8px;
  background-color: transparent;
  border-bottom: none;
  color: var(--muted-text);
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.skills-table td {
  padding: 14px;
  border-top: 1px solid rgba(16, 38, 61, 0.06);
  border-bottom: 1px solid rgba(16, 38, 61, 0.06);
  background: rgba(255, 255, 255, 0.9);
  vertical-align: top;
}

.skills-table td:first-child,
.skills-table th:first-child {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.skills-table td:last-child,
.skills-table th:last-child {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.education {
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(16, 38, 61, 0.08);
}

.education h3 {
  margin-bottom: 5px;
}

.education p {
  margin: 5px 0;
}

.header-inner {
  position: relative;
  width: 100%;
}

.header-center {
  text-align: center;
}

.header-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  font-weight: 600;
}

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

a.contact-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.title-tags,
.job-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.title-tags {
  justify-content: center;
  margin-top: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(8, 20, 34, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.job-tech {
  margin-top: 16px;
}

.job-tech .tag {
  background: rgba(16, 38, 61, 0.06);
  border-color: rgba(16, 38, 61, 0.08);
  color: var(--secondary-color);
}

.section-intro,
.job-context,
.profile-quote {
  color: var(--muted-text);
}

.section-intro,
.job-context {
  font-style: italic;
}

.profile-quote {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 38, 61, 0.08);
}

.job-context {
  margin: 0 0 12px;
}

.language-switch {
  position: static;
  margin: 0;
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 2;
}

.action-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 20, 34, 0.4);
  color: rgba(255, 255, 255, 0.96);
  padding: 10px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(9, 20, 33, 0.12);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
  background: rgba(8, 20, 34, 0.56);
  border-color: rgba(255, 255, 255, 0.3);
}

.action-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.action-btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.pdf-btn {
  background: rgba(200, 148, 70, 0.22);
  border-color: rgba(200, 148, 70, 0.32);
}

.pdf-btn:hover {
  background: rgba(200, 148, 70, 0.34);
  border-color: rgba(224, 179, 101, 0.4);
}

.language-btn {
  background-color: rgba(10, 61, 98, 0.35);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition:
    background-color 0.2s,
    transform 0.2s ease;
}

.language-btn:hover,
.language-btn.active {
  background-color: rgba(10, 61, 98, 0.7);
  transform: translateY(-1px);
}

p {
  margin: 0 0 10px;
}

strong {
  color: var(--primary-color);
}

[lang='en'] .fr-content {
  display: none;
}

[lang='fr'] .en-content {
  display: none;
}

body.pdf-exporting .header-controls {
  display: none !important;
}

body.pdf-exporting .container {
  max-width: none;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  background: #fff;
}

body.pdf-exporting {
  font-size: 9.15pt;
  line-height: 1.32;
}

body.pdf-exporting header {
  background: #fff;
  color: var(--primary-color);
  padding: 0 0 6mm;
  text-align: left;
  border-bottom: 1.5pt solid rgba(15, 23, 42, 0.14);
  margin-bottom: 4.5mm;
}

body.pdf-exporting header h1 {
  font-size: 21pt;
  line-height: 1;
}

body.pdf-exporting header::before,
body.pdf-exporting header::after,
body.pdf-exporting h2::after,
body.pdf-exporting body::before {
  display: none !important;
  content: none !important;
}

body.pdf-exporting header p {
  color: var(--secondary-color);
  max-width: none;
  margin-top: 3mm;
  font-size: 9.1pt;
}

body.pdf-exporting .contact-info {
  justify-content: flex-start;
  gap: 7px;
  margin-top: 4mm;
}

body.pdf-exporting .contact-item {
  padding: 0;
  border: none;
  background: none;
  backdrop-filter: none;
  color: var(--secondary-color);
  font-size: 8.7pt;
}

body.pdf-exporting .title-tags,
body.pdf-exporting .job-tech {
  gap: 4px 6px;
}

body.pdf-exporting .tag {
  padding: 0;
  border: none;
  background: none;
  color: var(--secondary-color);
  font-size: 7.5pt;
  line-height: 1.2;
}

body.pdf-exporting .content {
  padding: 0;
}

body.pdf-exporting .profile-summary,
body.pdf-exporting section,
body.pdf-exporting .experience,
body.pdf-exporting .education {
  background: #fff !important;
  box-shadow: none !important;
  border-radius: 0;
  backdrop-filter: none;
}

body.pdf-exporting .profile-summary {
  margin-bottom: 3.8mm;
  padding: 0 0 0 4mm;
  border: none;
  border-left: 2.5pt solid var(--accent-color);
}

body.pdf-exporting section {
  margin-top: 3.5mm;
  padding: 0;
  border: none;
  page-break-inside: auto;
  break-inside: auto;
}

body.pdf-exporting .experience {
  margin-bottom: 3mm;
  padding: 0 0 2.6mm;
  border: none;
  border-bottom: 0.8pt solid rgba(15, 23, 42, 0.1);
  page-break-inside: auto;
  break-inside: auto;
  overflow: visible;
}

body.pdf-exporting .experience:last-child {
  border-bottom: none;
}

body.pdf-exporting .education {
  margin-bottom: 2.8mm;
  padding: 0;
  border: none;
}

body.pdf-exporting .job-header,
body.pdf-exporting .profile-summary {
  page-break-inside: avoid;
  break-inside: avoid;
}

body.pdf-exporting .skills-table {
  border-spacing: 0;
  font-size: 8.35pt;
}

body.pdf-exporting h2 {
  display: block;
  margin: 0 0 2.3mm;
  font-size: 12.4pt;
  line-height: 1.1;
}

body.pdf-exporting h3 {
  margin-bottom: 1.2mm;
  font-size: 10.3pt;
  line-height: 1.16;
}

body.pdf-exporting .job-header {
  margin-bottom: 1.4mm;
}

body.pdf-exporting .period {
  font-size: 8pt;
}

body.pdf-exporting p {
  margin: 0 0 1.6mm;
  orphans: 3;
  widows: 3;
}

body.pdf-exporting ul {
  margin-top: 1.6mm;
  page-break-inside: auto;
  break-inside: auto;
}

body.pdf-exporting ul li {
  margin-bottom: 1.2mm;
  padding-left: 12px;
  font-size: 8.95pt;
  page-break-inside: avoid;
  break-inside: avoid;
}

body.pdf-exporting ul li::before {
  top: 0.62em;
  width: 4px;
  height: 4px;
  box-shadow: none;
  background: var(--accent-color);
}

body.pdf-exporting .skills-table th {
  padding: 0 5px 1.8mm;
  font-size: 7.2pt;
}

body.pdf-exporting .skills-table td {
  padding: 1.8mm 5px;
  background: none;
}

@media (max-width: 768px) {
  body {
    padding: 0;
  }

  .container {
    margin: 0;
    border-radius: 0;
  }

  header {
    padding: 34px 20px 28px;
  }

  .content {
    padding: 20px;
  }

  section,
  .profile-summary,
  .experience,
  .education {
    padding: 20px;
    border-radius: 18px;
  }

  .job-header {
    flex-direction: column;
  }

  .period {
    margin-top: 5px;
  }

  .language-switch {
    width: fit-content;
    margin: 0 auto;
  }

  .toolbar {
    justify-content: center;
  }

  .header-controls {
    flex-direction: column;
    align-items: center;
    margin-bottom: 18px;
  }

  .skills-table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  .skills-table td,
  .skills-table th {
    min-width: 180px;
  }
}

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

@media print {
  :root {
    --text-color: #111827;
    --primary-color: #0f172a;
    --secondary-color: #1e293b;
    --muted-text: #475569;
    --border-color: rgba(15, 23, 42, 0.14);
    --accent-color: #8b5e1a;
    --accent-soft: rgba(139, 94, 26, 0.12);
    --box-shadow: none;
  }

  html,
  body {
    background: #fff !important;
  }

  body {
    padding: 0;
    font-size: 9.2pt;
    line-height: 1.32;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body::before,
  header::before,
  header::after,
  h2::after {
    display: none !important;
    content: none !important;
  }

  .container {
    max-width: none;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    background: #fff;
    overflow: visible;
  }

  header {
    background: #fff;
    color: var(--primary-color);
    padding: 0 0 6mm;
    text-align: left;
    border-bottom: 1.5pt solid rgba(15, 23, 42, 0.14);
    margin-bottom: 4.5mm;
  }

  header h1 {
    font-size: 21pt;
    letter-spacing: 0.01em;
  }

  header p {
    max-width: none;
    margin-top: 3mm;
    color: var(--secondary-color);
    font-size: 9.1pt;
  }

  .language-switch {
    display: none !important;
  }

  .toolbar {
    display: none !important;
  }

  .contact-info {
    justify-content: flex-start;
    gap: 7px;
    margin-top: 4mm;
  }

  .contact-item {
    padding: 0;
    border: none;
    background: none;
    backdrop-filter: none;
    color: var(--secondary-color);
    font-size: 8.7pt;
  }

  .contact-item:not(:last-child)::after {
    content: '•';
    margin-left: 8px;
    color: var(--muted-text);
  }

  .content {
    padding: 0;
  }

  .profile-summary,
  section,
  .experience,
  .education {
    background: #fff !important;
    box-shadow: none !important;
    border-radius: 0;
    backdrop-filter: none;
  }

  .profile-summary {
    margin-bottom: 3.8mm;
    padding: 0 0 0 4mm;
    border: none;
    border-left: 2.5pt solid var(--accent-color);
    page-break-inside: avoid;
  }

  section {
    margin-top: 3.5mm;
    padding: 0;
    border: none;
    page-break-inside: auto;
    break-inside: auto;
  }

  #experiences {
    page-break-inside: auto;
  }

  .experience {
    margin-bottom: 3mm;
    padding: 0 0 2.6mm;
    border: none;
    border-bottom: 0.8pt solid rgba(15, 23, 42, 0.1);
    page-break-inside: auto;
    break-inside: auto;
    overflow: visible;
  }

  .experience:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .education {
    margin-bottom: 2.8mm;
    padding: 0;
    border: none;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .job-header,
  .profile-summary {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  h2 {
    display: block;
    margin: 0 0 2.3mm;
    font-size: 12.4pt;
    page-break-after: avoid;
    break-after: avoid;
  }

  h3 {
    margin-bottom: 1.2mm;
    font-size: 10.3pt;
    page-break-after: avoid;
  }

  .job-header {
    margin-bottom: 1.4mm;
    page-break-after: avoid;
  }

  .job-title,
  .company,
  strong {
    color: var(--primary-color);
  }

  .period {
    font-size: 8pt;
    color: var(--muted-text);
  }

  .period::before {
    width: 6px;
    height: 6px;
    box-shadow: none;
  }

  p {
    margin: 0 0 1.6mm;
    orphans: 3;
    widows: 3;
  }

  ul {
    margin-top: 1.6mm;
    page-break-inside: auto;
    break-inside: auto;
  }

  ul li {
    margin-bottom: 1.2mm;
    padding-left: 12px;
    font-size: 8.95pt;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  ul li::before {
    top: 0.62em;
    width: 4px;
    height: 4px;
    box-shadow: none;
    background: var(--accent-color);
  }

  .skills-table {
    border-spacing: 0;
    table-layout: fixed;
    font-size: 8.35pt;
  }

  .skills-table th,
  .skills-table td {
    min-width: 0 !important;
  }

  .skills-table th {
    padding: 0 5px 1.8mm;
    color: var(--muted-text);
    font-size: 7.2pt;
    background: none;
  }

  .skills-table td {
    padding: 1.8mm 5px;
    border-top: 0.8pt solid rgba(15, 23, 42, 0.08);
    border-bottom: 0.8pt solid rgba(15, 23, 42, 0.08);
    background: none;
  }

  .skills-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  #projects,
  #formation,
  #langues {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
