/* Miriade Consulting : conseil en infrastructures numériques et énergétiques
   Mise en page : colonne éditoriale sobre, bandeau schéma "réseau" en tête, grilles à filets fins. */
:root {
  --ink: #14202b;
  --paper: #f5f6f4;
  --surface: #ffffff;
  --line: #d6dcd9;
  --muted: #55616b;
  --accent: #11075d;      /* bleu marine du logo : numérique */
  --accent-2: #2c7a57;    /* vert : énergie */
  --accent-soft: #eae9f4;
  --accent-2-soft: #e4f1ea;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --radius: 4px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.prose { max-width: 66ch; }
.prose p + p { margin-top: 1em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* En-tête */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.1; }
.brand { align-items: flex-start; }
.brand img { display: block; height: 34px; width: auto; max-width: none; align-self: flex-start; object-fit: contain; }
.brand-tag { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; margin-top: 6px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a { display: block; padding: 8px 12px; text-decoration: none; color: var(--ink); font-size: 0.95rem; border-radius: var(--radius); }
.nav a:hover { background: var(--paper); }
.nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font: inherit; font-size: 0.9rem; color: var(--ink); cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
}

/* Sections */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.section-head { display: grid; gap: 12px; margin-bottom: 40px; max-width: 70ch; }
.section-head p { color: var(--muted); }

/* Bandeau de page intérieure */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 56px 0 48px; }
.page-head h1 { max-width: 22ch; }
.page-head p { margin-top: 16px; max-width: 62ch; color: var(--muted); font-size: 1.125rem; }

/* Accueil : en-tête */
.hero { background: var(--surface); padding: 72px 0 64px; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.hero p.lead { margin-top: 20px; font-size: 1.15rem; color: var(--muted); max-width: 56ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: 0.97rem; border: 1px solid var(--accent); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ghost { color: var(--accent); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }

/* Schéma de chaîne : NRO → SRO → PBO ; PDL → TGBT → BESS/IRVE */
.chains { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 28px; display: grid; gap: 28px; }
.chain-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.chain-label.num { color: var(--accent); }
.chain-label.nrj { color: var(--accent-2); }
.chain { display: flex; align-items: center; }
.node { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.node b { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; background: var(--surface); }
.node span { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink); }
.link { flex: 1 1 auto; height: 2px; background: currentColor; margin: 0 6px 22px; min-width: 18px; }
.chain.num { color: var(--accent); }
.chain.nrj { color: var(--accent-2); }
.chain-note { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* Chiffres */
.figures { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.figure { padding: 28px 24px 28px 0; }
.figure + .figure { border-left: 1px solid var(--line); padding-left: 24px; }
.figure strong { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.figure span { color: var(--muted); font-size: 0.95rem; }

/* Domaines */
.domains { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.domain { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 32px; display: grid; gap: 16px; align-content: start; }
.domain.nrj { border-top-color: var(--accent-2); }
.domain ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.domain .more { font-weight: 600; font-size: 0.95rem; }

/* Grilles à filets */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.grid-4 > div { padding: 24px 24px 8px 0; display: grid; gap: 10px; align-content: start; }
.grid-4 > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.grid-4 .num-mark { font-family: var(--font-display); color: var(--accent); font-size: 1rem; font-weight: 600; }
.grid-4 p { color: var(--muted); font-size: 0.97rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 56px; }
.grid-2 > div { display: grid; gap: 10px; align-content: start; }
.grid-2 p { color: var(--muted); }

/* Clients */
.clients { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.client { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 6px; align-content: start; }
.client h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.client p { font-size: 0.93rem; color: var(--muted); }

/* Expertises détaillées */
.expertise { display: grid; grid-template-columns: 280px 1fr; gap: 48px; }
.expertise aside { display: grid; gap: 12px; align-content: start; }
.expertise aside p { color: var(--muted); }
.svc-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.svc { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.svc h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.svc p { color: var(--muted); }
.terms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.term { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); }
.nrj .term, .term.nrj { background: var(--accent-2-soft); color: var(--accent-2); }

/* Références */
.refs { display: grid; gap: 0; border-top: 1px solid var(--line); }
.ref { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.ref-tags { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ref h3 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 700; }
.ref p { color: var(--muted); margin-top: 6px; }
.tag-client { font-size: 0.8rem; color: var(--muted); }

/* Étapes */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; border-top: 2px solid var(--ink); }
.step { padding: 20px 18px 0 0; display: grid; gap: 8px; align-content: start; }
.step + .step { padding-left: 18px; border-left: 1px solid var(--line); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-display); font-weight: 600; color: var(--accent); }
.step h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.step p { font-size: 0.93rem; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: grid; gap: 22px; }
.contact-card dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-card dd { margin: 4px 0 0; font-size: 1.1rem; }
.contact-card dl { margin: 0; display: grid; gap: 20px; }
.contact-list { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; color: var(--muted); }

/* Bandeau d'appel */
.cta { background: var(--accent); color: #eef1f3; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta h2 { color: #fff; max-width: 28ch; }
.cta p { color: #c3c0dc; margin-top: 10px; }
.cta .btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
.cta .btn-primary:hover { background: var(--accent-soft); }

/* Pied de page */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 40px 0; font-size: 0.92rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.foot-brand img { display: block; height: 26px; width: auto; margin-bottom: 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }

/* Mentions légales */
.legal h2 { font-size: 1.3rem; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink); }

/* Adaptation écrans */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-4 > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .grid-4 > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .clients { grid-template-columns: 1fr 1fr; }
  .expertise { grid-template-columns: 1fr; gap: 24px; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .step:nth-child(odd) { padding-left: 0; border-left: 0; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  section { padding: 52px 0; }
  .wrap { padding: 0 18px; }
  .domains, .grid-2, .clients, .grid-4, .steps { grid-template-columns: 1fr; }
  .grid-4 > div, .grid-4 > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .step, .step + .step { padding-left: 0; border-left: 0; }
  .figures { grid-template-columns: 1fr; }
  .figure, .figure + .figure { padding: 18px 0; border-left: 0; }
  .figure + .figure { border-top: 1px solid var(--line); }
  .svc, .ref { grid-template-columns: 1fr; gap: 8px; }
  .ref-tags { flex-direction: row; flex-wrap: wrap; }
  .chains { padding: 20px; }
  .node span { font-size: 0.7rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
