body{
  margin:0;
  font-family:Arial, sans-serif;
  background:#f3f5f9;
  color:#111827;
}

/* =========================
   THÈMES 2.0
   public = vert
   intranet = orange
   entreprises = bleu
========================= */
:root{
  --public:#16a34a;
  --public-dark:#15803d;
  --public-soft:#dcfce7;

  --intranet:#ff7a00;
  --intranet-dark:#d95f00;
  --intranet-soft:#fff0e3;

  --entreprise:#2563eb;
  --entreprise-dark:#1d4ed8;
  --entreprise-soft:#dbeafe;

  --neutral-dark:#0f172a;
  --neutral-mid:#374151;
  --neutral-soft:#6b7280;
  --card-shadow:0 10px 30px rgba(15,23,42,.08);
}

/* Thème par défaut */
body{
  --theme:#2563eb;
  --theme-dark:#1d4ed8;
  --theme-soft:#e8eefc;
  --theme-topbar-start:#081226;
  --theme-topbar-end:#1d3d75;
}

/* Mapping par univers */
body.public{
  --theme:var(--public);
  --theme-dark:var(--public-dark);
  --theme-soft:var(--public-soft);
  --theme-topbar-start:#0c1f12;
  --theme-topbar-end:#15803d;
}

body.intranet{
  --theme:var(--intranet);
  --theme-dark:var(--intranet-dark);
  --theme-soft:var(--intranet-soft);
  --theme-topbar-start:#2a1300;
  --theme-topbar-end:#d95f00;
}

body.entreprises{
  --theme:var(--entreprise);
  --theme-dark:var(--entreprise-dark);
  --theme-soft:var(--entreprise-soft);
  --theme-topbar-start:#081226;
  --theme-topbar-end:#1d4ed8;
}

/* Base */
.topbar{
  background:linear-gradient(90deg,var(--theme-topbar-start),var(--theme-topbar-end));
  padding:14px 0;
}

.inner{
  max-width:1180px;
  margin:auto;
  padding:0 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.brand{
  color:#fff;
  text-decoration:none;
  font-size:20px;
  font-weight:700;
}

.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.nav a{
  color:#fff;
  text-decoration:none;
  background:rgba(255,255,255,.08);
  padding:10px 14px;
  border-radius:999px;
  font-size:14px;
  transition:.2s ease;
}

.nav a:hover,
.nav a:focus-visible{
  background:rgba(255,255,255,.16);
  text-decoration:none;
}

.wrap{
  max-width:1280px;
  margin:auto;
  padding:46px 24px 80px;
}

.card{
  background:#fff;
  border-radius:24px;
  padding:32px;
  box-shadow:var(--card-shadow);
  margin-bottom:28px;
  border:1px solid rgba(15,23,42,.04);
}

.card.theme{
  border-top:6px solid var(--theme);
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:22px;
}

.badge{
  display:inline-block;
  padding:10px 14px;
  border-radius:999px;
  background:var(--theme-soft);
  color:var(--theme-dark);
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:18px;
}

h1{
  font-size:clamp(48px,6vw,72px);
  line-height:1.03;
  margin:0 0 22px;
  font-weight:800;
}

h2{
  font-size:24px;
  margin-top:0;
}

h1, h2, h3{
  color:#111827;
}

.section-title{
  color:var(--theme-dark);
}

p, li{
  line-height:1.7;
  color:#374151;
  font-size:16px;
}

.actions{
  margin-top:24px;
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}

.btn{
  display:inline-block;
  padding:16px 22px;
  border-radius:16px;
  text-decoration:none;
  font-weight:700;
  font-size:16px;
  transition:.2s ease;
}

.btn:hover{
  transform:translateY(-1px);
  text-decoration:none;
}

.btn-primary{
  background:var(--theme);
  color:#fff;
}

.btn-primary:hover,
.btn-primary:focus-visible{
  background:var(--theme-dark);
  color:#fff;
}

.btn-secondary{
  background:#0f172a;
  color:#fff;
}

.btn-secondary:hover,
.btn-secondary:focus-visible{
  background:#111827;
  color:#fff;
}

.btn-outline{
  background:#fff;
  color:var(--theme-dark);
  border:2px solid var(--theme);
}

.btn-outline:hover,
.btn-outline:focus-visible{
  background:var(--theme-soft);
  color:var(--theme-dark);
}

.btn-urgent{
  background:var(--theme);
  color:#fff;
}

.btn-urgent:hover,
.btn-urgent:focus-visible{
  background:var(--theme-dark);
}

.cta-link{
  color:var(--theme-dark);
  font-weight:700;
  text-decoration:none;
  align-self:center;
}

.cta-link:hover,
.cta-link:focus-visible{
  text-decoration:underline;
}

.hero{
  background:linear-gradient(180deg,#ffffff 0%, var(--theme-soft) 100%);
  border:1px solid rgba(15,23,42,.05);
}

.kpi{
  border-left:6px solid var(--theme);
}

.footer{
  padding:30px 20px 50px;
  text-align:center;
  color:#6b7280;
  font-size:14px;
}

.contact-form{
  margin-top:20px;
  max-width:520px;
}

.form-row{
  display:flex;
  flex-direction:column;
  margin-bottom:14px;
}

label{
  font-weight:700;
  margin-bottom:6px;
  color:#111827;
}

input,
select,
textarea{
  padding:10px;
  border-radius:8px;
  border:1px solid #9ca3af;
  font-size:14px;
  font-family:Arial, sans-serif;
  background:#fff;
  color:#111827;
}

input:focus,
select:focus,
textarea:focus{
  border:2px solid var(--theme);
  outline:none;
}

.table-theme{
  width:100%;
  border-collapse:collapse;
  overflow:hidden;
  border-radius:16px;
}

.table-theme th{
  background:var(--theme-soft);
  color:var(--theme-dark);
  text-align:left;
  padding:12px;
}

.table-theme td{
  padding:12px;
  border-bottom:1px solid #e5e7eb;
  background:#fff;
}

.table-theme tr:hover td{
  background:#f9fafb;
}

/* ===== ACCESSIBILITÉ RGAA ===== */
:focus-visible{
  outline:3px solid var(--theme);
  outline-offset:2px;
}

.skip-link{
  position:absolute;
  top:-40px;
  left:10px;
  background:#000;
  color:#fff;
  padding:10px;
  z-index:1000;
}

.skip-link:focus{
  top:10px;
}

a{
  text-decoration:none;
}

a:hover,
a:focus-visible{
  text-decoration:underline;
}

.btn:focus-visible{
  outline:3px solid var(--theme);
}

@media (prefers-reduced-motion: reduce){
  *{
    animation:none !important;
    transition:none !important;
    scroll-behavior:auto !important;
  }
}

@media (prefers-contrast: more){
  body{
    background:#fff;
    color:#000;
  }

  .card{
    border:2px solid #000;
  }

  .btn{
    border:2px solid #000;
  }
}

@media (max-width:800px){
  .inner{
    flex-direction:column;
    align-items:flex-start;
  }

  .card{
    padding:24px;
  }
}
