/* ==========================================================================
   CIC — Travaux d'installation électrique — Arnouville (95)
   ========================================================================== */

:root {
  --night:    #16171A;
  --slate:    #34373D;
  --grey:     #6E727B;
  --concrete: #E8E8E4;
  --paper:    #FBFBF9;
  --volt:     #F5C518;
  --volt-dk:  #D9A900;

  --rule:     rgba(22, 23, 26, .14);
  --rule-mid: rgba(22, 23, 26, .4);
  --rule-inv: rgba(232, 232, 228, .2);

  --font: "Epilogue", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4.6vw, 60px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--night);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; max-width: 62ch; }

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

.skip { position: absolute; left: -9999px; top: 0; background: var(--night); color: var(--volt); padding: 12px 18px; z-index: 60; }
.skip:focus { left: 12px; top: 12px; }

.kicker {
  display: inline-block;
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--volt); color: var(--night);
  padding: 5px 11px; margin-bottom: 18px;
}

/* ------------------------------------------------------------- Structure -- */

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

section { padding-block: clamp(56px, 8.5vw, 104px); }

.dim { background: var(--concrete); }
.dark { background: var(--night); color: var(--concrete); }
.dark p { color: #A9ADB5; }
.dark h2, .dark h3 { color: var(--paper); }

/* ---------------------------------------------------------------- Entête -- */

.masthead { background: var(--night); }

.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 78px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.brand__mark {
  background: var(--volt); color: var(--night);
  font-size: 21px; font-weight: 800; letter-spacing: .04em;
  padding: 6px 11px; line-height: 1.1;
}

.brand__sub { font-size: 13.5px; color: #9A9EA6; }

.nav { display: flex; gap: clamp(16px, 2.6vw, 32px); font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--concrete); padding-block: 6px; border-bottom: 3px solid transparent; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { border-bottom-color: var(--volt); color: #fff; }

/* ------------------------------------------------------------------ Hero -- */

.hero { position: relative; overflow: hidden; background: var(--night); }

.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .42;
}

.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(22,23,26,.94) 0%, rgba(22,23,26,.74) 52%, rgba(22,23,26,.5) 100%);
}

.hero .wrap { position: relative; z-index: 2; padding-block: clamp(66px, 11vw, 140px); }

.hero h1 {
  font-size: clamp(40px, 7.6vw, 92px);
  color: var(--paper);
  max-width: 16ch;
  margin-bottom: 24px;
}

.hero h1 em { font-style: normal; color: var(--volt); }

.hero__lede {
  font-size: clamp(17px, 2vw, 21px);
  color: #CFD2D6;
  max-width: 52ch;
  margin-bottom: 34px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block; font-family: var(--font);
  font-size: 15.5px; font-weight: 700;
  padding: 15px 28px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.btn--volt { background: var(--volt); color: var(--night); }
.btn--volt:hover { background: var(--volt-dk); }

.btn--line { border-color: var(--rule-inv); color: var(--paper); }
.btn--line:hover { border-color: var(--volt); color: var(--volt); }

.dim .btn--line, section:not(.dark) .btn--line { border-color: var(--rule-mid); color: var(--night); }
.dim .btn--line:hover, section:not(.dark) .btn--line:hover { border-color: var(--night); background: rgba(22,23,26,.06); }

/* -------------------------------------------------------------- Repères -- */

.marks { background: var(--volt); }

.marks .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.marks div { padding: 20px 26px 20px 0; border-right: 1px solid rgba(22,23,26,.22); }
.marks div:last-child { border-right: 0; }

@media (max-width: 640px) {
  .marks div { border-right: 0; border-bottom: 1px solid rgba(22,23,26,.22); padding-right: 0; }
  .marks div:last-child { border-bottom: 0; }
}

.marks dt { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(22,23,26,.62); margin-bottom: 3px; }
.marks dd { margin: 0; font-size: 16.5px; font-weight: 700; color: var(--night); }

/* ---------------------------------------------------- Titrage de section -- */

.lead-in { max-width: 46ch; margin-bottom: clamp(32px, 4.4vw, 52px); }
.lead-in h2 { font-size: clamp(29px, 4.6vw, 50px); margin-bottom: 15px; }
.lead-in p { color: var(--grey); margin: 0; }
.dark .lead-in p { color: #A9ADB5; }

/* -------------------------------------------------------------- Services -- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 2.4vw, 30px);
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color .18s ease, transform .18s ease;
}

.card:hover { border-color: var(--night); transform: translateY(-3px); }

.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--concrete); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }

.card__body { padding: 24px 24px 28px; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { font-size: 15.5px; color: var(--grey); margin: 0; max-width: none; }

/* ------------------------------------------------------------ Deux colonnes -- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: clamp(30px, 4.6vw, 66px);
  align-items: center;
}

.split__media { overflow: hidden; border: 1px solid var(--rule-inv); }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.tick-list { list-style: none; margin: 22px 0 0; padding: 0; }
.tick-list li {
  padding: 12px 0 12px 28px; border-bottom: 1px solid var(--rule-inv);
  font-size: 16.5px; position: relative;
}
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 20px;
  width: 14px; height: 3px; background: var(--volt);
}

section:not(.dark) .tick-list li { border-bottom-color: var(--rule); }

/* -------------------------------------------------------------- Séquence -- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: clamp(24px, 3.2vw, 40px);
  counter-reset: step;
}

.step { border-top: 4px solid var(--night); padding-top: 18px; }

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block; font-size: 13px; font-weight: 800;
  letter-spacing: .06em; color: var(--volt-dk); margin-bottom: 10px;
}

.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { font-size: 15.5px; color: var(--grey); margin: 0; }

/* ---------------------------------------------------------------- Secteur -- */

.zones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 30px; }
.zones li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 16.5px; font-weight: 500; }
.zones li span { display: block; font-size: 14px; font-weight: 400; color: var(--grey); }

/* ------------------------------------------------------------------- CTA -- */

.cta { background: var(--volt); }
.cta h2 { font-size: clamp(29px, 4.6vw, 50px); max-width: 18ch; margin-bottom: 16px; color: var(--night); }
.cta p { color: rgba(22,23,26,.76); max-width: 50ch; margin-bottom: 28px; }
.cta .btn--volt { background: var(--night); color: var(--volt); }
.cta .btn--volt:hover { background: #000; }
.cta .btn--line { border-color: rgba(22,23,26,.4); color: var(--night); }
.cta .btn--line:hover { border-color: var(--night); background: rgba(22,23,26,.08); }

/* ------------------------------------------------------------ Pages texte -- */

.page-head { background: var(--night); color: var(--concrete); padding-block: clamp(50px, 7.5vw, 92px); }
.page-head h1 { font-size: clamp(36px, 6.4vw, 76px); color: var(--paper); margin-bottom: 15px; }
.page-head p { color: #A9ADB5; font-size: 18px; max-width: 56ch; margin: 0; }

.prose h2 { font-size: clamp(25px, 3.4vw, 38px); border-top: 4px solid var(--volt); padding-top: 14px; margin: 0 0 18px; }
.prose h3 { font-size: 19px; margin: 36px 0 12px; }
.prose p, .prose li { color: #35383E; }
.prose + .prose { margin-top: clamp(46px, 5.6vw, 76px); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 0 38px; margin: 0; }
.facts div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 16.5px; }

.note { font-size: 15px; color: var(--grey); border-left: 4px solid var(--volt); padding-left: 18px; margin-top: 28px; }

/* --------------------------------------------------------------- Contact -- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 19px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--grey); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font); font-size: 16px; color: var(--night);
  background: #fff; border: 1px solid var(--rule-mid); padding: 12px 14px; border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--night); outline: 2px solid var(--volt); outline-offset: 0; }
.field textarea { min-height: 165px; resize: vertical; }

.form-note { font-size: 14.5px; color: var(--grey); margin-top: 15px; }

/* ------------------------------------------------------------------ Pied -- */

.foot { background: var(--night); color: #9A9EA6; padding-block: clamp(42px, 5.5vw, 66px); font-size: 15px; }
.foot a { color: var(--concrete); text-decoration: none; border-bottom: 1px solid var(--rule-inv); }
.foot a:hover { color: var(--volt); border-bottom-color: var(--volt); }

.foot__top {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 28px 40px; padding-bottom: 28px; border-bottom: 1px solid var(--rule-inv);
}

.foot__name {
  display: inline-block; background: var(--volt); color: var(--night);
  font-size: 19px; font-weight: 800; letter-spacing: .04em; padding: 5px 10px; margin-bottom: 12px;
}

.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 6px; }

.foot__bottom {
  padding-top: 22px; display: flex; flex-wrap: wrap;
  gap: 8px 26px; justify-content: space-between; font-size: 13.5px;
}

.credit { font-size: 12px; color: #62666E; margin-top: 16px; }
.credit a { border: 0; color: #62666E; }

/* ---------------------------------------------------------------- Motion -- */

.rise { opacity: 0; transform: translateY(14px); animation: rise .65s cubic-bezier(.2,.7,.3,1) forwards; }
.rise:nth-child(2) { animation-delay: .1s; }
.rise:nth-child(3) { animation-delay: .2s; }

@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; animation: none; }
  .card:hover { transform: none; }
  * { transition-duration: .01ms !important; }
}
