/* ══════════════════════════════════════════════════════════════
   Ere Numérique — thème du site
   Toutes les couleurs, tailles et espacements du site sont ici.
   Modifier une valeur dans :root la change partout.
   ══════════════════════════════════════════════════════════════ */

:root {
  /* Fonds */
  --bg:          #10141d;
  --bg-alt:      #141b2c;
  --bg-footer:   #0d1119;
  --surface:     #161d29;

  /* Filets et bordures */
  --line:        #212938;
  --line-strong: #2a3444;
  --line-soft:   #1a2230;

  /* Textes */
  --text:        #e8ecf2;
  --text-2:      #c8d0dc;
  --muted:       #a8b3c4;
  --muted-2:     #8ea3ba;
  --dim:         #7f8b9e;
  --dim-2:       #5f6b7d;

  /* Accents (logo) */
  --accent:      #3fb9d6;
  --accent-light:#6fd0e6;
  --accent-soft: #8fe3f4;
  --green:       #4ad6a8;
  --blue:        #3a6fd0;

  /* Typographie */
  --font:        Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: Jost, Inter, system-ui, sans-serif;

  /* Rythme */
  --wrap:        1240px;
  --wrap-narrow: 820px;
  --gutter:      32px;
  --radius:      10px;
  --radius-lg:   12px;
  --radius-sm:   8px;
}

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.02em; text-wrap: pretty; }
p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; }

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--green); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(63, 185, 214, .28); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Structure ────────────────────────────────────────── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.band { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rule-top { border-top: 1px solid var(--line); }
.rule-bottom { border-bottom: 1px solid var(--line); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-wide-left { grid-template-columns: 1.05fr .95fr; }
.split-wide-right { grid-template-columns: .95fr 1.05fr; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── En-tête ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 20, 29, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header > .wrap {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 48px; width: auto; display: block; }
.brand-tag {
  font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); border-left: 1px solid var(--line-strong);
  padding-left: 12px; line-height: 1.35; white-space: nowrap;
}

.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; min-width: 0; font-size: 14px; }
.nav a { color: var(--text-2); padding: 6px 0; white-space: nowrap; display: block; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom: 1px solid var(--accent); }

.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-left: auto; }

/* ── Menu mobile ──────────────────────────────────────── */
.menu-toggle, .burger, .tel-mobile { display: none; }

@media (max-width: 900px) {
  .site-header > .wrap { gap: 0 12px; padding-top: 10px; padding-bottom: 10px; }
  .brand { flex: 1; min-width: 0; }
  .brand img { height: 38px; }
  .brand-tag { font-size: 11px; letter-spacing: .1em; padding-left: 10px; }

  .tel-mobile {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; flex: none;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    color: var(--text-2); font-size: 19px;
  }
  .tel-mobile:hover { border-color: var(--accent); color: var(--text); }

  .burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; flex: none; padding: 0 10px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer;
  }
  .burger span { display: block; height: 1.5px; background: var(--text-2); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .menu-toggle:checked + .burger { border-color: var(--accent); }
  .menu-toggle:checked + .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .menu-toggle:checked + .burger span:nth-child(2) { opacity: 0; }
  .menu-toggle:checked + .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .menu-toggle:focus-visible + .burger { outline: 2px solid var(--accent); outline-offset: 2px; }

  /* Panneau replié par défaut */
  .site-header .nav,
  .site-header .header-actions {
    display: none; flex-basis: 100%; margin-left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
  }
  .menu-toggle:checked ~ .nav,
  .menu-toggle:checked ~ .header-actions { display: flex; }

  .site-header .nav { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
  .site-header .nav > a,
  .site-header .nav .has-sub > a {
    padding: 13px 2px; font-size: 15.5px; border-bottom: 1px solid var(--line-soft);
  }
  .site-header .nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text); }
  .site-header .header-actions { padding: 14px 0 6px; gap: 10px; }
  .site-header .header-actions .btn { justify-content: center; padding: 13px 15px; font-size: 14.5px; }
}

/* ── Boutons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  background: transparent; border: 1px solid var(--line-strong); color: var(--text-2);
  padding: 9px 15px; border-radius: var(--radius-sm);
  font: inherit; font-size: 13.5px; text-decoration: none; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn:active { border-color: var(--accent-light); background: rgba(63, 185, 214, .08); }

.btn-accent { border-color: var(--accent); color: var(--accent-soft); }
.btn-accent:hover { background: rgba(63, 185, 214, .12); color: var(--text); }

.btn-lg { padding: 13px 24px; font-size: 14.5px; }

/* ── Titres et intertitres ────────────────────────────── */
.kicker {
  font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
  color: #9fb2c6; margin: 0 0 18px;
}
.kicker-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.kicker-mark span { font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: #9fb2c6; }
.kicker-mark::before {
  content: ""; width: 34px; height: 1px; flex: none;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.page-head { padding-top: 72px; padding-bottom: 56px; }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.025em; max-width: 800px; }
.page-head .lead { margin-top: 22px; }

.hero-title { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.025em; }
.lead { font-size: 17px; color: var(--muted); max-width: 660px; }

h2.section-title { font-size: clamp(26px, 2.6vw, 38px); max-width: 620px; }

/* Titre de rubrique avec filet dégradé */
.rule-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.rule-heading h2 { font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: #9fb2c6; white-space: nowrap; }
.rule-heading::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

.step-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.step-mark span { font-size: 12px; color: var(--accent-light); letter-spacing: .16em; }
.step-mark::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }

/* ── Images ───────────────────────────────────────────── */
.media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.media img { width: 100%; display: block; object-fit: cover; }
.media-460 img { height: 460px; }
.media-440 img { height: 440px; }
.media-420 img { height: 420px; }
.media-380 img { height: 380px; }
.media-360 img { height: 360px; }
.media-300 img { height: 300px; }

.hero-mark { position: relative; height: 520px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero-mark::before {
  content: ""; position: absolute; width: 100%; max-width: 620px; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(63,185,214,.16), rgba(74,214,168,.07) 42%, transparent 68%);
}
.hero-mark img { position: relative; height: 493px; width: 493px; display: block; }

/* ── Bandeau de chiffres ──────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 38px; padding-bottom: 38px; align-items: center; }
.stats > div { text-align: center; }
.stats > div + div { border-left: 1px solid #263049; }
.stats strong { display: block; font-size: clamp(20px, 2vw, 30px); font-weight: 500; letter-spacing: -.02em; }

.stats-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; padding-top: 38px; padding-bottom: 38px; }
.stats-legend strong { display: block; font-size: 30px; font-weight: 500; letter-spacing: -.02em; margin-bottom: 5px; }
.stats-legend span { font-size: 13.5px; color: var(--muted-2); }

/* ── Cartes ───────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  transition: border-color .15s;
}
.card:hover { border-color: #2f4a5e; }
.card i { font-size: 26px; color: var(--accent-light); }
.card h3 { font-size: 18px; margin: 18px 0 10px; }
.card p { font-size: 14px; color: var(--muted-2); }

.panel {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 56px 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; flex-wrap: wrap;
}
.panel h2 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 12px; max-width: 560px; }
.panel p { font-size: 15.5px; color: var(--muted); max-width: 520px; }

/* ── Listes à puces cochées ───────────────────────────── */
.checklist { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--text-2); }
.checklist li::before {
  content: ""; flex: none; width: 11px; height: 6px; margin-top: 6px;
  border-left: 1.5px solid var(--green); border-bottom: 1.5px solid var(--green);
  transform: rotate(-45deg);
}

/* ── Points forts ─────────────────────────────────────── */
.features { display: flex; flex-direction: column; gap: 24px; max-width: 540px; }
.feature { display: flex; gap: 16px; }
.feature i { font-size: 22px; color: var(--accent-light); flex-shrink: 0; margin-top: 2px; }
.feature h3 { font-size: 16.5px; margin-bottom: 6px; }
.feature p { font-size: 14.5px; color: var(--muted-2); }

/* ── Équipe ───────────────────────────────────────────── */
.member h3 { font-size: 17.5px; margin-bottom: 4px; }
.member .role { font-size: 13px; color: var(--accent-light); margin-bottom: 10px; }
.member p { font-size: 14px; color: var(--muted-2); }
.member .media, .member .photo-pending { margin-bottom: 16px; }
.member .media img { object-position: center 18%; }
.photo-pending {
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.photo-pending b { font-size: 34px; letter-spacing: .06em; color: var(--accent-light); font-weight: 300; }
.photo-pending span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim-2); }

/* ── FAQ ──────────────────────────────────────────────── */
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  cursor: pointer; font-size: 18px; color: var(--text); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--accent-light); font-size: 22px; line-height: 1;
  font-weight: 300; transition: transform .2s; flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div {
  font-size: 15px; color: var(--muted); margin-top: 14px; max-width: 700px;
  padding-left: 22px; border-left: 1px solid var(--line);
}

/* ── Actualités ───────────────────────────────────────── */
.tag {
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-soft);
  border: 1px solid #2f4a5e; border-radius: 999px; padding: 4px 12px; display: inline-block;
}
.meta { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.meta time { font-size: 13px; color: var(--dim); }

.featured { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  padding-bottom: 56px; border-bottom: 1px solid var(--line); margin-bottom: 56px; }
.featured h2 { font-size: clamp(24px, 2.4vw, 28px); margin-bottom: 14px; }
.featured p { font-size: 15px; color: var(--muted); margin-bottom: 20px; }

.card-article { display: flex; flex-direction: column; }
.card-article .tag-plain { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-soft); }
.card-article h3 { font-size: 19px; margin: 14px 0 10px; letter-spacing: -.01em; }
.card-article p { font-size: 14px; color: var(--muted-2); margin-bottom: 18px; }
.card-article .more { font-size: 13.5px; color: var(--accent-light); margin-top: auto; }

.back-link { font-size: 14px; color: var(--accent-light); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 34px; }

.article-body h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 22px; }
.article-body .chapeau { font-size: 19px; line-height: 1.55; color: var(--text-2); }
.article-body h2 { font-size: 24px; letter-spacing: -.015em; margin: 38px 0 16px; }
.article-body p { font-size: 16px; line-height: 1.72; color: var(--muted); margin-bottom: 14px; }

/* ── Formulaire ───────────────────────────────────────── */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; }
.form-rows { display: flex; flex-direction: column; gap: 18px; }
.field label { display: block; font-size: 13px; color: var(--muted-2); margin-bottom: 7px; }
.input {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 11px 13px;
  color: var(--text); font-family: inherit; font-size: 14.5px;
}
.input:focus { border-color: var(--accent); outline: none; }
textarea.input { resize: vertical; }
.form-note { font-size: 12.5px; color: #6d788a; }
.form-ok { font-size: 14px; color: var(--green); display: flex; align-items: center; gap: 8px; }
.form-error { font-size: 14px; color: #e8927c; display: flex; align-items: center; gap: 8px; }

.contact-list { display: flex; flex-direction: column; gap: 24px; border-top: 1px solid var(--line); padding-top: 36px; }
.contact-list > div { display: flex; gap: 14px; }
.contact-list i { font-size: 20px; color: var(--accent-light); margin-top: 3px; }
.contact-list dt { font-size: 13px; color: var(--dim); margin-bottom: 3px; }
.contact-list dd { margin: 0; font-size: 16px; }
.contact-list dd a { color: var(--text); }
.contact-list dd a:hover { color: var(--accent-light); }

/* ── Pied de page ─────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-footer); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; padding-top: 56px; padding-bottom: 32px; }
.footer-grid img { height: 96px; width: auto; display: block; margin-bottom: 20px; }
.footer-grid p { font-size: 14px; color: var(--dim); max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col strong { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim-2); font-weight: 500; margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--muted); }
.footer-col a:hover { color: var(--accent-light); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft); padding-top: 22px; margin-top: 24px; padding-bottom: 40px;
}
.footer-bottom, .footer-bottom a { font-size: 13px; color: var(--dim-2); }
.footer-bottom nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* ── Contenu légal ────────────────────────────────────── */
.legal h2 { font-size: 22px; margin: 40px 0 14px; }
.legal h3 { font-size: 17px; margin: 24px 0 10px; }
.legal p, .legal li { font-size: 15.5px; color: var(--muted); line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }

/* ── Adaptation tablette et mobile ────────────────────── */
@media (max-width: 1080px) {
  .split, .split-wide-left, .split-wide-right, .featured { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-mark { height: 380px; }
  .hero-mark img { height: 320px; width: 320px; }
}

@media (max-width: 900px) {
  :root { --gutter: 22px; }
  .nav { gap: 6px 16px; font-size: 13.5px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .stats > div:nth-child(3) { border-left: 0; }
  .stats-legend { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .panel { padding: 36px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stats > div { border-left: 0 !important; }
  .stats-legend { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form { padding: 24px; }
  section { padding-top: 44px !important; padding-bottom: 44px !important; }
  .hero-mark { height: 300px; }
  .hero-mark img { height: 240px; width: 240px; }
}

/* ── Tableau comparatif ───────────────────────────────── */
.cmp { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.cmp th, .cmp td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); font-weight: 500; border-bottom-color: var(--line-strong); }
.cmp tbody th { color: var(--text-2); font-weight: 400; width: 24%; }
.cmp tbody td { color: var(--muted); }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tbody tr:hover th, .cmp tbody tr:hover td { background: rgba(63, 185, 214, .04); }

/* Menu déroulant Services */
.has-sub { position: relative; }
.sub {
  position: absolute; top: 100%; left: -14px; min-width: 260px;
  background: var(--bg-alt); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 8px; margin-top: 10px;
  display: none; flex-direction: column; gap: 2px; box-shadow: var(--shadow-lg, 0 18px 40px rgba(0,0,0,.45));
}
.has-sub:hover .sub, .has-sub:focus-within .sub { display: flex; }
.sub a { padding: 9px 12px; border-radius: 6px; font-size: 13.5px; color: var(--text-2); border: 0 !important; }
.sub a:hover { background: rgba(63, 185, 214, .1); color: var(--text); }
@media (max-width: 900px) {
  .sub { position: static; display: flex; margin: 0; padding: 4px 0 6px; border: 0; background: none; box-shadow: none; min-width: 0; }
  .sub a { padding: 10px 2px 10px 18px; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line-soft) !important; border-radius: 0; }
  .sub a:last-child { border-bottom: 0 !important; }
  .site-header .nav .has-sub { border-bottom: 1px solid var(--line-soft); }
  .site-header .nav .has-sub > a { border-bottom: 0; }
}
