/* ---------- Version 4 : visuels, animations, assistant ---------- */

/* Apparition au défilement */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.who .reveal:nth-child(2), .promises .reveal:nth-child(2), .timeline .reveal:nth-child(2) { transition-delay: .08s; }
.who .reveal:nth-child(3), .promises .reveal:nth-child(3), .timeline .reveal:nth-child(3) { transition-delay: .16s; }
.promises .reveal:nth-child(4), .timeline .reveal:nth-child(4) { transition-delay: .24s; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-bottom: 120px; }
.hero .wrap { grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.hero-tag { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin-bottom: 22px; }
.hero-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: #2fa66a; box-shadow: 0 0 0 0 rgba(47,166,106,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,166,106,.45); } 70% { box-shadow: 0 0 0 10px rgba(47,166,106,0); } 100% { box-shadow: 0 0 0 0 rgba(47,166,106,0); } }
.hero-id { margin-top: 26px; font-size: .86rem; color: var(--muted); }
button.link-more { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 110px; fill: #e6ecf8; }
.skyline .eiffel { fill: #d5dff3; }

/* Carte de suivi animée */
.tracker { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px 24px 20px; box-shadow: 0 24px 60px rgba(13,27,62,.12); }
.tracker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tracker-title { font-weight: 800; color: var(--navy); }
.tracker-badge, .doc-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg-soft); border-radius: 6px; padding: 3px 8px; }
.tracker-steps { list-style: none; margin: 0; padding: 0; }
.tracker-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); opacity: .45; transition: opacity .4s; }
.tracker-steps li:first-child { border-top: 0; }
.tracker-steps li b { display: block; color: var(--navy); font-size: .97rem; }
.tracker-steps li small { color: var(--muted); font-size: .84rem; }
.tick { flex: 0 0 24px; height: 24px; border-radius: 50%; border: 2px solid #c9d3e6; position: relative; transition: background .35s, border-color .35s; margin-top: 2px; }
.tick::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .3s .1s; }
.tracker-steps li.on { opacity: 1; }
.tracker-steps li.on .tick { background: #2fa66a; border-color: #2fa66a; }
.tracker-steps li.on .tick::after { transform: rotate(45deg) scale(1); }
.tracker-steps li.current .tick { border-color: var(--blue); animation: spin-ring 1s linear infinite; border-top-color: transparent; }
@keyframes spin-ring { to { transform: rotate(360deg); } }
.tracker-bar { height: 6px; background: var(--bg-soft); border-radius: 6px; margin-top: 14px; overflow: hidden; }
.tracker-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #2fa66a); border-radius: 6px; transition: width .6s ease; }

/* Qui */
.who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.who-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; transition: transform .25s, box-shadow .25s; }
.who-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(13,27,62,.1); }
.who-card svg { width: 60px; height: 60px; padding: 12px; border-radius: 16px; background: #eef3fc; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 16px; transition: background .25s, transform .25s; }
.who-card:hover svg { background: #e1eafb; transform: scale(1.05); }
.who-card p { color: var(--muted); margin: 0; }

/* Services */
.svc { background: var(--bg-soft); border-radius: 16px; padding: 28px; }
.svc .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .85rem; margin-right: 10px; vertical-align: 2px; }
.svc ul.plain li::marker { color: var(--blue); }

/* Frise */
.timeline { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 19px; left: 20px; right: 20px; height: 3px; background: #dbe3f3; }
.timeline::after { content: ""; position: absolute; top: 19px; left: 20px; height: 3px; width: 0; background: var(--blue); transition: width 1.6s ease .2s; }
.timeline.in::after { width: calc(100% - 40px); }
.timeline li { position: relative; }
.t-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); color: var(--navy); font-weight: 800; margin-bottom: 16px; }
.timeline p { color: var(--muted); margin: 0; }

/* Plan type */
.plan-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
ul.checks { list-style: none; padding: 0; margin: 0 0 1em; }
ul.checks li { position: relative; padding-left: 30px; margin-bottom: .7em; }
ul.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: #e3f4ea; }
ul.checks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 4px; height: 8px; border: solid #2fa66a; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.doc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; box-shadow: 0 20px 50px rgba(13,27,62,.1); transform: rotate(1.2deg); transition: transform .4s; }
.doc:hover { transform: rotate(0); }
.doc-head { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.doc-title { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin: 10px 0 14px; }
.doc-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: .93rem; }
.doc-row span { color: var(--muted); }
.doc-sub { margin-top: 14px; font-weight: 700; color: var(--navy); font-size: .9rem; }
.doc-steps { margin: 8px 0 0; padding-left: 1.2em; font-size: .93rem; color: var(--ink); }
.doc-steps li { margin-bottom: 4px; }
.doc-steps li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: #9fb0cc; }

.doc-toc { list-style: none; counter-reset: toc; margin: 16px 0 0; padding: 0; }
.doc-toc li { counter-increment: toc; position: relative; padding: 12px 0 12px 44px; border-top: 1px dashed var(--line); }
.doc-toc li:first-child { border-top: 0; }
.doc-toc li::before { content: counter(toc); position: absolute; left: 0; top: 12px; width: 28px; height: 28px; border-radius: 8px; background: #eef3fc; color: var(--blue); font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
.doc-toc b { display: block; color: var(--navy); }
.doc-toc span { color: var(--muted); font-size: .9rem; }

/* Engagements */
.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
.promise { border-top: 3px solid var(--blue); padding-top: 18px; }
.promise p { color: var(--muted); margin: 0; }

/* A propos + fiche société */
.about-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: start; }
.idcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.idcard h3 { font-size: 1rem; margin-bottom: 12px; }
.idcard dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; }
.idcard dt { color: var(--muted); }
.idcard dd { margin: 0; font-weight: 600; color: var(--navy); }
.small-link { display: inline-block; margin-top: 14px; font-size: .88rem; font-weight: 600; }
.inline-link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }

/* Contact */
.contact-band { background: var(--navy); color: #d6deef; }
.contact-band h2 { color: #fff; }
.contact-grid2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.contact-band .contact-lines p { margin: 0 0 12px; display: flex; flex-direction: column; }
.contact-band .contact-lines span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #8f9dbd; }
.contact-band .contact-lines a { color: #fff; font-weight: 700; text-decoration: none; }
.contact-band .contact-lines a:hover { text-decoration: underline; }

footer .foot p { margin: 10px 0 0; line-height: 1.7; }

/* ---------- Assistant ---------- */
.chat-launch { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 8px; background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 13px 20px 13px 16px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(44,95,196,.35); transition: transform .2s; }
.chat-launch:hover { transform: translateY(-2px); }
.chat-launch svg { width: 20px; height: 20px; fill: #fff; }
.chat-launch.hidden { display: none; }
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 370px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 40px); background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(13,27,62,.3); display: flex; flex-direction: column; overflow: hidden; animation: chat-in .25s ease; }
.chat[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.chat-head { background: var(--navy); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.chat-head small { display: block; color: #aab6d3; font-size: .78rem; }
.chat-close { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-note { margin: 0; padding: 8px 14px; font-size: .74rem; line-height: 1.4; color: var(--muted); background: #fff; border-bottom: 1px solid var(--line); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: .93rem; line-height: 1.5; animation: msg-in .25s ease; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.me { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg a { font-weight: 700; }
.typing { display: inline-flex; gap: 4px; padding: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9fb0cc; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.chat-choices { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 4px; background: #fff; border-top: 1px solid var(--line); }
.chat-choices:empty { display: none; }
.chat-choices button { font: inherit; font-size: .85rem; font-weight: 600; color: var(--blue); background: #eef3fc; border: 1px solid #d7e2f7; border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.chat-choices button:hover { background: #e1eafb; }
.chat-input { display: flex; gap: 6px; padding: 10px 12px 12px; background: #fff; }
.chat-input input { flex: 1; font: inherit; font-size: .93rem; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.chat-input button { border: 0; background: var(--navy); color: #fff; border-radius: 10px; width: 42px; font-size: 1.1rem; cursor: pointer; }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap, .plan-wrap, .about-grid, .contact-grid2 { grid-template-columns: 1fr; }
  .who, .promises { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .timeline::before, .timeline::after { display: none; }
  .doc { transform: none; }
}
@media (max-width: 600px) {
  .who, .promises, .timeline { grid-template-columns: 1fr; }
  .hero { padding-bottom: 90px; }
  .skyline { height: 70px; }
  .chat { right: 8px; bottom: 8px; height: calc(100vh - 16px); max-width: calc(100vw - 16px); }
  .chat-launch span { display: none; }
  .chat-launch { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-tag .dot, .tracker-steps li.current .tick, .typing i { animation: none; }
  .timeline::after { transition: none; }
  .who-card, .doc { transition: none; }
}

/* Partner services */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.tools .svc { background: var(--bg); }
.tool-h { margin-top: 1.4em; }
.tool-list { list-style: none; margin: 0; padding: 0; }
.tool-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.tool-list li:first-child { border-top: 0; padding-top: 0; }
.tool-list a { font-weight: 700; display: inline-block; margin-bottom: 2px; }
.tool-list span { display: block; color: var(--muted); font-size: .92rem; }
@media (max-width: 900px) { .tools { grid-template-columns: 1fr; } }
