/* ===================== Design tokens ===================== */
:root {
  /* Thème clair épuré — accent orange #F97316, turquoise #26B3BB en secondaire */
  --bg:        #ffffff;
  --bg-soft:   #f6f8fa;
  --surface:   #ffffff;
  --surface-2: #f1f4f7;
  --border:    #e5e9ef;
  --text:      #0f1722;
  --heading:   #0b1220;
  --muted:     #5a6b80;
  --primary:   #f97316;   /* orange UI (icônes, menu actif) */
  --primary-2: #ea670d;   /* orange foncé (hover) */
  --accent:    #1597a0;   /* turquoise de marque, assombri pour contraste sur blanc */
  --accent-2:  #ff5722;   /* orange chaud */
  --ok:        #16a34a;
  --radius:    14px;
  --radius-sm: 10px;
  --maxw:      1120px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 34, .04), 0 1px 3px rgba(15, 23, 34, .06);
  --shadow:    0 10px 30px rgba(15, 23, 34, .08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 34, .12);
  --font:      system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:      ui-monospace, "Cascadia Code", "Fira Code", Consolas, monospace;
}

/* ===================== Base ===================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; color: var(--heading); }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p  { margin: 0 0 1rem; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; color: var(--accent); }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .8rem;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, .5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.gradient-text { color: var(--primary); }

/* ===================== Boutons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .96rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); box-shadow: var(--shadow-sm); }

.btn-ghost { background: #fff; color: var(--heading); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { box-shadow: var(--shadow); }

/* ===================== En-tête ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }

.brand { display: flex; align-items: center; gap: .55rem; font-size: 1.15rem; }
.brand-mark { color: var(--heading); display: flex; }  /* perches foncées, pan orange via var(--primary) */
.brand-name { font-weight: 700; color: var(--heading); }
.brand-name strong { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: var(--muted); font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--heading); }
.nav-links a.btn-primary { color: #fff; font-weight: 600; }

.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(--heading); border-radius: 2px; transition: .25s; }

/* ===================== Hero ===================== */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 85% -5%, rgba(249, 115, 22, .06), transparent 60%),
    radial-gradient(50% 45% at 5% 5%, rgba(21, 151, 160, .05), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3rem;
  align-items: center;
}
.lead { color: var(--muted); font-size: 1.12rem; max-width: 34rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.6rem 0 1.4rem; }
.hero-trust { display: flex; gap: 1.4rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .9rem; }
.hero-trust li { position: relative; padding-left: 1.3rem; }
.hero-trust li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

/* Maquette d'application */
.hero-visual { position: relative; }
.app-card {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.app-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.app-title { margin-left: auto; font-size: .8rem; color: var(--muted); }

.app-shell { display: grid; grid-template-columns: 138px 1fr; min-height: 240px; }
.app-side {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 10px;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
}
.side-item { font-size: .82rem; color: var(--muted); padding: 8px 10px; border-radius: 8px; }
.side-item.active { color: var(--primary); background: rgba(249, 115, 22, .1); font-weight: 600; }

.app-main { padding: 16px; display: grid; gap: 14px; align-content: start; }
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.kpi-label { display: block; font-size: .7rem; color: var(--muted); }
.kpi-val { font-weight: 800; font-size: 1.05rem; color: var(--heading); }

.grid-mock { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.grid-mock .row { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--border); }
.grid-mock .row:last-child { border-bottom: 0; }
.grid-mock .row span { height: 8px; border-radius: 99px; background: var(--surface-2); }
.grid-mock .row.head span { background: #dfe5ec; }
.grid-mock .row span:first-child { background: rgba(249, 115, 22, .35); }

.toast {
  align-self: end;
  justify-self: end;
  font-size: .78rem;
  color: var(--heading);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ok);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

/* ===================== Bandeau de stats ===================== */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 2rem 24px; text-align: center; }
.stat strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--heading); }
.stat span { color: var(--muted); font-size: .88rem; }

/* ===================== Sections génériques ===================== */
.section-head { text-align: center; max-width: 42rem; margin: 0 auto 3rem; }
.section-head p { color: var(--muted); }

.features, .stack, .contact { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }

/* ===================== Modules ===================== */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.feature-card:hover { border-color: #d7dde5; box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 1.3rem;
  border-radius: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.feature-card h3 { color: var(--heading); }
.feature-card p { color: var(--muted); margin: 0; font-size: .94rem; }

/* ===================== Carte de vote (hero) ===================== */
.vote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.vote-card-head { padding: 1.2rem 1.3rem .9rem; border-bottom: 1px solid var(--border); }
.vote-card-title { display: block; font-weight: 700; color: var(--heading); }
.vote-card-sub { font-size: .82rem; color: var(--muted); }
.vote-list { list-style: none; margin: 0; padding: .6rem; display: grid; gap: .5rem; }
.vote-item {
  display: flex; align-items: center; gap: .9rem;
  padding: .7rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.vote-item.top { border-color: var(--primary); background: rgba(249, 115, 22, .05); }
.vote-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 48px; padding: .35rem .5rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-soft); color: var(--heading);
  font: inherit; line-height: 1.1; cursor: default;
}
.vote-item.top .vote-btn { border-color: var(--primary); color: var(--primary); background: #fff; }
.vote-btn .chevron { font-size: .7rem; }
.vote-btn b { font-size: .95rem; }
.vote-meta { display: grid; }
.vote-meta strong { color: var(--heading); font-size: .95rem; }
.vote-meta span { color: var(--muted); font-size: .82rem; }
.vote-card-foot { padding: .9rem 1.3rem 1.1rem; color: var(--primary); font-weight: 600; font-size: .9rem; border-top: 1px solid var(--border); }

/* ===================== Nos solutions ===================== */
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.solution-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.solution-card:hover { border-color: #d7dde5; box-shadow: var(--shadow); transform: translateY(-2px); }
.solution-card.available { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.solution-card.propose { background: var(--bg-soft); border-style: dashed; }
.solution-card h3 { color: var(--heading); }
.solution-card p { color: var(--muted); font-size: .94rem; flex: 1; }
.solution-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.tag { font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.tag-ok { color: #fff; background: var(--primary); }
.tag-vote { color: var(--accent); background: rgba(21, 151, 160, .1); border: 1px solid rgba(21, 151, 160, .25); }
.solution-link { color: var(--primary); font-weight: 600; font-size: .92rem; margin-top: .4rem; }
.solution-link:hover { color: var(--primary-2); }

/* ===================== Comment ça marche ===================== */
.how { padding: clamp(3.5rem, 7vw, 5.5rem) 0; background: var(--bg-soft); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem 1.6rem;
}
.step-num {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--primary); color: #fff;
  font-weight: 800; font-size: 1.1rem;
  margin-bottom: 1rem;
}
.step h3 { color: var(--heading); }
.step p { color: var(--muted); margin: 0; font-size: .94rem; }

/* ===================== Focus ERP ===================== */
.erp { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.erp-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.erp-text .lead { color: var(--muted); font-size: 1.08rem; }
.erp-modules {
  list-style: none; padding: 0; margin: 0 0 1.4rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: .55rem;
}
.erp-modules li { color: var(--text); font-size: .92rem; }
.erp-tech { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.6rem; }
.erp-tech span { font-size: .76rem; color: var(--accent); background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 4px 10px; }

/* ===================== Bandeau CTA ===================== */
.cta-band { background: var(--primary); color: #fff; }
.cta-inner { text-align: center; padding: clamp(2.5rem, 6vw, 3.8rem) 24px; }
.cta-inner h2 { color: #fff; }
.cta-inner p { color: rgba(255, 255, 255, .92); margin-bottom: 1.6rem; }

/* ===================== Contact ===================== */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-text p { color: var(--muted); max-width: 28rem; }
.contact-list { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .7rem; }
.contact-list li { display: flex; align-items: center; gap: .7rem; color: var(--muted); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: grid;
  gap: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.field { display: grid; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--heading); }
.field input, .field textarea {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .75rem .9rem;
  font: inherit;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .15);
}
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) { border-color: #e0566b; }
.form-note { margin: 0; font-size: .9rem; min-height: 1.2em; }
.form-note.ok { color: var(--ok); }
.form-note.err { color: #dc2626; }

/* ===================== Pied de page ===================== */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 2.5rem 0 1.5rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-brand p { color: var(--muted); margin: .3rem 0 0; }
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a { color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--heading); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  margin-top: 1.6rem; padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: .84rem;
}
.footer-mute { opacity: .75; }

/* ===================== Carte solution : état voté ===================== */
.solution-card.voted { border-color: var(--accent); }
.solution-card.voted .solution-link { color: var(--accent); }
.vote-item.voted .vote-btn { border-color: var(--accent); color: var(--accent); }

/* ===================== Modale de connexion ===================== */
.auth-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.auth-modal.open { display: block; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(11, 18, 32, .55); backdrop-filter: blur(2px); }
.auth-dialog {
  position: relative;
  max-width: 400px; width: calc(100% - 2rem);
  margin: 12vh auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.8rem 1.6rem 1.6rem;
}
.auth-x {
  position: absolute; top: .7rem; right: .9rem;
  background: none; border: 0; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--muted);
}
.auth-x:hover { color: var(--heading); }
.auth-dialog h3 { color: var(--heading); }
.auth-intro { color: var(--muted); font-size: .9rem; }
.auth-actions { display: flex; gap: .6rem; margin-top: .4rem; }
.auth-actions .btn { flex: 1; }
.auth-note { margin: .8rem 0 0; font-size: .88rem; min-height: 1.1em; color: var(--muted); }
.auth-note.ok { color: var(--ok); }
.auth-note.err { color: #dc2626; }

/* Bouton de déconnexion discret (coin bas-droit) */
.auth-status {
  position: fixed; bottom: 16px; right: 16px; z-index: 90;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); border-radius: 99px;
  padding: .5rem .9rem; font-size: .82rem; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.auth-status:hover { color: var(--heading); border-color: #d7dde5; }

/* ===================== Responsive ===================== */
@media (max-width: 980px) {
  .solution-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  /* Sur mobile : le texte d'accroche d'abord, la carte de vote ensuite */
  .hero-visual { max-width: 480px; margin-inline: auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .erp-inner { grid-template-columns: 1fr; }
  .erp-visual { order: -1; max-width: 520px; }
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-links {
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .4rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 1rem 24px 1.4rem;
    transform: translateY(-130%);
    transition: transform .28s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: .6rem 0; }
  .nav-links a.btn-primary { padding: .75rem 1rem; text-align: center; }
  .nav-toggle { display: flex; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .solution-grid { grid-template-columns: 1fr; }
  .erp-modules { grid-template-columns: 1fr; }
}

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