/* Design system CapTech : tokens repris tels quels (couleurs, typographie, espacements, rayons, ombre) */
@font-face { font-family: "Bricolage Grotesque"; src: url("assets/fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("assets/fonts/figtree.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  /* Couleurs */
  --lagon-profond: #08414c;
  --passe: #097a78;
  --turquoise: #5fd3c9;
  --corail: #ee6a4c;
  --blanc: #ffffff;
  --surface: #eef5f3;
  --surface-raised: #ffffff;
  --surface-night: #08414c;
  --tint: #d4efeb;
  --ink: #08414c;
  --ink-muted: #3f6670;
  --accent: #097a78;
  --on-accent: #ffffff;
  --accent-on-night: #5fd3c9;
  --line: #d3e4e0;
  --line-strong: #5e8c92;
  --signal: #b8432a;
  --focus: #097a78;
  --shadow-card: 0 1px 2px rgba(8,65,76,0.06), 0 10px 28px rgba(8,65,76,0.08);
  /* Texte secondaire et filets sur surface-night */
  --night-muted: rgb(255 255 255 / 78%);
  --night-line: rgb(255 255 255 / 18%);

  /* Espacements (grille de 4 px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Rayons */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Typographie */
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-sans: "Figtree", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/26px var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 var(--space-3); }
h1 { font-size: 40px; line-height: 46px; letter-spacing: -0.02em; }
h2 { font-size: 28px; line-height: 34px; letter-spacing: -0.01em; }
h3 { font-size: 20px; line-height: 26px; }
p { margin: 0 0 var(--space-4); }
.display { font-size: 56px; line-height: 60px; letter-spacing: -0.02em; }
@media (max-width: 720px) { .display { font-size: 40px; line-height: 46px; } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface-raised); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }

.wrap { width: min(1160px, 100% - 2 * var(--space-4)); margin-inline: auto; }
.wrap--narrow { width: min(780px, 100% - 2 * var(--space-4)); }

.eyebrow {
  display: inline-block;
  font: 600 12.5px/16px var(--font-sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.eyebrow--night, .section--night .eyebrow--night { color: var(--accent-on-night); }
.lead { font-size: 18px; line-height: 28px; color: var(--ink-muted); }
.hl { color: var(--accent); }

/* Logo : fichiers du design system, version couleur sur fond clair, négative sur fond sombre */
.brand { display: inline-flex; text-decoration: none; }
/* Le fichier inclut la zone de protection autour du logo : 64 px de haut pour un nom lisible */
.brand { margin-block: -8px; }
.brand img { height: 64px; width: auto; }

/* Boutons : toujours en pilule */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-5);
  border: 2px solid transparent; border-radius: var(--radius-pill);
  font: 600 15px/20px var(--font-sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--ink); color: var(--surface-raised); }
.btn--secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--secondary:hover { border-color: var(--ink); }
.btn--sm { min-height: 36px; padding: 0 var(--space-4); font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }

/* En-tête */
.topbar { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / 92%); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__inner { display: flex; align-items: center; gap: var(--space-6); min-height: 72px; }
.topbar__nav { display: flex; gap: var(--space-5); margin-left: auto; }
.topbar__nav a { color: var(--ink-muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.topbar__nav a:hover { color: var(--ink); }
@media (max-width: 860px) {
  .topbar__nav { display: none; }
  .topbar__inner .btn { margin-left: auto; }
}
/* Sur téléphone, les boutons d'action de l'accroche suffisent */
@media (max-width: 480px) { .topbar__inner .btn { display: none; } }

/* Accroche */
.hero { padding: calc(var(--space-8) * 1.5) 0 var(--space-8); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -100px; top: 40px; width: 460px; height: 520px;
  background: url("assets/captech-picto-couleur.svg") center/contain no-repeat; opacity: .08; pointer-events: none;
}
.hero__inner { max-width: 820px; position: relative; z-index: 1; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
@media (max-width: 720px) {
  .hero { padding: var(--space-7) 0; }
  .hero::after { width: 280px; height: 320px; right: -110px; top: 0; }
}

/* Sections */
.section { padding: var(--space-8) 0; }
@media (max-width: 720px) { .section { padding: var(--space-7) 0; } }
.section--tint { background: var(--tint); }
.section--night { background: var(--surface-night); color: var(--blanc); }
.section--night p { color: var(--night-muted); }
.section__head { max-width: 760px; margin-bottom: var(--space-6); }

.cards { display: grid; gap: var(--space-5); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .cards--3 { grid-template-columns: 1fr; } }
.card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-card); }
.card p { color: var(--ink-muted); margin: 0; }

/* Offres */
.offers { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
@media (max-width: 860px) { .offers { grid-template-columns: 1fr; } }
.offer { display: flex; flex-direction: column; gap: var(--space-3); }
.offer h3 { margin: 0; }
.offer .link-arrow { margin-top: auto; padding-top: var(--space-2); }
.offer__icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--tint); display: grid; place-items: center; }
/* Icônes Lucide : trait 1,75 px, extrémités arrondies, couleur du texte qu'elles accompagnent */
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.offer__icon .icon { color: var(--accent); }

/* Étapes de l'audit */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { border: 1px solid var(--night-line); border-radius: var(--radius-lg); padding: var(--space-5); }
.step__num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-pill); border: 2px solid var(--accent-on-night); color: var(--accent-on-night); font: 700 18px/1 var(--font-display); margin-bottom: var(--space-4); }
.step h3 { color: var(--blanc); }
.step p { margin: 0; }

/* Exemples */
.examples { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
@media (max-width: 860px) { .examples { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .examples { grid-template-columns: 1fr; } }
.examples li { display: grid; gap: var(--space-1); padding: var(--space-5) var(--space-5) var(--space-5) 0; border-bottom: 1px solid var(--line); }
.examples strong { font: 700 18px/24px var(--font-display); }
/* Puce en corail : décorative uniquement */
.examples strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--corail); margin-right: 10px; vertical-align: middle; }
.examples span { color: var(--ink-muted); }

/* GARI : garde son propre logo, sans le recolorer */
.gari { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-7); align-items: center; }
@media (max-width: 860px) { .gari { grid-template-columns: 1fr; gap: var(--space-6); } }
.gari p:not(.lead):not(.eyebrow) { color: var(--ink-muted); }
.gari .btn { margin-top: var(--space-2); }
.gari__card {
  display: grid; justify-items: center; gap: var(--space-4); padding: var(--space-7) var(--space-6); text-align: center; text-decoration: none;
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  transition: transform .2s;
}
.gari__card:hover { transform: translateY(-3px); }
.gari__card span { color: var(--ink-muted); font-weight: 500; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-7); align-items: start; }
.contact__mail { font-weight: 600; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; gap: var(--space-6); } }
.form { display: grid; gap: var(--space-4); }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.opt { color: var(--ink-muted); font-weight: 400; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }
.form input:not([type=radio]):not([type=checkbox]), .form textarea {
  width: 100%; font: 400 16px/24px var(--font-sans); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px var(--space-3); background: var(--surface-raised);
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--accent); }
.form [aria-invalid=true] { border-color: var(--signal) !important; }
.form__seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.form__seg legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.form__seg label { display: block; }
.form__seg input { position: absolute; opacity: 0; }
.form__seg span { display: inline-block; padding: 7px var(--space-4); border-radius: var(--radius-pill); border: 1px solid var(--line-strong); cursor: pointer; font-weight: 600; font-size: 14px; }
.form__seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--blanc); }
.form__seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.form__consent { grid-template-columns: auto 1fr; align-items: start; font-weight: 400 !important; color: var(--ink-muted); }
.form__consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.form .btn { justify-self: start; }
.form__status { margin: 0; font-weight: 600; min-height: 1.6em; }
.form__status.is-ok { color: var(--passe); }
.form__status.is-error { color: var(--signal); }
.hp { position: absolute; left: -9999px; }

/* Pied de page : bandeau sombre, logo négatif */
.footer { background: var(--surface-night); color: var(--night-muted); padding: var(--space-7) 0; font-size: 14px; line-height: 20px; }
.footer__inner { display: grid; gap: var(--space-4); justify-items: start; }
.footer__inner p { margin: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.footer nav a { color: var(--blanc); font-weight: 600; text-decoration: none; }
.footer nav a:hover { color: var(--accent-on-night); }
.footer__small { font-size: 12.5px; }

/* Pages légales */
.legal { padding: var(--space-7) 0 var(--space-8); }
.legal h2 { margin-top: var(--space-6); }
.legal p, .legal li { color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
