/* ============================================================
   Breizh Connect — style.css
   Design sombre premium · turquoise #41ddd0 · clair via html.light
   ============================================================ */

/* ---------- Polices (variables, self-hosted) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Sombre par défaut */
  --bg: #16181c;
  --bg-soft: #1a1d22;
  --bg-raised: #1f232a;
  --border: #2c3038;
  --border-strong: #373c46;
  --text: #f5f6f7;
  --text-muted: #b4b8bf;
  --text-faint: #7d828b;
  --primary: #41ddd0;
  --primary-strong: #54e0d4;
  --primary-ink: #0c211f;
  --primary-soft: rgba(65, 221, 208, 0.09);
  --primary-glow: rgba(65, 221, 208, 0.28);
  --gradient-primary: linear-gradient(135deg, #41ddd0, #6ae8dd);
  --shadow-card: 0 4px 24px -6px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 8px 40px -8px var(--primary-glow);
  --radius: 12px;
  --radius-lg: 18px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 68px;
  color-scheme: dark;
}
html.light {
  --bg: #ffffff;
  --bg-soft: #f4f5f7;
  --bg-raised: #ffffff;
  --border: #e4e6ea;
  --border-strong: #d4d7dd;
  --text: #1d2026;
  --text-muted: #4b5058;
  --text-faint: #6b7280;
  --primary: #17b8ab;
  --primary-strong: #109c91;
  --primary-ink: #ffffff;
  --primary-soft: rgba(23, 184, 171, 0.08);
  --primary-glow: rgba(23, 184, 171, 0.22);
  --gradient-primary: linear-gradient(135deg, #17b8ab, #2ccabe);
  --shadow-card: 0 4px 20px -4px rgba(29, 32, 38, 0.1);
  --shadow-glow: 0 8px 32px -8px var(--primary-glow);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-text);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--primary); color: var(--primary-ink); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.18rem; font-weight: 600; }

.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
section { padding: 84px 0; }
.section-tight { padding: 56px 0; }

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--text-muted); margin-top: 14px; font-size: 1.05rem; }
.accent { color: var(--primary); }
.grad-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--text-muted); }
.prose p + p { margin-top: 14px; }
.prose a { color: var(--primary); text-decoration: none; border-bottom: 1px solid var(--primary-glow); }
.prose a:hover { border-bottom-color: var(--primary); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }
.logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.22rem;
  text-decoration: none; letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo span { color: var(--primary); }
.main-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.main-nav a {
  display: block; padding: 8px 12px;
  font-size: 0.92rem; font-weight: 500;
  color: var(--text-muted); text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.main-nav a:hover { color: var(--text); }
.main-nav a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  cursor: pointer; display: grid; place-items: center;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html.light .theme-toggle .icon-sun { display: block; }
html.light .theme-toggle .icon-moon { display: none; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  background: none; border: 1px solid var(--border); border-radius: 9px;
  cursor: pointer; position: relative;
}
.menu-toggle span {
  position: absolute; left: 10px; right: 10px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle span:nth-child(1) { top: 13px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px;
  font-family: var(--font-text); font-size: 0.98rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border-radius: 10px; border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--gradient-primary); color: var(--primary-ink); box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 48px -8px var(--primary-glow); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 84px) 0 96px;
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% -5%, var(--primary-glow), transparent 68%),
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(#000 30%, transparent 95%);
  mask-image: linear-gradient(#000 30%, transparent 95%);
  pointer-events: none;
}
.hero .container { position: relative; max-width: 880px; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { font-size: 1.13rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-badges {
  display: flex; gap: 22px; justify-content: center; flex-wrap: wrap;
  margin-top: 42px; font-size: 0.88rem; color: var(--text-faint);
}
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; }
.hero-badges svg { color: var(--primary); flex-shrink: 0; }

/* Hero interne (pages) */
.page-hero { padding: calc(var(--header-h) + 64px) 0 56px; text-align: center; position: relative; overflow: hidden; }
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 55% at 50% -10%, var(--primary-glow), transparent 70%);
  opacity: 0.55; pointer-events: none;
}
.page-hero .container { position: relative; max-width: 820px; }
.page-hero h1 { margin-bottom: 18px; }
.page-hero .lead { font-size: 1.08rem; color: var(--text-muted); margin-bottom: 30px; }

/* ---------- Cartes ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--primary-glow); box-shadow: var(--shadow-glow); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.97rem; }
.card-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card-static:hover { transform: none; box-shadow: var(--shadow-card); border-color: var(--border); }

/* ---------- Étapes numérotées ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 66px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 2px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid var(--primary-glow);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  display: grid; place-items: center;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.97rem; }

/* ---------- Listes cochées ---------- */
.checklist { list-style: none; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; color: var(--text-muted); }
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary-soft);
  border: 1px solid var(--primary);
}
.checklist li::after {
  content: "";
  position: absolute; left: 4.5px; top: 10.5px;
  width: 7px; height: 4px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}
.checklist-2col { grid-template-columns: repeat(2, 1fr); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s ease;
}
.faq-item[open] { border-color: var(--primary-glow); }
.faq-item summary {
  cursor: pointer; list-style: none;
  padding: 20px 52px 20px 24px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--primary);
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding: 0 24px 20px; color: var(--text-muted); font-size: 0.97rem; }

/* ---------- Portfolio ---------- */
.project-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.project-card figure { position: relative; aspect-ratio: 16 / 9.2; overflow: hidden; background: var(--bg-raised); }
.project-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s ease; }
.project-card:hover img { transform: scale(1.04); }
.project-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-body h3 a { text-decoration: none; color: var(--text); }
.project-body h3 a:hover { color: var(--primary); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.tag {
  font-size: 0.76rem; font-weight: 600;
  padding: 4px 11px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid var(--primary-glow);
}

/* ---------- Témoignages ---------- */
.review-card { display: flex; flex-direction: column; gap: 12px; }
.review-head { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid var(--primary-glow);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700;
}
.review-head strong { display: block; font-size: 0.95rem; }
.review-head small { color: var(--text-faint); font-size: 0.8rem; }
.stars { color: #f5c542; letter-spacing: 2px; font-size: 0.9rem; }
.review-card blockquote { color: var(--text-muted); font-size: 0.94rem; font-style: normal; }

/* ---------- Bandeau chiffres / résultats ---------- */
.stats-band {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 38px 30px;
  text-align: center;
}
.stats-band .num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats-band .lbl { font-size: 0.85rem; color: var(--text-faint); margin-top: 6px; }

/* ---------- CTA final ---------- */
.cta-band {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 34px;
  text-align: center;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 90% at 50% 120%, var(--primary-glow), transparent 70%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); margin-bottom: 26px; }

/* ---------- Formulaire ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field input, .field textarea {
  font: inherit; color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-note { font-size: 0.82rem; color: var(--text-faint); }
.form-status { display: none; padding: 14px 16px; border-radius: 10px; font-size: 0.95rem; margin-top: 4px; }
.form-status.ok { display: block; background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-glow); }
.form-status.err { display: block; background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.contact-info { display: grid; gap: 16px; }
.contact-info .card { display: flex; align-items: flex-start; gap: 16px; padding: 22px; }
.contact-info .card-icon { width: 44px; height: 44px; margin: 0; flex-shrink: 0; }
.contact-info h3 { font-size: 1rem; margin-bottom: 3px; }
.contact-info p, .contact-info a { color: var(--text-muted); font-size: 0.95rem; text-decoration: none; }
.contact-info a:hover { color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 56px 0 28px;
  font-size: 0.93rem;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer h4 {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-faint); margin-bottom: 16px;
}
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer a { color: var(--text-muted); text-decoration: none; transition: color 0.2s ease; }
.site-footer a:hover { color: var(--primary); }
.footer-brand p { color: var(--text-muted); margin-top: 12px; max-width: 340px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--text-faint); font-size: 0.83rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.84rem; color: var(--text-faint); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- Révélations au scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  section { padding: 60px 0; }
  .grid-2, .grid-3, .checklist-2col, .form-grid { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* Navigation : bascule en menu burger des 1100px. Avec 8 entrees, la barre
   debordait sur deux lignes entre 1000 et 1150px. */
@media (max-width: 1100px) {
  .menu-toggle { display: block; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { padding: 12px 10px; font-size: 1rem; }
}
@media (max-width: 720px) {
  .header-cta { display: none; }
}
