:root {
  --bg: #f7f8f5;
  --paper: #ffffff;
  --paper-soft: #eef4f2;
  --text: #233544;
  --muted: #647583;
  --line: #d9e4e1;
  --primary: #1f7a7c;
  --primary-dark: #163746;
  --accent: #c8a160;
  --footer: #203544;
  --shadow: 0 14px 34px rgba(26, 56, 62, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.65;
}
a, button { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}
.section {
  padding: 84px 0;
  scroll-margin-top: 90px;
}
.section-alt { background: var(--paper-soft); }
.section h2,
.site-footer h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.section h2 span { color: var(--primary); }
.section-intro {
  margin: 0 0 28px;
  max-width: 760px;
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(247, 248, 245, 0.92);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}
.brand {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.brand span { color: var(--primary); }
.main-nav {
  display: flex;
  gap: 20px;
}
.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.header-actions {
  display: flex;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary {
  background: var(--primary-dark);
  color: white;
}
.btn-light {
  background: var(--paper);
  border-color: var(--line);
  color: var(--text);
}
.btn-white {
  background: white;
  color: var(--primary-dark);
}
.btn-ghost {
  border-color: rgba(255,255,255,0.35);
  color: white;
}

.hero {
  padding: 72px 0 60px;
  background:
    radial-gradient(circle at 90% 15%, rgba(31,122,124,0.11), transparent 24%),
    linear-gradient(180deg, #fbfcfa 0%, #f7f8f5 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  gap: 48px;
  align-items: center;
}
.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}
.hero h1 span { color: var(--primary); }
.lead {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 44px;
}
.metric-card {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.metric-card strong {
  display: block;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  color: var(--primary);
  letter-spacing: -0.04em;
}
.metric-card span,
.footnote {
  color: var(--muted);
  font-size: 0.92rem;
}
.footnote { margin-top: 12px; }
.hero-portrait {
  position: relative;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #eef4f2 100%);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}
.hero-portrait img {
  border-radius: 22px;
  width: 100%;
  object-fit: cover;
}
.portrait-note {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 14px 16px;
}
.portrait-note strong {
  display: block;
  margin-bottom: 4px;
}
.portrait-note span {
  color: var(--muted);
  font-size: 0.92rem;
}

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.role-tab {
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  color: var(--text);
}
.role-tab.is-active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.role-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 24px;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.role-panel h3,
.skill-detail h3,
.timeline-item h3,
.modal h3 { margin: 0 0 12px; font-size: 1.45rem; letter-spacing: -0.03em; }
.role-panel-main p,
.role-proof p { color: var(--muted); }
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tag-list span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #eaf4f2;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}
.role-proof {
  padding: 22px;
  background: #eef5f3;
  border-radius: 18px;
}
.role-proof strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 2.2rem;
  letter-spacing: -0.04em;
  color: var(--primary);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.case-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
  padding: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.case-art {
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.case-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  min-height: 212px;
}
.case-card-body h3 { margin: 0; font-size: 1.18rem; }
.case-card-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.case-link {
  margin-top: auto;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.9rem;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.skill-button {
  text-align: left;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.skill-button.is-active {
  background: #e5f1ef;
  border-color: #a8ccc8;
}
.skill-button strong { display: block; margin-bottom: 8px; }
.skill-button small { color: var(--muted); }
.skill-detail {
  padding: 26px;
  background: #eaf4f2;
  border: 1px solid #d3e4df;
  border-radius: 18px;
}
.skill-detail p:last-child { margin: 0; color: var(--muted); }

.timeline {
  position: relative;
  margin-top: 26px;
  padding-left: 28px;
  border-left: 2px solid var(--line);
}
.timeline-item {
  position: relative;
  margin-bottom: 28px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid var(--bg);
}
.timeline-item strong { color: var(--primary); font-size: 0.82rem; }
.timeline-item p { color: var(--muted); margin: 0; }

.site-footer {
  padding: 72px 0 34px;
  background: var(--footer);
  color: white;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
}
.site-footer p { color: rgba(255,255,255,0.8); max-width: 800px; }
.footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(20, 42, 53, 0.72);
  z-index: 50;
}
.modal {
  width: min(680px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: white;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.2);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.modal-close {
  border: none;
  background: #eef4f2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.7rem;
  color: var(--text);
}
.modal h4 {
  margin: 18px 0 6px;
  color: var(--primary);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.modal p { margin: 0 0 12px; color: var(--muted); }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .hero-grid,
  .role-panel,
  .footer-inner { grid-template-columns: 1fr; display: grid; }
  .metrics,
  .case-grid,
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1160px); }
  .header-inner { flex-wrap: wrap; padding: 14px 0; }
  .header-actions { width: 100%; }
  .header-actions .btn { flex: 1; }
  .hero { padding-top: 48px; }
  .metrics,
  .case-grid,
  .skill-grid { grid-template-columns: 1fr; }
  .section { padding: 58px 0; }
  .role-panel { padding: 20px; }
}
/* Masquer correctement les fenêtres modales */
.modal-backdrop[hidden] {
    display: none !important;
}