:root {
  /* Brand */
  --black: #0a0a0a;
  --yellow: #facc15;
  --yellow-soft: #fef9c3;
  /* App « Mes courses » — bleu doux + slate */
  --blue: #2563eb;
  --blue-soft: #3b82f6;
  --blue-tint: #eff6ff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #f8fafc;
  --card: #ffffff;
  --bg: #ffffff;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 4px 8px rgba(15, 23, 42, 0.06), 0 18px 44px rgba(15, 23, 42, 0.12);
  --maxw: 1040px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Hero ---------- */
header {
  text-align: center;
  padding: 64px 0 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 44px;
}

.brand-tile {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: block;
}

.brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--black);
  letter-spacing: -0.02em;
}

.brand-name .dot {
  color: var(--yellow);
}

header h1 {
  font-size: clamp(2rem, 5.2vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--black);
  font-weight: 800;
  margin-bottom: 20px;
}

.lead {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.stats {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 26px;
  min-width: 150px;
}

.stat strong {
  display: block;
  color: var(--black);
  font-size: 1.05rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.24);
}

.btn-primary:hover {
  background: var(--blue-soft);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.btn-outline {
  background: var(--card);
  color: var(--black);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--surface);
}

/* ---------- Sections ---------- */
.section-head {
  text-align: center;
  margin-bottom: 36px;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  color: var(--black);
  letter-spacing: -0.02em;
  font-weight: 800;
}

.section-sub {
  color: var(--muted);
  margin-top: 8px;
  font-size: 1.05rem;
}

.apps-section {
  padding: 48px 0;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.app-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.app-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: var(--blue-tint);
  border-radius: 14px;
  margin-bottom: 16px;
}

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

.app-card p {
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: 16px;
  flex-grow: 1;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--blue-tint);
  color: var(--blue);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge.rating {
  background: var(--yellow-soft);
  color: #854d0e;
}

.app-link {
  align-self: flex-start;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.app-link:hover {
  color: var(--blue-soft);
  text-decoration: underline;
}

/* ---------- CTA ---------- */
.cta-section {
  position: relative;
  text-align: center;
  background: var(--black);
  border-radius: var(--radius);
  padding: 52px 24px;
  margin: 32px 0 64px;
  overflow: hidden;
}

.cta-section h2 {
  color: #fff;
}

.cta-section .section-sub {
  color: #cbd5e1;
}

/* signature yellow accent bar */
.cta-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--yellow);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.cta-section .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.cta-section .btn-outline:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 56px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--blue);
}

.copyright {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  header {
    padding: 40px 0 24px;
  }

  .brand {
    margin-bottom: 28px;
  }

  .stats {
    gap: 12px;
  }

  .stat {
    flex: 1 1 100%;
    min-width: 0;
  }

  .hero-cta .btn,
  .cta-buttons .btn {
    width: 100%;
  }
}

/* ---------- CV ---------- */
.cv-head {
  padding-bottom: 24px;
}

.cv-role {
  color: var(--blue);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.cv-actions {
  margin-bottom: 24px;
}

.cv-actions .btn {
  cursor: pointer;
}

.cv-main {
  padding-bottom: 24px;
}

.cv-section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.cv-section-head {
  text-align: left;
  margin-bottom: 24px;
  position: relative;
  padding-left: 16px;
}

/* Barre signature jaune (cohérence avec .cta-section::before) */
.cv-section-head::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: var(--yellow);
}

.cv-section-head h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}

/* Timeline (expérience / formation) */
.cv-timeline {
  position: relative;
  padding-left: 24px;
}

.cv-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}

.cv-entry {
  position: relative;
  margin-bottom: 24px;
}

.cv-entry:last-child {
  margin-bottom: 0;
}

.cv-dot {
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--black);
  box-shadow: 0 0 0 3px var(--bg);
}

.cv-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cv-entry-head h3,
.cv-skill-group h3,
.cv-project h3 {
  font-size: 1.1rem;
  color: var(--black);
  font-weight: 700;
}

.cv-period {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.cv-entry-sub,
.cv-project-sub {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 2px;
}

.cv-entry-desc {
  color: var(--muted);
  margin-top: 6px;
}

/* Compétences (chips) */
.cv-skills-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.cv-skill-group .cv-skills {
  margin-top: 10px;
}

.cv-skill-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 8px;
}

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

/* Projets (réutilise .apps-grid / .app-card) */
.cv-project .cv-period {
  display: inline-block;
  margin: 4px 0 8px;
}

.cv-empty {
  color: var(--muted);
  text-align: center;
  padding: 48px 0;
}

/* ---------- Impression / PDF ---------- */
@media print {
  .cv-actions,
  footer .footer-links,
  .brand {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .cv-head {
    padding-top: 0;
    text-align: left;
  }

  .cv-section {
    padding: 16px 0;
  }

  .cv-entry,
  .cv-skill-group,
  .cv-project {
    break-inside: avoid;
  }

  .app-card,
  .cv-project {
    box-shadow: none;
    border-color: #ccc;
  }
}
