/* BCT – site vitrine
   Mise en page : colonnes de 1240 px, sections séparées par des filets fins, accent rouge BCT. */
:root {
  --bg: #0B0B0D;
  --bg-2: #0F0F12;
  --surface: #121215;
  --text: #EDEAE4;
  --text-2: #CFCBC4;
  --muted: #B9B5AE;
  --mute-2: #A19D96;
  --dim: #8C8882;
  --line: rgba(237, 234, 228, 0.10);
  --line-2: rgba(237, 234, 228, 0.16);
  --red: #D3131B;
  --red-2: #F2555B;
  --green: #3FCF8E;

  --f-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --f-serif: "Instrument Serif", Georgia, serif;

  --wrap: 1240px;
  --radius: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
p { margin: 0; }
a { color: var(--red-2); }
a:hover { color: #FF8A8E; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-2); outline-offset: 3px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 6px; }
.skip:focus { top: 16px; }

.mono { font-family: var(--f-mono); font-size: 13px; }
.serif { font-family: var(--f-serif); font-weight: 400; letter-spacing: -0.01em; }
em.serif { font-style: italic; }
.red { color: var(--red-2); }
.muted { color: var(--mute-2); }
.dim { color: var(--dim); }
.small { font-size: 12px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
  padding: 16px 26px; border-radius: 6px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .25s, background-color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-1px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: #E3232B; color: #fff; }
.btn--light { background: var(--text); color: var(--bg); padding: 11px 18px; font-size: 15px; }
.btn--light:hover { color: var(--bg); background: #fff; }
.btn--ghost { border-color: rgba(237, 234, 228, 0.22); color: var(--text); font-weight: 500; }
.btn--ghost:hover { color: var(--text); border-color: var(--red-2); }
.btn--block { width: 100%; }

/* En-tête */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero__dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(237, 234, 228, 0.13) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
}
.hero__glow {
  position: absolute; width: 640px; height: 640px; right: -160px; top: -220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(211, 19, 27, 0.30), transparent 65%);
  animation: drift 16s ease-in-out infinite;
}

.nav { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__txt strong { font-weight: 600; font-size: 16px; letter-spacing: 0.14em; }
.brand__txt small { font-family: var(--f-mono); font-size: 11px; color: var(--mute-2); }
.nav__menu { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav__menu a:not(.btn) { color: var(--text-2); text-decoration: none; padding: 10px 0; }
.nav__menu a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 6px; background: transparent; cursor: pointer; position: relative; }
.nav__bar, .nav__bar::before, .nav__bar::after { position: absolute; left: 12px; width: 18px; height: 1.5px; background: var(--text); content: ""; transition: transform .25s, opacity .25s; }
.nav__bar { top: 21px; }
.nav__bar::before { left: 0; top: -6px; }
.nav__bar::after { left: 0; top: 6px; }
.nav__toggle[aria-expanded="true"] .nav__bar { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__bar::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bar::after { transform: translateY(-6px) rotate(-45deg); }

.hero__body { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 104px; }
.hero__text { flex: 1 1 560px; min-width: 0; }
.hero h1 { margin-top: 22px; font-size: clamp(2.5rem, 5.4vw, 4.6rem); line-height: 1.04; letter-spacing: -0.03em; }
.hero h1 em { font-family: var(--f-serif); font-weight: 400; letter-spacing: -0.01em; }
.rule { height: 1px; width: 120px; background: var(--red); margin-top: 30px; transform-origin: left; animation: grow 1.4s cubic-bezier(.2, .7, .2, 1) .5s both; }
.lead { margin-top: 26px; font-size: 19px; color: var(--muted); max-width: 540px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }

.editor { flex: 1 1 420px; min-width: 0; border: 1px solid rgba(237, 234, 228, 0.12); background: rgba(18, 18, 21, 0.85); border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.editor__tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.editor__tabs button { font: inherit; font-family: var(--f-mono); font-size: 13px; padding: 14px 18px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--dim); cursor: pointer; }
.editor__tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: inset 0 -2px 0 var(--red); }
.editor__tabs button:hover { color: var(--text); }
.editor__code { padding: 22px 24px 26px; font-family: var(--f-mono); font-size: 14px; line-height: 1.9; min-height: 236px; }
.editor__code .ln { display: flex; gap: 16px; animation: type .35s ease both; }
.editor__code .n { color: #5E5B56; width: 18px; text-align: right; flex: none; }
.editor__code .k { color: var(--red-2); }
.editor__code .p { color: #7E7A74; }
.caret { display: inline-block; width: 8px; height: 16px; background: var(--red-2); vertical-align: -3px; animation: blink 1.1s steps(1) infinite; }
.editor__hint { padding: 12px 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }

/* Engagements */
.stats { border-bottom: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 30px 24px; border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; padding-right: 0; }
.stat p:not(.stat__big):not(.mono) { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.stat__big { font-size: 52px; line-height: 1; }
.stat__unit { font-family: var(--f-sans); font-size: 15px; color: var(--mute-2); }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 8px; animation: live 2s ease-in-out infinite; }
.clocks { margin-top: 10px; font-size: 15px; line-height: 1.75; color: var(--text); font-variant-numeric: tabular-nums; }

/* Sections */
.section { padding-top: 104px; padding-bottom: 24px; }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; }
.section h2, .faq h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; max-width: 720px; }
.sub { margin-top: 14px; font-size: 17px; color: var(--muted); max-width: 640px; }
.lift { transition: border-color .3s, transform .3s, background-color .3s; }
.lift:hover { border-color: rgba(242, 85, 91, 0.5); transform: translateY(-3px); }

.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); margin-top: 48px; border-top: 1px solid var(--line); }
.mode { border: 1px solid transparent; border-bottom-color: var(--line); padding: 34px 28px 34px 0; display: flex; flex-direction: column; gap: 14px; }
.mode h3 { font-size: 26px; letter-spacing: -0.01em; }
.mode p:not(.mono) { font-size: 16px; line-height: 1.65; color: var(--muted); }

.config { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 44px; }
.config__choices { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 30px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font: inherit; font-size: 15px; padding: 10px 16px; border-radius: 6px; cursor: pointer; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); transition: border-color .2s, background-color .2s, color .2s; min-height: 44px; }
.chip:hover { border-color: rgba(242, 85, 91, 0.6); }
.chip[aria-pressed="true"] { border-color: var(--red); background: rgba(211, 19, 27, 0.16); color: #fff; }
.config__out { flex: 1 1 340px; min-width: 0; border: 1px solid rgba(237, 234, 228, 0.14); background: var(--surface); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.json { margin: 0; font-size: 14px; line-height: 1.85; color: var(--text); white-space: pre-wrap; overflow-x: auto; }
.json .k { color: var(--red-2); }
.json.flash { animation: flash .5s ease; }
.config__out .btn { margin-top: auto; font-size: 15px; padding: 15px 20px; }

.techs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; margin-top: 44px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tech { background: var(--bg); border: 1px solid transparent; padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.tech h3 { font-size: 24px; letter-spacing: -0.01em; }
.tech p:last-child { margin-top: 4px; font-size: 15px; line-height: 1.55; color: var(--muted); }

.steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps li { border-top: 1px solid rgba(237, 234, 228, 0.18); padding: 22px 24px 0 0; display: flex; flex-direction: column; gap: 8px; }
.steps h3 { font-size: 19px; }
.steps p:last-child { font-size: 15px; line-height: 1.55; color: var(--muted); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; margin-top: 44px; }
.plan { border: 1px solid rgba(237, 234, 228, 0.12); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 4px; }
.plan--hl { border-color: rgba(211, 19, 27, 0.55); background: rgba(211, 19, 27, 0.06); }
.plan h3 { font-size: 21px; }
.plan__price { margin-top: 24px; font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; }
.plan .mono.red { margin-top: 8px; font-size: 14px; }
.plan p:last-child { margin-top: 16px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.note { margin-top: 14px; }

.faq { display: flex; flex-wrap: wrap; gap: 32px 72px; }
.faq__head { flex: 1 1 320px; min-width: 0; }
.faq__head .mono { margin-top: 14px; }
.faq__list { flex: 999 1 560px; min-width: 0; border-top: 1px solid rgba(237, 234, 228, 0.14); }
details { border-bottom: 1px solid rgba(237, 234, 228, 0.14); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font-size: 18px; font-weight: 500; }
summary::-webkit-details-marker { display: none; }
summary:hover { color: #fff; }
.plus { flex: none; font-family: var(--f-mono); font-size: 22px; color: var(--red-2); transition: transform .25s; }
details[open] .plus { transform: rotate(45deg); }
details p { margin: 0 0 22px; font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 640px; }

/* Contact */
.contact { margin-top: 110px; border-top: 1px solid var(--line); background: var(--bg-2); }
.contact__grid { display: flex; flex-wrap: wrap; gap: 48px 72px; padding-top: 100px; padding-bottom: 100px; }
.contact__info { flex: 1 1 360px; min-width: 0; }
.contact__title { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.04; letter-spacing: -0.03em; }
.card-id { margin-top: 40px; display: flex; flex-direction: column; gap: 4px; line-height: 1.7; }
.card-id__name { font-weight: 600; font-size: 18px; }
.card-id a { color: var(--text); font-size: 15px; width: fit-content; }
.form { flex: 1 1 460px; min-width: 0; border: 1px solid rgba(237, 234, 228, 0.12); background: var(--bg); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--f-mono); font-size: 13px; color: var(--mute-2); }
.field input, .field textarea { font: inherit; padding: 13px 14px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); width: 100%; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--red-2); outline: none; box-shadow: 0 0 0 3px rgba(242, 85, 91, 0.2); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red-2); }
.form .btn { align-self: flex-start; }
.form__status { font-size: 15px; min-height: 1.5em; }
.form__status.ok { color: #8FDDB4; }
.form__status.err { color: var(--red-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.footer { border-top: 1px solid var(--line); color: var(--dim); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 28px; padding-bottom: 28px; font-size: 14px; }

/* Animations */
.in { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .31s; } .d4 { animation-delay: .44s; } .d5 { animation-delay: .6s; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, 30px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes live { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes type { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { background: rgba(211, 19, 27, 0.18); } 100% { background: transparent; } }

/* Tablette et mobile */
@media (max-width: 900px) {
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 26px 20px; border-bottom: 1px solid var(--line); }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(even) { border-right: 0; padding-right: 0; }
  .stat:nth-child(n+3) { border-bottom: 0; }
}
@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__menu {
    display: none; position: absolute; top: 100%; left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a:not(.btn) { padding: 12px 10px; }
  .nav__menu .btn { margin-top: 6px; }
  .hero__body { padding-top: 40px; padding-bottom: 72px; gap: 40px; }
  .section { padding-top: 80px; }
}
@media (max-width: 520px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .stats__grid { grid-template-columns: 1fr; }
  .stat, .stat:nth-child(odd), .stat:nth-child(even) { padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .stat__big { font-size: 44px; }
  .lead { font-size: 17px; }
  .editor__tabs button { flex: 1 1 auto; padding: 12px 8px; font-size: 11.5px; }
  .editor__code { font-size: 13px; padding: 18px; }
  .mode { padding-right: 0; }
  .plan, .form, .config__out { padding: 24px; }
  .contact__grid { padding-top: 72px; padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
