/* Portfolio UX Designer - style des visuels */
:root {
  --bg-dark: #0d1520;
  --bg-card: #141c2b;
  --bg-gradient-top: #1a2b40;
  --bg-gradient-bottom: #0b1522;
  --text: #f8f8f8;
  --text-muted: #9ca3af;
  --accent: #00bcd4;
  --accent-hover: #79b8ff;
  --accent-magenta: #9b59b6;
  --border: #2d3a4f;
  --border-accent: rgba(84, 160, 255, 0.5);
  --pdf-accent: #e74c3c;
  --font-heading: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Roboto', 'Segoe UI', system-ui, sans-serif;
  --nav-height: 56px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  background: radial-gradient(circle at bottom, #08455f, #050911);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: radial-gradient(circle at bottom, #08455f, #050911);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.page-title, .relecture-title,
.about-name, .about-job, .about-subtitle,
.card-title, .card-subtitle,
.section-title, .pub-year,
.cv-section-title, .cv-role, .cv-company, .cv-skill-label, .cv-reco-name {
  font-family: var(--font-heading);
}

h3 {
  font-size: 1.65em;
}

/* Navigation fixe – même position sur toutes les pages */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(13, 21, 32, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  box-sizing: border-box;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 2rem);
  flex-wrap: wrap;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Dropdown Projets */
.nav-projets {
  position: relative;
}

.nav-projets .trigger-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--text);
  background: none;
  border: none;
  font: inherit;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
  text-decoration: none;
  border-radius: 6px;
}

.nav-projets .trigger {
  display: none;
}

/* Sur desktop, utiliser le lien */
@media (min-width: 600px) {
  /* Cacher la checkbox et le label sur desktop */
  .nav-projets-checkbox,
  .nav-projets .trigger {
    display: none;
  }
  
  /* Afficher le lien sur desktop */
  .nav-projets .trigger-link {
    display: inline-flex;
  }
  
  /* Le dropdown fonctionne au survol sur desktop */
  .nav-projets:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}


.nav a:hover,
.nav-projets .trigger-link:hover,
.nav-projets .dropdown a:hover {
  color: var(--accent);
  background: rgba(84, 160, 255, 0.08);
}

.nav a:active,
.nav a.active,
.nav-projets .trigger.active,
.nav-projets .trigger-link.active,
.nav-projets .dropdown a:active,
.nav-projets .dropdown a.active {
  color: var(--accent);
  background: rgba(128, 160, 200, .3);
  border-bottom: 2px solid var(--accent);
}

.nav-projets .trigger-link::after {
  content: "▾";
  font-size: 1.05em;
  opacity: 0.9;
}

.nav-projets .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.35rem;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.nav-projets:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-projets .dropdown a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--text);
  border-radius: 0;
}

/* Menu hamburger - Checkbox cachée */
.nav-checkbox,
.nav-projets-checkbox {
  display: none;
}

/* Label du bouton hamburger */
.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  flex-shrink: 0;
}

.nav-toggle-icon {
  display: block;
  width: 24px;
  height: 24px;
  position: relative;
}

.nav-toggle-icon span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.15s ease;
}

.nav-toggle-icon span:nth-child(1) {
  top: 0;
}

.nav-toggle-icon span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle-icon span:nth-child(3) {
  bottom: 0;
}

/* Animation du hamburger en X quand ouvert */
.nav-checkbox:checked ~ .nav-toggle-label .nav-toggle-icon span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.nav-checkbox:checked ~ .nav-toggle-label .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.nav-checkbox:checked ~ .nav-toggle-label .nav-toggle-icon span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Menu mobile */
@media (max-width: 600px) {
  .nav {
    padding: 0 1rem;
    min-height: 52px;
    justify-content: space-between;
  }

  .nav-toggle-label {
    display: block;
  }

  .nav-inner {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    height: auto;
    max-height: calc(100vh - var(--nav-height));
    background: rgba(13, 21, 32, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1rem 1.5rem;
    gap: clamp(0.75rem, 2vw, 1.25rem);
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.35s ease-in-out;
    margin: 0;
    width: 100%;
    max-width: inherit;
    flex-wrap: nowrap;
  }

  /* Afficher le menu quand la checkbox est cochée */
  .nav-checkbox:checked ~ .nav-inner {
    transform: translateX(0);
  }

  /* Empêcher le scroll du body quand le menu est ouvert */
  .nav-checkbox:checked ~ .nav-inner {
    overflow-x: hidden;
    overflow-y: auto;
  }

  body:has(.nav-checkbox:checked) {
    overflow: hidden;
  }

  .nav a {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-bottom: none;
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .nav a:first-child {
    border-top: none;
  }

  .nav-projets {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .nav-projets .trigger-link {
    display: inline-block;
    width: auto;
    padding: 0.5rem 0.75rem;
    border-bottom: none;
    border-radius: 6px;
    text-align: left;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
  }
  
  .nav-projets .trigger {
    display: none;
  }

  .nav-projets .dropdown {
    position: static;
    top: auto;
    left: auto;
    margin-top: 0;
    margin-left: 1rem;
    min-width: auto;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .nav-projets-checkbox:checked ~ .dropdown {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-projets .dropdown a {
    padding: 0.5rem 0.75rem;
    border-bottom: none;
    display: block;
    border-radius: 6px;
    text-align: left;
  }

  .nav-projets .dropdown a:last-child {
    border-bottom: none;
  }
}

/* Sur desktop, le menu reste toujours visible */
@media (min-width: 600px) {
  .nav-inner {
    transform: none !important;
    position: static !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  body:has(.nav-checkbox:checked) {
    overflow: auto !important;
  }
}

/* Contenu principal */
.main {
  max-width: 1150px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 2rem) clamp(1.25rem, 4vw, 2rem) 4rem;
}

/* Titre des pages */
.page-title {
  color: var(--text);
  text-align: center;
  font-size: 2.25rem;
  margin-top: 1rem;
  margin-bottom: 2.25rem;
}

.page-title:has(+ p.about-subtitle) {
  margin-bottom: 0rem;
}

/* Page À propos */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.about-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.about-name-job {
  min-width: 0;
  text-align: right;
}

.about-name {
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--text);
  letter-spacing: -0.02em;
  color: var(--text);
  letter-spacing: -0.02em;
}

.about-job {
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin: 0;
}

.about-photo {
  width: 175px;
  height: 175px;
  max-width: min(175px, 100%);
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--border-accent);
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
  .about-identity {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .about-photo {
    width: 175px;
    height: 175px;
  }
}

.about-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.arrow {
  width: 1.5em !important;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

@keyframes arrow-slide-right {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0);
  }
}

.btn:hover img[src*="arrow_right"].arrow,
.btn-more:hover img[src*="arrow_right"].arrow {
  animation: arrow-slide-right 0.8s ease-in-out infinite;
}

@keyframes arrow-slide-down {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
  100% {
    transform: translateY(0);
  }
}

.btn:hover img[src*="arrow_down"].arrow,
.btn-more:hover img[src*="arrow_down"].arrow,
.btn-cv:hover img[src*="arrow_down"].arrow {
  animation: arrow-slide-down 0.8s ease-in-out infinite;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 44px;
  min-width: 44px;
}

.btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.about-buttons + .btn {
  height: 50px;
}


.btn-linkedin {
  background: #0a66c2;
  color: white;
  width: 50px;
  font-size: 1.25rem;
  padding: 0;
}

.btn-linkedin:hover {
  text-decoration: underline;
}

.btn-email {
  background: var(--accent-magenta);
  color: white;
  width: 50px;
  font-size: 1.25rem;
  padding: 0;
}

.btn-email:hover {
  text-decoration: underline;
}

.btn-cv {
  background: var(--accent);
  color: white;
  min-width: auto;
}

.btn-cv:hover {
  text-decoration: underline;
}

.about-subtitle {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 1rem 0;
  padding-top: 0px;
  padding-bottom: 0px;
}

.about-text p {
  margin: 0 0 1rem 0;
  color: var(--text);
  font-size: 1rem;
}

/* Cartes projets (page Projets) */
.projets-intro {
  text-align: left;
  margin-bottom: 2.25rem;
  color: var(--text);
}

.projets-intro p {
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 14px;
  padding: .5rem 1.5rem 1.5rem 1.5rem;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  transition: background 0.25s ease, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  background: #1a2235;
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(84, 160, 255, 0.12);
}

.card-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.card-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 1rem 0;
  text-align: left;
  min-height: 2em;
  max-height: 2em;
  line-height: 1.4;
  display: flex;
  align-items: center;
}

.card-image-wrap {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card p {
  margin: 0 0 1rem 0;
  color: var(--text);
  font-size: 0.95rem;
  flex: 1;
  text-align: left;
}

.card-actions {
  text-align: center;
  margin-top: auto;
  padding-top: 0.5rem;
}

.card-actions .btn-more {
  display: inline-block;
}

.btn-more {
  background: var(--accent);
  color: white;
}

/* Pages projets détaillés */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin: 2rem 0 1rem 0;
}

.section-title:first-of-type {
  margin-top: 0;
}

.content-block {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-with-aside {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-direction: row;
}

.content-with-aside > figure {
  width: 40%;
  max-width: 450px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.content-with-aside > figure.small {
  width: 25%;
}

@media (max-width: 600px) {
  .project-image-figure, .content-with-aside > figure.small {
    width: 100% !important;
    max-width: 100%;
  }
}

.content-with-aside > figure > img {
  border-radius: 5px;
}

.content-with-aside > figure > figcaption {
  font-size: 1em;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  margin: 0;
}

/* Pages projets détaillés (mobile) */
@media (max-width: 600px) {
  
  .content-with-aside {
    flex-direction: column;
  }
  
  .content-with-aside > figure {
    width: 100%;
    max-width: 100%;
  }
  
  .content-with-aside > div {
    width: 100%;
  }

  ol, ul {
    padding-left: 1em;
  }
}

.content-block strong {
  color: var(--text);
}

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

.content-block a:hover {
  text-decoration: underline;
}

/* CV – Deux colonnes (1/3 + 2/3) */
.cv-main {
  padding-bottom: 4rem;
}

.cv-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.cv-layout {
  display: grid;
  grid-template-columns: .9fr 2.1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 600px) {
  .cv-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.cv-col-left {
  min-width: 0;
}

.cv-col-right {
  min-width: 0;
}

.cv-about-block {
  margin-bottom: 1.5rem;
}

.cv-about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
}

@media (max-width: 930px) {
  .cv-about-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.cv-about-photo {
  flex-shrink: 0;
}

.cv-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-accent);
  background: var(--bg-card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: block;
}

.cv-about-info {
  min-width: 0;
  font-family: var(--font-body);
}

.cv-contact {
  margin: 0;
  font-family: var(--font-body);
}

.cv-contact-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem 0;
}

.cv-contact-item {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0.25rem 0;
}

.cv-contact-item a {
  color: var(--accent);
  text-decoration: none;
}

.cv-contact-item a:hover {
  text-decoration: underline;
}

.cv-col-left .cv-section {
  margin-bottom: 1.75rem;
}

.cv-col-left .cv-section:last-child {
  margin-bottom: 0;
}

.cv-col-left .cv-skill-group {
  margin-bottom: 1rem;
}

.cv-col-left .cv-skill-group:last-child {
  margin-bottom: 0;
}

.cv-col-left .cv-reco-card {
  margin-bottom: 0.75rem;
}

.cv-col-left .cv-reco-card:last-child {
  margin-bottom: 0;
}

.cv-hero-title {
  margin-bottom: 0.5rem;
}

.cv-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem 0;
  font-family: var(--font-body);
}

.cv-download-btn {
  display: inline-block;
}

.cv-section {
  margin-bottom: 2.5rem;
  padding-left: 1.1rem;
  border-left: 2.5px solid transparent;
  position: relative;
}

.cv-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.15rem;
  padding-left: 0.5em;
  border-bottom: 1px solid;
  letter-spacing: -0.02em;
}

/* Section Contact - Bleu cyan */
.cv-section-contact {
  border-color: #00bcd4;
}

.cv-section-contact .cv-section-title {
  color: #00bcd4;
  background: linear-gradient(90deg, #00bcd460 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom-color: rgba(42, 194, 255, 0.4);
}

/* Section Compétences - Orange */
.cv-section-competences {
  border-color: #e67e22;
}

.cv-section-competences .cv-section-title {
  color: #e67e22;
  background: linear-gradient(90deg, #e67e2260 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom-color: rgba(230, 126, 34, 0.4);
}

/* Section Loisirs - Turquoise */
.cv-section-loisirs {
  border-color: #1abc9c;
}

.cv-section-loisirs .cv-section-title {
  color: #1abc9c;
  background: linear-gradient(90deg, #1abc9b60 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom-color: rgba(26, 188, 156, 0.4);
}

/* Section Recommandations - Violet */
.cv-section-recommandations {
  border-color: #9b59b6;
}

.cv-section-recommandations .cv-section-title {
  color: #b87fd6;
  background: linear-gradient(90deg, #b87fd660 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom-color: rgba(155, 89, 182, 0.4);
}

/* Section Expériences professionnelles - Bleu */
.cv-section-experiences {
  border-color: #3498db;
}

.cv-section-experiences .cv-section-title {
  color: #3498db;
  background: linear-gradient(90deg, #3498db60 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom-color: rgba(52, 152, 219, 0.4);
}

.cv-section-experiences .cv-company {
  color: #3498db;
}

/* Section Formations - Rouge */
.cv-section-formations {
  border-color: #e74c3c;
}

.cv-section-formations .cv-section-title {
  color: #e74c3c;
  background: linear-gradient(90deg, #e74c3c60 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom-color: rgba(231, 76, 60, 0.4);
}

.cv-section-formations .cv-company {
  color: #e74c3c;
}

/* Section Enseignements - Vert */
.cv-section-enseignements {
  border-color: #2ecc71;
}

.cv-section-enseignements .cv-section-title {
  color: #2ecc71;
  background: linear-gradient(90deg, #2ecc7160 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom-color: rgba(46, 204, 113, 0.4);
}

.cv-item {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cv-item:hover {
  border-color: rgba(42, 162, 255, 0.4);
}

.cv-item-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cv-date {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-body);
}

.cv-item-heading {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.2rem;
  min-width: 0;
}

.cv-role {
  display: flex;
  flex-wrap: wrap;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.cv-company {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
}

.cv-list {
  margin: 0;
  padding-left: 1.35rem;
  list-style: disc;
  color: var(--text);
  line-height: 1.7;
}

.cv-list li {
  margin: 0.35rem 0;
}

.cv-item-link {
  margin: 0.75rem 0 0 0;
  font-size: 0.95rem;
}

.cv-item-link a {
  color: var(--accent);
  text-decoration: none;
}

.cv-item-link a:hover {
  text-decoration: underline;
}

.cv-item-desc,
.cv-item-desc p {
  margin: 0.5rem 0 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.cv-item-compact .cv-item-header {
  margin-bottom: 0.5rem;
}

/* Compétences en tags */
.cv-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.cv-skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  padding: 1.25rem;
}

.cv-skill-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
  text-align: center;
}

.cv-section-competences .cv-skill-label {
  color: #e67e22;
}

.cv-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cv-tag {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-family: var(--font-body);
}

.cv-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cv-tags-wrap .cv-tag {
  margin: 0;
}

/* Recommandations (grid in main, stack in sidebar) */
.cv-reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.cv-reco-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cv-reco-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.cv-reco-role {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.cv-reco-email {
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.25rem;
}

.cv-section-recommandations .cv-reco-email {
  color: #b87fd6;
}

.cv-reco-email:hover {
  text-decoration: underline;
}

@media (max-width: 930px) {
  .cv-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .cv-skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Publications */
.pub-year-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0px;
  margin-bottom: 18px;
  width: 100%;
}

.pub-year-group:first-of-type {
  margin-top: 0;
}

.pub-year {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
  flex-shrink: 0;
  height: 1.2em;
}

.pub-items-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* Activités de relecture */
.relecture-title {
  margin-top: 2.5rem;
  margin-bottom: 2.25rem;
}

.relecture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .relecture-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .relecture-grid .content-block {
    margin-bottom: 0;
  }
}

.pub-item {
  background: var(--bg-card);
  border: 1px solid rgba(0, 188, 212, 0.4);
  border-radius: 12px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  padding: 1rem 1.25rem;
  margin-bottom: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.pub-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.pub-authors {
  color: var(--text);
  font-size: 0.95rem;
}

.pub-authors strong {
  color: var(--text);
}

.pub-title {
  font-style: italic;
  color: var(--text);
  font-size: 0.95rem;
}

.pub-details {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.pub-links {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pub-item a.pdf-link,
.pub-item a.video-link,
.pub-item a.bib-link {
  color: var(--pdf-accent);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.pub-item a.pdf-link img,
.pub-item a.video-link img,
.pub-item a.bib-link img {
  display: block;
}

.pub-item a.pdf-link:hover,
.pub-item a.video-link:hover,
.pub-item a.bib-link:hover {
  opacity: 0.85;
}

.pub-note {
  font-size: 0.9em;
  color: var(--text-muted);
  font-weight: normal;
}

/* Responsive global */
@media (max-width: 600px) {
  .main {
    max-width: 100%;
    margin: 0;
    padding-top: calc(52px + 1.5rem);
  }

  .page-title {
    margin-bottom: 1.75rem;
  }

  .project-image-container {
    flex-direction: column;
  }

}

/* Liens généraux */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
