/* ============================================================
   AgentIA Studio — Design premium v2
   Palette : teal profond + accents lumineux, glassmorphism,
   animations douces, cartes hover.
   ============================================================ */
:root {
  --teal: #0d9488;
  --teal-dark: #115e59;
  --teal-deep: #0f3d3a;
  --teal-light: #ccfbf1;
  --teal-mist: #f0fdfa;
  --teal-border: #5eead4;
  --ink: #0f172a;
  --muted: #64748b;
  --red: #dc2626;
  --bg: #f6faf9;
  --card: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 61, 58, 0.07);
  --shadow: 0 4px 14px rgba(15, 61, 58, 0.09);
  --shadow-lg: 0 16px 40px rgba(15, 61, 58, 0.16);
  --grad: linear-gradient(135deg, #0d9488 0%, #0f766e 55%, #0b5c77 100%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Segoe UI", "Inter", Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
a { color: var(--teal); text-decoration: none; }
.small { font-size: 12px; }
.muted { color: var(--muted); }

/* ---------- Topbar (sticky + glass) ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(15,61,58,0.08); padding: 12px 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 18px; font-weight: 700; color: var(--ink); }
.brand-sub { color: var(--teal); font-weight: 600; }
.topbar nav { display: flex; gap: 6px; }
.topbar nav a { margin-left: 4px; color: var(--ink); font-weight: 500; padding: 7px 14px; border-radius: 20px; transition: all 0.18s ease; }
.topbar nav a:hover { background: var(--teal-mist); color: var(--teal-dark); }
.topbar nav a.active { background: var(--grad); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background:
    radial-gradient(1100px 460px at 20% -10%, rgba(45, 212, 191, 0.22), transparent 60%),
    radial-gradient(900px 420px at 90% 10%, rgba(14, 116, 144, 0.16), transparent 55%),
    linear-gradient(180deg, #f2fdfb 0%, var(--bg) 100%);
  padding: 68px 0 58px; text-align: center; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(13, 148, 136, 0.08) 1px, transparent 1px); background-size: 26px 26px; pointer-events: none; }
.hero .wrap { position: relative; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.85); border: 1px solid var(--teal-border); color: var(--teal-dark); padding: 6px 16px; border-radius: 40px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm); backdrop-filter: blur(6px); }
.hero h1 { font-size: 46px; line-height: 1.12; margin: 20px 0 14px; color: var(--teal-deep); font-weight: 800; letter-spacing: -0.02em; }
.hero .accent { position: relative; color: var(--teal); }
.hero .accent::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 9px; background: rgba(45, 212, 191, 0.28); border-radius: 6px; z-index: -1; }
.hero .lead { font-size: 18px; max-width: 760px; margin: 0 auto 28px; color: #334155; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; border-radius: 12px; font-weight: 600; cursor: pointer; border: 1px solid transparent; font-size: 15px; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(13, 148, 136, 0.32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(13, 148, 136, 0.42); }
.btn-lg { padding: 15px 34px; font-size: 17px; border-radius: 14px; }
.btn-outline { background: #fff; border-color: var(--teal-border); color: var(--teal-dark); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: var(--teal-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-block { width: 100%; margin-top: 16px; }
.btn-small { padding: 6px 14px; font-size: 13px; border-radius: 9px; }

/* ---------- Sections & cartes ---------- */
.section-title { font-size: 27px; font-weight: 800; color: var(--teal-deep); margin: 44px 0 22px; letter-spacing: -0.01em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid rgba(15,61,58,0.08); border-radius: var(--radius); padding: 22px 22px 20px; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--teal-border); }
.card-icon { font-size: 34px; display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 16px; background: linear-gradient(135deg, var(--teal-mist), #e6f7f3); border: 1px solid var(--teal-border); margin-bottom: 12px; }
.card h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; color: var(--teal-deep); }
.card p { font-size: 13.5px; color: #475569; margin: 0 0 16px; flex: 1; }
.card .btn { align-self: flex-start; }

/* ---------- Avantages (benefits) ---------- */
.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: -22px; }
.benefit { background: var(--card); border: 1px solid rgba(15,61,58,0.08); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); text-align: center; transition: transform 0.2s ease, box-shadow 0.25s ease; }
.benefit:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.benefit-icon { font-size: 30px; }
.benefit h3 { margin: 10px 0 6px; font-size: 15.5px; color: var(--teal-deep); }
.benefit p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Bandeau ---------- */
.band { margin: 44px auto; }
.band-box { background: linear-gradient(135deg, #ffffff, var(--teal-mist)); border: 1px solid var(--teal-border); border-radius: 18px; padding: 26px 32px; box-shadow: var(--shadow-sm); }
.band-box h3 { margin: 0 0 12px; font-size: 20px; color: var(--teal-deep); }
.steps { padding-left: 22px; }
.steps li { margin: 8px 0; color: #334155; }

/* ---------- Studio layout ---------- */
.studio-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; margin: 28px auto 40px; align-items: start; }
.panel { background: var(--card); border: 1px solid rgba(15,61,58,0.08); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow-sm); }
.panel-title { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--teal-deep); }
.tool-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tool-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--ink); transition: background 0.15s ease, color 0.15s ease; }
.tool-link:hover { background: var(--teal-mist); color: var(--teal-dark); }
.tool-link.active { background: var(--grad); color: #fff; }
.tool-icon { font-size: 21px; }
.tool-name { font-size: 13.5px; font-weight: 500; }
.big-icon { font-size: 46px; }
#tool-head h2 { margin: 8px 0 4px; font-size: 22px; color: var(--teal-deep); font-weight: 800; }
#tool-desc { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

/* ---------- Formulaire ---------- */
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.form-field input[type="text"], .form-field textarea, .form-field select {
  width: 100%; padding: 10px 12px; border: 1px solid #d4dde2; border-radius: 10px; font-size: 14px; font-family: inherit; background: #fff; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,0.14); }
.form-field textarea { min-height: 80px; resize: vertical; }

/* ---------- Statut & résultat ---------- */
.status { margin-top: 14px; padding: 11px 15px; border-radius: 10px; font-size: 13.5px; }
.status.ok { background: var(--teal-mist); color: var(--teal-dark); border: 1px solid var(--teal-border); }
.status.err { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.hidden { display: none; }
.result { margin-top: 18px; }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#result-text { width: 100%; border: 1px solid #d4dde2; border-radius: 10px; padding: 14px; font-size: 13.5px; font-family: inherit; background: #fbfefe; }

/* ---------- Footer premium ---------- */
.site-footer { margin-top: 60px; background: linear-gradient(180deg, #0f3d3a 0%, #0a2a28 100%); color: #cbd5e1; padding: 46px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 34px; }
.footer-logo { font-size: 20px; color: #fff; margin-bottom: 12px; }
.footer-logo span { color: var(--teal-light); }
.footer-desc { font-size: 13.5px; line-height: 1.7; color: #94a3b8; margin: 0; max-width: 300px; }
.site-footer h4 { color: #fff; font-size: 14px; font-weight: 700; margin: 4px 0 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #94a3b8; font-size: 13.5px; transition: color 0.15s ease, padding-left 0.15s ease; }
.site-footer a:hover { color: var(--teal-light); padding-left: 3px; }
.footer-contact li { font-size: 13.5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; max-width: 1120px; }
.footer-bottom p { margin: 0; font-size: 12.5px; color: #64748b; }
.footer-legal { max-width: 720px; line-height: 1.6; }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}
/* Footer compact (studio, mentions) */
.footer-compact { padding: 26px 0 0; }
.footer-compact .footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 20px; }
.footer-compact a { color: var(--teal-light); }

/* ============================================================
   Chatbot AgentIA Assistant
   ============================================================ */
.chat-fab-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 999; }
.chat-fab {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--grad);
  color: #fff; border: none; cursor: pointer;
  font-size: 26px;
  box-shadow: 0 10px 26px rgba(13, 148, 136, 0.45);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chat-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 32px rgba(13, 148, 136, 0.55); }

.chat-window {
  position: fixed; right: 22px; bottom: 22px; z-index: 1000;
  width: 372px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100vh - 44px);
  background: #fff; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 61, 58, 0.28);
  display: flex; flex-direction: column; overflow: hidden;
  animation: chatIn 0.24s ease both;
}
@keyframes chatIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.chat-head {
  background: var(--grad); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-head-left { display: flex; align-items: center; gap: 10px; }
.chat-avatar { font-size: 26px; background: rgba(255,255,255,0.18); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.chat-title { font-size: 15px; }
.chat-status { font-size: 11.5px; opacity: 0.92; display: flex; align-items: center; gap: 5px; }
.chat-status .dot { width: 8px; height: 8px; background: #4ade80; border-radius: 50%; display: inline-block; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.chat-close { background: transparent; border: none; color: #fff; font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.chat-close:hover { background: rgba(255,255,255,0.18); }

.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f7fbfa; }
.chat-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg.bot { background: #fff; border: 1px solid rgba(15,61,58,0.08); border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); color: #1f2937; align-self: flex-start; }
.chat-msg.user { background: var(--grad); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-msg.typing { color: var(--muted); font-style: italic; border: none; background: transparent; }

.chat-suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px 14px; border-top: 1px solid rgba(15,61,58,0.06); background: #f7fbfa; }
.chat-suggestions button { font-size: 12px; padding: 6px 12px; border-radius: 16px; border: 1px solid var(--teal-border); background: #fff; color: var(--teal-dark); cursor: pointer; transition: background 0.15s ease; }
.chat-suggestions button:hover { background: var(--teal-light); }

.chat-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(15,61,58,0.08); background: #fff; }
.chat-form input { flex: 1; padding: 11px 14px; border: 1px solid #d4dde2; border-radius: 22px; font-size: 13.5px; font-family: inherit; outline: none; }
.chat-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,0.14); }
.chat-send { width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: #fff; border: none; font-size: 16px; cursor: pointer; flex-shrink: 0; transition: transform 0.15s ease; }
.chat-send:hover { transform: scale(1.08); }

.hidden { display: none !important; }

@media (max-width: 520px) {
  .chat-window { right: 10px; bottom: 10px; left: 10px; width: auto; }
  .chat-fab-wrap { right: 14px; bottom: 14px; }
}

/* ---------- Divers ---------- */
pre { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: 13px; }
.tag { font-size: 10px; padding: 2px 8px; border-radius: 20px; margin-left: 6px; vertical-align: middle; }
.tag-red { background: #fee2e2; color: var(--red); }

/* Animation d'apparition douce */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.hero h1, .hero .lead, .hero-badge, .cta-row, .card, .benefit { animation: fadeUp 0.5s ease both; }
.card:nth-child(2) { animation-delay: 0.04s; } .card:nth-child(3) { animation-delay: 0.08s; }
.card:nth-child(4) { animation-delay: 0.12s; } .card:nth-child(5) { animation-delay: 0.16s; }
.card:nth-child(6) { animation-delay: 0.2s; } .card:nth-child(7) { animation-delay: 0.24s; }
.card:nth-child(8) { animation-delay: 0.28s; } .card:nth-child(9) { animation-delay: 0.32s; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .studio-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .topbar nav a { padding: 6px 10px; font-size: 13.5px; }
}
@media (max-width: 520px) {
  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 27px; }
  .benefits { margin-top: 6px; }
}