/* ==========================================================
   Césaire Assurances – Immobilier – Finances
   Charte : navy #132C5B · orange #F97316 · bleu ciel #2196F3
   ========================================================== */

:root {
  --navy: #132C5B;
  --navy-soft: #1D3A70;
  --orange: #F97316;
  --orange-dark: #E05F04;
  --sky: #2196F3;
  --bg: #F8F9FA;
  --card: #FFFFFF;
  --ink: #20304F;
  --ink-soft: #5A6A85;
  --line: #E4E9F1;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 2px 8px rgba(19, 44, 91, 0.07), 0 12px 32px rgba(19, 44, 91, 0.07);
  --shadow-soft: 0 1px 4px rgba(19, 44, 91, 0.06);
  --font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 700; color: var(--navy); line-height: 1.2; margin: 0 0 14px 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.5vw, 46px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 14px 0; text-wrap: pretty; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.kicker {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 10px;
}
.lead { font-size: 17px; color: var(--ink-soft); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font); font-size: 15.5px; font-weight: 600;
  padding: 14px 26px; border-radius: 12px; border: none; cursor: pointer;
  text-decoration: none; transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  min-height: 48px; line-height: 1.25;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(249, 115, 22, 0.32); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-secondary { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.btn-secondary:hover { background: #EFF3FA; }
.btn-ghost-light { background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.45); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.2); }
.btn-sm { padding: 10px 18px; font-size: 14px; min-height: 42px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 72px; max-width: 1140px; margin: 0 auto; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { height: 46px; width: auto; object-fit: contain; flex: none; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 18px; font-weight: 800; color: var(--navy); letter-spacing: 0.02em; }
.brand-sub { font-size: 9.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); }
.main-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.main-nav a.nav-link {
  font-size: 15px; font-weight: 500; color: var(--ink); padding: 9px 14px; border-radius: 10px;
}
.main-nav a.nav-link:hover { background: #EFF3FA; text-decoration: none; color: var(--navy); }
.main-nav a.nav-link.active { color: var(--navy); font-weight: 700; }
.header-cta { margin-left: 10px; }

/* ---------- Menus déroulants (Particuliers / Professionnels) ---------- */
.nav-drop { position: relative; }
.nav-drop > .nav-link { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.nav-drop > .nav-link::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px); opacity: 0.6; transition: transform 0.18s;
}
.nav-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 248px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(19,44,91,0.16); padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
  z-index: 60;
}
/* ouverture au survol (desktop) et au focus clavier */
.nav-drop:hover > .nav-menu,
.nav-drop:focus-within > .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-drop:hover > .nav-link::after { transform: rotate(-135deg) translateY(-1px); }
.nav-menu a {
  display: block; padding: 9px 13px; border-radius: 9px; font-size: 14.5px; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.nav-menu a:hover { background: #EFF3FA; color: var(--navy); }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: none; cursor: pointer;
  width: 46px; height: 46px; border-radius: 10px; align-items: center; justify-content: center;
  flex-direction: column; gap: 5px; padding: 0;
}
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Cartes ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; border: 1px solid rgba(228, 233, 241, 0.6);
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ---------- Placeholders photo ---------- */
.ph {
  background: repeating-linear-gradient(45deg, #E9EEF5 0 14px, #F3F6FA 14px 28px);
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  border: 1px dashed #C7D2E2; overflow: hidden; min-height: 120px;
}
.ph-label {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace; font-size: 12px;
  color: #7E8DA6; background: rgba(255,255,255,0.85); padding: 6px 12px;
  border-radius: 8px; text-align: center; max-width: 85%;
}

/* ---------- Photos d'agence (défilement automatique) ----------
   Devanture puis intérieur, en fondu enchaîné. Les images sont empilées
   en absolu ; seule celle qui porte .is-on est visible. Piloté par
   js/agency-shots.js sur tout élément [data-shots]. */
.agency-shots {
  display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: #EDF1F7; border-radius: var(--radius);
}
.agency-shots img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .8s ease-in-out;
}
.agency-shots img.is-on { opacity: 1; }
.shot-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 6px;
}
.shot-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.55);
  box-shadow: 0 1px 3px rgba(0,0,0,0.35); transition: background .3s, width .3s;
}
.shot-dots i.is-on { background: #fff; width: 16px; border-radius: 999px; }
/* Respect du réglage système : on n'impose pas de mouvement. */
@media (prefers-reduced-motion: reduce) {
  .agency-shots img { transition: none; }
}


/* ---------- Pied de page ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.82); margin-top: 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px;
  padding: 56px 0 40px 0;
}
.site-footer h4 { color: #fff; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,0.82); }
.site-footer a:hover { color: #fff; }
.footer-phone {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 24px; font-weight: 800; color: #fff !important; letter-spacing: 0.02em;
  margin: 6px 0 4px 0;
}
.footer-phone:hover { text-decoration: none; color: var(--orange) !important; }
.footer-note { font-size: 13px; color: rgba(255,255,255,0.55); }
.footer-office { margin-bottom: 18px; font-size: 14.5px; line-height: 1.55; }
.footer-office strong { color: #fff; display: block; margin-bottom: 2px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14); padding: 20px 0;
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,0.55);
}
.footer-bottom nav { display: flex; gap: 22px; }
.footer-bottom a { color: rgba(255,255,255,0.65); font-size: 13px; }
.footer-brand-line { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand-line .brand-name { color: #fff; font-size: 17px; }
.footer-brand-line .brand-sub { color: rgba(255,255,255,0.55); }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font); font-size: 15px; color: var(--ink);
  padding: 13px 14px; border: 1.5px solid #D4DCE8; border-radius: 11px; background: #fff;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 48px;
}
.field textarea { min-height: 90px; resize: vertical; }
/* Safari iOS zoome sur un champ dont la police est < 16px, ce qui décale
   toute la page au moment de la saisie. On repasse à 16px sur les écrans
   tactiles étroits uniquement : le desktop garde son rendu compact. */
@media (max-width: 860px) {
  .field input, .field select, .field textarea { font-size: 16px; }
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--sky); box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}
.field .error-msg { display: none; font-size: 12.5px; color: #D5453C; margin-top: 5px; font-weight: 500; }
.field.invalid input, .field.invalid select { border-color: #D5453C; }
.field.invalid .error-msg { display: block; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); margin: 18px 0; line-height: 1.5; }
.consent input { width: 19px; height: 19px; margin-top: 1px; accent-color: var(--orange); flex: none; cursor: pointer; }
.consent.invalid { color: #D5453C; }
.consent a { font-weight: 600; }
/* honeypot anti-bot (jamais visible) */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
/* message d'erreur de soumission */
.form-error { background: #FDECEA; border: 1px solid #F5C6C0; color: #B71C1C; border-radius: 11px; padding: 11px 14px; font-size: 13.5px; font-weight: 500; margin: 4px 0 14px 0; }
.rdv-captcha, .chat-captcha { margin: 6px 0 14px 0; }

/* ---------- Bandeau de page intérieure ---------- */
.page-hero { background: var(--navy); color: #fff; padding: 52px 0; }
.page-hero h1 { color: #fff; margin-bottom: 8px; font-size: clamp(26px, 3.5vw, 38px); }
.page-hero p { color: rgba(255,255,255,0.75); max-width: 620px; margin: 0; }

/* ---------- Widget chat flottant ---------- */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: flex; align-items: center; gap: 10px;
  background: var(--orange); color: #fff; border: none; cursor: pointer;
  padding: 13px 20px 13px 14px; border-radius: 999px;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.45);
  transition: transform 0.15s, background 0.18s;
}
.chat-fab:hover { background: var(--orange-dark); transform: translateY(-2px); }
.chat-fab .fab-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.chat-fab .fab-avatar img { width: 19px; height: 17px; object-fit: contain; }
.chat-panel {
  position: fixed; right: 20px; bottom: 92px; z-index: 200;
  width: 390px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: var(--radius-lg); box-shadow: 0 12px 48px rgba(19,44,91,0.3);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }
/* mount() ajoute .chat-shell (display:flex) au panneau : cette règle plus
   spécifique garantit que le panneau fermé reste masqué malgré ce conflit */
.chat-panel:not(.open) { display: none; }

/* ---------- Interface de chat ---------- */
.chat-shell { display: flex; flex-direction: column; height: 100%; background: #fff; }
.chat-head {
  background: var(--navy); color: #fff; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px; flex: none;
}
.chat-head .bot-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #fff; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.chat-head .bot-avatar img { width: 24px; height: 21px; object-fit: contain; }
.chat-head .bot-id { line-height: 1.25; }
.chat-head .bot-name { font-weight: 700; font-size: 15.5px; }
.chat-head .bot-status { font-size: 12px; color: rgba(255,255,255,0.65); display: flex; align-items: center; gap: 6px; }
.chat-head .bot-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4CD964; }
.chat-close {
  margin-left: auto; background: rgba(255,255,255,0.12); color: #fff; border: none;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.chat-close:hover { background: rgba(255,255,255,0.25); }
.chat-body { flex: 1; overflow-y: auto; padding: 20px 18px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.msg-row { display: flex; margin-bottom: 10px; }
.msg-row.bot { justify-content: flex-start; }
.msg-row.user { justify-content: flex-end; }
.bubble {
  max-width: 82%; padding: 12px 16px; font-size: 14.5px; line-height: 1.5;
  border-radius: 16px; white-space: pre-line;
}
.msg-row.bot .bubble { background: var(--navy); color: #fff; border-bottom-left-radius: 5px; }
.msg-row.user .bubble { background: #E8ECF2; color: var(--ink); border-bottom-right-radius: 5px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px 0; }
.chip {
  background: #fff; border: 1.5px solid var(--orange); color: var(--orange-dark);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  min-height: 42px;
}
.chip:hover { background: var(--orange); color: #fff; }
.chip:active { transform: scale(0.97); }
.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.7); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 70%, 100% { opacity: 0.3; } 35% { opacity: 1; } }
.chat-form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); padding: 18px; margin: 4px 0 14px 0; max-width: 95%;
}
.chat-form-card .field { margin-bottom: 12px; }
.chat-form-card .field input { min-height: 44px; padding: 11px 13px; }
.chat-composer {
  flex: none; display: flex; gap: 10px; padding: 12px 14px;
  background: #fff; border-top: 1px solid var(--line);
}
.chat-composer input {
  /* 16px minimum : en dessous, Safari iOS zoome automatiquement sur le champ
     au moment de la saisie, ce qui décale toute la page. */
  flex: 1; font-family: var(--font); font-size: 16px; padding: 12px 15px;
  border: 1.5px solid #D4DCE8; border-radius: 999px; outline: none; min-width: 0;
}
.chat-composer input:focus { border-color: var(--sky); }
.chat-composer input:disabled { background: #F2F4F8; }
.chat-composer button {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--orange); color: #fff; font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.chat-composer button:disabled { background: #D4DCE8; cursor: not-allowed; }
.confirm-banner {
  background: #EDF7EE; border: 1px solid #BBDEC0; color: #2E6B34;
  border-radius: var(--radius); padding: 16px 18px; font-size: 14.5px; font-weight: 600;
  margin: 4px 0 14px 0; max-width: 95%;
}

/* ---------- Étapes (RDV) ---------- */
.steps { display: flex; align-items: center; gap: 0; margin: 0 0 36px 0; }
.step { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.step .dot {
  width: 34px; height: 34px; border-radius: 50%; background: #E4E9F1; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none;
}
.step.active { color: var(--navy); }
.step.active .dot { background: var(--orange); color: #fff; }
.step.done .dot { background: var(--navy); color: #fff; }
.step-sep { flex: 1; height: 2px; background: #E4E9F1; margin: 0 14px; min-width: 24px; }

/* ---------- Créneaux calendrier ---------- */
.day-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; margin-bottom: 24px; }
.day-cell {
  background: #fff; border: 1.5px solid #D4DCE8; border-radius: 12px; padding: 10px 6px;
  text-align: center; cursor: pointer; font-family: var(--font); transition: border-color 0.15s, background 0.15s;
}
.day-cell:hover { border-color: var(--sky); }
.day-cell.selected { border-color: var(--orange); background: #FFF4EB; }
.day-cell .dow { display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.day-cell .dnum { display: block; font-size: 21px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.day-cell .dmon { display: block; font-size: 11.5px; color: var(--ink-soft); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.slot {
  background: #fff; border: 1.5px solid #D4DCE8; border-radius: 11px; padding: 11px 8px;
  font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--navy);
  text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s;
  min-height: 46px;
}
.slot:hover { border-color: var(--sky); }
.slot.selected { border-color: var(--orange); background: var(--orange); color: #fff; }
.slot[disabled] { background: #F2F4F8; color: #B3BFD0; border-color: #E4E9F1; cursor: not-allowed; text-decoration: line-through; }

/* ---------- Divers ---------- */
.phone-inline { font-weight: 800; color: var(--navy); white-space: nowrap; }
.notice {
  font-size: 13px; color: var(--ink-soft); background: #EFF3FA;
  border-radius: 10px; padding: 12px 16px;
}

/* ---------- Devis dynamique ---------- */
.devis-layout { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start; }
.devis-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 96px; }
.devis-video {
  border-radius: var(--radius); overflow: hidden; background: var(--navy);
  aspect-ratio: 16 / 10; box-shadow: var(--shadow-soft);
}
.devis-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.devis-video-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: rgba(255,255,255,0.85); text-align: center; padding: 20px; font-size: 14px; font-weight: 600;
}
.devis-video-icon {
  width: 48px; height: 48px; border-radius: 50%; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 4px;
}
.devis-video-placeholder small { font-weight: 400; color: rgba(255,255,255,0.5); font-size: 12px; }
.devis-reassurance {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 14px;
}
.devis-reassurance-item { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-soft); }
.devis-reassurance-item strong { color: var(--navy); font-size: 14px; font-weight: 700; }
.devis-phone { font-size: 13.5px; color: var(--ink-soft); padding-top: 12px; border-top: 1px solid var(--line); }
.devis-phone a { font-weight: 700; }

.devis-main { min-width: 0; }
/* La vidéo d'aide existe en deux exemplaires : un dans la colonne de droite
   (desktop), un sous le fil des étapes (mobile). Un seul est affiché à la fois. */
.devis-video-mobile { display: none; }
.devis-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-soft);
}
.devis-card h2 { font-size: 22px; margin-bottom: 8px; }
.devis-help { font-size: 14px; color: var(--ink-soft); margin: 0 0 22px 0; }
.devis-help-error { color: #D5453C; font-weight: 600; }
.devis-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.devis-fields .field:first-child, .devis-fields .field:nth-child(4) { grid-column: 1 / -1; }

/* boutons de choix (choice / yes_no) */
.devis-choices { display: flex; flex-direction: column; gap: 12px; margin-bottom: 6px; }
.devis-choice {
  text-align: left; background: #fff; border: 1.5px solid #D4DCE8; border-radius: 12px;
  padding: 16px 20px; font-family: var(--font); font-size: 15.5px; font-weight: 600; color: var(--navy);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.devis-choice:hover { border-color: var(--sky); }
.devis-choice.selected { border-color: var(--orange); background: #FFF4EB; }

/* grille de produits */
.devis-produits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.devis-produit {
  background: #fff; border: 1.5px solid #D4DCE8; border-radius: 12px; padding: 18px 16px;
  font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--navy);
  cursor: pointer; text-align: center; transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.devis-produit:hover { border-color: var(--sky); transform: translateY(-1px); }
.devis-produit.selected { border-color: var(--orange); background: #FFF4EB; }

/* pièces jointes */
.devis-uploads { display: flex; flex-direction: column; gap: 14px; margin-bottom: 8px; }
.devis-upload { display: flex; flex-direction: column; gap: 6px; }
.devis-upload label { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.devis-upload input[type="file"] { font-family: var(--font); font-size: 13.5px; color: var(--ink-soft); }
.devis-upload input[type="file"]::file-selector-button {
  font-family: var(--font); font-weight: 600; font-size: 13px; color: var(--navy);
  background: #EFF3FA; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; margin-right: 12px; cursor: pointer;
}
.devis-upload-status { font-size: 12.5px; color: var(--sky); font-weight: 600; }
.devis-upload-status.err { color: #D5453C; }

/* récapitulatif */
.devis-recap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 22px; }
.devis-recap-row { display: flex; gap: 16px; padding: 12px 16px; font-size: 14px; border-top: 1px solid #F0F3F8; }
.devis-recap-row:first-child { border-top: none; }
.devis-recap-row > span { flex: 0 0 44%; color: var(--ink-soft); }
.devis-recap-row > strong { flex: 1; color: var(--navy); font-weight: 600; }

.devis-nav { display: flex; gap: 12px; margin-top: 26px; }
.devis-nav .btn { flex: 0 0 auto; }
.devis-nav .btn-primary { margin-left: auto; }
.devis-error {
  margin-top: 16px; font-size: 14px; color: #D5453C; font-weight: 600;
  background: #FDF0EF; border-radius: 10px; padding: 12px 16px;
}

/* écran de fin */
.devis-done { text-align: center; }
.devis-check {
  width: 60px; height: 60px; border-radius: 50%; background: #E9F9EF; color: #15803D;
  font-size: 30px; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px auto;
}
.devis-ref { font-size: 14.5px; color: var(--ink-soft); margin-top: 8px; }
.devis-done .devis-nav { justify-content: center; }
.devis-done .devis-nav .btn-primary { margin-left: 0; }

/* ---------- Suivi de dossier (lien magique) ---------- */
.dossier-demande-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dossier-demande-produit { font-size: 18px; font-weight: 700; color: var(--navy); }
.dossier-demande-ref { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.dossier-section-title { font-size: 12.5px; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: 0.4px; margin: 18px 0 8px 0; }
.dossier-statut {
  font-size: 17px; font-weight: 700; color: var(--navy);
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.dossier-statut::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none; }
.dossier-meta { font-size: 14px; color: var(--ink-soft); }
.dossier-pieces { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px 0; }
.dossier-piece { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #F8F9FB; border: 1px solid var(--line); border-radius: 12px; }
.dossier-piece-ico { font-size: 20px; flex: none; }
.dossier-piece-info { flex: 1; min-width: 0; }
.dossier-piece-name { font-size: 14.5px; font-weight: 600; color: var(--navy); }
.dossier-piece-date { font-size: 12.5px; color: var(--ink-soft); }
.dossier-piece-ok { color: #15803D; font-weight: 800; flex: none; }
.dossier-hint { font-size: 13px; color: var(--ink-soft); margin: 0; }
.dossier-empty { font-size: 13.5px; color: var(--ink-soft); font-style: italic; margin: 4px 0; }
.dossier-fil { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 20px 0; max-height: 360px; overflow-y: auto; }
.dossier-msg-meta { font-size: 11.5px; opacity: 0.7; margin-top: 5px; }
.dossier-compose { border-top: 1px solid var(--line); padding-top: 16px; }
.dossier-compose textarea {
  width: 100%; box-sizing: border-box; padding: 11px 14px; border: 1.5px solid #D4DCE8; border-radius: 12px;
  font-family: var(--font); font-size: 14.5px; color: var(--ink); resize: vertical; min-height: 70px; outline: none;
}
.dossier-compose textarea:focus { border-color: var(--sky); }
.dossier-compose-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.dossier-attach { cursor: pointer; }
.dossier-attach input { display: none; }
.dossier-attach span {
  display: inline-block; padding: 10px 16px; border: 1.5px solid var(--navy); border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--navy); background: #fff; transition: background 0.15s;
}
.dossier-attach span:hover { background: #EFF3FA; }
.dossier-compose-row .btn-primary { margin-left: auto; }
.dossier-files-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dossier-file-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: #EFF3FA;
  border-radius: 8px; font-size: 13px; color: var(--navy); font-weight: 600;
}
.dossier-file-rm { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 13px; padding: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .devis-layout { grid-template-columns: 1fr; gap: 24px; }
  /* L'aside (réassurance) passe sous le formulaire ; la vidéo, elle, remonte
     au-dessus via la copie .devis-video-mobile placée après le fil des étapes. */
  .devis-aside { position: static; order: 2; }
  .devis-video-desktop { display: none; }
  .devis-video-mobile { display: block; margin-bottom: 20px; }
  .devis-card { padding: 24px; }
  .devis-fields { grid-template-columns: 1fr; }
  .devis-produits { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding: 44px 0 32px 0; }
  .section { padding: 52px 0; }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 20px 20px 20px; gap: 4px;
    box-shadow: 0 16px 32px rgba(19,44,91,0.12);
  }
  .main-nav.open { display: flex; }
  .main-nav a.nav-link { padding: 14px 12px; font-size: 16px; }
  .header-cta { margin: 10px 0 0 0; }
  /* menus déroulants en accordéon sur mobile : le sous-menu s'affiche en flux
     sous son entête (ouvert au tap via .open ajouté par nav-menu.js) */
  .nav-drop { display: flex; flex-direction: column; }
  .nav-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-radius: 0; padding: 0 0 0 12px; min-width: 0;
    display: none; background: transparent;
  }
  .nav-drop.open > .nav-menu { display: flex; }
  .nav-drop > .nav-link::after { margin-left: auto; }
  .nav-menu a { padding: 11px 12px; font-size: 15px; }
  .steps { flex-wrap: wrap; gap: 12px; }
  .step-sep { display: none; }
  .step span.step-label { font-size: 13px; }
}
@media (max-width: 640px) {
  .chat-fab span.fab-label { display: none; }
  .chat-fab { padding: 13px 14px; }
  /* Sur téléphone, la conversation occupe tout l'écran (comme demande.html)
     plutôt qu'une bulle de 390px : la saisie et la lecture y sont bien plus
     confortables, et le clavier ne recouvre plus la moitié du panneau.
     100dvh (et non 100vh) pour tenir compte de la barre d'adresse mobile. */
  .chat-panel {
    right: 0; bottom: 0; left: 0; top: 0;
    width: 100%; max-width: none;
    height: 100vh; height: 100dvh; max-height: none;
    border-radius: 0;
  }
  h1 { font-size: 29px; }
  .container { padding: 0 18px; }
  .card { padding: 22px; }
  .devis-produits { grid-template-columns: 1fr; }
  .devis-nav { flex-direction: column-reverse; }
  .devis-nav .btn { width: 100%; }
  .devis-nav .btn-primary { margin-left: 0; }
}
