/* ============================================================
   CREIM — Cabinet de gestion, cadrage & pilotage de projets
   Design tokens
   ============================================================ */

:root {
  --navy-900: #0a1b30;
  --navy-800: #0f2a4a;
  --navy-700: #163a5e;
  --navy-600: #1d4a74;
  --orange-500: #e85d1f;
  --orange-400: #ee7a3f;
  --orange-300: #f4a15b;
  --orange-100: #fce6d6;
  --paper: #f2f5f7;
  --paper-dim: #e6ebee;
  --white: #ffffff;
  --ink: #101923;
  --ink-soft: #4c5b68;
  --ink-faint: #7c8a96;
  --line: #d2dae0;
  --line-dark: #2a4361;

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0;
  color: var(--ink-soft);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--orange-500);
  font-weight: 500;
}

/* Skip link / focus visibility ------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 3px;
}

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

/* ============================================================
   Header / Navigation
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-800);
  border-bottom: 1px solid var(--line-dark);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  letter-spacing: 0.01em;
}

.brand-name span {
  color: var(--orange-400);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  font-size: 0.95rem;
  color: #cfdbe6;
  padding: 8px 14px;
  border-radius: 3px;
  position: relative;
}

.main-nav a:hover {
  color: var(--white);
}

.main-nav a.active {
  color: var(--white);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--orange-500);
}

.nav-cta {
  margin-left: 8px;
  background: var(--orange-500);
  color: var(--white) !important;
  padding: 9px 18px !important;
  border-radius: 3px;
  font-weight: 500;
}

.nav-cta:hover {
  background: var(--orange-400);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle span::before {
  position: absolute;
  top: -7px;
}

.nav-toggle span::after {
  position: absolute;
  top: 7px;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--navy-800);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 24px 20px;
    display: none;
    border-bottom: 1px solid var(--line-dark);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-cta {
    margin: 12px 0 0;
    text-align: center;
  }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--orange-500);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--orange-400);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-dark);
  color: var(--white);
}

.btn-outline:hover {
  border-color: var(--orange-400);
  color: var(--orange-300);
}

.btn-dark {
  background: var(--navy-800);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--navy-700);
}

/* ============================================================
   Hero (shared shell — content differs per page)
   ============================================================ */

.hero {
  background: var(--navy-800);
  color: var(--white);
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  color: var(--white);
  margin-bottom: 22px;
}

.hero-lede {
  font-size: 1.1rem;
  color: #c3d2de;
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.page-hero {
  background: var(--navy-800);
  color: var(--white);
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
}

.page-hero .wrap {
  position: relative;
}

.page-hero .eyebrow {
  color: var(--orange-300);
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  margin: 10px 0 16px;
  max-width: 20ch;
}

.page-hero p {
  color: #c3d2de;
  max-width: 58ch;
  font-size: 1.05rem;
}

/* ============================================================
   Gantt / phase diagram — recurring motif
   ============================================================ */

.phase-diagram {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phase-row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: center;
}

.phase-node {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange-500);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phase-bar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  height: 40px;
  position: relative;
  overflow: hidden;
}

.phase-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--orange-500), var(--orange-400));
  border-radius: 2px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy-900);
  white-space: nowrap;
}

/* Light variant, for use on paper background */
.phase-diagram.on-paper .phase-bar-track {
  background: var(--paper-dim);
}

.phase-diagram.on-paper .phase-bar {
  color: var(--white);
}

.phase-diagram.on-paper .phase-node {
  background: var(--navy-800);
}

/* ============================================================
   Sections
   ============================================================ */

section {
  padding: 84px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head h2 {
  margin-top: 10px;
}

.section-alt {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-dark {
  background: var(--navy-900);
  color: var(--white);
}

.section-dark p {
  color: #b6c4d0;
}

.section-dark h2, .section-dark h3 {
  color: var(--white);
}

/* Pillars grid — deliberately asymmetric, not identical cards ----- */

.pillars {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.pillar {
  background: var(--white);
  padding: 40px;
}

.pillar-lead {
  grid-row: span 2;
  background: var(--navy-800);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pillar-lead h3, .pillar-lead p {
  color: var(--white);
}

.pillar-lead p {
  color: #c3d2de;
}

.pillar-index {
  font-family: var(--font-mono);
  color: var(--orange-400);
  font-size: 0.85rem;
  margin-bottom: 18px;
  display: block;
}

.pillar h3 {
  margin-bottom: 10px;
}

.pillar:not(.pillar-lead) .pillar-index {
  color: var(--orange-500);
}

@media (max-width: 760px) {
  .pillars {
    grid-template-columns: 1fr;
  }
  .pillar-lead {
    grid-row: auto;
  }
}

/* Service list — used on services.html ----------------------------- */

.service-list {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.service-row:last-child {
  border-bottom: 1px solid var(--line);
}

.service-num {
  font-family: var(--font-mono);
  color: var(--orange-500);
  font-size: 1.1rem;
}

.service-body h3 {
  margin-bottom: 8px;
}

.service-body p {
  max-width: 62ch;
}

@media (max-width: 640px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Stat strip -------------------------------------------------------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.stat {
  background: var(--navy-900);
  padding: 32px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--orange-400);
  display: block;
  margin-bottom: 6px;
}

.stat-label {
  color: #b6c4d0;
  font-size: 0.92rem;
}

@media (max-width: 700px) {
  .stat-strip {
    grid-template-columns: 1fr;
  }
}

/* Tools row ---------------------------------------------------------- */

.tools-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: center;
}

.tool-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}

.tool-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.tool-dot.green { background: #2f8f4e; }
.tool-dot.red { background: #d1332f; }
.tool-dot.blue { background: var(--navy-700); }

/* Course / featured training card ------------------------------------ */

.course-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--white);
}

.course-feature-info {
  padding: 44px;
}

.course-feature-info .eyebrow {
  display: block;
  margin-bottom: 10px;
}

.course-feature-info h3 {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.course-feature-info > p {
  margin-bottom: 24px;
}

.course-facts {
  background: var(--paper);
  padding: 44px;
  border-left: 1px solid var(--line);
}

.fact-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.fact-row:last-child {
  border-bottom: none;
}

.fact-label {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding-top: 2px;
}

.fact-value {
  font-weight: 600;
  color: var(--ink);
}

.price-tag {
  font-family: var(--font-mono);
  color: var(--orange-500);
}

.curriculum-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.curriculum-list li {
  padding: 10px 0 10px 26px;
  position: relative;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.curriculum-list li:last-child {
  border-bottom: none;
}

.curriculum-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 8px;
  height: 8px;
  background: var(--orange-500);
}

@media (max-width: 820px) {
  .course-feature {
    grid-template-columns: 1fr;
  }
  .course-facts {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}

/* Upcoming catalogue grid --------------------------------------------- */

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.catalog-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 28px;
}

.catalog-card .eyebrow {
  color: var(--ink-faint);
}

.catalog-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 10px 0 8px;
}

.catalog-card p {
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

/* Values grid (à propos) ------------------------------------------------ */

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.value-card {
  background: var(--white);
  padding: 36px;
}

.value-card h3 {
  margin: 14px 0 8px;
  font-size: 1.1rem;
}

.value-card p {
  font-size: 0.94rem;
}

@media (max-width: 760px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
}

/* Presence / locations --------------------------------------------------- */

.presence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.presence-card {
  border: 1px solid var(--line-dark);
  padding: 30px;
}

.presence-flag {
  font-size: 1.6rem;
  margin-bottom: 12px;
  display: block;
}

.presence-card h3 {
  color: var(--white);
  margin-bottom: 6px;
}

.presence-card p {
  color: #b6c4d0;
}

@media (max-width: 640px) {
  .presence-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact page ------------------------------------------------------------ */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-block {
  margin-bottom: 30px;
}

.contact-block .eyebrow {
  display: block;
  margin-bottom: 8px;
}

.contact-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  padding: 6px 0;
}

.contact-line span.flag {
  font-family: var(--font-body);
  font-size: 1.2rem;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 560px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 500;
}

input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 2px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 6px;
}

/* CTA band ----------------------------------------------------------------- */

.cta-band {
  background: var(--orange-500);
  color: var(--white);
}

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 56px 0;
}

.cta-band h2 {
  color: var(--white);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  max-width: 26ch;
}

.cta-band .btn-dark:hover {
  background: var(--navy-900);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--navy-900);
  color: #a9bac8;
  padding: 60px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 16px;
}

.footer-brand .brand-name {
  color: var(--white);
}

.footer-brand p {
  margin-top: 14px;
  max-width: 32ch;
  color: #90a3b3;
  font-size: 0.92rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.85rem;
  color: #7690a2;
  flex-wrap: wrap;
  gap: 10px;
}
