:root {
  --dark-bg: #1e1e1e;
  --light-bg: #f5f5f5;
  --accent: #bfa46f;
  --text-main: #333;
  --text-light: #777;
  --font-heading: 'Merriweather', serif;
  --font-body: 'Open Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--light-bg);
  color: var(--text-main);
  line-height: 1.5;
  padding: 20px;
}

/* --- LAYOUT PRINCIPAL EN GRID --- */
.cv-container {
  display: grid;
  grid-template-columns: 280px 1fr;  /* sidebar + contenu */
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  background: var(--dark-bg);
  color: #fff;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-wrap {
  width: 140px;
  height: 140px;
  border: 4px solid var(--accent);
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 20px;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 5px;
  text-align: center;
}

.role {
  font-weight: 600;
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 20px;
  text-align: center;
}

.contact p {
  font-size: 0.9rem;
  margin: 6px 0;
  text-align: center;
}

.contact i {
  color: var(--accent);
  margin-right: 8px;
}

.contact a {
  color: #fff;
  text-decoration: none;
}

/* SECTIONS (sidebar vs. main content) */
.section {
  width: 100%;
  margin-top: 30px;
}
/* Sidebar : titres et listes centrés */
.sidebar .section {
  text-align: center;
}
/* Contenu principal : alignement à gauche */
.main-content .section {
  text-align: left;
}

/* Titres de section */
.section h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 12px;
  position: relative;
}
.section h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 4px;
}

/* Listes */
.skills,
.languages,
.publications {
  list-style: none;
  padding-left: 0;
}
.skills li,
.languages li,
.publications li {
  font-size: 0.9rem;
  margin: 6px 0;
}
.languages span {
  color: var(--accent);
  margin-left: 8px;
}

/* CONTENU PRINCIPAL */
.main-content {
  padding: 40px 30px;
}

.profile p {
  font-style: italic;
  margin-bottom: 20px;
}

.item {
  margin-bottom: 25px;
}
.item h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--dark-bg);
}
.period {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
  display: block;
}
.item ul {
  list-style: disc inside;
}

/* Footer */
.footer {
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 40px;
}

/* --- BREAKPOINTS --- */
/* ≤ 900px : on passe en une colonne */
@media (max-width: 900px) {
  .cv-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    flex-direction: row;
    align-items: center;
  }
  .photo-wrap {
    margin-right: 20px;
  }
  .main-content {
    padding: 30px 20px;
  }
}

/* ≤ 600px : sidebar en colonne compacte */
@media (max-width: 600px) {
  .sidebar {
    flex-direction: column;
    padding: 15px;
  }
  .photo-wrap {
    margin-bottom: 15px;
    margin-right: 0;
  }
  .name {
    font-size: 1.5rem;
  }
  .role {
    font-size: 0.9rem;
  }
  .contact p {
    font-size: 0.85rem;
  }
  .section h2 {
    font-size: 1rem;
  }
  .main-content {
    padding: 20px 15px;
  }
  .item h3 {
    font-size: 1rem;
  }
  .period {
    font-size: 0.8rem;
  }
  .item ul {
    padding-left: 15px;
  }
}

/* Pourcentage langue */
.section.languages {
  max-width: 400px;
  margin: 2rem auto;
}

.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.lang-name {
  font-weight: 600;
  flex: 1;
}
.progress {
  flex: 2;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  height: 8px;
  margin-left: 1rem;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0056b3, #0090ff);
  border-radius: 4px 0 0 4px;
}
