:root {
  --primary: #2d5096;
  --dark-primary: #0e2466;
  --light-primary: #8dbae8;
  --dark-grey: #525252;
  --light-grey: #e0e0e0;
  --white-smoke: #f6f6f6;
  --white: #ffffff;
  --yellow: #f8bc00;
  --ink: #0e2466;
  --space: 24px;
  --max: 1080px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--white-smoke);
  line-height: 1.5;
}

html[data-locale="fr"] .en,
html[data-locale="en"] .fr { display: none; }

a { color: var(--primary); }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--white);
  color: var(--dark-primary);
  padding: 12px 16px;
  z-index: 5;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--light-grey);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 4px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dark-primary);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand img { height: 32px; width: auto; }

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.locale {
  display: inline-flex;
  border: 1px solid var(--light-grey);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.locale button {
  min-width: 24px;
  min-height: 24px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--dark-grey);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.locale button[aria-pressed="true"] {
  background: var(--primary);
  color: var(--white);
}

.header-actions > a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.connexion { position: relative; }

.connexion:not([open]) .connexion-menu { display: none; }

.connexion summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 2px 10px;
  font-size: 13px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.connexion summary::-webkit-details-marker { display: none; }

.connexion-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 4;
  min-width: 168px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(14, 36, 102, 0.16);
}

.connexion-menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--dark-primary);
  font-weight: 700;
  text-decoration: none;
}

.connexion-menu a:hover,
.connexion-menu a:focus-visible {
  background: var(--white-smoke);
}

.programs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.programs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dark-primary);
  font-weight: 700;
}

.feature-icon,
.program-icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon { margin-bottom: 10px; }

.program-icon { flex: none; }

.button-primary {
  background: var(--primary);
  color: var(--white-smoke);
}

.button-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.hero {
  padding: 40px 0 24px;
}

.hero-card {
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: 20px;
  padding: 28px 20px 24px;
  text-align: center;
}

.hero-copy > img {
  width: min(100%, 280px);
  height: auto;
}

.devices {
  width: min(100%, 820px);
  margin: 28px auto 8px;
}

.devices-title {
  margin: 0 0 18px;
  font-weight: 700;
  color: var(--dark-primary);
}

.device-stage {
  display: grid;
  grid-template-columns: minmax(128px, 168px) minmax(0, 1fr);
  align-items: end;
}

.device-laptop {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  margin: 0;
}

.device-phone {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0 -28px 22px 0;
}

.device { margin: 0; }

.device figcaption {
  margin-top: 8px;
  font-weight: 700;
  color: var(--dark-grey);
  font-size: 0.95rem;
}

.phone {
  padding: 10px 8px 12px;
  border-radius: 28px;
  background: #121820;
  border: 3px solid #2c3442;
  box-shadow: 0 18px 36px rgba(14, 36, 102, 0.28);
}

.phone::before {
  content: "";
  display: block;
  width: 46px;
  height: 5px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: #3c4556;
}

.phone-screen {
  overflow: hidden;
  border-radius: 18px;
  background: #023876;
  line-height: 0;
}

.phone-screen img,
.laptop-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.laptop { width: min(100%, 560px); }

.laptop-screen {
  overflow: hidden;
  border: 10px solid #1a1f2b;
  border-bottom-width: 0;
  border-radius: 16px 16px 0 0;
  background: #11161f;
  line-height: 0;
}

.laptop-base {
  position: relative;
  height: 14px;
  margin: 0 6%;
  background: linear-gradient(#d5dae2, #b4bac4);
  border-radius: 0 0 12px 12px;
}

.laptop-base::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 84px;
  height: 6px;
  transform: translateX(-50%);
  background: #8d94a0;
  border-radius: 0 0 8px 8px;
}

.hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.lead {
  max-width: 38rem;
  margin: 0 auto;
  color: var(--dark-grey);
  font-size: 1.05rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.section { padding: 12px 0 32px; }

.section h2 {
  margin: 0 0 16px;
  font-size: 1.4rem;
}

.features, .access {
  display: grid;
  gap: 16px;
}

.feature, .access article {
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: 16px;
  padding: 18px 18px 16px;
}

.feature h3, .access h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.feature p, .access p {
  margin: 0;
  color: var(--dark-grey);
}

.access article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.access .button { margin-top: auto; }

.site-footer {
  background: var(--dark-primary);
  color: var(--white-smoke);
  padding: 28px 0;
}

.site-footer a { color: var(--white); }

.site-footer .wrap {
  display: grid;
  gap: 8px;
}

.site-footer p { margin: 0; }

.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.contact-phones {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-icon {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#sigesco-app {
  display: none;
  position: fixed;
  inset: 0;
  background: #023876;
  color: var(--white);
}

html.sigesco-app-route #landing { display: none; }

html.sigesco-app-route #sigesco-app {
  display: flex;
  align-items: center;
  justify-content: center;
}

#sigesco-boot { margin: 0; font-size: 1.05rem; }

@media (min-width: 600px) {
  .features, .access { grid-template-columns: 1fr 1fr; }
  .hero-card { padding: 40px 32px 32px; }
}

@media (max-width: 599px) {
  .device-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
  }

  .device-laptop,
  .device-phone {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    margin: 0;
  }

  .phone { width: 180px; margin: 0 auto; }
}

@media (min-width: 840px) {
  .features { grid-template-columns: 1fr 1fr 1fr; }
}

@media (min-width: 1200px) {
  :root { --max: 1120px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
