/* ============================================================
   FEETLE — Feuille de style
   Charte : bleu #3C90CB (primaire) · orange #E95C05 (actions)
   Typo : Sora (display) · Inter (texte)
   ============================================================ */

:root {
  --bleu: #3C90CB;
  --bleu-fonce: #2A6E9E;
  --bleu-nuit: #0B2236;
  --bleu-nuit-2: #10304A;
  --bleu-clair: #96C3E2;
  --orange: #E95C05;
  --orange-vif: #FF6E14;
  --fond: #F7FAFC;
  --surface: #FFFFFF;
  --texte: #16303F;
  --texte-2: #4E6470;
  --bordure: #DDE8F0;
  --ombre: 0 10px 30px rgba(11, 34, 54, .08);
  --radius: 14px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

[data-theme="dark"] {
  --fond: #0B2236;
  --surface: #10304A;
  --texte: #EAF3FA;
  --texte-2: #9FB8C9;
  --bordure: #1D4260;
  --ombre: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font-body);
  color: var(--texte);
  background: var(--fond);
  line-height: 1.65;
  transition: background .3s, color .3s;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
a { color: var(--bleu); text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--orange); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: 0; }
.hp { position: absolute; left: -5000px; }

/* ---------------- Boutons & chips ---------------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: 600 1rem var(--font-body);
  padding: .8rem 1.5rem; border-radius: 999px; transition: transform .15s, box-shadow .15s, background .2s;
}
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(233, 92, 5, .35); }
.btn--primary:hover { background: var(--orange-vif); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--bleu); border: 2px solid var(--bleu); }
.btn--ghost:hover { background: var(--bleu); color: #fff; }
.btn--light { color: #fff; border-color: #fff; }
.btn--light:hover { background: #fff; color: var(--bleu-nuit); }
.btn--sm { padding: .5rem 1.1rem; font-size: .9rem; }
.btn--block { display: block; width: 100%; text-align: center; }

.chip {
  border: 1.5px solid var(--bleu); background: transparent; color: var(--bleu);
  border-radius: 999px; padding: .4rem 1rem; font: 500 .88rem var(--font-body);
  cursor: pointer; transition: all .15s;
}
.chip:hover, .chip.is-active { background: var(--bleu); color: #fff; }
.chip.is-active { box-shadow: 0 0 0 3px rgba(60, 144, 203, .25); }

.link-btn { background: none; border: 0; color: var(--orange); font: 600 .95rem var(--font-body); cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }

.eyebrow {
  font: 700 .78rem var(--font-display); letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: .5rem;
}
.eyebrow--light { color: var(--bleu-clair); }

/* ---------------- Navigation ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .8rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--fond) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bordure);
}
.nav__logo { display: flex; align-items: center; gap: .5rem; }
.logo-img { height: 42px; width: auto; display: block; }
.nav__links { display: flex; gap: 1.2rem; margin-left: auto; }
.nav__links a { color: var(--texte); font-weight: 500; font-size: .93rem; position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: var(--orange); transition: width .2s;
}
.nav__links a:hover::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: .8rem; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--bordure);
  background: var(--surface); cursor: pointer; display: grid; place-items: center;
}
.theme-toggle__icon { width: 16px; height: 16px; border-radius: 50%; background: var(--orange); box-shadow: inset -4px -3px 0 var(--surface); transition: box-shadow .3s; }
[data-theme="dark"] .theme-toggle__icon { box-shadow: inset 0 0 0 var(--surface); background: #FFC24B; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 24px; height: 2.5px; background: var(--texte); border-radius: 2px; transition: .2s; }

/* ---------------- Héro ---------------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  background: radial-gradient(ellipse at 70% 20%, var(--bleu-nuit-2), var(--bleu-nuit) 65%);
  color: #fff; overflow: hidden; padding: 7rem 1.5rem 4rem;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__inner { position: relative; z-index: 2; max-width: 880px; text-align: center; }
.hero__eyebrow { font: 600 .82rem var(--font-display); letter-spacing: .2em; text-transform: uppercase; color: var(--bleu-clair); margin-bottom: 1rem; }
.hero__title { font-size: clamp(2.4rem, 6.5vw, 4.6rem); font-weight: 800; margin-bottom: 1.2rem; }
.hero__title .accent { color: var(--orange-vif); position: relative; }
.hero__lead { max-width: 620px; margin: 0 auto 2rem; color: #C9DCEA; font-size: 1.08rem; }
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.6rem; }
.hero__cta .btn--ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero__cta .btn--ghost:hover { background: #fff; color: var(--bleu-nuit); border-color: #fff; }
.hero__profiles { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; align-items: center; }
.hero__profiles-label { font-size: .88rem; color: var(--bleu-clair); margin-right: .3rem; }
.hero__profiles .chip { border-color: rgba(255,255,255,.45); color: #E4EFF7; }
.hero__profiles .chip:hover, .hero__profiles .chip.is-active { background: var(--orange); border-color: var(--orange); color: #fff; }

.hero__scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 24px; height: 40px; border: 2px solid rgba(255,255,255,.4); border-radius: 14px; }
.hero__scroll span { position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--orange); animation: scrollHint 1.8s infinite; }
@keyframes scrollHint { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* Bandeau adaptatif */
.profile-banner {
  background: var(--bleu); color: #fff; padding: .9rem clamp(1rem, 4vw, 3rem);
  display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap;
  font-size: .95rem;
}
.profile-banner a { color: #fff; font-weight: 700; text-decoration: underline; }

/* ---------------- Sections ---------------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 5vw, 4rem); max-width: 1200px; margin: 0 auto; }
.section--alt { background: color-mix(in srgb, var(--bleu) 6%, var(--fond)); max-width: none; }
.section--alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section--dark { background: var(--bleu-nuit); color: #E4EFF7; max-width: none; }
.section--dark > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section__head { max-width: 720px; margin-bottom: 2.5rem; }
.section__sub { color: var(--texte-2); margin-top: .8rem; }
.section--dark .section__sub { color: #9FB8C9; }

.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--ombre); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); }

/* Services */
.service__icon { font-size: 1.8rem; margin-bottom: .8rem; }
.service h3 { margin-bottom: .5rem; color: var(--bleu); }
.service__tech { margin-top: .9rem; font-size: .8rem; color: var(--texte-2); font-family: var(--font-display); }

.method { margin-top: 3.5rem; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--radius); padding: 2rem; box-shadow: var(--ombre); }
.method h3 { margin-bottom: 1.2rem; }
.method__steps { display: grid; gap: .9rem; padding-left: 1.4rem; counter-reset: step; }
.method__steps li::marker { color: var(--orange); font-weight: 700; }

/* Filtres portfolio */
.filters { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.filters__group { display: flex; flex-direction: column; gap: .3rem; }
.filters__group--grow { flex: 1; min-width: 200px; }
.filters label { font-size: .8rem; font-weight: 600; color: var(--texte-2); }
.filters select, .filters input {
  padding: .6rem .9rem; border: 1.5px solid var(--bordure); border-radius: 10px;
  background: var(--surface); color: var(--texte); font: 1rem var(--font-body);
}

.projet { display: flex; flex-direction: column; gap: .6rem; }
.projet__meta { display: flex; gap: .5rem; flex-wrap: wrap; }
.tag { font-size: .72rem; font-weight: 600; padding: .18rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--bleu) 14%, transparent); color: var(--bleu); }
.tag--type { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); }
.projet h3 { color: var(--texte); }
.projet__resultat { margin-top: auto; font-weight: 700; color: var(--orange); font-size: .92rem; }
.projet__tech { font-size: .78rem; color: var(--texte-2); }

/* Innovation Lab */
.lab-card h3 { color: var(--bleu); margin-bottom: .5rem; }
.lab-card .link-btn { margin-top: .8rem; display: inline-block; }

/* Appels d'offres */
.offre-item h3 { color: var(--orange-vif); margin-bottom: .4rem; }
.offre-cta { margin-top: 2.4rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* À propos */
.apropos { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: center; }
.valeurs { margin-top: 1.2rem; padding-left: 1.2rem; display: grid; gap: .5rem; }
.valeurs li::marker { color: var(--orange); }
.apropos__stats { display: grid; gap: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--bordure); border-left: 5px solid var(--orange); border-radius: var(--radius); padding: 1.2rem 1.5rem; box-shadow: var(--ombre); }
.stat__num { font: 800 2.2rem var(--font-display); color: var(--bleu); display: block; }
.stat__label { color: var(--texte-2); font-size: .9rem; }

/* Blog */
.post h3 { color: var(--texte); margin: .4rem 0; font-size: 1.05rem; }
.post__date { font-size: .78rem; color: var(--texte-2); }
.post__tags { display: flex; gap: .4rem; margin-top: .8rem; }

/* Carrières */
.jobs { display: grid; gap: .9rem; margin-bottom: 2rem; }
.job { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--radius); padding: 1rem 1.4rem; }
.job__infos { display: flex; gap: .8rem; flex-wrap: wrap; color: var(--texte-2); font-size: .85rem; }
.job h3 { font-size: 1rem; }

/* Formulaires */
.form-card { max-width: 760px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field select, .field textarea {
  padding: .7rem .9rem; border: 1.5px solid var(--bordure); border-radius: 10px;
  background: var(--fond); color: var(--texte); font: 1rem var(--font-body);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--bleu); outline: none; box-shadow: 0 0 0 3px rgba(60,144,203,.18); }
.form-msg { margin-top: .8rem; font-weight: 600; min-height: 1.2em; }
.form-msg.ok { color: #1B8A4C; }
.form-msg.err { color: #C22F0C; }

/* Configurateur */
.config { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.6rem; align-items: start; }
.config__panel { display: grid; gap: 1.4rem; }
.config__group { border: 1px solid var(--bordure); border-radius: var(--radius); background: var(--surface); padding: 1.3rem; box-shadow: var(--ombre); }
.config__group legend { font: 700 .95rem var(--font-display); color: var(--bleu); padding: 0 .4rem; }
.radio-cards, .check-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; margin-top: .6rem; }
.radio-cards--inline { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.radio-cards label, .check-cards label {
  display: flex; align-items: center; gap: .5rem; border: 1.5px solid var(--bordure);
  border-radius: 10px; padding: .6rem .8rem; cursor: pointer; font-size: .92rem; background: var(--fond);
  transition: border-color .15s, background .15s;
}
.radio-cards label:has(input:checked), .check-cards label:has(input:checked) {
  border-color: var(--orange); background: color-mix(in srgb, var(--orange) 8%, var(--fond));
}
.radio-cards input, .check-cards input { accent-color: var(--orange); }

.config__result {
  position: sticky; top: 96px; background: var(--bleu-nuit); color: #fff;
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--ombre);
}
.config__result-label { font: 600 .8rem var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--bleu-clair); }
.config__result-range { font: 800 clamp(1.3rem, 2.6vw, 1.8rem) var(--font-display); color: var(--orange-vif); margin: .5rem 0; }
.config__result-delay { color: #C9DCEA; font-size: .92rem; }
.config__result-note { font-size: .78rem; color: #9FB8C9; margin: 1rem 0 1.2rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: start; }
.contact__aside h3 { color: var(--bleu); margin-bottom: .4rem; }
.contact__aside p { margin-bottom: 1.4rem; color: var(--texte-2); }
.news-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.news-form input[type="email"] { flex: 1; min-width: 180px; padding: .6rem .9rem; border: 1.5px solid var(--bordure); border-radius: 10px; background: var(--surface); color: var(--texte); }

/* ---------------- Pied de page ---------------- */
.footer { background: var(--bleu-nuit); color: #C9DCEA; padding: 3rem clamp(1rem, 5vw, 4rem) 1.5rem; }
.footer__inner { max-width: 1200px; margin: 0 auto 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer nav { display: grid; gap: .5rem; align-content: start; }
.footer a { color: #C9DCEA; font-size: .92rem; }
.footer a:hover { color: var(--orange-vif); }
.logo-img--footer { height: 46px; background: #fff; padding: .4rem .6rem; border-radius: 10px; }
.footer__copy { text-align: center; font-size: .8rem; color: #7F9AAD; border-top: 1px solid var(--bleu-nuit-2); padding-top: 1.2rem; max-width: 1200px; margin: 0 auto; }

/* ---------------- Assistant ---------------- */
.assistant-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 120;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--orange); color: #fff; font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(233,92,5,.45);
  transition: transform .15s;
}
.assistant-fab:hover { transform: scale(1.08); }
.assistant {
  position: fixed; right: 20px; bottom: 90px; z-index: 120;
  width: min(370px, calc(100vw - 40px)); height: 480px; max-height: calc(100vh - 120px);
  background: var(--surface); border: 1px solid var(--bordure); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(11,34,54,.3);
  display: flex; flex-direction: column; overflow: hidden;
}
.assistant[hidden] { display: none; }
.assistant__head { background: var(--bleu); color: #fff; padding: .8rem 1rem; display: flex; justify-content: space-between; align-items: center; }
.assistant__close { background: none; border: 0; color: inherit; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.assistant__log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.bulle { max-width: 85%; padding: .6rem .9rem; border-radius: 14px; font-size: .92rem; }
.bulle--bot { background: color-mix(in srgb, var(--bleu) 10%, var(--fond)); border-bottom-left-radius: 4px; align-self: flex-start; }
.bulle--user { background: var(--orange); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.bulle .link-btn { display: block; margin-top: .4rem; }
.assistant__input { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--bordure); }
.assistant__input input { flex: 1; padding: .55rem .8rem; border: 1.5px solid var(--bordure); border-radius: 10px; background: var(--fond); color: var(--texte); }

/* ---------------- Cookies & modale ---------------- */
.cookies {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 130;
  max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--bordure);
  border-radius: var(--radius); box-shadow: 0 18px 50px rgba(11,34,54,.3);
  padding: 1.1rem 1.3rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  font-size: .88rem;
}
.cookies[hidden] { display: none; }
.legal { border: 0; border-radius: var(--radius); max-width: 640px; width: calc(100vw - 40px); padding: 1.6rem; background: var(--surface); color: var(--texte); box-shadow: 0 18px 60px rgba(0,0,0,.4); }
.legal::backdrop { background: rgba(11,34,54,.6); }
.legal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.legal h3 { color: var(--bleu); }

/* ---------------- Animations d'apparition ---------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.loading { color: var(--texte-2); font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll span { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .apropos, .contact, .config { grid-template-columns: 1fr; }
  .config__result { position: static; }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav__links {
    position: fixed; inset: 60px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--bordure);
    padding: .5rem 0; display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .8rem 1.5rem; }
  .nav__burger { display: flex; }
  .nav .btn { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
