/* ===== Cythin — thème clair/sombre, couleurs de marque =====
   Le thème suit le mode du navigateur (prefers-color-scheme)
   et peut être forcé via [data-theme] (bouton + localStorage). */

/* ---- Thème CLAIR (défaut) ---- */
:root {
  --bg: #ffffff;
  --bg-alt: #eef5fa;
  --surface: #ffffff;
  --border: #d7e3ed;
  --text: #0b2436;
  --muted: #566b7d;
  --accent: #0ea5c4;          /* cyan Cythin — usages décoratifs (bordures, icônes, dégradés) */
  --accent-text: #097089;     /* cyan foncé pour le TEXTE sur fond clair (AA ≥ 4.5:1) */
  --accent-2: #2563eb;
  --on-accent: #ffffff;
  --btn-from: #0a7d95;        /* dégradé bouton primaire : texte blanc lisible (AA) */
  --btn-to: #2563eb;
  --ok-text: #0d7a57;
  --err-text: #c0392b;
  --accent-soft: rgba(14, 165, 196, 0.10);
  --accent-border: rgba(14, 165, 196, 0.35);
  --hero-from: #e7f6fb;
  --hero-to: #d3e9f5;
  --grid-line: rgba(11, 36, 54, 0.06);
  --mark-opacity: 0.06;
  --shadow: 0 20px 50px rgba(11, 36, 54, 0.12);
  --header-bg: rgba(255, 255, 255, 0.85);

  --radius: 14px;
  --maxw: 1140px;
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---- Thème SOMBRE ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #06131f;
    --bg-alt: #0a1e2e;
    --surface: #0f2536;
    --border: #1e3a4f;
    --text: #e9f3fa;
    --muted: #93aabd;
    --accent: #22c5e8;
    --accent-text: #22c5e8;
    --accent-2: #4f8cff;
    --on-accent: #04121a;
    --btn-from: #22c5e8;
    --btn-to: #4f8cff;
    --ok-text: #16c088;
    --err-text: #ff6b6f;
    --accent-soft: rgba(34, 197, 232, 0.12);
    --accent-border: rgba(34, 197, 232, 0.35);
    --hero-from: #0a2130;
    --hero-to: #061321;
    --grid-line: rgba(120, 170, 200, 0.10);
    --mark-opacity: 0.10;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(6, 19, 31, 0.85);
  }
}
:root[data-theme="dark"] {
  --bg: #06131f;
  --bg-alt: #0a1e2e;
  --surface: #0f2536;
  --border: #1e3a4f;
  --text: #e9f3fa;
  --muted: #93aabd;
  --accent: #22c5e8;
  --accent-text: #22c5e8;
  --accent-2: #4f8cff;
  --on-accent: #04121a;
  --btn-from: #22c5e8;
  --btn-to: #4f8cff;
  --ok-text: #16c088;
  --err-text: #ff6b6f;
  --accent-soft: rgba(34, 197, 232, 0.12);
  --accent-border: rgba(34, 197, 232, 0.35);
  --hero-from: #0a2130;
  --hero-to: #061321;
  --grid-line: rgba(120, 170, 200, 0.10);
  --mark-opacity: 0.10;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(6, 19, 31, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Logo swap selon le thème ---- */
.logo--dark { display: none; }
.logo--light { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo--light { display: none; }
  :root:not([data-theme="light"]) .logo--dark { display: block; }
}
:root[data-theme="dark"] .logo--light { display: none; }
:root[data-theme="dark"] .logo--dark { display: block; }
:root[data-theme="light"] .logo--light { display: block; }
:root[data-theme="light"] .logo--dark { display: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: 9px 18px; font-size: 0.85rem; }
.btn--primary {
  background: linear-gradient(135deg, var(--btn-from), var(--btn-to));
  color: var(--on-accent); box-shadow: 0 10px 26px rgba(14, 165, 196, 0.28);
}
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-text); }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; }
.brand__logo { height: 34px; width: auto; }
.nav { display: flex; gap: 26px; margin-left: 28px; margin-right: auto; }
.nav a { color: var(--muted); font-size: 0.95rem; font-weight: 500; transition: color .2s; }
.nav a:hover { color: var(--accent-text); }
.header__actions { display: flex; align-items: center; gap: 12px; }

/* Icon button (theme toggle) */
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
:root[data-theme="light"] .icon-sun { display: block; }
:root[data-theme="light"] .icon-moon { display: none; }

/* Language switcher */
.lang { position: relative; }
.lang__toggle {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 700;
}
.lang__toggle:hover { border-color: var(--accent); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  list-style: none; min-width: 150px; padding: 6px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s ease;
}
.lang.open .lang__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang__menu button {
  width: 100%; text-align: left; background: none; border: none; color: var(--text);
  padding: 9px 12px; border-radius: 7px; cursor: pointer; font-size: 0.9rem;
}
.lang__menu button:hover { background: var(--accent-soft); color: var(--accent-text); }

/* Mobile nav toggle */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 104px 0 88px; }
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 72% 12%, var(--accent-soft), transparent 45%),
    linear-gradient(160deg, var(--hero-from), var(--hero-to));
}
.hero__bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 55%, transparent 100%);
}
.hero__mark {
  position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  width: 520px; max-width: 60%; opacity: var(--mark-opacity); filter: grayscale(0.2);
}
.hero__inner { position: relative; z-index: 1; text-align: center; max-width: 830px; margin: 0 auto; }
.badge {
  display: inline-block; font-size: 0.82rem; color: var(--accent-text);
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 26px; font-weight: 700;
}
.hero__title { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.1; letter-spacing: -0.5px; font-weight: 900; }
.hero__subtitle { color: var(--muted); font-size: 1.15rem; margin: 20px auto 34px; max-width: 640px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__stats { display: flex; justify-content: center; gap: 46px; list-style: none; margin-top: 56px; flex-wrap: wrap; }
.hero__stats strong { display: block; font-size: 1.7rem; color: var(--text); }
.hero__stats span { color: var(--muted); font-size: 0.9rem; }

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 660px; margin: 0 auto 52px; }
.section__head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -0.5px; font-weight: 900; }
.section__head p { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }
.eyebrow { color: var(--accent-text); font-weight: 700; font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase; }

/* Grid */
.grid { display: grid; gap: 22px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* Cards */
.card, .feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover, .feature:hover { transform: translateY(-4px); border-color: var(--accent-border); box-shadow: var(--shadow); }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 16px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
}
.card__icon svg { width: 24px; height: 24px; }
.card h3, .feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p, .feature p { color: var(--muted); font-size: 0.95rem; }
.card { display: flex; flex-direction: column; }
.card__more { margin-top: auto; padding-top: 14px; color: var(--accent-text); font-weight: 700; font-size: 0.9rem; }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split__text h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 10px 0 16px; font-weight: 900; }
.split__text p { color: var(--muted); }
.checklist { list-style: none; margin: 22px 0 28px; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; color: var(--text); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-size: 0.75rem; font-weight: 700;
}
.split__visual { display: grid; place-items: center; }
.ring {
  width: 240px; height: 240px; border-radius: 50%; display: grid; place-items: center; text-align: center;
  font-weight: 700; color: var(--accent-text); border: 2px solid var(--accent-border);
  box-shadow: 0 0 0 12px var(--accent-soft), inset 0 0 40px var(--accent-soft);
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
}

/* Pricing */
.plan {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; position: relative; display: flex; flex-direction: column;
}
.plan--popular { border-color: var(--accent); box-shadow: var(--shadow); }
.plan__tag {
  position: absolute; top: -12px; right: 22px; background: var(--accent); color: var(--on-accent);
  font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.plan h3 { font-size: 1.3rem; }
.plan__meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }
.plan__price { margin-bottom: 4px; }
.plan__price strong { font-size: 2rem; }
.plan__price span { color: var(--muted); font-size: 0.9rem; }
.plan__days { color: var(--accent-text); font-weight: 700; font-size: 0.9rem; margin-bottom: 20px; }
.plan__list { list-style: none; display: grid; gap: 10px; margin-bottom: 26px; flex: 1; }
.plan__list li { position: relative; padding-left: 24px; color: var(--muted); font-size: 0.92rem; }
.plan__list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-text); font-weight: 700; }
.plan .btn { width: 100%; }
.pricing__note { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 26px; font-style: italic; }

/* Contact */
.contact__list { list-style: none; margin: 22px 0 14px; display: grid; gap: 10px; }
.contact__list a { color: var(--accent-text); }
.contact__form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; display: grid; gap: 16px;
}
.contact__form label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 700; }
.contact__form input, .contact__form textarea {
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px;
  color: var(--text); font: inherit; font-weight: 400; resize: vertical;
}
.contact__form input:focus, .contact__form textarea:focus { outline: none; border-color: var(--accent); }
.form__hint { color: var(--muted); font-size: 0.8rem; }

/* Honeypot anti-spam (masqué aux humains) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Case de consentement */
.contact__form label.consent { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.contact__form label.consent input { width: auto; flex: 0 0 auto; margin-top: 2px; accent-color: var(--accent); }
.contact__form label.consent span { flex: 1; }

/* Message de statut */
.form__status { font-size: 0.9rem; font-weight: 600; padding: 10px 12px; border-radius: 8px; }
.form__status--info { color: var(--muted); background: var(--accent-soft); }
.form__status--ok { color: var(--ok-text); background: rgba(18, 163, 115, 0.14); }
.form__status--err { color: var(--err-text); background: rgba(229, 72, 77, 0.14); }

/* ===== Accessibilité ===== */
/* Lien d'évitement : visible uniquement au focus clavier */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--btn-from); color: var(--on-accent);
  padding: 10px 16px; border-radius: 8px; font-weight: 700; transition: top .2s ease;
}
.skip-link:focus { top: 8px; }

/* Indicateur de focus clavier net et contrasté */
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; border-radius: 4px; }
.contact__form input:focus-visible, .contact__form textarea:focus-visible { outline-offset: 1px; }

/* Respecte la préférence « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .btn:hover, .card:hover, .feature:hover { transform: none; }
}

/* ===== Footer ===== */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 56px 0 24px; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__logo { height: 40px; width: auto; max-width: 220px; }
.footer__brand { gap: 14px; }
.footer__col h4 { font-size: 0.95rem; margin-bottom: 4px; }
.footer__col a, .footer__col span { color: var(--muted); font-size: 0.9rem; transition: color .2s; }
.footer__col a:hover { color: var(--accent-text); }
.footer__brand p { color: var(--muted); font-size: 0.9rem; }
.footer__social { display: inline-flex; align-items: center; gap: 7px; }
.footer__social svg { flex: 0 0 auto; }
.footer__bottom {
  border-top: 1px solid var(--border); margin-top: 40px; padding-top: 22px;
  color: var(--muted); font-size: 0.85rem;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.footer__legal { display: flex; gap: 14px; flex-wrap: wrap; }
.footer__legal a { color: var(--muted); transition: color .2s; }
.footer__legal a:hover { color: var(--accent-text); }

/* ===== Pages légales ===== */
.legal-back { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color .2s; }
.legal-back:hover { color: var(--accent-text); }
.legal-main { max-width: 820px; margin: 0 auto; padding: 56px 24px 80px; }
.legal-main h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -0.5px; }
.legal-main .updated { color: var(--muted); font-size: 0.85rem; margin: 8px 0 32px; }
.legal-main h2 { font-size: 1.2rem; margin: 34px 0 10px; }
.legal-main p, .legal-main li { color: var(--muted); }
.legal-main ul { padding-left: 20px; margin: 10px 0; display: grid; gap: 6px; }
.legal-main a { color: var(--accent-text); }
.legal-main .todo {
  background: var(--accent-soft); color: var(--accent-text);
  padding: 1px 7px; border-radius: 5px; font-weight: 500; white-space: nowrap;
}
/* Bloc d'appel à l'action des pages service */
.service-cta {
  margin-top: 44px; padding: 32px 28px; text-align: center;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
}
.service-cta h2 { margin-bottom: 18px; }
.service-cta .btn { margin: 4px 6px; }

/* ===== Parcours audit flash (wizard) ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.audit-main { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }
.audit-main .eyebrow { display: block; margin-bottom: 6px; }
.audit-main h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -0.5px; margin: 0 0 12px; }
.audit-intro { color: var(--muted); margin-bottom: 28px; }
.wizard { gap: 0; }
.wizard__progress { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; }
.wizard__progress li { flex: 1; height: 6px; border-radius: 999px; background: var(--border); transition: background .2s; }
.wizard__progress li.active, .wizard__progress li.done { background: var(--accent); }
.wizard__steplabel { color: var(--muted); font-size: .9rem; font-weight: 700; margin: 0 0 20px; }
.step { border: 0; padding: 0; margin: 0; min-inline-size: auto; display: none; gap: 16px; }
.step.active { display: grid; }
.field-help { color: var(--muted); font-size: .8rem; font-weight: 400; }
.contact__form label span em { color: var(--accent-text); font-style: normal; }
.wizard__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.wizard__nav .btn { min-width: 130px; }
#nextBtn { margin-left: auto; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .hero__mark { display: none; }
}
@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 12px 24px;
    transform: translateY(-120%); transition: transform .25s ease; z-index: 40;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 480px) {
  .grid--4 { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__stats { gap: 28px; }
  .brand__logo { height: 28px; }
}
