/* =========================================================
   Areya — feuille de style
   Mobile-first, sans dépendances. Mode clair / sombre auto.
   ========================================================= */

:root {
  --brand: #108bc7;
  --brand-strong: #0b6fa1;
  --brand-soft: #e6f4fb;
  --accent: #79cdc0;

  --bg: #ffffff;
  --bg-alt: #f5f8fb;
  --surface: #ffffff;
  --text: #0f1b2a;
  --text-muted: #556577;
  --border: #e3e9ef;

  --dark-bg: #0b1622;
  --dark-text: #e8eef4;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 42, .04), 0 8px 24px rgba(15, 27, 42, .06);
  --shadow-lg: 0 2px 4px rgba(15, 27, 42, .04), 0 20px 48px rgba(15, 27, 42, .12);

  --container: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #3aa9e0;
    --brand-strong: #69c0eb;
    --brand-soft: rgba(58, 169, 224, .12);
    --bg: #0b1420;
    --bg-alt: #0f1b29;
    --surface: #132233;
    --text: #e8eef4;
    --text-muted: #9aabbd;
    --border: #1f3246;
    --dark-bg: #071019;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 48px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .9rem;
}
.accent {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .8rem 1.5rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; line-height: 1;
  cursor: pointer; transition: transform .2s, background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn-sm { min-height: 40px; padding: .55rem 1.1rem; font-size: .95rem; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 20px rgba(16, 139, 199, .3); }
.btn-primary:hover { background: var(--brand-strong); color: #fff; transform: translateY(-2px); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

.link-arrow { font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand img { height: 42px; width: auto; }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a:not(.btn) {
  color: var(--text-muted); font-weight: 500; padding: .5rem .85rem; border-radius: 999px;
  transition: color .2s, background-color .2s;
}
.nav a:not(.btn):hover, .nav a.active { color: var(--text); background: var(--brand-soft); }
.nav .btn { margin-left: .5rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 0; cursor: pointer; border-radius: var(--radius-sm);
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; position: relative; z-index: 2; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: .25rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--bg);
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .25s, opacity .25s, visibility .25s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: .85rem 1rem; font-size: 1.05rem; }
  .nav .btn { margin: .5rem 0 0; min-height: 48px; }
  .site-header:has(.nav.open) { background: var(--bg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)) 0 clamp(4rem, 8vw, 7rem);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 85% 20%, rgba(16, 139, 199, .18), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(121, 205, 192, .2), transparent 70%),
    var(--bg);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  opacity: .5;
}
.hero-inner { display: grid; gap: 3rem; align-items: center; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 38rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 2.75rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { font-size: .9rem; color: var(--text-muted); }

.hero-visual { display: none; justify-content: center; }
.manta-orb {
  position: relative; width: min(420px, 100%); aspect-ratio: 1;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--brand) 22%, var(--surface)), var(--surface) 70%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border);
}
.manta-orb::before {
  content: ""; position: absolute; inset: -18px; border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--brand) 40%, transparent);
  animation: spin 40s linear infinite;
}
.manta-orb img { width: 68%; animation: glide 6s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(16, 139, 199, .25)); }
@keyframes glide { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.25fr 1fr; }
  .hero-visual { display: flex; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 44rem; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.section-head p:last-child { color: var(--text-muted); font-size: 1.075rem; }

.grid { display: grid; gap: 1.25rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.icon {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Services */
.services { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.service { transition: transform .25s, box-shadow .25s, border-color .25s; }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.service .icon { margin-bottom: 1.25rem; }
.service p { color: var(--text-muted); margin: 0; }
.service-cta {
  background: linear-gradient(135deg, var(--brand), #0b5f8a);
  border-color: transparent; color: #fff;
  display: flex; flex-direction: column; justify-content: center;
}
.service-cta p { color: rgba(255, 255, 255, .85); margin-bottom: 1.25rem; }
.service-cta .link-arrow, .service-cta .link-arrow:hover { color: #fff; }

/* Projets */
.projects { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }
.project {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-media { display: block; aspect-ratio: 650 / 425; overflow: hidden; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.project-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s; }
.project:hover .project-media img { transform: scale(1.04); }
.project-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.project-body h3 { margin-bottom: .35rem; }
.project-desc { color: var(--text); margin-bottom: .5rem; }
.project-role { color: var(--text-muted); font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .5rem; }
.tags li {
  font-size: .78rem; font-weight: 600;
  padding: .3rem .7rem; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
}

/* Approche */
.steps { display: grid; gap: 1.25rem; counter-reset: step; }
.step {
  position: relative;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.step::before {
  content: ""; position: absolute; left: 1.75rem; right: 1.75rem; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 0 0 3px 3px;
}
.step-num { display: block; font-size: 2.5rem; font-weight: 800; letter-spacing: -.04em; color: var(--brand); opacity: .35; line-height: 1; margin-bottom: 1rem; }
.step p { color: var(--text-muted); margin: 0; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Témoignages */
.section-dark { background: var(--dark-bg); color: var(--dark-text); }
.section-dark .eyebrow { color: var(--accent); }
.testimonials { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.quote {
  margin: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
}
.quote blockquote { margin: 0; font-size: 1.05rem; line-height: 1.7; color: rgba(232, 238, 244, .92); }
.quote figcaption { display: flex; flex-direction: column; font-size: .95rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.quote figcaption span { color: rgba(232, 238, 244, .6); }
.quote a { color: var(--accent); }
.quote a:hover { color: #fff; }

/* Technologies */
.tech { display: flex; flex-wrap: wrap; gap: .75rem; }
.tech li {
  padding: .75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: border-color .2s, color .2s, transform .2s;
}
.tech li:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

/* Contact */
.contact { display: grid; gap: 2.5rem; align-items: start; }
.contact-intro > p { color: var(--text-muted); font-size: 1.075rem; max-width: 34rem; margin-bottom: 1.75rem; }
.team { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; margin-top: 2.75rem; }
.member { display: flex; align-items: center; gap: .85rem; }
.member img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--bg-alt), 0 0 0 5px var(--brand-soft); }
.member div { display: flex; flex-direction: column; line-height: 1.35; }
.member span { font-size: .9rem; color: var(--text-muted); }
.team-note { margin-top: 1.25rem; font-size: .95rem; color: var(--text-muted); max-width: 30rem; }

.contact-card { display: grid; gap: 1.5rem; padding: 2rem; }
.contact-card li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-card li > div:last-child { display: flex; flex-direction: column; min-width: 0; }
.contact-card .label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.contact-card a { color: var(--text); font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.contact-card a:hover { color: var(--brand); }

@media (min-width: 900px) { .contact { grid-template-columns: 1.3fr 1fr; gap: 4rem; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; font-size: .92rem; color: var(--text-muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-inner p { margin: 0; }
.to-top { color: var(--text-muted); font-weight: 600; }

/* ---------- Animations d'apparition ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
