/* ============================================================
   ComptaGest — feuille de style principale
   Architecture templatisable : toutes les valeurs de marque
   (couleurs, fontes, rayons, espacements) vivent dans :root.
   ============================================================ */

:root {
  /* -- Marque -- */
  --c-primary: #c82035;          /* rouge logo */
  --c-primary-dark: #a51528;
  --c-dark: #23272e;             /* anthracite (sections sombres) */
  --c-dark-2: #2e333c;
  --c-ink: #333333;              /* gris logo / texte titres */
  --c-text: #4a4f57;
  --c-muted: #7a8089;
  --c-bg: #ffffff;
  --c-bg-alt: #f5f6f8;
  --c-line: #e6e8ec;
  --c-on-dark: #ffffff;
  --c-on-dark-muted: #b8bdc6;

  /* -- Typographie -- */
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;

  /* -- Rythme -- */
  --section-pad: clamp(3.5rem, 8vw, 6.5rem);
  --container: 1180px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(35, 39, 46, .10);
  --shadow-lg: 0 18px 50px rgba(35, 39, 46, .16);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }
ul { padding-left: 1.2rem; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--c-ink);
  line-height: 1.12;
  margin: 0 0 .6em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .85rem 1.9rem;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn-outline { border-color: currentColor; color: var(--c-ink); background: transparent; }
.btn-outline:hover { background: var(--c-ink); color: #fff; }
.section-dark .btn-outline, .hero .btn-outline { color: #fff; }
.section-dark .btn-outline:hover, .hero .btn-outline:hover { background: #fff; color: var(--c-ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 76px;
}
.brand { flex: 0 0 auto; }
.brand img { height: 44px; width: auto; max-width: none; }
.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: .55rem .8rem;
  font-family: var(--f-display); font-size: 1.02rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; color: var(--c-ink);
  border-radius: 4px; white-space: nowrap;
}
.main-nav a:hover, .main-nav li.current > a { color: var(--c-primary); }
.has-sub { position: relative; }
.has-sub > a::after { content: " ▾"; font-size: .75em; }
.sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 250px;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); list-style: none; margin: 0; padding: .5rem;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.sub-menu a { text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-weight: 600; font-size: .98rem; }
.header-cta { white-space: nowrap; font-weight: 700; }
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 0; cursor: pointer; padding: .5rem;
}
.nav-toggle span {
  display: block; width: 26px; height: 3px; margin: 5px 0;
  background: var(--c-ink); border-radius: 2px; transition: transform .25s, opacity .25s;
}

/* ---------- Héro ---------- */
.hero {
  position: relative; display: grid; align-items: center;
  min-height: min(88vh, 780px);
  background: var(--c-dark);
  color: #fff; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .38;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(23,26,32,.92) 20%, rgba(23,26,32,.45) 60%, rgba(200,32,53,.28));
}
.hero .container { position: relative; z-index: 2; padding-block: 5rem; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .kicker {
  font-family: var(--f-display); text-transform: uppercase; letter-spacing: .25em;
  color: var(--c-primary); font-weight: 600; font-size: 1rem; margin-bottom: 1rem;
}
.hero .kicker::before { content: ""; display: inline-block; width: 42px; height: 2px; background: var(--c-primary); vertical-align: middle; margin-right: .8rem; }
.hero p.lead { max-width: 56ch; font-size: 1.15rem; color: #dfe2e7; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* Bannière de page intérieure */
.page-hero { min-height: 320px; }
.page-hero .container { padding-block: 3.5rem; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }
.section-alt { background: var(--c-bg-alt); }
.section-dark { background: var(--c-dark); color: var(--c-on-dark-muted); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head .kicker {
  font-family: var(--f-display); text-transform: uppercase; letter-spacing: .22em;
  color: var(--c-primary); font-weight: 600; display: block; margin-bottom: .4rem;
}
.section-head p { color: var(--c-muted); }
.section-dark .section-head p { color: var(--c-on-dark-muted); }

/* ---------- Grilles / cartes ---------- */
.grid { display: grid; gap: 1.6rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-media { aspect-ratio: 16/10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card-body p { margin: 0; color: var(--c-muted); font-size: .98rem; }
.card-link {
  margin-top: auto; padding-top: .9rem;
  font-family: var(--f-display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem;
}
.card-link::after { content: " →"; transition: margin .18s; }
.card:hover .card-link::after { margin-left: .35rem; }

/* Cartes expertises avec liseré rouge */
.card-topline { border-top: 4px solid var(--c-primary); }

/* ---------- Objectifs entrepreneurs (liste besoins) ---------- */
.goals { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem 2.4rem; margin-top: 1rem; }
.goal {
  display: flex; gap: .9rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 1rem 1.2rem; font-weight: 600; color: var(--c-ink);
  transition: border-color .18s, transform .18s;
}
.goal:hover { border-color: var(--c-primary); transform: translateX(4px); }
.goal .dot {
  flex: 0 0 auto; width: 10px; height: 10px; margin-top: .5rem;
  border-radius: 50%; background: var(--c-primary);
}
.goal small { display: block; font-weight: 400; color: var(--c-muted); }

/* ---------- Split (texte + image) ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.split .checklist { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.split .checklist li { padding: .35rem 0 .35rem 2rem; position: relative; }
.split .checklist li::before {
  content: "✓"; position: absolute; left: 0; top: .3rem;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--c-primary); color: #fff; font-size: .8rem;
  display: grid; place-items: center; font-weight: 700;
}

/* ---------- Chiffres clés ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat .num {
  font-family: var(--f-display); font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 700; color: #fff; line-height: 1;
}
.stat .num em { font-style: normal; color: var(--c-primary); }
.stat .label { margin-top: .4rem; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; }

/* ---------- Équipe ---------- */
.person { text-align: center; }
.person img {
  width: 170px; height: 170px; object-fit: cover; object-position: top;
  border-radius: 50%; margin: 0 auto 1rem; border: 4px solid #fff; box-shadow: var(--shadow);
}
.person h3 { margin-bottom: .1em; }
.person .role { color: var(--c-primary); font-weight: 600; margin: 0; }
.person .mail { font-size: .95rem; color: var(--c-muted); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: var(--c-line);
}
.timeline li { position: relative; padding: 0 0 1.8rem 2.4rem; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: .35rem;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 5px solid var(--c-primary);
}
.timeline .year { font-family: var(--f-display); font-size: 1.4rem; font-weight: 700; color: var(--c-ink); display: block; }

/* ---------- Témoignages ---------- */
.quote-mark { font-family: Georgia, serif; font-size: 4rem; line-height: 0; color: var(--c-primary); display: block; height: .5em; }
.testimonial-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.9rem 1.8rem; display: flex; flex-direction: column; gap: 1rem;
}
.testimonial-card blockquote { margin: 0; font-style: italic; color: var(--c-text); }
.testimonial-card .stars { color: #e8a51c; letter-spacing: .2em; }
.testimonial-card .who { font-weight: 700; color: var(--c-ink); }
.testimonial-card .who small { display: block; font-weight: 400; color: var(--c-muted); }

/* Slider simple */
.slider { position: relative; }
.slides { overflow: hidden; }
.slide { display: none; }
.slide.active { display: block; animation: fadeIn .45s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.slider-nav { display: flex; gap: .5rem; justify-content: center; margin-top: 1.6rem; }
.slider-nav button {
  width: 12px; height: 12px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--c-line); transition: background .18s, transform .18s;
}
.slider-nav button.active { background: var(--c-primary); transform: scale(1.25); }

/* ---------- Bande CTA ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 22ch; margin-inline: auto; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.8rem; }

/* ---------- Contenu riche (pages intérieures) ---------- */
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: .4rem; }
.pullquote {
  border-left: 4px solid var(--c-primary);
  background: var(--c-bg-alt); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.8rem; margin: 2.2rem 0;
  font-family: var(--f-display); font-size: 1.45rem; color: var(--c-ink); font-weight: 600;
}

/* Encadré infos (feature box) */
.feature {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.feature h3 { display: flex; align-items: center; gap: .6rem; }
.feature h3::before { content: ""; width: 12px; height: 12px; background: var(--c-primary); border-radius: 3px; flex: 0 0 auto; }
.feature p { margin: 0; color: var(--c-muted); font-size: .98rem; }

/* ---------- Formulaires ---------- */
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { font-weight: 600; color: var(--c-ink); display: block; margin-bottom: .3rem; font-size: .95rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--c-ink);
  border: 1px solid var(--c-line); border-radius: 6px;
  padding: .7rem .9rem; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(200, 32, 53, .12);
}
.field { margin-bottom: 1.1rem; }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; color: var(--c-muted); }
.consent input { width: auto; margin-top: .3rem; }

/* ---------- Infos contact ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.contact-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.7rem; text-align: center;
}
.contact-card .ico { font-size: 1.8rem; display: block; margin-bottom: .5rem; }
.contact-card strong { display: block; font-family: var(--f-display); font-size: 1.2rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink); margin-bottom: .3rem; }
.map-frame { border: 0; width: 100%; height: 420px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-dark); color: var(--c-on-dark-muted); padding: 4rem 0 0; }
.site-footer h4 { color: #fff; text-transform: uppercase; letter-spacing: .1em; font-size: 1.05rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--c-on-dark-muted); }
.site-footer a:hover { color: #fff; }
.site-footer .brand-foot img { height: 40px; margin-bottom: 1rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.2rem 0; font-size: .9rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
}

/* ---------- Reveal au scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 2.2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .main-nav {
    position: fixed; inset: 76px 0 0 0; background: #fff;
    padding: 1.5rem; overflow-y: auto;
    transform: translateX(100%); transition: transform .28s ease;
  }
  .main-nav.open { transform: none; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: .8rem .4rem; border-bottom: 1px solid var(--c-line); }
  .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 0 0 0 1.2rem;
  }
  body.nav-locked { overflow: hidden; }
  .grid-3, .grid-2, .contact-cards { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .goals { grid-template-columns: 1fr; }
  form .row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
