/* ==========================================================================
   TCA Electronics – tcaelectronics.ch
   Desktop calé sur le mockup (gabarit 1280px). Mobile / tablette en dessous.
   ========================================================================== */

:root {
  --bg: #060a14;
  --bg-soft: #0a0f1c;
  --text: #ffffff;
  --text-soft: #c9d0de;
  --blue: #1e86ff;
  --blue-light: #4fb0ff;
  --line: rgba(130, 160, 210, 0.22);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-brand: "Michroma", "Poppins", sans-serif;
  --maxw: 1280px;
}

*, *::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(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

.accent {
  background: linear-gradient(90deg, #1a7cff 0%, #3fa3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--blue);
}

/* --- Icônes (sprite SVG inline) ------------------------------------------ */
.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: url(#ig);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--cur { stroke: currentColor; }

/* --- Boutons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(110, 175, 255, 0.75);
  background: linear-gradient(180deg, #1f7bf0 0%, #0b4fc4 100%);
  box-shadow: 0 0 18px rgba(30, 120, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); box-shadow: 0 0 26px rgba(30, 120, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .contact-list a:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 3px;
}
.btn-sm { height: 40px; padding: 0 20px; font-size: 13.2px; }
.btn-sm .icon { width: 20px; height: 20px; stroke-width: 1.7; }
.btn-lg { height: 47px; width: 253px; font-size: 17.8px; }
.btn-lg .icon { width: 20px; height: 20px; stroke-width: 2.2; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #080c18 0%, #0b101e 100%);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  height: 84px;
  margin: 0 auto;
  padding: 0 24px 0 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 116px; height: auto; }
.brand-name {
  font-family: var(--font-brand);
  text-transform: uppercase;
  font-size: 15.5px;
  letter-spacing: .27em;
  color: #e6eaf3;
  line-height: 1;
  padding-top: 3px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(180deg, #070c19 0%, #0d1930 60%, #060a14 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
/* La photo occupe la droite et se fond dans le bleu nuit derrière le logo et le titre */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0; bottom: 0; right: 0;
  left: calc(50% - 150px);
  background: url("assets/img/hero.jpg") left 60% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .3) 18%, rgba(0, 0, 0, .65) 38%, #000 60%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .3) 18%, rgba(0, 0, 0, .65) 38%, #000 60%);
}
.hero-inner {
  max-width: var(--maxw);
  height: 422px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
}
.hero-logo {
  width: 328px;
  height: auto;
  margin: 82px 0 0 66px;
  flex: none;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .45));
}
.hero-sep {
  flex: none;
  width: 2px;
  height: 137px;
  margin: 96px 0 0 17px;
  background: linear-gradient(180deg, rgba(40, 140, 255, 0) 0%, #2b8dff 35%, #2b8dff 65%, rgba(40, 140, 255, 0) 100%);
  opacity: .9;
}
.hero-text { margin-left: 28px; padding-top: 90px; }
.hero-text h1 {
  font-weight: 600;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}
.hero-text h1 span.l1 { display: block; font-size: 37.7px; line-height: 44px; }
.hero-text h1 span.l2 { display: block; font-size: 41.5px; line-height: 46px; }
.hero-tags {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20.7px;
  line-height: 30px;
  color: #eef2fa;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
.hero-tags i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2b8dff;
  box-shadow: 0 0 8px rgba(43, 141, 255, .9);
}
.hero-text .btn { margin-top: 30px; margin-left: -1px; }

/* ==========================================================================
   Services
   ========================================================================== */
.services { padding: 21px 0 0; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  font-size: 36.9px;
  line-height: 44px;
  font-weight: 600;
  text-align: center;
}
.section-title::before,
.section-title::after {
  content: "";
  height: 2px;
  width: 230px;
  flex: none;
  margin-top: 6px;
  background: linear-gradient(90deg, rgba(30, 134, 255, 0), #1e86ff 45%, #1e86ff);
  box-shadow: 0 0 10px rgba(30, 134, 255, .55);
  opacity: .9;
}
.section-title::after { transform: scaleX(-1); }

.cards {
  max-width: var(--maxw);
  margin: 30px auto 0;
  padding: 0 29px 0 32px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 11px;
}

.card {
  position: relative;
  height: 348px;
  padding: 159px 8px 14px;
  text-align: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .11);
  background: linear-gradient(180deg, #0c1220 0%, #080c17 100%);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.card-photo {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 182px;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
}
.card-icon {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  stroke-width: 1.25;
  filter: drop-shadow(0 0 6px rgba(30, 134, 255, .55));
}
.card h3 {
  position: relative;
  margin-top: 8px;
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
}
.card p {
  position: relative;
  margin: 9px auto 0;
  font-size: 14.15px;
  line-height: 20px;
  color: var(--text-soft);
  white-space: nowrap;
}

/* ==========================================================================
   Instruments + véhicule (ajouts client, hors mockup)
   ========================================================================== */
.instruments { padding: 56px 0 0; scroll-margin-top: 84px; }
.instruments-inner {
  max-width: var(--maxw);
  margin: 30px auto 0;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.photo-frame {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .11);
}
.instruments-photo { height: auto; }
.instruments-text h3 {
  font-size: 26px;
  line-height: 35px;
  font-weight: 600;
}
.instruments-text h3 .accent { display: block; }
.instruments-text p {
  margin-top: 16px;
  font-size: 15.5px;
  line-height: 26px;
  color: var(--text-soft);
}
.instruments-text .instruments-motto {
  margin-top: 22px;
  padding-left: 18px;
  border-left: 3px solid var(--blue);
  font-size: 17px;
  font-weight: 500;
  color: #fff;
}

.vehicle { max-width: var(--maxw); margin: 0 auto; padding: 56px 32px 0; }
.vehicle img { height: auto; aspect-ratio: 2.15; object-fit: cover; object-position: center 78%; }

/* ==========================================================================
   Solutions / À propos
   ========================================================================== */
.solutions {
  scroll-margin-top: 84px;
  position: relative;
  min-height: calc(344px + max(0px, (100vw - 1280px) * .14));
  padding-top: 57px;
  background: var(--bg);
}
/* Ciel + chaîne de montagnes : le ciel se fond vers le haut, les sommets restent entiers */
.solutions::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: min(100%, max(283px, 22.1vw));
  background: url("assets/img/montagnes.jpg?v=3") center bottom / cover no-repeat;
  filter: brightness(1.12);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .55) 28%, #000 55%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .55) 28%, #000 55%);
  pointer-events: none;
}
.solutions-top, .features { z-index: 1; }
.solutions-top {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
}
.solutions-title {
  position: relative;
  flex: none;
  margin-left: 65px;
  padding-left: 36px;
  font-weight: 600;
}
.solutions-title span.l1 { display: block; font-size: 36.6px; line-height: 40px; }
.solutions-title span.l2 { display: block; font-size: 40.3px; line-height: 40px; }
.solutions-title::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 3px; height: 78px;
  background: linear-gradient(180deg, rgba(30, 134, 255, 0), #1e86ff 30%, #1e86ff 70%, rgba(30, 134, 255, 0));
}
.solutions-text {
  margin: 0 0 0 91px;
  max-width: 640px;
  white-space: nowrap;
  font-size: 17px;
  line-height: 26.5px;
  color: #c9cfdc;
}

.features {
  position: relative;
  max-width: var(--maxw);
  margin: 41px auto 0;
  padding-left: 191px;
  display: grid;
  grid-template-columns: 341px 336px 1fr;
  align-items: center;
}
.features li { display: flex; align-items: center; gap: 18px; }
.features li:nth-child(1) { gap: 18px; }
.features li:nth-child(2) { gap: 27px; margin-left: 0; }
.features li:nth-child(3) { gap: 28px; }
.feature-icon { width: 50px; height: 50px; stroke: #e9eef8; stroke-width: 1.2; }
.features li:nth-child(1) .feature-icon { width: 70px; height: 70px; }
.features span { font-size: 18.7px; line-height: 24px; color: #f1f4fa; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, #08101f 0%, #060a14 70%);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(30, 134, 255, 0) 0%, rgba(30, 134, 255, .55) 18%, #46a6ff 50%, rgba(30, 134, 255, .55) 82%, rgba(30, 134, 255, 0) 100%);
  box-shadow: 0 0 14px rgba(40, 140, 255, .8), 0 0 40px rgba(40, 140, 255, .35);
}
.footer-inner {
  max-width: var(--maxw);
  height: 121px;
  margin: 0 auto;
  padding: 0 46px 0 42px;
  display: flex;
  align-items: center;
}
.brand--footer { gap: 10px; }
.brand--footer img { width: 124px; }
.brand--footer .brand-name { font-size: 15.5px; }

.contact-list { display: flex; align-items: center; margin-left: auto; }
.contact-list li { display: flex; align-items: center; }
.contact-list li + li::before {
  content: "";
  width: 1px; height: 24px;
  margin: 0 28px;
  background: linear-gradient(180deg, rgba(30, 134, 255, 0), #1e86ff, rgba(30, 134, 255, 0));
}
.contact-list a { display: flex; align-items: center; gap: 13px; font-size: 15.8px; color: #e9edf6; transition: color .2s; }
.contact-list a:hover { color: #fff; }
.contact-list .icon { width: 22px; height: 22px; stroke: #eef2fa; stroke-width: 1.7; }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Header */
@media (max-width: 1180px) {
  .header-inner { padding-left: 32px; }
  .brand img { width: 100px; }
  .brand-name { font-size: 13.5px; }
}

/* Sous le gabarit complet, les textes reviennent à la ligne naturellement */
@media (max-width: 1279px) {
  .card p { white-space: normal; }
  .card p br, .solutions-text br { display: none; }
  .solutions-text { white-space: normal; margin-left: 56px; margin-right: 32px; }
}

/* Petit desktop / grande tablette */
@media (max-width: 1180px) {
  .hero-logo { width: 270px; margin-left: 32px; margin-top: 96px; }
  .hero-sep { margin-left: 14px; }
  .hero-text { margin-left: 24px; }
  .hero-text h1 span.l1 { font-size: 31px; line-height: 38px; }
  .hero-text h1 span.l2 { font-size: 34px; line-height: 40px; }
  .hero-tags { font-size: 18px; }
  .hero-text { padding-top: 96px; }
  .hero-text .btn { margin-top: 26px; }

  .cards { grid-template-columns: repeat(3, 1fr); padding: 0 32px; gap: 14px; }
  .card { height: auto; min-height: 330px; padding-bottom: 22px; }
  .card p { white-space: normal; max-width: 210px; margin-left: auto; margin-right: auto; }
  .card p br { display: none; }

  .solutions-title { margin-left: 32px; }
  .solutions-title span.l1 { font-size: 31px; line-height: 36px; }
  .solutions-title span.l2 { font-size: 34px; line-height: 38px; }
  .solutions-title::before { height: 72px; }
  .solutions-text { margin-left: 40px; margin-right: 32px; font-size: 16.5px; white-space: normal; }
  .solutions-text br { display: none; }
  .features { padding-left: 32px; padding-right: 32px; grid-template-columns: repeat(3, 1fr); }

  .footer-inner { padding: 0 32px; }
  .contact-list li + li::before { margin: 0 16px; }
  .contact-list a { font-size: 15px; gap: 10px; }
  .brand--footer img { width: 104px; }
}

@media (max-width: 900px) {
  .header-inner { height: 68px; padding: 0 20px; }
  .brand img { width: 84px; }
  .brand-name { font-size: 12px; }
}

/* Tablette : hero empilé */
@media (max-width: 900px) {
  .hero::before { left: 0; background-position: 68% center; -webkit-mask-image: none; mask-image: none; }
  .hero-inner {
    height: auto;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px 48px;
    background: linear-gradient(180deg, rgba(6, 10, 20, .55), rgba(6, 10, 20, .8));
    max-width: none;
  }
  .hero-logo { width: 240px; margin: 0; }
  .hero-sep { width: 90px; height: 2px; margin: 22px 0; background: linear-gradient(90deg, rgba(40,140,255,0), #2b8dff, rgba(40,140,255,0)); }
  .hero-text { margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; }
  .hero-text h1 span.l1 { font-size: 28px; line-height: 36px; }
  .hero-text h1 span.l2 { font-size: 31px; line-height: 40px; }
  .hero-tags { flex-wrap: wrap; justify-content: center; font-size: 17px; margin-top: 14px; }
  .hero-text .btn { margin: 26px 0 0; }

  .section-title::before, .section-title::after { width: 80px; }
  .section-title { font-size: 31px; gap: 18px; }

  .instruments, .solutions { scroll-margin-top: 68px; }
  .instruments { padding-top: 48px; }
  .instruments-inner { grid-template-columns: 1fr; gap: 28px; padding: 0 24px; max-width: 720px; }
  .vehicle { padding: 44px 24px 0; max-width: 720px; }
  .vehicle img { aspect-ratio: 1.7; }

  .solutions { padding: 48px 24px 150px; }
  .solutions::after { height: 220px; }
  .solutions-top { flex-direction: column; gap: 22px; }
  .solutions-title { margin-left: 0; }
  .solutions-text { margin: 0; max-width: 640px; }
  .features { margin-top: 36px; padding: 0; grid-template-columns: 1fr; gap: 20px; justify-items: start; }
  .features li:nth-child(n) { gap: 18px; }
  .features li:nth-child(1) .feature-icon { width: 52px; height: 52px; }

  .footer-inner { height: auto; flex-wrap: wrap; padding: 32px 24px; gap: 24px 32px; justify-content: space-between; }
  .contact-list { order: 3; width: 100%; margin: 0; flex-direction: column; align-items: flex-start; gap: 14px; }
  .contact-list li + li::before { display: none; }
  .contact-list a { font-size: 16px; }
}

/* Header étroit : la marque seule laisse la place au bouton */
@media (max-width: 520px) {
  .site-header .brand-name { display: none; }
  .site-header .brand img { width: 92px; }
}

/* Mobile */
@media (max-width: 640px) {
  .header-inner { padding: 0 16px; }
  .cards { grid-template-columns: repeat(2, 1fr); padding: 0 16px; gap: 12px; margin-top: 24px; }
  .card { min-height: 0; padding: 128px 10px 20px; }
  .card-photo { height: 150px; }
  .card-icon { width: 40px; height: 40px; }
  .card h3 { font-size: 18px; line-height: 24px; margin-top: 6px; }
  .card p { font-size: 13px; line-height: 19px; max-width: none; }

  .section-title { font-size: 25px; gap: 12px; padding: 0 12px; }
  .section-title::before, .section-title::after { width: 36px; }

  .instruments-inner { padding: 0 16px; margin-top: 24px; }
  .instruments-text h3 { font-size: 21px; line-height: 29px; }
  .vehicle { padding: 36px 16px 0; }
  .vehicle img { aspect-ratio: 3 / 2; }

  .hero-text h1 span.l1 { font-size: 23px; line-height: 32px; }
  .hero-text h1 span.l2 { font-size: 26px; line-height: 36px; }
  .btn-lg { width: 100%; max-width: 320px; }
  .hero-tags { font-size: 15.5px; gap: 9px; }

  .solutions-title { padding-left: 22px; }
  .solutions-title span.l1 { font-size: 23px; line-height: 31px; }
  .solutions-title span.l2 { font-size: 26px; line-height: 34px; }
  .solutions-title::before { height: 62px; }
  .solutions-text { font-size: 16px; line-height: 25px; }
  .features span { font-size: 17px; }
}

@media (max-width: 380px) {
  .hero-tags { font-size: 14px; gap: 7px; }
  .card { padding-top: 112px; }
  .card-photo { height: 132px; }
  .card h3 { font-size: 16.5px; }
}

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