/* =========================================================
   Easy Computation and Simulation
   Feuille de style principale
   ========================================================= */

:root {
  --bg: #0b1120;
  --bg-soft: #111a2e;
  --surface: #ffffff;
  --surface-alt: #f4f7fb;
  --ink: #1b2435;
  --ink-soft: #515c70;
  --muted: #7c8699;
  --brand: #1f6feb;
  --brand-dark: #1456c4;
  --brand-soft: #e7f0ff;
  --accent: #00b3a4;
  --accent-soft: #e2faf7;
  --line: #e3e8f0;
  --warn: #f59e0b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(16, 32, 64, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 32, 64, 0.16);
  --maxw: 1140px;
  --font: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.section { padding: 72px 0; }
.section--alt { background: var(--surface-alt); }
.section--dark { background: var(--bg); color: #d6deeb; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .6rem;
}
.section--dark .eyebrow { color: var(--accent); }

.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(31,111,235,.3); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn--light { background: #fff; color: var(--brand); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 800;
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
}
.brand__name { line-height: 1.1; }
.brand__name small { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .95rem;
  padding: .5rem .8rem;
  border-radius: 8px;
}
.nav__links a:hover { color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.nav__links a.active { color: var(--brand); }
.nav__cta { margin-left: .4rem; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(1100px 500px at 85% -10%, rgba(0,179,164,.25), transparent 60%),
              radial-gradient(900px 500px at 10% 0%, rgba(31,111,235,.35), transparent 55%),
              var(--bg);
  color: #e9eef7;
  overflow: hidden;
  padding: 92px 0 84px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: #fff; }
.hero p { color: #b9c4d8; font-size: 1.18rem; max-width: 52ch; }
.hero .eyebrow { color: var(--accent); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero__stats { display: flex; gap: 30px; margin-top: 38px; flex-wrap: wrap; }
.hero__stat strong { display: block; font-size: 1.9rem; color: #fff; }
.hero__stat span { color: var(--muted); font-size: .9rem; }

.code-card {
  background: #0d1526;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: "Consolas", "SF Mono", Menlo, monospace;
}
.code-card__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  background: #0a1120;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.code-card__bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.code-card__bar i:nth-child(1){ background:#ff5f56; }
.code-card__bar i:nth-child(2){ background:#ffbd2e; }
.code-card__bar i:nth-child(3){ background:#27c93f; }
.code-card__bar em { margin-left: auto; font-style: normal; color: #5d6b85; font-size: .78rem; }
.code-card pre { margin: 0; padding: 18px 20px; font-size: .86rem; line-height: 1.7; overflow-x: auto; color: #cdd6e6; }
.code-card .c-key { color: #c792ea; }
.code-card .c-fn { color: #82aaff; }
.code-card .c-str { color: #c3e88d; }
.code-card .c-num { color: #f78c6c; }
.code-card .c-com { color: #5d6b85; font-style: italic; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cfdaf0; }
.card__icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--brand-soft);
  color: var(--brand);
}
.card__icon--c { background:#eef2ff; color:#3b5bdb; }
.card__icon--py { background:#fff7e6; color:#d9890a; }
.card__icon--mat { background:#fdecec; color:#d6453d; }
.card__icon--comsol { background:#e7f7f4; color:#0a9384; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-soft); font-size: .98rem; margin-bottom: 0; }
.card__link { display: inline-block; margin-top: 16px; font-weight: 700; font-size: .92rem; }
.card__link::after { content: " →"; }

/* Feature with check list */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: .8rem; color: var(--ink-soft); }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  width: 20px; height: 20px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .75rem; font-weight: 800;
}

/* ---------- Pillars / numbered steps ---------- */
.steps { counter-reset: step; display: grid; gap: 22px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step__num {
  counter-increment: step;
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800;
}
.step__num::before { content: counter(step); }
.step h3 { margin-bottom: .25rem; }
.step p { color: var(--ink-soft); margin: 0; }

/* ---------- Page header ---------- */
.page-head {
  background: radial-gradient(800px 400px at 90% -20%, rgba(0,179,164,.22), transparent 60%), var(--bg);
  color: #e9eef7;
  padding: 64px 0 56px;
}
.page-head h1 { color: #fff; }
.page-head p { color: #b9c4d8; max-width: 62ch; margin: 0; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--accent); }

/* ---------- Course detail ---------- */
.course-meta {
  display: flex; flex-wrap: wrap; gap: 24px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
}
.course-meta div span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.course-meta div strong { font-size: 1.05rem; }

.module {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  background: #fff;
}
.module h3 { display: flex; align-items: center; gap: .6rem; }
.module h3 .tag { font-size: .72rem; }

.tag {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand);
}
.tag--accent { background: var(--accent-soft); color: var(--accent); }
.tag--warn { background: #fff4e0; color: #b06a00; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-block;
  padding: .4rem .85rem;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  font-size: .85rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.contact-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.contact-card__icon {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 1.2rem;
}
.contact-card__icon--wa { background: var(--accent-soft); color: var(--accent); }
.contact-card h3 { margin: 0 0 .15rem; font-size: 1.05rem; }
.contact-card p { margin: 0; color: var(--ink-soft); }
.contact-card a { font-weight: 700; }

/* ---------- CTA banner ---------- */
.cta {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  border-radius: 20px;
  padding: 52px 44px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.9); max-width: 60ch; margin: 0 auto 24px; }
.cta .btn--light:hover { background: #f0f4ff; }

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  background: #fff;
  margin-bottom: 14px;
}
.faq-item h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.faq-item p { margin: 0; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  color: #98a4ba;
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 36px;
}
.site-footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: #98a4ba; }
.site-footer a:hover { color: #fff; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand__name small { color: var(--muted); }
.footer-brand p { color: #8593ab; font-size: .92rem; margin-top: 14px; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 22px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .85rem; color: #6f7c93;
}

/* ---------- Images / médias ---------- */
.media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.08);
  background: #0b1426;
}
.media img { width: 100%; display: block; }

.figure { margin: 0; }
.figure figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; }

/* Galerie d'illustrations */
.gallery .card { padding: 0; overflow: hidden; }
.gallery .card img { width: 100%; display: block; background: #0b1426; }
.gallery .card .cap { padding: 20px 24px; }
.gallery .card .cap h3 { margin: 0 0 .3rem; font-size: 1.08rem; }
.gallery .card .cap p { margin: 0; color: var(--ink-soft); font-size: .94rem; }

/* Vignette en tête de carte de formation */
.thumb {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  background: #0b1426;
  border: 1px solid var(--line);
}

/* Illustration dans la colonne latérale des fiches formation */
.course-figure {
  margin: 0 0 18px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.course-figure img { width: 100%; display: block; background: #0b1426; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.section-head { max-width: 64ch; margin-bottom: 44px; }
.section-head.text-center { margin-left: auto; margin-right: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav__links {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 22px 18px;
    gap: 2px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: .7rem .6rem; }
  .nav__cta { margin: 8px 0 0; }
  .nav__toggle { display: flex; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .cta { padding: 38px 22px; }
}
