*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --purple: #7C6EF8;
  --purple-light: #ede9fe;
  --purple-blob: #c4b5fd;
  --text-dark: #1a1a2e;
  --text-muted: #6b7280;
  --white: #ffffff;           /* texte sur violet : toujours blanc */
  --bg: #ffffff;
  --surface: #ffffff;         /* surfaces élevées (navbar, cartes, modale) */
  --card-bg: #f9f9ff;
  --card-border: #ede9fe;
  --border: #d1d5db;
  --navbar-border: #f0f0f0;
  --input-border: #e5e7eb;
  --placeholder: #b0b7c3;
  --footer-bg: #f9f9ff;
}

[data-theme="dark"] {
  --purple: #8b7ff9;
  --purple-light: #2a2640;
  --text-dark: #e8e8f0;
  --text-muted: #9a9ab0;
  --white: #ffffff;
  --bg: #0f0f17;
  --surface: #1a1a26;
  --card-bg: #16161f;
  --card-border: #2a2a3a;
  --border: #3a3a4d;
  --navbar-border: #22222e;
  --input-border: #2a2a3a;
  --placeholder: #6a6a80;
  --footer-bg: #13131c;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: clip;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Verrouille le défilement de fond quand la modale est ouverte */
body.modal-open {
  overflow: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 60px;
  border-bottom: 1px solid var(--navbar-border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 100;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.navbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.navbar__logo svg {
  display: block;
  border-radius: 50%;
}

.navbar__logo .logo-bg {
  fill: var(--surface);
  stroke: var(--purple);
  stroke-width: 2;
  transition: fill 0.2s ease;
}

.navbar__logo .logo-text {
  fill: var(--purple);
  transition: fill 0.2s ease;
}

.navbar__brand:hover .navbar__logo {
  transform: scale(1.06);
}

.navbar__brand:hover .navbar__logo .logo-bg {
  fill: var(--purple);
}

.navbar__brand:hover .navbar__logo .logo-text {
  fill: #ffffff;
}

.navbar__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e7eb;
}

.navbar__name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.navbar__fullname {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
  transition: color 0.2s;
}

.navbar__brand:hover .navbar__fullname {
  color: var(--purple);
}

.navbar__role {
  font-size: 12px;
  color: var(--text-muted);
}

.navbar__links {
  display: flex;
  gap: 36px;
}

.navbar__links a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  transition: color 0.2s;
}

.navbar__links a:hover {
  color: var(--purple);
}

.navbar__links a::after {
  content: '';
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--purple);
  transform: scaleX(0);
  transition: transform 0.25s ease;
  margin-top: 3px;
}

.navbar__links a:hover::after,
.navbar__links a.active::after {
  transform: scaleX(1);
}

.navbar__links a.active {
  color: var(--purple);
}

.btn-talk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  background: var(--surface);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-talk:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.navbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.lang-sep {
  color: #d1d5db;
}

.lang-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.2s;
}

.lang-btn.active {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-btn:not(.active):hover {
  color: var(--purple);
}

/* Toggle thème clair/sombre */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  color: var(--purple);
  background: var(--purple-light);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background 0.2s;
  transform-origin: center;
}

.hamburger:hover span {
  background: var(--purple);
}

.hamburger.is-open span { border-radius: 0; }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile */
.mobile-menu {
  display: none;
  position: fixed;
  top: 61px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--card-border);
  z-index: 99;
  flex-direction: column;
  padding: 16px 20px 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  animation: slideDown 0.25s ease;
}

.mobile-menu.is-open {
  display: flex;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu__link {
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  padding: 12px 8px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.mobile-menu__contact {
  margin-top: 8px;
  text-align: center;
  justify-content: center;
}

.mobile-menu__link:hover {
  background: var(--purple-light);
  color: var(--purple);
}

/* ===== SCROLL OFFSET (navbar sticky) ===== */
section {
  scroll-margin-top: 80px;
}

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 70px 60px 60px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

.hero__text {
  flex: 1;
  max-width: 480px;
}

.hero__greeting {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.hero__title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.hero__tagline {
  margin: 0 0 28px;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--purple);
  max-width: 430px;
}

.hero__tagline-motto {
  display: block;
  font-size: 17px;
  font-weight: 700;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.hero__tagline-sub {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: var(--purple);
  color: var(--white);
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: #6457e0;
  transform: translateY(-1px);
}

.btn-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.btn-link:hover {
  color: var(--purple);
}

.hero__social {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
}

.hero__social a {
  color: var(--text-dark);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.hero__social a:hover {
  color: var(--purple);
}

/* Accès rapide (raccourcis discrets dans le hero) */
.hero__quicklinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
}

.hero__quicklinks-items {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.hero__quicklinks-label {
  color: var(--text-muted);
  font-weight: 600;
}

.hero__quicklinks a {
  color: var(--text-dark);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.hero__quicklinks a:hover {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.hero__quicklinks-sep {
  color: var(--purple);
  font-weight: 700;
  opacity: 0.7;
}

/* Hero visual */
.hero__visual {
  position: relative;
  flex-shrink: 0;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__blob {
  position: absolute;
  right: -20px;
  top: -20px;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--purple-blob) 60%, var(--purple) 100%);
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  z-index: 0;
}

.hero__photo-ring {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 8px rgba(124, 110, 248, 0.15);
  overflow: hidden;
  background: #e5e7eb;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== SERVICES ===== */
.services {
  padding: 60px 60px 80px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.services__title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.services__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 40px;
}

.services__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.service-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 24px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.service-card:hover {
  box-shadow: 0 4px 20px rgba(124, 110, 248, 0.12);
  transform: translateY(-2px);
}

.service-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card__body {
  flex: 1;
}

.service-card__name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 4px;
}

.service-card__desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.service-card__arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.2s;
}

.service-card__arrow:hover {
  color: var(--purple);
}

/* ===== À PROPOS DE MOI ===== */
.about {
  padding: 60px 60px 80px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.about__title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.about__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
  margin: 14px auto 0;
}

.about__intro {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 44px;
}

.about__text {
  text-align: left;
  max-width: 760px;
  margin: 0 auto;
}

.about__block {
  margin-bottom: 28px;
}

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

.about__block-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.about__block-title::after {
  content: '';
  display: block;
  width: 34px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
  margin-top: 8px;
}

.about__block-text {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

.about__block-text--quote {
  position: relative;
  padding: 8px 0 0 40px;
  font-style: italic;
  color: var(--text-dark);
}

.about__block-text--quote::before {
  content: '\201C';
  position: absolute;
  left: 0;
  top: -6px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 52px;
  line-height: 1;
  color: var(--purple);
  opacity: 0.5;
}

.about__stats-intro {
  max-width: 760px;
  margin: 44px auto 18px;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
}

.about__stats-intro::after {
  content: '';
  display: block;
  width: 34px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
  margin-top: 8px;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.stat {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  background: linear-gradient(150deg, #8b7ff9 0%, #7C6EF8 60%, #6a5cf0 100%);
  border-radius: 16px;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(124, 110, 248, 0.22);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(124, 110, 248, 0.38);
}

.stat__icon {
  color: #ffffff;
  margin-bottom: 6px;
  opacity: 0.95;
}

.stat__num {
  display: block;
  font-size: 40px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.stat__label {
  font-size: 13.5px;
  color: #ffffff;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.95;
}

/* ===== EXPERTISES ===== */
.expertises {
  padding: 60px 60px 80px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.expertises__title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.expertises__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 40px;
}

.expertises__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}

.expertise-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.expertise-card:hover {
  box-shadow: 0 6px 24px rgba(124, 110, 248, 0.13);
  transform: translateY(-3px);
}

.expertise-card__icon {
  width: 52px;
  height: 52px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.expertise-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.expertise-card__desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== PROJETS ===== */
.projects {
  padding: 60px 60px 80px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.projects__title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.projects__desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 40px;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.project-card:hover {
  box-shadow: 0 6px 24px rgba(124, 110, 248, 0.13);
  transform: translateY(-3px);
}

.project-card__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 48px;
  padding: 8px;
  margin-bottom: 16px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.project-card__logo img {
  height: 28px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.project-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.project-card__client {
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 10px;
}

.project-card__client-sub {
  font-style: italic;
  font-weight: 500;
  color: var(--text-muted);
}

.project-card__client-sub::before {
  content: ' — ';
  font-style: normal;
}

.project-card__desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-card__role {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-dark);
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-card__arrow {
  color: var(--purple);
  flex-shrink: 0;
  margin-top: 4px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
  transition: gap 0.2s ease, opacity 0.2s;
}

.project-card__link:hover {
  gap: 9px;
  opacity: 0.8;
}

/* ===== BLOC OUTILS ===== */
.tools {
  text-align: center;
  margin-top: 56px;
}

.tools__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 28px;
}

.tools__title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
  margin: 12px auto 0;
}

.tools__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

/* ===== CV ===== */
.cv {
  padding: 60px 60px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.cv__title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 48px;
}

.cv__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.cv__block {
  margin-bottom: 36px;
}

.cv__block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--purple-light);
}

.cv__text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.cv__entry {
  position: relative;
  padding-left: 16px;
  border-left: 2px solid var(--purple-light);
  margin-bottom: 22px;
}

.cv__entry::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
}

.cv__entry-date {
  display: block;
  font-size: 12px;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: 3px;
}

.cv__entry-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.cv__entry-company {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cv__entry-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.cv__entry-context {
  display: block;
  font-size: 12.5px;
  font-style: italic;
  color: var(--purple);
  margin-top: 2px;
}

.cv__entry-list {
  margin: 4px 0 0;
  padding-left: 16px;
  list-style: none;
}

.cv__entry-list li {
  position: relative;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 14px;
  margin-bottom: 4px;
}

.cv__entry-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple);
}

.cv__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cv__skill {
  background: var(--purple-light);
  color: var(--purple);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 50px;
}

.cv__langs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cv__lang {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
}

.cv__lang-level {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.btn-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--surface);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-linkedin:hover,
.hero__social a.btn-linkedin:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white) !important;
}

/* Bouton principal "Télécharger mon CV" du hero */
.btn-hero-cv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--purple);
  color: #ffffff;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-hero-cv:hover {
  background: #6a5cf0;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 110, 248, 0.3);
}

/* LinkedIn en icône seule */
.btn-linkedin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  color: var(--text-dark);
  background: var(--surface);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-linkedin-icon:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: #ffffff;
}

.modal__success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 0 10px;
  gap: 14px;
}

.modal__success.is-visible {
  display: flex;
  animation: modalIn 0.3s ease;
}

.modal__success-icon {
  width: 72px;
  height: 72px;
  background: var(--purple-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__success-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
}

.modal__success-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
}

.modal__error {
  display: none;
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 6px;
}

.modal__error.is-visible {
  display: block;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cv__qrcode {
  display: flex;
  /* masqué sur mobile, visible uniquement desktop */
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.cv__qrcode-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

#qrcode {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(124, 110, 248, 0.1);
}

#qrcode img,
#qrcode canvas {
  display: block;
  border-radius: 4px;
}

.cv__download {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  background: var(--surface);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-download:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

/* ===== SECTION CONTACT (inline) ===== */
.contact {
  padding: 60px 20px 80px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact__title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
}

/* Barre d'accent violette sous les titres de section */
.expertises__title::after,
.projects__title::after,
.cv__title::after,
.contact__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
  margin: 14px auto 0;
}

.contact__subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 460px;
  margin: 0 auto 32px;
}

.contact__card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  text-align: left;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ===== MODALE CONTACT ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(3px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  padding: 40px;
  width: calc(100% - 40px);
  max-width: 480px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  transition: color 0.2s;
}

.modal__close:hover {
  color: var(--text-dark);
}

.modal__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.modal__subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--input-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--placeholder);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--purple);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--surface);
  color: var(--text-dark);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  margin-top: 4px;
}

.btn-submit:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--card-border);
  padding: 40px 60px 24px;
  margin-top: 20px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto 28px;
  flex-wrap: wrap;
}

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

.footer__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.footer__role {
  font-size: 13px;
  color: var(--purple);
  font-weight: 500;
}

.footer__links {
  display: flex;
  gap: 28px;
}

.footer__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--purple);
}

.footer__linkedin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.footer__linkedin:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.footer__copy {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 24px 0;
}

/* En-tête CV : masqué à l'écran, visible uniquement à l'impression */
.cv__print-header {
  display: none;
}

/* ===== BOUTON RETOUR EN HAUT ===== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--purple);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s, color 0.2s, border-color 0.2s;
  z-index: 150;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--purple);
  color: #ffffff;
  border-color: var(--purple);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 16px 20px;
  }
  .navbar__links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .navbar__right .btn-talk {
    display: none;
  }
  .hero {
    flex-direction: column-reverse;
    padding: 40px 20px;
    text-align: center;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__social {
    justify-content: center;
  }
  .hero__quicklinks {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .hero__visual {
    width: 240px;
    height: 240px;
  }
  .hero__blob {
    width: 220px;
    height: 220px;
  }
  .hero__photo-ring {
    width: 170px;
    height: 170px;
  }
  .cv {
    padding: 40px 20px 60px;
  }

  .cv__grid {
    grid-template-columns: 1fr;
  }

  .cv__qrcode {
    display: none;
  }

  .about {
    padding: 40px 20px 60px;
  }

  .about__stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Section contact compacte sur mobile (formulaire entierement visible) */
  .contact {
    padding: 32px 20px 48px;
    scroll-margin-top: 64px;
  }
  .contact__title {
    font-size: 26px;
  }
  .contact__subtitle {
    margin-bottom: 22px;
  }
  .contact__card {
    padding: 22px 20px;
  }
  .contact__form {
    gap: 14px;
  }
  .stat {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    aspect-ratio: auto;
    padding: 16px 20px;
    text-align: left;
  }
  .stat__icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .stat__label {
    flex: 1;
    font-size: 13.5px;
  }
  .stat__num {
    font-size: 28px;
  }

  .expertises {
    padding: 40px 20px 60px;
  }

  .expertises__grid {
    grid-template-columns: 1fr;
  }

  .projects {
    padding: 40px 20px 60px;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .tools__grid {
    grid-template-columns: 1fr;
  }
}

/* ===== IMPRESSION / EXPORT PDF ===== */
@media print {
  /* On force le thème clair pour l'impression */
  :root, [data-theme="dark"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --text-dark: #1a1a2e;
    --text-muted: #555;
    --purple: #7C6EF8;
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
  }

  body {
    background: #fff;
  }

  /* On masque tout sauf le CV */
  .navbar,
  .mobile-menu,
  .hero,
  .expertises,
  .footer,
  .modal-overlay,
  .cv__download,
  .cv__title,
  .back-to-top {
    display: none !important;
  }

  /* La section CV occupe toute la page */
  .cv {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  /* En-tête CV visible à l'impression */
  .cv__print-header {
    display: block;
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--purple);
  }

  .cv__print-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-dark);
  }

  .cv__print-role {
    font-size: 15px;
    font-weight: 600;
    color: var(--purple);
    margin-top: 2px;
  }

  .cv__print-contact {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
  }

  .cv__print-sep {
    margin: 0 8px;
    color: var(--purple);
  }

  /* Mise en page deux colonnes conservée */
  .cv__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  /* Évite les coupures disgracieuses au milieu d'un bloc/entrée */
  .cv__block,
  .cv__entry {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Badges conservés en violet clair pour l'impression */
  .cv__skill {
    background: #ede9fe !important;
    color: #5b4fd6 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    margin: 14mm;
  }
}
