/* Cabinet dentaire : bleu marine et turquoise de la carte de visite, rose en touche */
:root {
  --navy: #1f3a68; --teal: #3fa7b5; --teal-soft: #e8f6f8; --rose: #f6dadb; --ink: #1d2a3a; --muted: #5d6b7a;
  --line: #e2e8ef; --bg: #ffffff; --alt: #f6f9fb; --red: #c62828; --orange: #e65100;
  --r: 16px; --shadow: 0 14px 40px rgba(31, 58, 104, .10);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* sinon .form { display: grid } réaffiche un bloc caché */
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Poppins, system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; overflow-x: clip; }
html[dir="rtl"] body { font-family: Tajawal, Poppins, sans-serif; font-size: 17px; }
a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.demo-bar { background: var(--navy); color: #fff; font-size: 13px; text-align: center; padding: 7px 16px; }

/* ---------- en-tête ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.logo svg { width: 40px; height: 40px; flex: none; }
.logo b { display: block; font-size: 15px; line-height: 1.2; }
.logo small { color: var(--teal); font-weight: 600; font-size: 13px; }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.lang { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-family: Tajawal, Poppins, sans-serif; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 24px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-main { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(31, 58, 104, .25); }
.btn-urgent { background: #fff; color: var(--red); border: 2px solid var(--red); }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }

/* ---------- accueil ---------- */
.hero { background: linear-gradient(135deg, var(--teal-soft), #fff 55%, var(--rose)); padding: 56px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
h1 { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.15; margin: 0 0 14px; color: var(--navy); }
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; margin: 0 0 10px; color: var(--navy); }
.hero p { font-size: 17px; color: var(--muted); max-width: 540px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; color: var(--muted); }
.hero-points li::before { content: "✓"; color: var(--teal); font-weight: 700; margin-inline-end: 8px; }
.hero-card { background: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.hc-title { font-weight: 600; margin-bottom: 12px; }
.lvl { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.lvl:first-of-type { border-top: 0; }
.lvl i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.lvl b { display: block; font-size: 15px; }
.lvl small { color: var(--muted); }

/* page /rendez-vous (lien de la fiche Google) : on arrive directement sur le formulaire */
.page-rdv .hero, .page-rdv #docteur { display: none; }
.page-rdv #rdv { padding-top: 28px; }
.urgent-strip { background: #fff3f3; border-block: 1px solid #f5c9c9; color: #7a1c1c; padding: 12px 0; font-size: 15px; }
.urgent-strip .tel { font-weight: 700; color: var(--red); white-space: nowrap; margin-inline-start: 6px; }

/* ---------- sections ---------- */
.block { padding: 64px 0; }
.block.alt { background: var(--alt); }
.lead { font-size: 17px; color: var(--muted); max-width: 640px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.soins { background: var(--teal-soft); border-radius: var(--r); padding: 22px 24px; }
.soins h3 { margin: 0 0 10px; }
.soins ul { margin: 0; padding-inline-start: 20px; columns: 2; }
.soins li { margin-bottom: 4px; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.info { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.info h3 { margin: 0 0 8px; color: var(--navy); }
.info p { margin: 0; }
.pre { white-space: pre-line; }
.todo { color: var(--muted); font-style: italic; }

/* ---------- formulaire ---------- */
.card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 26px; margin-top: 22px; }
.form { display: grid; gap: 14px; max-width: 760px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: 15px; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #cfd8e3; border-radius: 12px; background: #fff; font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
/* champ piège à robots : invisible SANS décalage (un left:-9999px élargit la page en arabe, de droite à gauche) */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.err { color: var(--red); font-weight: 500; min-height: 1em; }
.questions { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--alt); }
.q-head { font-weight: 600; margin-bottom: 10px; }
.q { margin-bottom: 12px; }
.q p { margin: 0 0 6px; font-size: 15px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1px solid #cfd8e3; background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 14px; }
.opt.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.live { border-radius: 14px; padding: 12px 16px; color: #fff; font-weight: 600; }

/* ---------- résultat ---------- */
.result { margin-top: 22px; max-width: 760px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.result .r-head { color: #fff; padding: 18px 22px; }
.result .r-head b { display: block; font-size: 20px; }
.result .r-body { padding: 18px 22px; }
.result ul { padding-inline-start: 20px; margin: 8px 0; }
.result .r-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ticket { font-size: 14px; color: var(--muted); }
.disclaimer { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }

.foot { background: var(--navy); color: #cfd9ea; padding: 22px 0; font-size: 14px; text-align: center; }

/* ---------- assistant ---------- */
.bot-fab { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); inset-inline-end: 18px; z-index: 40; display: flex; align-items: center; gap: 8px; background: var(--teal); color: #fff; border: 0; border-radius: 999px; padding: 13px 18px; font-weight: 600; box-shadow: 0 12px 30px rgba(63, 167, 181, .45); cursor: pointer; }
.bot { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); inset-inline-end: 18px; z-index: 50; width: 380px; max-width: calc(100vw - 24px); height: min(620px, calc(100dvh - 40px)); background: #fff; border-radius: 22px; box-shadow: 0 24px 60px rgba(29, 42, 58, .28); display: flex; flex-direction: column; overflow: hidden; }
.bot[hidden] { display: none; }
.bot-head { background: var(--navy); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.bot-head small { display: block; opacity: .8; font-size: 12px; }
.bot-head button { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; width: 36px; height: 36px; }
.bot-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--alt); }
.bm { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-line; animation: pop .25s ease both; }
.bm.bot-msg { background: #fff; align-self: flex-start; border-end-start-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.bm.me { background: var(--navy); color: #fff; align-self: flex-end; border-end-end-radius: 4px; }
.bm.alert { border: 2px solid var(--red); }
.bm .badge { display: inline-block; color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.bchips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; animation: pop .25s ease both; }
.bchips button { border: 1px solid var(--teal); background: #fff; color: var(--navy); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; }
.bchips button.danger { border-color: var(--red); color: var(--red); }
.bot-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.bot-input input { flex: 1; border-radius: 999px; padding: 10px 14px; font-size: 16px; }
.bot-input button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; cursor: pointer; flex: none; }
html[dir="rtl"] .bot-input button { transform: scaleX(-1); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .hero-grid, .two, .three, .grid2 { grid-template-columns: 1fr; }
  .hero { padding: 36px 0; }
  .soins ul { columns: 1; }
  .nav-actions .btn { display: none; }
  .logo b { font-size: 14px; }
  .card { padding: 18px; }
  .bot { inset-inline-end: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; } }
