/* ── Variables ──────────────────────────────────────── */
:root {
  --color-bg:       #faf8f5;
  --color-surface:  #f0ece5;
  --color-text:     #1c1917;
  --color-muted:    #78716c;
  --color-accent:   #c8602a;
  --color-border:   #e0d9d0;

  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: ui-monospace, monospace;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  8rem;

  --radius: 8px;
  --max-width: 860px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:      #111009;
    --color-surface: #1c1a16;
    --color-text:    #f0ece5;
    --color-muted:   #a8a29e;
    --color-accent:  #e07a4a;
    --color-border:  #2e2a24;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
}

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

a:hover {
  text-decoration: underline;
}

/* ── Layout ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

section {
  padding: var(--space-lg) 0;
}

/* ── Header / Nav ───────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 10;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}

@media (max-width: 540px) {
  nav {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem var(--space-sm);
  }
  .nav-brand {
    flex: 1 1 100%;
  }
  .nav-links {
    gap: 0.5rem 0.75rem;
    flex-wrap: wrap;
  }
  nav a {
    font-size: 0.8rem;
  }
}

nav a {
  font-size: 0.9rem;
  color: var(--color-muted);
}

nav a:hover {
  color: var(--color-text);
  text-decoration: none;
}

/* ── Hero ───────────────────────────────────────────── */
#hero {
  padding: var(--space-xl) 0 var(--space-lg);
  background: radial-gradient(ellipse 80% 60% at 70% 40%, color-mix(in srgb, var(--color-accent) 8%, transparent), transparent);
}

.hero-content {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-md);
  align-items: center;
}

.hero-text {
  align-self: stretch;
}

/* ── Photo de profil ─────────────────────────────────── */
.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Initiales affichées si pas de photo */
.hero-photo.no-photo::after {
  content: "CB";
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-muted);
  letter-spacing: -0.02em;
}

@media (max-width: 640px) {
  .hero-photo {
    width: 140px;
    height: 140px;
  }
}

#hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.tagline {
  font-size: 1.2rem;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.bio {
  max-width: 560px;
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

.social-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.social-links a {
  font-size: 0.9rem;
}

/* ── CTA Button ─────────────────────────────────────── */
.cta-btn {
  display: inline-block;
  margin-top: var(--space-sm);
  padding: 0.75rem 1.5rem;
  background-color: var(--color-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.cta-btn:hover {
  background-color: color-mix(in srgb, var(--color-accent) 85%, #000);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ── Projets ────────────────────────────────────────── */
#projects h2,
#contact h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.projects-grid {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.project-card h3 {
  font-size: 1rem;
  font-weight: 600;
}

.project-card p {
  color: var(--color-muted);
  font-size: 0.9rem;
  flex: 1;
}

.project-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-accent) 15%, transparent);
}

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

.tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  color: var(--color-muted);
}

/* ── Logo mission ────────────────────────────────────── */
.mission-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--color-bg);
  flex-shrink: 0;
}

.mission-period {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-family: var(--font-mono);
  flex: 0 !important;
}

/* ── Sous-rôles dans une carte mission ───────────────── */
.mission-subroles {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.mission-subrole {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.mission-subrole:first-child {
  padding-top: 0;
  border-top: none;
}

.mission-subrole-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.mission-subrole-period {
  font-size: 0.75rem;
  color: var(--color-accent);
  font-family: var(--font-mono);
  margin-bottom: 0.4rem;
}

.mission-subrole ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mission-subrole ul li {
  font-size: 0.83rem;
  color: var(--color-muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.4;
}

.mission-subrole ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.7rem;
  top: 0.15em;
}

/* ── Bullets de mission ──────────────────────────────── */
.mission-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.mission-bullets li {
  font-size: 0.85rem;
  color: var(--color-muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.4;
}

.mission-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.7rem;
  top: 0.15em;
}

/* ── Certifications (hero) ───────────────────────────── */
.certs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: var(--space-md);
}

.certs .certs-label {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-right: 0.2rem;
  list-style: none;
}

.certs li {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  color: var(--color-muted);
}

/* ── Section intro ───────────────────────────────────── */
.section-intro {
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

/* ── Bio multi-paragraphes ───────────────────────────── */
.bio {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 620px;
  margin-bottom: var(--space-md);
}

/* ── Hero hook (accroche problème-client) ─────────────── */
.hero-hook {
  margin-bottom: var(--space-md);
}

.hero-hook-question {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.hero-hook-cta {
  font-size: 1rem;
  color: var(--color-accent);
  font-weight: 500;
}

/* ── Hero pitch ──────────────────────────────────────── */
.hero-pitch {
  max-width: 620px;
  color: var(--color-muted);
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Hero method (3 étapes) ──────────────────────────── */
.hero-method {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem var(--space-sm);
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.hero-method-step {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hero-method-step strong {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.hero-method-step span {
  font-size: 0.78rem;
  color: var(--color-muted);
}

.hero-method-sep {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.1rem;
  align-self: center;
}

@media (max-width: 540px) {
  .hero-method {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-method-sep {
    display: none;
  }
}

/* ── Hero audience ───────────────────────────────────── */
.hero-audience {
  margin-bottom: var(--space-md);
}

.hero-audience-label {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-bottom: 0.4rem;
}

/* ── Témoignages ─────────────────────────────────────── */
#testimonials {
  border-top: 1px solid var(--color-border);
}

#testimonials h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.testimonials-grid {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.testimonial p {
  color: var(--color-text);
  font-size: 0.875rem;
  line-height: 1.6;
  flex: 1;
  font-style: italic;
}

.testimonial cite {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-style: normal;
}

.testimonial {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonial:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-accent) 12%, transparent);
}

/* ── Témoignages featured ────────────────────────────── */
.testimonial.featured {
  border-color: color-mix(in srgb, var(--color-accent) 30%, var(--color-border));
  position: relative;
  overflow: hidden;
}

.testimonial.featured::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 8rem;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.08;
  position: absolute;
  top: -1rem;
  left: 0.5rem;
  pointer-events: none;
  user-select: none;
}

/* ── Details/Summary témoignages ─────────────────────── */
.testimonials-more {
  margin-top: var(--space-md);
}

.testimonials-more summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-accent);
  font-weight: 500;
  list-style: none;
  padding: 0.5rem 0;
  user-select: none;
}

.testimonials-more summary::-webkit-details-marker {
  display: none;
}

.testimonials-more summary::after {
  content: '↓';
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.testimonials-more[open] summary::after {
  transform: rotate(180deg);
}

.testimonials-more summary:hover {
  color: color-mix(in srgb, var(--color-accent) 80%, var(--color-text));
}

.testimonials-more .testimonials-grid {
  margin-top: var(--space-sm);
}

/* ── Formations ──────────────────────────────────────── */
#formations {
  border-top: 1px solid var(--color-border);
}

#formations h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.formations-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.formations-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.formation-title {
  font-size: 0.9rem;
  color: var(--color-text);
}

.formation-org {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--color-muted);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .formation-org {
    white-space: normal;
  }
}

.formations-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-top: var(--space-md);
  margin-bottom: 0.25rem;
}

.formations-category:first-of-type {
  margin-top: 0;
}

/* ── Compétences & outils ────────────────────────────── */
.skills-block {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.skills-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skills-group h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Contact ────────────────────────────────────────── */
#contact {
  border-top: 1px solid var(--color-border);
}

#contact p {
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

#contact strong {
  color: var(--color-text);
}

/* ── Footer ─────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}

footer p {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ── Animation scroll (reveal) ──────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
