/* Échelle de texte (une seule) : 12 · 14 · 16 · 18 · 20 · 24 · 28 · 32 · 40 · 48 · 56 · 64 · 72 px. Grille d'espacement : 4 · 8 · 12 · 16 · 24 · 32 · 40 · 48 · 56 · 64 · 80 · 96 · 128 px. */
/* Démos « Ce qu'on peut faire » (page Services de sitely.fr et page Réalisations).
   Tout est préfixé .sd- et ne dépend que de quelques variables du site hôte, avec des valeurs de secours. */

.sd {
  --sd-acc: var(--accent, var(--bleu, #4D9BFF));
  --sd-cta: var(--cta, var(--rouge, #FF3B3B));
  --sd-on-cta: var(--sur-cta, #0E0E10);
  --sd-surface: var(--surface, #18181C);
  --sd-bg: var(--fond, #0E0E10);
  --sd-line: var(--ligne, #2A2A30);
  --sd-text: var(--texte, #FAF7F2);
  --sd-text2: var(--texte-2, #C9C3B9);
  --sd-veil: var(--voile-bleu, rgba(77, 155, 255, 0.14));
  --sd-veil-line: var(--voile-bleu-bord, rgba(77, 155, 255, 0.35));
  --sd-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sd-nova: #5B3DF5;
  --sd-nova-deep: #0E0B1F;
  --sd-nova-coral: #FF6B4A;
  color: var(--sd-text);
}

.sd-head { display: grid; gap: 16px; margin-bottom: 32px; max-width: 46rem; }
.sd-head h2 { margin: 0; font-size: clamp(2rem, 1.25rem + 2.4vw, 3rem); line-height: 1.08; letter-spacing: -0.03em; }
.sd-head h2 em { font-style: normal; color: var(--sd-acc); }
.sd-head p { margin: 0; color: var(--sd-text2); font-size: 1.125rem; }

/* Onglets */
.sd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.sd-tab {
  appearance: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 1rem;
  padding: 12px 16px; border-radius: 0; border: 1px solid var(--sd-line);
  background: transparent; color: var(--sd-text2);
  transition: background 0.2s var(--sortie), color 0.2s var(--sortie), border-color 0.2s var(--sortie);
}
.sd-tab:hover { color: var(--sd-text); border-color: var(--sd-text2); }
.sd-tab[aria-selected="true"] { background: var(--sd-acc); border-color: var(--sd-acc); color: #fff; }
.sd-tab:focus-visible { outline: 3px solid var(--sd-acc); outline-offset: 3px; }

/* Un panneau : texte à gauche, démo à droite */
.sd-panel {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: center;
  padding: 40px 0 0; border: 0; border-top: 1.5px solid var(--sd-line); border-radius: 0; background: none;
}
.sd-panel[hidden] { display: none; }
.sd-text { display: grid; gap: 16px; align-content: start; }
.sd-text h3 { margin: 0; font-size: clamp(1.5rem, 1.125rem + 1.2vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; }
.sd-text p { margin: 0; color: var(--sd-text2); }
.sd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sd-list li {
  position: relative; padding: 8px 12px 8px 40px; border-radius: 0; color: var(--sd-text2);
  border: 1px solid transparent; transition: background 0.3s var(--sortie), border-color 0.3s var(--sortie), color 0.3s var(--sortie);
}
.sd-list li::before {
  content: ""; position: absolute; left: 12px; top: 15px; width: 14px; height: 8px;
  border-left: 2.5px solid var(--sd-acc); border-bottom: 2.5px solid var(--sd-acc); transform: rotate(-45deg) scale(0.9);
}
.sd-list.sd-pinned { counter-reset: pin; }
.sd-list.sd-pinned li { counter-increment: pin; cursor: default; }
.sd-list.sd-pinned li::before {
  content: counter(pin); border: 0; transform: none; left: 10px; top: 10px; width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--sd-veil); color: var(--sd-acc); font-size: 0.75rem; font-weight: 800;
}
.sd-list li.on { background: var(--sd-veil); border-color: var(--sd-veil-line); color: var(--sd-text); }
.sd-list.sd-pinned li.on::before { background: var(--sd-acc); color: #fff; }
.sd-note { font-size: 0.875rem; color: var(--sd-text2); }
.sd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.sd-cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 0;
  background: var(--sd-cta); color: var(--sd-on-cta); font-weight: 800; text-decoration: none; transition: transform 0.15s var(--sortie), filter 0.2s var(--sortie);
}
.sd-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.sd-cta:focus-visible { outline: 3px solid var(--sd-acc); outline-offset: 3px; }
.sd-replay {
  appearance: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 0.875rem; color: var(--sd-text);
  background: transparent; border: 1px solid var(--sd-line); border-radius: 0; min-height: 50px; padding: 0 16px;
}
.sd-replay:hover { border-color: var(--sd-acc); color: var(--sd-acc); }
.sd-replay:focus-visible { outline: 3px solid var(--sd-acc); outline-offset: 3px; }

.sd-stage { display: grid; justify-items: center; min-width: 0; }
.sd-caption { margin: 12px 0 0; font-size: 0.875rem; color: var(--sd-text2); text-align: center; }

/* ---------- Fenêtre de navigateur (site Studio Nova) ---------- */
.sd-browser {
  position: relative; width: 100%; max-width: 560px; border-radius: 0; overflow: hidden; background: #fff; color: #15121F;
  border: 1px solid rgba(0, 0, 0, 0.18);
}
.sd-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #ECE9F6; border-bottom: 1px solid #DAD5EC; }
.sd-bar i { display: none; }
.sd-url { margin-left: 12px; flex: 1; font-size: 0.75rem; color: #5D5A6B; background: #fff; border-radius: 0; padding: 4px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-site { position: relative; min-height: 380px; background: var(--sd-nova-deep); color: #fff; overflow: hidden; }
.sd-nav { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 16px 24px 16px 40px; font-size: 0.75rem; }
.sd-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1rem; }
.sd-logo i { width: 22px; height: 22px; border-radius: 0; background: var(--sd-nova); display: block; }
.sd-links { display: flex; gap: 16px; color: #C9C3E8; }
.sd-hero { position: relative; padding: 16px 24px 24px 40px; display: grid; gap: 12px; max-width: 24em; }
.sd-hero small { color: #B9AEFF; font-weight: 700; font-size: 0.75rem; }
.sd-hero h4 { margin: 0; font-size: clamp(1.5rem, 1.125rem + 1.6vw, 2rem); line-height: 1.05; letter-spacing: -0.03em; }
.sd-hero p { margin: 0; font-size: 0.875rem; color: #D6D1EE; }
.sd-hero-btns { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sd-b1, .sd-b2 { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 0; font-size: 0.75rem; font-weight: 800; }
.sd-b1 { background: var(--sd-nova-coral); color: #1F0B05; }
.sd-b2 { border: 1px solid rgba(255, 255, 255, 0.4); }
.sd-proofs { position: relative; display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 24px 16px 40px; font-size: 0.75rem; color: #D6D1EE; }
.sd-proofs span { background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 0; padding: 4px 8px; }
.sd-form {
  position: relative; margin: 0 24px 24px 40px; padding: 12px; border-radius: 0; background: #fff; color: #15121F;
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; font-size: 0.75rem;
}
.sd-form span { border: 1px solid #DAD5EC; border-radius: 0; padding: 8px 12px; color: #6B6778; }
.sd-form b { background: var(--sd-nova); color: #fff; border-radius: 0; padding: 8px 12px; }

/* Repères numérotés sur le site */
.sd-pin {
  position: absolute; z-index: 3; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--sd-nova); font-weight: 800; font-size: 0.75rem;
  opacity: 0.55; transform: scale(0.85); transition: opacity 0.3s var(--sortie), transform 0.4s var(--sd-ease), background 0.3s var(--sortie), color 0.3s var(--sortie);
}
.sd-pin.on { opacity: 1; transform: scale(1.18); background: var(--sd-nova-coral); color: #1F0B05; }
.sd-pin.on::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--sd-nova-coral); animation: sd-ping 1.4s ease-out infinite; }
.sd-hero .sd-pin { left: 8px; top: 18px; }
.sd-hero-btns .sd-pin { left: -32px; top: 50%; margin-top: -12px; }
.sd-proofs .sd-pin { left: 8px; top: -3px; }
.sd-form .sd-pin { left: -32px; top: 50%; margin-top: -12px; }
@keyframes sd-ping { from { opacity: 0.9; transform: scale(0.8); } to { opacity: 0; transform: scale(1.6); } }

/* Bulle de chat posée sur le site */
.sd-bubble {
  position: absolute; right: 16px; bottom: 16px; z-index: 4; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sd-nova); color: #fff; transition: transform 0.3s var(--sd-ease), opacity 0.2s var(--sortie);
}
.sd-bubble svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sd-bubble.gone { transform: scale(0.6); opacity: 0; pointer-events: none; }
.sd-chatwin {
  position: absolute; right: 14px; bottom: 14px; z-index: 5; width: min(300px, calc(100% - 28px)); height: 330px; display: flex; flex-direction: column;
  border-radius: 0; overflow: hidden; background: #fff; color: #15121F;
  transform-origin: 100% 100%; transform: scale(0.4); opacity: 0; pointer-events: none; transition: transform 0.45s var(--sd-ease), opacity 0.25s var(--sortie);
}
.sd-chatwin.open { transform: scale(1); opacity: 1; }
.sd-chathead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--sd-nova); color: #fff; font-size: 0.875rem; }
.sd-chathead i { width: 26px; height: 26px; border-radius: 50%; background: var(--sd-nova); display: block; }
.sd-chathead b { display: block; line-height: 1.2; }
.sd-chathead small { opacity: 0.8; font-size: 0.75rem; }
.sd-web-log { flex: 1; overflow: hidden; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #F7F5F0; scroll-behavior: smooth; }

/* ---------- Téléphone (WhatsApp) ---------- */
.sd-phone {
  width: 100%; max-width: 330px; border-radius: 0; padding: 12px; background: #1b1b1f; border: 1px solid #3a3a42;
 
}
.sd-phone-in { border-radius: 0; overflow: hidden; display: flex; flex-direction: column; height: 520px; background: #ECE5DD; }
.sd-wa-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #0B6B5E; color: #fff; }
.sd-wa-head i { width: 34px; height: 34px; border-radius: 50%; background: var(--sd-nova); display: block; flex-shrink: 0; }
.sd-wa-head b { display: block; font-size: 0.875rem; line-height: 1.2; }
.sd-wa-head small { font-size: 0.75rem; opacity: 0.85; }
.sd-wa-log {
  flex: 1; overflow: hidden; padding: 12px 12px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth;
  background-image: radial-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px); background-size: 14px 14px;
}
.sd-wa-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #F0F0F0; }
.sd-wa-foot span { flex: 1; background: #fff; border-radius: 0; padding: 8px 16px; font-size: 0.75rem; color: #8A8A8A; }
.sd-wa-foot i { width: 34px; height: 34px; border-radius: 50%; background: #0B6B5E; display: block; }

/* ---------- Messages (communs) ---------- */
.sd-msg { max-width: 86%; padding: 8px 12px; border-radius: 0; font-size: 0.875rem; line-height: 1.4; color: #15121F; animation: sd-pop 0.35s var(--sd-ease) both; position: relative; }
.sd-msg.bot { align-self: flex-start; background: #fff; border-top-left-radius: 0; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); }
.sd-msg.me { align-self: flex-end; background: #D9FDD3; border-top-right-radius: 0; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); }
.sd-web-log .sd-msg.me { background: var(--sd-nova); color: #fff; }
.sd-msg time { display: block; margin-top: 4px; font-size: 0.75rem; color: #7A7A7A; text-align: right; }
.sd-web-log .sd-msg.me time { color: rgba(255, 255, 255, 0.7); }
.sd-msg strong { font-weight: 800; }
.sd-chips { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 8px; animation: sd-pop 0.35s var(--sd-ease) both; }
.sd-chips span { padding: 8px 12px; border-radius: 0; background: #fff; border: 1px solid #0B6B5E; color: #0B6B5E; font-size: 0.75rem; font-weight: 700; }
.sd-web-log .sd-chips span { border-color: var(--sd-nova); color: var(--sd-nova); }
.sd-ok {
  align-self: stretch; border-radius: 0; padding: 12px 12px; background: #E8F7F0; border: 1px solid #B6E5D0; color: #115C3F; font-size: 0.75rem;
  animation: sd-pop 0.4s var(--sd-ease) both;
}
.sd-ok b { display: block; font-size: 0.875rem; }
.sd-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 12px; border-radius: 0; border-top-left-radius: 0; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); }
.sd-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9A9A9A; animation: sd-dot 1s infinite ease-in-out; display: block; }
.sd-typing i:nth-child(2) { animation-delay: 0.15s; }
.sd-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes sd-dot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes sd-pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ---------- Automatisation ---------- */
.sd-flow { width: 100%; max-width: 520px; border: 1px solid var(--sd-line); border-radius: 0; padding: 24px; background: var(--sd-bg); }
.sd-flow-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 0.875rem; color: var(--sd-text2); }
.sd-flow-top b { color: var(--sd-text); }
.sd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.sd-step { position: relative; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; opacity: 0.45; transition: opacity 0.4s var(--sortie); }
.sd-step:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 46px; bottom: -8px; width: 2px; background: var(--sd-line); }
.sd-step:not(:last-child)::before {
  content: ""; position: absolute; left: 16px; top: 46px; width: 2px; height: 0; background: var(--sd-acc); z-index: 1; bottom: -8px; transform: scaleY(0); transform-origin: top; transition: transform 0.6s var(--sd-ease) 0.3s;
}
.sd-step.done:not(:last-child)::before { transform: scaleY(1); }
.sd-step .n {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.875rem;
  border: 2px solid var(--sd-line); color: var(--sd-text2); background: var(--sd-bg); position: relative; z-index: 2; transition: all 0.3s var(--sortie);
}
.sd-step .t b { display: block; font-size: 1rem; color: var(--sd-text); line-height: 1.25; }
.sd-step .t span { font-size: 0.875rem; color: var(--sd-text2); }
.sd-step .s { font-size: 0.75rem; font-weight: 800; color: var(--sd-text2); letter-spacing: 0.04em; text-transform: uppercase; }
.sd-step.run, .sd-step.done { opacity: 1; }
.sd-step.run .n { border-color: var(--sd-acc); color: var(--sd-acc);  }
.sd-step.run .s { color: var(--sd-acc); }
.sd-step.done .n { background: var(--sd-acc); border-color: var(--sd-acc); color: #fff; }
.sd-step.done .s { color: #2BB57A; }
.sd-flow-end { margin-top: 16px; padding: 12px 16px; border-radius: 0; background: var(--sd-veil); border: 1px solid var(--sd-veil-line); font-size: 0.875rem; opacity: 0; transform: translateY(6px); transition: opacity 0.4s var(--sortie), transform 0.4s var(--sortie); }
.sd-flow-end.show { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .sd-panel { grid-template-columns: 1fr; gap: 32px; padding: 24px; }
  .sd-phone-in { height: 480px; }
}
@media (max-width: 480px) {
  .sd-panel { padding: 16px; border-radius: 0; }
  .sd-form { grid-template-columns: 1fr; }
  .sd-links { display: none; }
  .sd-site { min-height: 400px; }
  .sd-pin { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sd *, .sd *::before, .sd *::after { animation: none !important; transition: none !important; }
}

/* Thème sombre : l'accent est un bleu clair, le texte posé dessus doit être foncé. */
@media (prefers-color-scheme: dark) {
  .sd-tab[aria-selected="true"], .sd-list.sd-pinned li.on::before { color: #0E0E10; }
}
