/* ==========================================================================
   CORYAS — Design System
   "la digitalisation des entreprises c'est nous"
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* --- Brand (constant across themes) --- */
  --c-orange: #F6B014;
  --c-orange-dim: #C98E0E;
  --c-success: #2ECC8F;
  --c-danger: #E2574C;

  /* --- Dark theme (default) --- */
  --bg: #0E0E10;
  --bg-raised: #1A1A1D;
  --bg-raised-2: #232327;
  --line: #2C2C30;
  --text: #FAFAF7;
  --text-dim: #A9A9AE;
  --text-faint: #6B6B70;
  --shadow: 0 20px 50px -20px rgba(0,0,0,0.6);
  --logo-current: url('../img/logo-light.png');

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --container: 1180px;

  --ff-display: 'Space Grotesk', 'Inter', sans-serif;
  --ff-body: 'Inter', system-ui, sans-serif;
  --ff-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
  --bg: #FAFAF7;
  --bg-raised: #FFFFFF;
  --bg-raised-2: #F1F0EA;
  --line: #E5E3DA;
  --text: #14140F;
  --text-dim: #55554E;
  --text-faint: #8B897E;
  --shadow: 0 20px 50px -20px rgba(20,20,15,0.18);
  --logo-current: url('../img/logo-dark.png');
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

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

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

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

p { margin: 0 0 1em; color: var(--text-dim); }

.mono {
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

section { position: relative; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--c-orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Eyebrow / labels — the "signal dot" motif
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-orange);
  box-shadow: 0 0 0 0 rgba(246,176,20,0.5);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246,176,20,0.45); }
  50% { box-shadow: 0 0 0 6px rgba(246,176,20,0); }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--c-orange);
  color: #14140F;
}
.btn-primary:hover { background: #FFC53D; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--c-orange); color: var(--c-orange); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { height: 28px; width: auto; }

/* No-JS fallback: swap logo via CSS if the browser prefers light and JS hasn't run yet */
@media (prefers-color-scheme: light) {
  html:not([data-theme]) #brand-logo,
  html:not([data-theme]) #footer-logo {
    content: url('../img/logo-dark.png');
  }
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-desktop a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-desktop a:hover, .nav-desktop a.active { color: var(--text); }
.nav-desktop a.active::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--c-orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--c-orange); transform: rotate(15deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.burger span {
  width: 18px; height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 78px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 99;
  padding: 16px 24px 28px;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-weight: 500;
}
.nav-mobile a.active { color: var(--c-orange); }
.nav-mobile .btn { margin-top: 16px; }

@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .burger { display: flex; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 168px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: normal;
  color: var(--c-orange);
}
.hero .lead {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-stats .stat-num {
  font-family: var(--ff-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stats .stat-label {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Signature element: connected systems diagram */
.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 480px;
  margin: 0 auto;
}
.hero-art svg { width: 100%; height: 100%; }
.node-pulse {
  animation: node-glow 3.2s ease-in-out infinite;
}
.node-pulse.d1 { animation-delay: 0s; }
.node-pulse.d2 { animation-delay: 0.5s; }
.node-pulse.d3 { animation-delay: 1s; }
.node-pulse.d4 { animation-delay: 1.5s; }
.node-pulse.d5 { animation-delay: 2s; }
@keyframes node-glow {
  0%, 100% { opacity: 0.35; r: 5; }
  50% { opacity: 1; r: 7; }
}
.line-flow {
  stroke-dasharray: 6 8;
  animation: dash-flow 6s linear infinite;
}
@keyframes dash-flow {
  to { stroke-dashoffset: -200; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 130px 0 70px; text-align: left; }
  .hero-art { max-width: 320px; margin-top: 20px; }
}

/* --------------------------------------------------------------------------
   Section scaffolding
   -------------------------------------------------------------------------- */
.section { padding: 100px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}
.section-alt { background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

@media (max-width: 700px) {
  .section { padding: 70px 0; }
}

/* --------------------------------------------------------------------------
   Cards — services / values
   -------------------------------------------------------------------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
@media (max-width: 900px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 32px 28px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover { border-color: var(--c-orange); transform: translateY(-4px); }
.card .card-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-s);
  background: rgba(246,176,20,0.12);
  color: var(--c-orange);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.card .card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { font-size: 0.94rem; margin-bottom: 0; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; }
.card ul li {
  font-size: 0.88rem;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
}
.card ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-orange);
}

/* Reusable dot-list (used outside .card too, e.g. services page) */
.dot-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.dot-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  color: var(--text-dim);
}
.dot-list li:last-child { margin-bottom: 0; }
.dot-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-orange);
}

/* --------------------------------------------------------------------------
   Process / connector list (orthogonal connector motif)
   -------------------------------------------------------------------------- */
.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 20px;
}
.process-step {
  position: relative;
  padding: 28px 22px 0;
  border-top: 2px solid var(--line);
}
.process-step::before {
  content: '';
  position: absolute;
  top: -2px; left: 0;
  width: 36px; height: 2px;
  background: var(--c-orange);
}
.process-step .step-num {
  font-family: var(--ff-mono);
  color: var(--c-orange);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 14px;
}
.process-step h4 { font-size: 1.02rem; margin-bottom: 8px; }
.process-step p { font-size: 0.88rem; }

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

/* --------------------------------------------------------------------------
   Team
   -------------------------------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .team-grid { grid-template-columns: 1fr; }
}

.team-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.team-card:hover { border-color: var(--c-orange); transform: translateY(-4px); }
.team-avatar {
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: #14140F;
  position: relative;
  overflow: hidden;
}
.team-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.25), transparent 45%);
}
.team-body { padding: 22px 24px 26px; }
.team-body h3 { font-size: 1.08rem; margin-bottom: 4px; }
.team-role {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-orange);
  display: block;
  margin-bottom: 14px;
}
.team-body p { font-size: 0.88rem; margin: 0; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: 1.7rem; margin-bottom: 6px; }
.cta-band p { margin: 0; }
.cta-band-text { max-width: 520px; }

@media (max-width: 700px) {
  .cta-band { padding: 36px 26px; flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: flex-start;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.contact-info-item .ci-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-s);
  background: rgba(246,176,20,0.12);
  color: var(--c-orange);
  display: flex; align-items: center; justify-content: center;
}
.contact-info-item .ci-icon svg { width: 20px; height: 20px; }
.contact-info-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-info-item p { font-size: 0.9rem; margin: 0; }
.contact-info-item a:hover { color: var(--c-orange); }

.social-row { display: flex; gap: 10px; margin-top: 28px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social-row a svg { width: 16px; height: 16px; }
.social-row a:hover { border-color: var(--c-orange); color: var(--c-orange); }

.form-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 36px;
}
@media (max-width: 500px) {
  .form-card { padding: 26px 20px; }
}

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 13px 15px;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--c-orange);
  outline: none;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 500px) {
  .field-row { grid-template-columns: 1fr; }
}

.form-msg {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-s);
  font-size: 0.9rem;
  margin-bottom: 18px;
  font-weight: 500;
}
.form-msg.show { display: flex; }
.form-msg.success { background: rgba(46,204,143,0.14); color: var(--c-success); border: 1px solid rgba(46,204,143,0.35); }
.form-msg.error { background: rgba(226,87,76,0.14); color: var(--c-danger); border: 1px solid rgba(226,87,76,0.35); }
.form-msg.pending { background: rgba(246,176,20,0.12); color: var(--c-orange); border: 1px solid rgba(246,176,20,0.3); }

/* Map card */
.map-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-top: 36px;
  height: 280px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(0.2); }

/* --------------------------------------------------------------------------
   Page hero (sub-pages)
   -------------------------------------------------------------------------- */
.page-hero {
  padding: 150px 0 70px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 14px; }
.page-hero p { max-width: 560px; font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col img { height: 26px; margin-bottom: 16px; }
.footer-col p { font-size: 0.9rem; }
.footer-col h5 {
  font-family: var(--ff-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; font-size: 0.9rem; }
.footer-col a { color: var(--text-dim); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--c-orange); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--text-faint);
}
.footer-bottom .social-row { margin-top: 0; }

/* --------------------------------------------------------------------------
   Reveal on scroll (progressive enhancement — visible by default without JS)
   -------------------------------------------------------------------------- */
.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Misc utility
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(246,176,20,0.12);
  color: var(--c-orange);
  margin-bottom: 14px;
}
