/* =========================
   RESET & VARIABLES
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

:root {
  --primary: #5b5bff;
  --text: #111;
  --muted: #666;
  --bg-main: #ffffff;
  --bg-soft: #fafafa;
  --bg-tint: #f8f9ff;
  --bg-dark: #0f0f14;
}

/* =========================
   BASE
========================= */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-main);
  color: var(--text);
  line-height: 1.6;
  padding-top: 70px;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

/* =========================
   HEADER & NAV (FIX MOBILE)
========================= */

.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #eee;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  height: 70px;
  gap: 14px;
}

/* Logo always visible */
.logo {
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
}

.logo span {
  color: var(--primary);
}

/* Navigation */
.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-right::-webkit-scrollbar {
  display: none;
}

.nav-right a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  padding: 10px 6px;
  position: relative;
}

/* underline */
.nav-right a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.25s ease;
}

.nav-right a:hover::after {
  width: 100%;
}

/* Language switch */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.lang-switch a {
  text-decoration: none;
  color: var(--muted);
}

.lang-switch .active {
  font-weight: 600;
  color: var(--text);
}

/* =========================
   BUTTONS
========================= */

.btn {
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid var(--text);
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
}

/* =========================
   HERO
========================= */

.hero {
  padding: 150px 0 110px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-tint) 100%);
}

.hero h1 {
  font-size: 3.4rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  max-width: 620px;
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 25px;
}

.hero-points {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 40px;
}

/* =========================
   SECTIONS
========================= */

.section {
  padding: 100px 0;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 40px;
}

.section.dark {
  background: var(--bg-dark);
  color: #fff;
}

/* =========================
   GRIDS & CARDS
========================= */

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 30px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  padding: 30px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #f0f0f0;
}

.section.dark .card {
  background: #14141c;
  border: 1px solid #1f1f2a;
}

/* =========================
   CTA
========================= */

.cta-after-demos {
  background: var(--bg-dark);
  color: #fff;
  text-align: center;
  padding: 120px 0;
}

.cta-content {
  max-width: 680px;   /* LIMITE LA LARGEUR */
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.4rem;
  margin-bottom: 22px;
}

.cta-content p {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 36px; /* ESPACE TEXTE → BOUTON */
}

.cta-content .btn {
  display: inline-block;
}

.cta-note {
  margin-top: 18px;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* =========================
   ABOUT
========================= */

.about {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 50px;
  align-items: center;
}

.about img {
  width: 100%;
  border-radius: 14px;
}

/* =========================
   FOOTER
========================= */

.footer {
  padding: 40px 0;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid #eee;
  color: var(--muted);
}

/* =========================
   MOBILE OPTIMISATION
========================= */

@media (max-width: 768px) {

  body {
    padding-top: 90px;
  }

  .hero {
    padding: 120px 0 80px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-points {
    flex-direction: column;
    gap: 8px;
  }

  .section {
    padding: 70px 0;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .about {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about img {
    max-width: 260px;
    margin: 0 auto;
  }
}

/* =========================
   TYPOGRAPHIE – PASSE FINALE
========================= */

/* TITRES */
h1, h2, h3, h4 {
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  line-height: 1.2;
  margin-bottom: 36px;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

/* PARAGRAPHES */
p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

/* Texte clair sur fond sombre */
.section.dark p,
.cta-after-demos p {
  color: rgba(255,255,255,0.85);
}

/* LISTES (hero points) */
.hero-points {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* CARTES */
.card p {
  font-size: 0.95rem;
  line-height: 1.65;
}

/* CTA */
.cta-content h2 {
  font-weight: 600;
}

.cta-content p {
  font-size: 1.05rem;
}

/* FOOTER */
.footer {
  font-size: 0.85rem;
}

/* =========================
   MOBILE TYPO
========================= */

@media (max-width: 768px) {

  p {
    font-size: 0.95rem;
  }

  h1 {
    margin-bottom: 20px;
  }

  h2 {
    margin-bottom: 28px;
  }

}

/* ==================================================
   PATCH PREMIUM CARDS – VISUEL + HOVER
   (override volontaire)
================================================== */

.card {
  background: var(--bg-soft);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 30px;
  position: relative;
  overflow: hidden;

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.04);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease,
    border-color 0.35s ease;
}

/* halo subtil */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    900px circle at top left,
    rgba(91,91,255,0.06),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  background: #ffffff;
  border-color: rgba(91,91,255,0.35);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.09);
}

.card:hover::before {
  opacity: 1;
}

/* Cartes sur fond sombre */
.section.dark .card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: none;
}

.section.dark .card:hover {
  background: rgba(255,255,255,0.07);
  transform: translateY(-4px);
}

/* =========================================
   SERVICES DÉTAILLÉS – VISUEL PREMIUM
========================================= */

.services-detail .service-block {
  background: #fafafa;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 18px;
  padding: 42px 46px;
  margin-bottom: 40px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.04);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background 0.35s ease;
}

.services-detail .service-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(0,0,0,0.08);
  border-color: rgba(91,91,255,0.35);
  background: #ffffff;
}

/* Titres */
.services-detail h2 {
  margin-bottom: 14px;
}

/* Listes */
.services-detail ul {
  margin-top: 18px;
  padding-left: 20px;
}

.services-detail li {
  margin-bottom: 8px;
}

/* Séparateurs → on les rend discrets */
.service-divider {
  display: none;
}

/* =====================
   MOBILE
===================== */

@media (max-width: 768px) {
  .services-detail .service-block {
    padding: 28px 22px;
    margin-bottom: 28px;
  }

  .services-detail .service-block:hover {
    transform: none;
    box-shadow: 0 10px 26px rgba(0,0,0,0.04);
  }
}

/* =========================
   LOGO CLIQUABLE (HEADER)
========================= */

.logo {
  text-decoration: none;
  color: inherit;
}

.logo:visited {
  color: inherit;
}

.logo:hover {
  text-decoration: none;
}

.logo:focus {
  outline: none;
}

.contact {
  text-align: center;
}

.contact-intro {
  margin-bottom: 16px;
  color: #666;
}

.contact-email a,
.contact-whatsapp a {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.contact-email {
  margin-bottom: 8px;
}

.contact-whatsapp {
  margin-bottom: 12px;
}

.contact-email a:hover,
.contact-whatsapp a:hover {
  text-decoration: underline;
}

.contact-address {
  font-size: 0.9rem;
  color: #777;
  line-height: 1.4;
}

#jd-chatbot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: system-ui, sans-serif;
}

#jd-chat-window {
  width: 320px;
  height: 420px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.hidden {
  display: none;
}

#jd-chat-header {
  padding: 12px;
  background: #111;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#jd-chat-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
}

.jd-msg {
  margin-bottom: 8px;
  line-height: 1.4;
}

.jd-user {
  text-align: right;
  color: #111;
  font-weight: 500;
}

.jd-bot {
  text-align: left;
  color: #444;
}

#jd-chat-quick {
  padding: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#jd-chat-quick button {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  cursor: pointer;
}

#jd-chat-form {
  display: flex;
  border-top: 1px solid #eee;
}

#jd-chat-input {
  flex: 1;
  border: none;
  padding: 10px;
  font-size: 14px;
}

#jd-chat-form button {
  border: none;
  background: #111;
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
}

#jd-chat-toggle.hidden {
  display: none;
}

#jd-chat-toggle {
  width: 68px;          /* avant : 56px */
  height: 68px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}

#jd-chat-toggle img {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 768px) {
  #jd-chat-toggle {
    width: 58px;
    height: 58px;
  }
}

/* =========================
   CHATBOT – HALO ANIMÉ
========================= */

#jd-chat-toggle {
  position: relative;
  z-index: 10000;
}

/* Halo */
#jd-chat-toggle::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(91, 91, 255, 0.35) 0%,
    rgba(91, 91, 255, 0.25) 30%,
    rgba(91, 91, 255, 0.15) 45%,
    rgba(91, 91, 255, 0.05) 60%,
    transparent 70%
  );
  opacity: 0.8;
  animation: chatbot-pulse 2.8s ease-out infinite;
  pointer-events: none;
}

/* Animation */
@keyframes chatbot-pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  60% {
    transform: scale(1.15);
    opacity: 0;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

/* =========================
   CHATBOT – BADGE EN LIGNE
========================= */

#jd-chat-toggle {
  position: relative;
}

/* Badge */
#jd-chat-toggle::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2ecc71; /* vert en ligne */
  box-shadow: 0 0 0 2px #ffffff;
  animation: online-pulse 2s ease-out infinite;
}

/* Animation douce */
@keyframes online-pulse {
  0% {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 0 rgba(46,204,113,0.6);
  }
  70% {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 8px rgba(46,204,113,0);
  }
  100% {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 0 rgba(46,204,113,0);
  }
}

/* =========================
   CHATBOT – MESSAGE ACCROCHE
========================= */

#jd-chat-teaser {
  position: fixed;
  bottom: 110px;
  right: 24px;
  background: #ffffff;
  color: #111;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  box-shadow: 0 14px 36px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 9998;
}

#jd-chat-teaser.show {
  opacity: 1;
  transform: translateY(0);
}

/* Petite flèche */
#jd-chat-teaser::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 20px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  transform: rotate(45deg);
}
