/* SIAD Technologie Plus — feuille de style */
:root {
  --bleu: #004886;        /* bleu du logo */
  --bleu-nuit: #032544;
  --bleu-clair: #E8F0F8;
  --rouge: #E2231A;       /* rouge "Technologie Plus" */
  --rouge-fonce: #B8180F;
  --vert: #7DBB2E;        /* vert du globe, usage ponctuel */
  --encre: #13202E;
  --gris: #5A6878;
  --ligne: #D6DEE8;
  --fond: #F4F7FA;
  --blanc: #FFFFFF;
  --wa: #25D366;

  --f-titre: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-texte: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1180px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--encre);
  background: var(--blanc);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--bleu); }
h1, h2, h3 { font-family: var(--f-titre); line-height: 1.08; margin: 0 0 .5em; color: var(--bleu-nuit); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.45rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bleu); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; border-radius: 2px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--f-titre); font-weight: 600; font-size: 1.15rem; letter-spacing: .01em;
  padding: .8rem 1.4rem; border-radius: 4px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-sm { font-size: 1.05rem; padding: .5rem 1rem; }
.btn-block { width: 100%; }
.btn-red { background: var(--rouge); color: #fff; }
.btn-red:hover { background: var(--rouge-fonce); }
.btn-blue { background: var(--bleu); color: #fff; }
.btn-blue:hover { background: var(--bleu-nuit); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--ligne);
  backdrop-filter: saturate(1.4) blur(6px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; }
.brand img { height: 64px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) {
  font-family: var(--f-titre); font-weight: 600; font-size: 1.15rem;
  color: var(--bleu-nuit); text-decoration: none; padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:not(.btn):hover { border-bottom-color: var(--rouge); }

.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; }
.nav-toggle .bar { display: block; width: 26px; height: 3px; background: var(--bleu); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-8px) rotate(-45deg); }

/* Hero */
.hero {
  background: var(--bleu-nuit);
  background-image:
    radial-gradient(120% 90% at 85% 40%, rgba(0,72,134,.9), transparent 60%);
  color: #fff;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-kicker {
  font-family: var(--f-titre); font-weight: 600; font-size: 1.2rem;
  color: #9CC3EA; margin-bottom: 1rem;
  padding-left: .9rem; border-left: 4px solid var(--rouge);
}
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 700; max-width: 18ch; }
.lead { font-size: 1.15rem; color: #D5E3F1; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }

.hero-plan { margin: 0; color: #9CC3EA; }
.hero-plan svg { width: 100%; height: auto; }
.hero-plan .wall { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2; }
.hero-plan .wall.thin { stroke: rgba(255,255,255,.22); stroke-dasharray: 6 6; }
.hero-plan .cable { fill: none; stroke: #5FA8EC; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hero-plan .power { fill: none; stroke: var(--rouge); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hero-plan .box { fill: var(--bleu-nuit); stroke: #fff; stroke-width: 2; }
.hero-plan .slot { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 2; stroke-linecap: round; }
.hero-plan .bolt { stroke: #FFD34D; }
.hero-plan .led { fill: #5FA8EC; }
.hero-plan .led.red { fill: var(--rouge); }
.hero-plan .led.green { fill: var(--vert); }
.hero-plan .lbl { fill: #D5E3F1; font-family: var(--f-texte); font-size: 13px; font-weight: 500; text-anchor: middle; }
.hero-plan .lbl-start { text-anchor: start; }

/* Animation unique : le schéma se trace au chargement */
.hero-plan .draw { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: trace 1.6s ease-out forwards; }
.hero-plan .c1 { animation-delay: .6s; } .hero-plan .c2 { animation-delay: .75s; }
.hero-plan .c3 { animation-delay: .9s; } .hero-plan .c4 { animation-delay: 1s; }
.hero-plan .c5 { animation-delay: 1.1s; }
.hero-plan .node { opacity: 0; animation: apparait .5s ease-out forwards; animation-delay: var(--d); }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes apparait { to { opacity: 1; } }
.hero-plan .wall.thin { opacity: 0; animation: apparait .8s ease-out .5s forwards; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 640px; margin-bottom: 2.75rem; }
.section-head p { color: var(--gris); font-size: 1.125rem; }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 3px solid var(--bleu); }
.service {
  padding: 2.25rem 2rem 2rem 0;
  border-bottom: 1px solid var(--ligne);
}
.service:nth-child(odd) { padding-right: 2.5rem; border-right: 1px solid var(--ligne); }
.service:nth-child(even) { padding-left: 2.5rem; }
.service .ico { width: 44px; height: 44px; fill: none; stroke: var(--rouge); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1rem; }
.service h3 { font-size: 1.7rem; }
.service > p { color: var(--gris); }
.service ul { list-style: none; padding: 0; margin: 0; }
.service li { position: relative; padding: .4rem 0 .4rem 1.4rem; border-top: 1px dashed var(--ligne); }
.service li::before { content: ""; position: absolute; left: 0; top: 1rem; width: 8px; height: 8px; background: var(--bleu); border-radius: 50%; }

/* Domaines */
.section-blue { background: var(--fond); }
.domaines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.domaine { background: #fff; padding: 2rem 1.75rem; border-left: 5px solid var(--bleu); }
.domaine:nth-child(2) { border-left-color: #FFB400; }
.domaine:nth-child(3) { border-left-color: var(--rouge); }
.domaine h3 { font-size: 1.6rem; }
.domaine p { color: var(--gris); margin: 0; }

/* Étapes (vraie séquence) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: etape; position: relative; }
.steps::before { content: ""; position: absolute; top: 22px; left: 22px; right: calc(25% - 23px); height: 3px; background: var(--bleu-clair); }
.steps li { counter-increment: etape; position: relative; padding-right: 1.5rem; }
.steps li::before {
  content: counter(etape);
  display: grid; place-items: center; position: relative;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--bleu); color: #fff;
  font-family: var(--f-titre); font-weight: 700; font-size: 1.4rem;
  margin-bottom: 1.1rem; box-shadow: 0 0 0 6px #fff;
}
.steps li:last-child::before { background: var(--rouge); }
.steps p { color: var(--gris); }

/* Partenaire */
.partner { background: var(--bleu); color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0; }
.partner-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.partner-mark {
  font-family: var(--f-titre); font-weight: 700; font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: .04em; line-height: 1; padding: 1.2rem 1.6rem;
  border: 3px solid #fff; color: #fff;
}
.partner h2 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.partner p { color: #D5E3F1; max-width: 60ch; }
.partner .btn-blue { background: #fff; color: var(--bleu); }
.partner .btn-blue:hover { background: var(--bleu-clair); }
.partner-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.1); }
a.partner-mark { text-decoration: none; }

/* Contact */
.contact { background: var(--fond); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-info > p { color: var(--gris); font-size: 1.125rem; max-width: 42ch; }
.coords { list-style: none; padding: 0; margin: 2rem 0 0; }
.coords li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--ligne); }
.coords .k { color: var(--gris); font-size: .95rem; }
.coords a { font-weight: 600; text-decoration: none; }
.coords a:hover { text-decoration: underline; }

.form { background: #fff; padding: clamp(1.5rem, 4vw, 2.5rem); border-top: 4px solid var(--rouge); }
.form h3 { font-size: 1.8rem; margin-bottom: 1.25rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--encre);
  padding: .75rem .85rem; border: 1.5px solid var(--ligne); border-radius: 4px; background: #fff;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(0,72,134,.15); }
.field.invalide input, .field.invalide select, .field.invalide textarea { border-color: var(--rouge); }
.field .erreur { display: block; color: var(--rouge-fonce); font-size: .88rem; margin-top: .3rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 1rem 0 0; font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: #2E7D1F; }
.form-status.ko { color: var(--rouge-fonce); }
.form-note { font-size: .88rem; color: var(--gris); margin: .5rem 0 0; }

/* Pied de page */
.site-footer { background: var(--bleu-nuit); color: #C4D4E4; padding: 3rem 0 2rem; text-align: center; }
.footer-logo { margin: 0 auto 1rem; background: #fff; padding: 6px 10px; border-radius: 4px; height: 52px; width: auto; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-links a { color: #fff; text-decoration: none; font-weight: 600; }
.copy { font-size: .9rem; color: #8FA6BD; margin: 1.5rem 0 0; }

/* WhatsApp flottant */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; align-items: center; gap: .5rem;
  background: var(--wa); color: #fff; text-decoration: none;
  padding: .75rem 1.1rem .75rem .85rem; border-radius: 999px;
  font-weight: 600; box-shadow: 0 8px 24px rgba(3,37,68,.28);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.05); }
.wa-float svg { width: 30px; height: 30px; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-plan { max-width: 520px; }
  .domaines { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .steps::before { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--ligne);
    padding: .5rem var(--pad) 1.25rem;
    display: none;
  }
  .nav.ouvert { display: flex; }
  .nav a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--ligne); }
  .nav .btn { margin-top: 1rem; }
}
@media (max-width: 720px) {
  .services { grid-template-columns: 1fr; }
  .service, .service:nth-child(odd), .service:nth-child(even) { padding: 2rem 0; border-right: 0; }
  .partner-inner { grid-template-columns: 1fr; }
  .partner-mark { justify-self: start; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .steps { grid-template-columns: 1fr; }
  .brand img { height: 44px; }
  .wa-float { padding: .85rem; }
  .wa-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-plan .draw, .hero-plan .node, .hero-plan .wall.thin { animation: none; stroke-dashoffset: 0; opacity: 1; }
  .wa-float, .btn { transition: none; }
}
