/* ── Police (auto-hébergée) ────────────────────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('InterVariable.woff2') format('woff2');
}

/* ── Reset & Variables ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w: 272px;
  --sidebar-bg: #1c2b3a;
  --sidebar-text: #b8ccd8;
  --accent: #4fa3e0;
  --accent-dim: rgba(79, 163, 224, 0.18);
  --main-bg: #ffffff;
  --text: #2d3748;
  --meta: #718096;
  --border: #e2e8f0;
  --tag-bg: #ebf4fb;
  --tag-color: #1d6fa4;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 14px; }
body {
  font-family: var(--font);
  line-height: 1.55;
  color: var(--text);
  background: #edf2f7;
  min-height: 100vh;
}

/* ── Controls bar ──────────────────────────────────────────── */
.controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.controls button {
  padding: 5px 14px;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.controls button:hover {
  background: var(--accent);
  color: #fff;
}

/* ── CV container ──────────────────────────────────────────── */
.cv {
  display: flex;
  max-width: 960px;
  margin: 24px auto 40px;
  box-shadow: 0 6px 32px rgba(0,0,0,0.13);
  border-radius: 10px;
  overflow: hidden;
  min-height: 1060px;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 32px 22px 36px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Profile block */
.profile {
  text-align: center;
  padding-bottom: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.fullname {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  margin-bottom: 5px;
}

.fullname span { text-transform: uppercase; }

.headline {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1.4;
}

/* Sidebar sections */
.sb-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sb-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sb-heading {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 12px;
}

/* Contact */
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.contact-list li {
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-wrap: anywhere;
  color: var(--sidebar-text);
}

.contact-list a {
  color: var(--sidebar-text);
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.icon {
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
  min-width: 14px;
  text-align: center;
}

/* Skill groups */
.skill-group { margin-bottom: 11px; }
.skill-group:last-child { margin-bottom: 0; }

.skill-heading {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.tags { display: flex; flex-wrap: wrap; gap: 5px; }

.sidebar .tag {
  background: rgba(79, 163, 224, 0.16);
  color: #7ec8f0;
  border: 1px solid rgba(79, 163, 224, 0.28);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

/* Language indicators */
.lang-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  row-gap: 4px;
  margin-bottom: 10px;
}

.lang-item:last-child { margin-bottom: 0; }

.lang-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.lang-badge {
  font-size: 10px;
  color: var(--accent);
  font-style: italic;
}

.lang-dots {
  grid-column: 1 / -1;
  display: flex;
  gap: 4px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.on  { background: var(--accent); }
.dot.off { background: rgba(255,255,255,0.15); }

/* ── Main content ──────────────────────────────────────────── */
.main {
  flex: 1;
  background: var(--main-bg);
  padding: 36px 36px 40px;
}

.main-section { margin-bottom: 32px; }
.main-section:last-child { margin-bottom: 0; }

.section-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tag-bg);
  margin-bottom: 22px;
}

/* Job entries */
.job {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

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

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

.job-role {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.job-company {
  font-size: 12.5px;
  color: var(--meta);
}

.job-loc { font-size: 12px; }

.job-period {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  background: var(--tag-bg);
  padding: 3px 9px;
  border-radius: 5px;
  flex-shrink: 0;
}

.job-bullets {
  padding-left: 16px;
  margin-bottom: 10px;
}

.job-bullets li {
  font-size: 13px;
  color: #4a5568;
  margin-bottom: 3px;
  line-height: 1.5;
}

/* ── Profile summary ──────────────────────────────────────── */
.profil-section { margin-bottom: 28px; }

.profil-text {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.65;
  text-align: justify;
}

.job-bullets li {
  text-align: justify;
}

/* ── Publications & Patents ────────────────────────────────── */
.publi-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.publi-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.publi-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.publi-venue {
  font-size: 11.5px;
  color: var(--meta);
  line-height: 1.4;
}

.degree-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--meta);
}

/* ── Footer print (masqué à l'écran) ───────────────────────── */
.print-footer { display: none; }

/* ── Mobile ────────────────────────────────────────────────── */
@media screen and (max-width: 700px) {
  body { background: #1c2b3a; }

  .cv {
    flex-direction: column;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 0;
  }

  .sidebar {
    width: 100%;
    padding: 24px 20px 28px;
  }

  .main {
    padding: 24px 20px 32px;
    background: #fff;
  }

  .profil-text,
  .job-bullets li { text-align: left; }

  .job-header {
    flex-direction: column;
    gap: 6px;
  }

  .job-period { align-self: flex-start; }
}

/* ── Print / PDF ───────────────────────────────────────────── */
@media print {
  @page { margin: 0; }

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

  body { background: white; font-size: 10.5pt; }

  .cv {
    margin: 0;
    max-width: 100%;
    box-shadow: none;
    border-radius: 0;
    min-height: 594mm;
  }

  .sidebar {
    width: 200px;
    min-height: 594mm;
    padding: 24px 16px 28px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .main { padding: 24px 26px 28px; }

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

  .print-footer {
    display: block;
    margin-top: 28px;
    font-size: 8.5pt;
    color: var(--meta);
    text-align: right;
  }

  .print-footer a {
    color: var(--meta);
    text-decoration: none;
  }
}
