/* ==========================================================
   DESIGN TOKENS — Charte Triphase Énergie
   ========================================================== */
:root {
  /* Palette */
  --c-navy:       #0a2c5c;
  --c-blue:       #045da3;
  --c-blue-hover: #035da2;
  --c-gold:       #c19a2f;
  --c-gold-hover: #a8851f;
  --c-teal:       #07a2a8;
  --c-teal-soft:  #e8f6f6;
  --c-gold-soft:  #faf3e2;
  --c-blue-soft:  #e6eff8;

  --c-text:       #333333;
  --c-text-mute:  #666666;
  --c-bg:         #ffffff;
  --c-bg-soft:    #f5f5f5;
  --c-error:      #d32f2f;

  /* Typographie */
  --ff-display: 'Montserrat', system-ui, -apple-system, sans-serif;
  --ff-body:    'Open Sans', system-ui, -apple-system, sans-serif;

  /* Espacements (grille 8pt) */
  --s-1: 4px; --s-2: 8px; --s-3: 16px; --s-4: 24px;
  --s-5: 32px; --s-6: 48px; --s-7: 64px; --s-8: 96px;

  /* Rayons */
  --r-sm: 4px; --r-md: 6px; --r-pill: 999px;

  /* Ombres (teintées navy pour cohérence) */
  --shadow-sm: 0 1px 3px rgba(10, 44, 92, 0.06);
  --shadow-md: 0 6px 20px rgba(10, 44, 92, 0.08);
  --shadow-lg: 0 16px 48px rgba(10, 44, 92, 0.12);

  /* Transitions */
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* Largeur de contenu */
  --w-max: 1180px;
}

/* ==========================================================
   RESET & BASE
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Focus clavier — accessibilité */
:focus:not(:focus-visible) { outline: none; }
:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.site-footer :focus-visible {
  outline-color: var(--c-gold);
}

body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--c-blue); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--c-blue-hover); }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  color: var(--c-navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.container {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--s-4);
}

/* ==========================================================
   LOGO TRIPHASE
   ========================================================== */
.triphase-logo svg { display: block; width: 100%; height: auto; }

@keyframes triphase-flow {
  from { transform: translateX(0); }
  to   { transform: translateX(-130px); }
}
.triphase-logo #wave-or   { animation: triphase-flow 12s linear infinite; }
.triphase-logo #wave-bleu { animation: triphase-flow 15s linear infinite; }
.triphase-logo #wave-vert { animation: triphase-flow 18s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .triphase-logo #wave-or,
  .triphase-logo #wave-bleu,
  .triphase-logo #wave-vert { animation: none; }
}

/* Variante nav : logo masqué dans un cercle */
.triphase-logo--nav {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.triphase-logo--nav svg {
  width: 200px;
  max-width: none;
  height: auto;
  flex-shrink: 0;
  transform: translateX(-35px);
}
/* Variante footer : logo étendu */
.triphase-logo--footer {
  width: 100%;
  max-width: 360px;
}

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(10, 44, 92, 0.08);
  z-index: 100;
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: var(--s-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand__name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--c-navy);
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand__name span { color: var(--c-gold); font-weight: 600; }

.site-nav ul {
  display: flex;
  gap: var(--s-5);
  list-style: none;
}
.site-nav a {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--c-navy);
  position: relative;
  padding: 6px 0;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--c-blue-hover);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav a:hover::after { transform: scaleX(1); }

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .2s var(--ease);
  text-decoration: none;
  line-height: 1;
}
.btn--gold {
  background: var(--c-gold);
  color: #fff;
}
.btn--gold:hover {
  background: var(--c-gold-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--navy {
  background: var(--c-navy);
  color: #fff;
}
.btn--navy:hover {
  background: #061f43;
  color: #fff;
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--c-navy);
  border-color: var(--c-navy);
}
.btn--ghost:hover {
  background: var(--c-navy);
  color: #fff;
}
.btn--ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn--ghost-light:hover {
  background: #fff;
  color: var(--c-navy);
}
.btn--sm {
  padding: 10px 18px;
  font-size: 13.5px;
}
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:not(a[href]) { cursor: default; }

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  background: var(--c-navy);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--s-8) 0 var(--s-4);
  position: relative;
}
.site-footer::before {
  /* Onde décorative en haut du footer */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(193, 154, 47, 0.5), rgba(7, 162, 168, 0.5), transparent);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s-6);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (max-width: 800px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--s-5); }
}

.site-footer h4 {
  font-family: var(--ff-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--s-3);
}
.site-footer p, .site-footer li {
  font-size: 14.5px;
  line-height: 1.7;
}
.site-footer__tagline {
  margin: var(--s-3) 0 0;
  max-width: 320px;
}
.site-footer ul {
  list-style: none;
}
.site-footer ul li { margin-bottom: 8px; }
.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  transition: color .2s var(--ease);
}
.site-footer a:hover { color: var(--c-gold); }
.site-footer__contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-footer__contact-item svg {
  width: 14px; height: 14px;
  color: var(--c-gold);
  flex-shrink: 0;
}
.site-footer__bottom {
  padding-top: var(--s-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
.site-footer__legal-links { display: flex; gap: var(--s-4); }
.site-footer__legal-links a { color: rgba(255, 255, 255, 0.5); }
.site-footer__legal-links a:hover { color: var(--c-gold); }

/* ==========================================================
   UTILS
   ========================================================== */
.text-gold { color: var(--c-gold); }
.text-blue { color: var(--c-blue); }
.text-teal { color: var(--c-teal); }

/* Apparition au scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  [class*="animation"] { animation: none !important; }
}

/* ==========================================================
   BURGER — bouton + menu mobile
   ========================================================== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-navy);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4) var(--s-5);
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid rgba(10, 44, 92, 0.08);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav ul { list-style: none; }
.mobile-nav li { border-bottom: 1px solid rgba(10, 44, 92, 0.06); }
.mobile-nav a:not(.btn) {
  display: block;
  padding: 12px 0;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--c-navy);
}
.mobile-nav .btn {
  align-self: flex-start;
  margin-top: var(--s-3);
}

/* ==========================================================
   RESPONSIVE — header mobile
   ========================================================== */
@media (max-width: 800px) {
  .site-nav { display: none; }
  .btn--sm { display: none; }
  .nav-toggle { display: flex; }
}