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

:root {
  --bg:            #F8F7F4;
  --surface:       #FFFFFF;
  --surface2:      #F1EFE9;
  --border:        #E4E0D8;
  --border-strong: #C9C4BA;
  --text-1:        #181714;
  --text-2:        #6A6560;
  --text-3:        #9C9790;
  --accent:        #1D4E35;
  --accent-light:  #E8F2EC;
  --accent-mid:    #3D8A5F;
  --font-display:  'Fraunces', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;
  --max-w: 1080px;
}

html   { font-size: 16px; scroll-behavior: smooth; }
body   { font-family: var(--font-body); background: var(--bg); color: var(--text-1); -webkit-font-smoothing: antialiased; }
a      { text-decoration: none; color: inherit; }
ul     { list-style: none; }
em     { font-style: italic; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,247,244,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 2rem;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 400;
  letter-spacing: -0.02em; color: var(--text-1);
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: 0.85rem; font-weight: 400; color: var(--text-2);
  transition: color .15s;
}
.nav-links a:hover { color: var(--text-1); }

.nav-cv-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--text-1); color: #fff !important;
  border-radius: var(--r-md);
  font-size: 0.82rem; font-weight: 500;
  transition: background .15s;
}
.nav-cv-btn:hover { background: #2e2c28; }
.nav-cv-btn svg   { flex-shrink: 0; }

/* ── Hero ── */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 5rem 2rem 4.5rem;
}
.hero-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto;
  gap: 4rem; align-items: center;
}
.eyebrow {
  font-size: 0.72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent-mid); margin-bottom: .6rem;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -0.03em; color: var(--text-1);
  margin-bottom: 1.25rem;
}
.hero-bio {
  font-size: .95rem; font-weight: 300; line-height: 1.75;
  color: var(--text-2); max-width: 480px; margin-bottom: 2rem;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: var(--accent); color: #fff;
  border-radius: var(--r-md); font-family: var(--font-body);
  font-size: .88rem; font-weight: 500;
  transition: background .15s, transform .1s;
}
.btn-primary:hover   { background: #163b28; }
.btn-primary:active  { transform: scale(.98); }

/* Hero stats card */
.hero-stats-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem 2.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  min-width: 220px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.hsc-divider { height: 1px; background: var(--border); }
.hsc-label {
  font-size: .7rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .09em; color: var(--text-3); margin-bottom: 4px;
}
.hsc-value {
  font-family: var(--font-display);
  font-size: 2.4rem; line-height: 1; color: var(--text-1);
}
.hsc-value--accent { color: var(--accent); }
.hsc-sub { font-size: .78rem; color: var(--text-3); margin-top: 4px; }
.hsc-sub span { font-weight: 500; color: var(--text-2); }

/* ── Section ── */
.section { padding: 4rem 2rem 5rem; }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-head  { margin-bottom: 2rem; }
.section-title {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 400;
  letter-spacing: -0.02em; color: var(--text-1);
}

/* ── Table ── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
table { width: 100%; border-collapse: collapse; table-layout: fixed; }

thead th {
  font-size: .68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-3); padding: .9rem 1.25rem;
  text-align: left; background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.col-titre { width: 28%; }
.col-comp  { width: 18%; }
.col-prest { width: 14%; }
.col-compt { width: 26%; }
.col-img   { width: 9%;  }
.col-arr   { width: 5%;  }

tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #FAF9F6; }
tbody tr:hover .row-arr { opacity: 1; transform: translateX(0); }

td {
  padding: 1rem 1.25rem; font-size: .88rem;
  color: var(--text-1); vertical-align: middle;
}
.td-titre { font-weight: 500; line-height: 1.4; }

.comp-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: .7rem; font-weight: 500;
  background: var(--accent-light); color: var(--accent);
  border: 1px solid #C4DACC; white-space: nowrap;
}
.comp-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-mid); flex-shrink: 0; }

.h-val  { font-size: .95rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.h-unit { font-size: .75rem; color: var(--text-3); margin-left: 1px; }

/* Comptabilisées cell */
.compt-cell { display: flex; flex-direction: column; gap: 5px; }
.compt-top  { display: flex; align-items: center; gap: 8px; }

.bar-track { height: 4px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 99px; background: var(--accent); }

/* Thumbnail */
.td-img { text-align: center; }
.thumb {
  width: 40px; height: 40px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--surface2);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph  { color: var(--text-3); font-size: 1rem; }

/* Arrow */
.row-arr {
  display: flex; align-items: center; justify-content: flex-end;
  color: var(--text-3); opacity: 0;
  transform: translateX(-4px); transition: opacity .15s, transform .15s;
}

/* Tfoot totals */
tfoot td {
  padding: .85rem 1.25rem; font-size: .82rem;
  font-weight: 500; color: var(--text-2);
  background: var(--surface2);
  border-top: 1px solid var(--border);
}
tfoot .tf-label { color: var(--text-3); font-weight: 400; }
tfoot .tf-total {
  font-family: var(--font-display);
  font-size: 1.15rem; color: var(--text-1);
}
tfoot .tf-total-accent {
  font-family: var(--font-display);
  font-size: 1.15rem; color: var(--accent);
}

/* ── Back button ── */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; margin-bottom: 1.75rem;
  font-family: var(--font-body); font-size: .84rem; font-weight: 500;
  color: var(--text-2); background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md); cursor: pointer; transition: background .15s;
}
.back-btn:hover { background: var(--surface2); color: var(--text-1); }

/* ── Detail ── */
.detail-grid {
  display: grid; grid-template-columns: 300px 1fr;
  gap: 3rem; align-items: start;
}
.detail-img-wrap {
  aspect-ratio: 4/3; border-radius: var(--r-xl);
  overflow: hidden; border: 1px solid var(--border);
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.detail-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.d-img-ph { text-align: center; color: var(--text-3); font-size: .85rem; }
.d-img-ph-icon { font-size: 2rem; margin-bottom: 6px; }

.detail-meta {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.meta-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 1.1rem; font-size: .84rem;
  border-bottom: 1px solid var(--border);
}
.meta-row:last-child { border-bottom: none; }
.meta-lbl { color: var(--text-3); font-weight: 300; }
.meta-val { color: var(--text-1); font-weight: 500; font-variant-numeric: tabular-nums; }

.detail-comp-tag {
  font-size: .7rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent-mid); margin-bottom: .5rem;
}
.detail-title {
  font-family: var(--font-display); font-size: 2rem; font-weight: 400;
  line-height: 1.15; letter-spacing: -.02em;
  color: var(--text-1); margin-bottom: 1.5rem;
}
.detail-hrow {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 1.25rem;
}
.dh-card {
  background: var(--surface2); border-radius: var(--r-md);
  padding: .9rem 1rem;
}
.dh-card .dh-lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 500; margin-bottom: 5px; }
.dh-card .dh-val {
  font-family: var(--font-display); font-size: 1.8rem;
  line-height: 1; color: var(--text-1);
}
.dh-card .dh-val--accent { color: var(--accent); }
.dh-card .dh-sub { font-size: .72rem; color: var(--text-3); margin-top: 3px; }

.detail-gauge {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.1rem 1.4rem; margin-bottom: 1.75rem;
}
.dg-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3); font-weight: 500; margin-bottom: .9rem;
}
.dg-track { height: 8px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.dg-fill  { height: 100%; border-radius: 99px; background: var(--accent); }
.dg-scale {
  display: flex; justify-content: space-between;
  font-size: .68rem; color: var(--text-3);
}

.desc-label {
  font-size: .68rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-3);
  padding-bottom: .5rem; border-bottom: 1px solid var(--border);
  margin-bottom: .85rem;
}
.detail-desc {
  font-size: .92rem; font-weight: 300;
  color: var(--text-2); line-height: 1.8;
}

/* ── Footer ── */
.footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem; color: var(--text-3);
}
.footer-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text-2); font-size: .82rem; transition: color .15s;
}
.footer-link:hover { color: var(--text-1); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-stats-card { flex-direction: row; min-width: unset; padding: 1.5rem; }
  .hsc-divider { width: 1px; height: auto; }
  .col-img, .col-comp { display: none; }
  .col-titre { width: 42%; }
  .col-prest { width: 20%; }
  .col-compt { width: 32%; }
  .col-arr   { width: 6%; }
  .detail-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .detail-img-wrap { aspect-ratio: 16/9; }
}
@media (max-width: 580px) {
  .nav-links li:not(:last-child) { display: none; }
  .section { padding: 2.5rem 1rem 3rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .detail-title { font-size: 1.5rem; }
}
