/*
  Socle commun des sites démo.
  Chaque site définit son thème dans :root (couleurs, polices) depuis son propre index.html.
*/
:root {
  --brand: #1f5f99;
  --brand-dark: #154571;
  --brand-soft: #e8f0f7;
  --accent: #f2a43a;
  --ink: #1c2329;
  --muted: #5c6670;
  --bg: #ffffff;
  --bg-alt: #f5f7f9;
  --line: #e1e6eb;
  --urgent: #c8331e;
  --radius: 12px;
  --font-title: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16.5px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Bandeau démo */
.d-banner { background: #1b1f23; color: #fff; font-size: .82rem; padding: 8px 0; }
.d-banner .wrap { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; align-items: center; }
.d-banner a { color: #ffc21a; font-weight: 600; }

/* En-tête */
.d-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.d-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.d-logo { font: 700 1.15rem var(--font-title); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.d-logo__mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.05rem; }
.d-nav { display: none; gap: 20px; font-size: .95rem; }
.d-nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.d-nav a:hover, .d-nav a[aria-current="page"] { color: var(--brand); }
.d-burger { background: none; border: 1px solid var(--line); border-radius: 8px; width: 42px; height: 42px; font-size: 1.2rem; cursor: pointer; }
.d-mobile-nav { display: none; border-top: 1px solid var(--line); padding: 8px 16px 16px; }
.d-mobile-nav.is-open { display: grid; }
.d-mobile-nav a { padding: 10px 0; text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 500; }

/* Boutons */
.d-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font: 600 1rem var(--font-body); text-decoration: none;
}
.d-btn:hover { background: var(--brand-dark); }
.d-btn--alt { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.d-btn--alt:hover { background: var(--brand-soft); }
.d-btn--urgent { background: var(--urgent); }
.d-btn--urgent:hover { background: #a82a18; }
.d-btn--small { min-height: 40px; padding: 0 14px; font-size: .9rem; }
.d-btn:focus-visible, .d-chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Hero */
.d-hero { background: var(--brand-soft); padding: 48px 0 56px; }
.d-hero__grid { display: grid; gap: 32px; align-items: center; }
.d-hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 34em; }
.d-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.d-badges { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--muted); padding: 0; margin: 0; list-style: none; }
.d-badges li::before { content: "✓ "; color: var(--brand); font-weight: 700; }

/* Visuels provisoires (en attendant les vraies photos) */
.ph {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; font-size: 3rem;
}
.ph--wide { aspect-ratio: 16 / 10; font-size: 4.5rem; }
.ph span { position: absolute; left: 10px; bottom: 10px; font: 600 .75rem var(--font-body); background: rgba(0,0,0,.45); padding: 3px 9px; border-radius: 999px; }
.ph--light { background: linear-gradient(135deg, var(--brand-soft) 0%, #fff 100%); color: var(--brand); }

/* Sections */
.d-section { padding: 56px 0; }
.d-section--alt { background: var(--bg-alt); }
.d-section__intro { color: var(--muted); max-width: 42em; }
.d-grid { display: grid; gap: 16px; margin-top: 24px; }
.d-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.d-card__icon { font-size: 1.7rem; margin-bottom: 8px; display: block; }
.d-card p { color: var(--muted); margin: 0; }
.d-card a.d-more { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--brand); text-decoration: none; }
.d-list { padding-left: 1.2em; }
.d-list li { margin-bottom: 6px; }

.d-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }

.d-review { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.d-review__stars { color: var(--accent); letter-spacing: 2px; }
.d-review p { margin: 8px 0; }
.d-review cite { font-style: normal; font-size: .9rem; color: var(--muted); }
.d-note { font-size: .82rem; color: var(--muted); font-style: italic; }

.d-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding: 0; list-style: none; }
.d-chips li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .92rem; }

.d-faq { display: grid; gap: 10px; margin-top: 20px; }
.d-faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; }
.d-faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; }
.d-faq details p { color: var(--muted); }

.d-cta { background: var(--brand); color: #fff; border-radius: 18px; padding: 32px 24px; text-align: center; }
.d-cta p { color: rgba(255,255,255,.85); }
.d-cta .d-btn { background: #fff; color: var(--brand); }
.d-cta .d-btn:hover { background: var(--brand-soft); }
.d-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }

.d-info { display: grid; gap: 4px 20px; grid-template-columns: auto 1fr; margin: 16px 0; }
.d-info dt { color: var(--muted); }
.d-info dd { margin: 0; font-weight: 500; }

/* Pages (sites Vitrine) */
[data-page][hidden] { display: none; }
.d-page-head { background: var(--brand-soft); padding: 40px 0 36px; }
.d-page-head p { color: var(--muted); max-width: 40em; margin: 0; }
.d-crumb { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.d-crumb a { color: var(--brand); }
.d-two { display: grid; gap: 28px; align-items: start; }

/* Pied de page */
.d-footer { background: #1c2329; color: #c9d0d6; padding: 40px 0 110px; font-size: .9rem; }
.d-footer .wrap { display: grid; gap: 22px; }
.d-footer strong { color: #fff; }
.d-footer a { color: #c9d0d6; }
.d-footer__cols { display: grid; gap: 22px; }
.d-footer__cols ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.d-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid #333c44; padding-top: 18px; }
.d-footer__warning { color: #fff; font-weight: 600; }

/* Message « numéro fictif » */
.d-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60;
  background: #1b1f23; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: .9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px);
}

/* ---------- Assistant ---------- */
.as-launcher { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 10px; }
.as-launcher__btn {
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 1.6rem; box-shadow: 0 8px 22px rgba(0,0,0,.25);
}
.as-launcher__teaser { margin: 0; background: #fff; padding: 10px 14px; border-radius: 14px 14px 4px 14px; box-shadow: 0 8px 22px rgba(0,0,0,.15); font-size: .9rem; max-width: 220px; }
.as-panel { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: #fff; }
.as-panel[hidden] { display: none; }
.as-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--brand); color: #fff; }
.as-avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; font: 700 .9rem var(--font-body); flex: none; }
.as-head strong { display: block; }
.as-head span { font-size: .8rem; opacity: .85; }
.as-close { margin-left: auto; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.as-log { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-alt); }
.as-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff; font-size: .95rem; white-space: pre-line; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.as-msg--me { align-self: flex-end; background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; }
.as-msg--typing { display: flex; gap: 4px; padding: 14px; }
.as-msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: as-blink 1s infinite; }
.as-msg--typing i:nth-child(2) { animation-delay: .15s; }
.as-msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes as-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.as-input { border-top: 1px solid var(--line); padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; background: #fff; }
.as-input:empty { display: none; }
.d-chip { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--brand); background: #fff; color: var(--brand); font: 500 .9rem var(--font-body); cursor: pointer; }
.d-chip:hover { background: var(--brand-soft); }
.d-chip[aria-pressed="true"] { background: var(--brand); color: #fff; }
.d-chip--go { background: var(--brand); color: #fff; }
.as-text { display: flex; gap: 8px; width: 100%; }
.as-text input, .as-form input[type="text"], .as-form input[type="tel"], .as-form input[type="email"] {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--line); font: 400 .95rem var(--font-body);
}
.as-text input:focus, .as-form input:focus { outline: none; border-color: var(--brand); }
.as-form { display: grid; gap: 8px; width: 100%; }
.as-form label { font-size: .8rem; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.as-form .d-chip { justify-self: start; }
.as-error { color: var(--urgent); font-size: .85rem; margin: 0; }

.as-summary { align-self: stretch; background: #fff; border: 2px solid var(--brand); border-radius: 14px; padding: 16px; }
.as-summary__tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; margin: 0 0 10px; }
.as-summary__tag--urgent { background: #fde0da; color: var(--urgent); }
.as-summary__tag--hot { background: #fde8d4; color: #b4501c; }
.as-summary__tag--warm { background: #fff3c4; color: #7a5a00; }
.as-summary__tag--info { background: var(--brand-soft); color: var(--brand-dark); }
.as-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: .9rem; }
.as-summary dt { color: var(--muted); }
.as-summary dd { margin: 0; font-weight: 500; }
.as-summary__note { font-size: .8rem; color: var(--muted); margin: 0 0 12px; }
.as-summary__cta {
  display: block; text-align: center; padding: 12px; border-radius: 10px; text-decoration: none; font-weight: 700;
  background: #ffc21a; color: #1b1f23; border: 2px solid #1b1f23;
}

@media (min-width: 760px) {
  .d-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .d-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .d-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .d-gallery { grid-template-columns: repeat(4, 1fr); }
  .d-footer__cols { grid-template-columns: repeat(3, 1fr); }
  .d-two { grid-template-columns: 1.2fr .8fr; }
  .as-panel { inset: auto 16px 90px auto; width: 380px; height: 600px; max-height: calc(100vh - 120px); border-radius: 18px; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.25); }
}
@media (min-width: 980px) {
  .d-nav { display: flex; }
  .d-burger { display: none; }
  .d-hero__grid { grid-template-columns: 1.1fr .9fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
