:root {
  --navy-950: #020914;
  --navy-900: #061120;
  --navy-850: #091827;
  --navy-800: #0b1d30;
  --blue-500: #12bdf2;
  --blue-600: #078ce7;
  --cyan-soft: #7fe9ff;
  --white: #ffffff;
  --text: #dceaf4;
  --muted: #8fa8b9;
  --ink: #111827;
  --paper: #f5f9fc;
  --border: rgba(127, 233, 255, .18);
  --glass: rgba(8, 24, 39, .74);
  --shadow: 0 24px 80px rgba(0,0,0,.35);
  --radius: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background:
    radial-gradient(circle at 15% 5%, rgba(18,189,242,.10), transparent 28%),
    linear-gradient(180deg, var(--navy-950), #071421 44%, #eef4f8 44%);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

/* Header */
.topbar {
  position: relative;
  z-index: 50;
  background: #020814;
  color: #b8d3e3;
  font-size: .82rem;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(3, 11, 22, .82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(127, 233, 255, .12);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 15px 0; }
.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo img { width: 286px; height: auto; filter: drop-shadow(0 0 18px rgba(0,174,255,.20)); }
.menu { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .92rem; }
.menu a:not(.btn) { color: #d9e8f2; opacity: .88; position: relative; }
.menu a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--blue-500), transparent); transition: transform .28s ease; }
.menu a:hover, .menu a.active { color: var(--cyan-soft); opacity: 1; }
.menu a:hover::after, .menu a.active::after { transform: scaleX(1); }
.menu-toggle { display: none; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: white; border-radius: 14px; padding: 10px 12px; font-size: 1.4rem; line-height: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #19c8ff, #0878e6);
  color: var(--white) !important;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .01em;
  border: 1px solid rgba(127,233,255,.42);
  box-shadow: 0 14px 34px rgba(0, 148, 255, .26);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 48px rgba(0, 148, 255, .38); }
.btn.secondary { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.28); box-shadow: none; }
.btn.secondary:hover { background: rgba(255,255,255,.12); }

/* Home hero */
.hero {
  position: relative;
  min-height: 760px;
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 118px 0 96px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(2,9,20,.96) 0%, rgba(2,9,20,.80) 38%, rgba(2,9,20,.34) 72%, rgba(2,9,20,.76) 100%),
    linear-gradient(180deg, rgba(2,9,20,.12), rgba(2,9,20,.95)),
    url('../img/fond-evolution-electricite.jpg') center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 65% 52%, rgba(18,189,242,.20), transparent 18%),
    linear-gradient(115deg, transparent 0 46%, rgba(127,233,255,.10) 49%, transparent 52%);
  mix-blend-mode: screen;
  opacity: .9;
  animation: pulseGlow 5.8s ease-in-out infinite alternate;
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  left: -10%; right: -10%; bottom: -2px;
  height: 170px;
  background: linear-gradient(180deg, transparent, var(--navy-950) 80%);
  z-index: -1;
}
.hero-content { max-width: 780px; animation: fadeUp .8s ease both; }
.eyebrow { color: var(--cyan-soft); font-weight: 900; text-transform: uppercase; letter-spacing: .22em; font-size: .85rem; margin-bottom: 18px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 16px; }
h1 { font-size: clamp(2.7rem, 6.5vw, 5.7rem); letter-spacing: -.055em; }
.hero p { font-size: clamp(1.08rem, 1.65vw, 1.36rem); max-width: 720px; color: #e8f5fb; margin: 0 0 18px; }
.hero-actions { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }
.hero-metrics { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; }
.metric { min-width: 160px; padding: 15px 18px; border: 1px solid rgba(127,233,255,.18); border-radius: 18px; background: rgba(3,14,26,.52); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.metric strong { display:block; color:white; font-size: 1.55rem; line-height: 1; }
.metric span { color: #acc6d7; font-size: .9rem; }

/* Sections */
.section { position: relative; padding: 84px 0; background: #f4f8fb; color: #203241; }
.section.dark { background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); color: var(--text); }
.section.alt { background: #eaf2f7; }
.section-title { max-width: 830px; margin-bottom: 34px; }
.section-title h2 { font-size: clamp(2rem, 3.5vw, 3.2rem); color: #08233a; letter-spacing: -.03em; }
.section-title p { color: #5f7484; margin: 0; font-size: 1.08rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(5, 35, 58, .09);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 20px 70px rgba(6, 28, 45, .10);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: fadeUp .65s ease both;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: linear-gradient(180deg, var(--blue-500), transparent); opacity: .75; }
.card:hover { transform: translateY(-7px); box-shadow: 0 28px 90px rgba(6,28,45,.16); border-color: rgba(18,189,242,.28); }
.card h2, .card h3 { color: #0a2a43; }
.card h3 { font-size: 1.28rem; }
.card p { margin-bottom: 0; color: #52697a; }
ul.clean { padding-left: 20px; }
ul.clean li { margin: 8px 0; }

.band {
  position: relative;
  color: var(--white);
  padding: 64px 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(3,14,26,.96), rgba(6,36,62,.94)), url('../img/fond-evolution-electricite.jpg') center 55% / cover no-repeat;
}
.band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 50%, rgba(18,189,242,.22), transparent 24%); animation: pulseGlow 5s ease infinite alternate; }
.band .container { position: relative; }
.band h2 { color: var(--white); font-size: clamp(1.9rem, 3vw, 2.7rem); }
.band p { color: #d6eaf5; max-width: 820px; }

/* Subpage hero */
.page-hero {
  position: relative;
  border-bottom: 1px solid rgba(127,233,255,.16);
  padding: 98px 0 74px;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(2,9,20,.98), rgba(3,17,30,.78)),
    url('../img/fond-evolution-electricite.jpg') center / cover no-repeat;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(127,233,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127,233,255,.05) 1px, transparent 1px),
    radial-gradient(circle at 75% 48%, rgba(18,189,242,.20), transparent 22%);
  background-size: 46px 46px, 46px 46px, auto;
  transform: perspective(700px) rotateX(62deg) translateY(-18%);
  transform-origin: top;
  opacity: .65;
  animation: gridDrift 12s linear infinite;
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); color: white; letter-spacing: -.045em; }
.page-hero p { color: #d8edf7; max-width: 850px; margin: 0; font-size: 1.15rem; }

.content { max-width: 930px; }
.content h2 { color: #09283f; margin-top: 40px; font-size: 1.75rem; }
.content p, .content li { color: #344a5b; }
.contact-box { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.form-note { background: white; border: 1px solid rgba(5,35,58,.10); padding: 28px; border-radius: var(--radius); box-shadow: 0 20px 70px rgba(6,28,45,.10); }
.notice { border-left: 4px solid var(--blue-500); background: #eef9fc; padding: 16px 18px; border-radius: 10px; color: #123247; }

/* Footer */
.footer { background: #020814; color: #dce8ef; padding: 48px 0 24px; border-top: 1px solid rgba(127,233,255,.14); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer h3, .footer h4 { color: var(--white); margin-top: 0; }
.footer a { color: #dce8ef; display: block; margin: 7px 0; opacity: .84; }
.footer a:hover { color: var(--cyan-soft); opacity: 1; }
.footer-logo { width: 280px; margin-bottom: 14px; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 18px; color: #91a6b5; font-size: .9rem; }

/* Animations */
.reveal, .section-title, .content, .grid, .band .container { animation: fadeUp .7s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow { from { opacity: .56; filter: saturate(1); } to { opacity: 1; filter: saturate(1.35); } }
@keyframes gridDrift { from { background-position: 0 0, 0 0, center; } to { background-position: 0 46px, 46px 0, center; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 1020px) {
  .menu-toggle { display: inline-flex; }
  .nav { align-items: center; }
  .menu {
    position: absolute;
    top: 100%; left: 20px; right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: rgba(3, 11, 22, .96);
    border: 1px solid rgba(127,233,255,.16);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }
  .menu.open { display: flex; }
  .menu a { padding: 8px 0; }
  .topbar { display: none; }
  .logo img { width: 230px; }
  .hero { min-height: 680px; padding: 86px 0 72px; background-position: 58% center; }
  .grid, .grid.two, .contact-box, .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1160px); }
  .nav { padding: 12px 0; }
  .logo img { width: 195px; }
  .hero { min-height: 720px; padding: 74px 0 58px; background-position: 50% center; }
  .hero::before { background: radial-gradient(circle at 62% 46%, rgba(18,189,242,.22), transparent 26%); }
  h1 { font-size: clamp(2.35rem, 12vw, 3.9rem); }
  .hero p { font-size: 1.03rem; }
  .hero-actions .btn { width: 100%; }
  .metric { width: 100%; }
  .section { padding: 58px 0; }
  .page-hero { padding: 72px 0 52px; }
  .card { padding: 24px; border-radius: 22px; }
}


/* --- Formulaire contact KNOWELEC : ajout sans modification de l'accueil --- */
.contact-layout {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
  gap: 28px;
  align-items: start;
}

.contact-card,
.contact-info-panel {
  border: 1px solid rgba(88, 214, 255, 0.22);
  background: linear-gradient(145deg, rgba(8, 22, 38, 0.90), rgba(3, 10, 20, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255,255,255,.06);
  border-radius: 24px;
  padding: 30px;
  backdrop-filter: blur(12px);
}

.contact-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  letter-spacing: .01em;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.form-fallback textarea {
  width: 100%;
  border: 1px solid rgba(88, 214, 255, 0.25);
  border-radius: 14px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  outline: none;
  font: inherit;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.contact-form select option {
  color: #081221;
  background: #ffffff;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus,
.form-fallback textarea:focus {
  border-color: rgba(38, 199, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(38, 199, 255, 0.12);
  background: rgba(255, 255, 255, 0.085);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.form-note,
.muted,
.form-fallback {
  color: rgba(255,255,255,.68);
  line-height: 1.7;
}

.form-note {
  font-size: .92rem;
  margin-top: 16px;
}

.form-fallback {
  margin-top: 22px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(88, 214, 255, 0.16);
  background: rgba(88, 214, 255, 0.06);
}

.contact-info-panel a,
.form-fallback a {
  color: #58d6ff;
  text-decoration: none;
}

.contact-info-panel a:hover,
.form-fallback a:hover {
  text-decoration: underline;
}

.mini-list {
  margin-top: 26px;
  display: grid;
  gap: 10px;
}

.mini-list span {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(88, 214, 255, 0.08);
  border: 1px solid rgba(88, 214, 255, 0.15);
  color: rgba(255,255,255,.86);
}

@media (max-width: 800px) {
  .contact-layout {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 1120px);
    margin-bottom: 56px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-card,
  .contact-info-panel {
    padding: 22px;
    border-radius: 20px;
  }
}

/* Logo KNOWELEC validé et nouvelle compétence Académies */
.logo img { width: 190px; max-height: 118px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.footer-logo { width: 230px; background: #fff; border-radius: 14px; padding: 8px; }
.academy-highlight .card::before { background: linear-gradient(180deg, #12bdf2, #078ce7); opacity: 1; }
@media (max-width: 1020px) { .logo img { width: 165px; max-height: 103px; } }
@media (max-width: 640px) { .logo img { width: 140px; max-height: 88px; } }


/* Multilingual language selector */
.language-switcher{display:flex;align-items:center;margin-left:auto;margin-right:10px;position:relative;z-index:30}
.language-switcher select{appearance:none;-webkit-appearance:none;border:1px solid rgba(16,58,92,.22);border-radius:8px;background:#fff;padding:9px 28px 9px 10px;font:600 13px/1.2 inherit;color:#123a5c;cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,#123a5c 50%),linear-gradient(135deg,#123a5c 50%,transparent 50%);background-position:calc(100% - 13px) 50%,calc(100% - 9px) 50%;background-size:4px 4px,4px 4px;background-repeat:no-repeat}
.language-switcher select:focus{outline:2px solid rgba(0,136,204,.28);outline-offset:2px}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
html[dir="rtl"] body{text-align:right}
html[dir="rtl"] .language-switcher{margin-right:auto;margin-left:10px}
html[dir="rtl"] .language-switcher select{padding:9px 10px 9px 28px;background-position:13px 50%,9px 50%}
html[dir="rtl"] .footer-grid,html[dir="rtl"] .grid,html[dir="rtl"] .contact-layout{direction:rtl}
html[dir="rtl"] .menu,html[dir="rtl"] .main-nav{direction:rtl}
html[dir="rtl"] ul.clean{padding-right:20px;padding-left:0}
@media(max-width:900px){.language-switcher{margin-left:auto;margin-right:8px}.header .language-switcher,.site-header .language-switcher{order:2}.menu-toggle{order:3}.menu,.main-nav{order:4}.language-switcher select{padding-top:8px;padding-bottom:8px}}

/* Direct contact form delivery — v7 */
.hp-field {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.form-status {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 600;
}
.form-status.is-success {
  background: #e8f6ef;
  border: 1px solid #7fc9a4;
  color: #145c3b;
}
.form-status.is-error {
  background: #fff3f2;
  border: 1px solid #e3a19b;
  color: #8a2d24;
}
.contact-form button[disabled] {
  cursor: wait;
  opacity: .72;
}

