:root {
  --navy: #0f2a4a;
  --navy-dark: #0a1d33;
  --gold: #c9a227;
  --gold-light: #ddb84a;
  --bg: #f7f8fa;
  --text: #2a2f36;
  --text-light: #6b7280;
  --white: #ffffff;
  --border: #e5e7eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
body.page-vitrine {
  background-image: url('../img/cote-dor-beaune-1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { color: var(--navy); font-weight: 700; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 15px;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
}
.btn-primary:hover { background: var(--gold-light); }
.btn-nav {
  background: var(--navy);
  color: var(--white);
  padding: 10px 20px;
}
.btn-nav:hover { background: var(--navy-dark); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  display: flex;
  align-items: center;
}
.logo img {
  height: 72px;
  width: auto;
  display: block;
}
nav { display: flex; gap: 28px; }
nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
nav a:hover { color: var(--navy); }

/* Hero */
.hero {
  background:
    linear-gradient(135deg, rgba(15, 42, 74, 0.88) 0%, rgba(10, 29, 51, 0.92) 100%),
    url('../img/cote-dor-beaune-2.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 56px 0 64px;
  text-align: center;
}
.hero h1 {
  color: var(--white);
  font-size: 34px;
  max-width: 750px;
  margin: 0 auto 20px;
}
.hero-sub {
  color: #cbd5e1;
  max-width: 600px;
  margin: 0 auto 36px;
  font-size: 17px;
}

/* Services */
.services { padding: 90px 0; text-align: center; }
.services h2 { font-size: 30px; margin-bottom: 12px; }
.section-sub { color: var(--text-light); margin-bottom: 48px; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cards-hero {
  margin-top: 40px;
  text-align: left;
}
.cards-hero .card { padding: 26px 24px; }
.cards-hero .card h3 { font-size: 17px; }
.cards-hero .card p { font-size: 14px; }
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px 28px;
  text-align: left;
}
.card-icon { font-size: 32px; margin-bottom: 16px; }
.card h3 { margin-bottom: 10px; font-size: 19px; }
.card p { color: var(--text-light); font-size: 15px; }
.card-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.card-link:hover { color: var(--gold); }

/* Assurance detail */
.assurance-detail { padding: 90px 0; text-align: center; background: rgba(247, 248, 250, 0.88); }
.assurance-detail h2 { font-size: 30px; margin-bottom: 12px; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
  margin-top: 20px;
}
.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 24px;
}
.detail-card h4 {
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 8px;
}
.detail-card p {
  color: var(--text-light);
  font-size: 14px;
  margin: 0;
}
.detail-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.detail-card li {
  color: var(--text-light);
  font-size: 14px;
  padding-left: 14px;
  position: relative;
  margin-bottom: 4px;
}
.detail-card li::before {
  content: "•";
  color: var(--gold);
  position: absolute;
  left: 0;
}
.detail-card-wide {
  grid-column: 1 / -1;
}
.detail-card-wide p {
  margin-bottom: 12px;
}
.detail-card-wide ul {
  margin-top: 4px;
}
.detail-card-wide li {
  margin-bottom: 8px;
}
.legal-notice {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-style: italic;
  color: var(--text-light);
}

/* Apporteur d'affaires */
.apporteur { padding: 90px 0; text-align: center; background: rgba(247, 248, 250, 0.88); }
.apporteur h2 { font-size: 30px; margin-bottom: 12px; }
.apporteur .section-sub { max-width: 700px; margin-left: auto; margin-right: auto; }
.apporteur-cta { margin-top: 44px; }

/* Accompagnement */
.accompagnement { padding: 90px 0; background: rgba(247, 248, 250, 0.88); }
.accompagnement-inner { max-width: 760px; text-align: left; }
.accompagnement h2 { font-size: 28px; margin-bottom: 24px; text-align: center; }
.accompagnement p { color: var(--text-light); margin-bottom: 16px; font-size: 15px; }
.accompagnement p:last-child { margin-bottom: 0; }
.accompagnement h3 { font-size: 18px; margin: 32px 0 12px; }
.accompagnement h3:first-of-type { margin-top: 0; }
.accompagnement a { color: var(--navy); }

/* A propos */
.apropos { background: rgba(247, 248, 250, 0.88); padding: 90px 0; }
.apropos-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: center;
}
.apropos-photo {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.apropos-photo img {
  width: 100%;
  height: auto;
}
.apropos-text h2 { font-size: 28px; margin-bottom: 16px; }
.apropos-text p { color: var(--text-light); margin-bottom: 14px; }

/* Contact */
.contact { padding: 90px 0; background: rgba(255, 255, 255, 0.9); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.contact-info h2 { font-size: 28px; margin-bottom: 16px; }
.contact-info p { color: var(--text-light); margin-bottom: 24px; }
.contact-info ul { list-style: none; }
.contact-info li { margin-bottom: 12px; color: var(--text); font-size: 15px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-form input,
.contact-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
}
.contact-form button { align-self: flex-start; }

/* Devis vehicule */
.devis { padding: 90px 0; text-align: center; background: rgba(255, 255, 255, 0.9); }
.devis h2 { font-size: 28px; margin-bottom: 12px; }
.devis-inner { max-width: 700px; }
.devis-form {
  text-align: left;
  margin-top: 32px;
}
.devis-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.devis-form input,
.devis-form select,
.devis-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
}
.devis-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.devis-form button { align-self: flex-start; margin-top: 6px; }

.devis-inner-wide { max-width: 900px; }

.devis-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px 28px;
  margin: 0 0 24px;
  min-width: 0;
}
.devis-section .table-wrap { max-width: 100%; }
.devis-section legend {
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
}
.devis-section > label,
.devis-section > .devis-row {
  margin-bottom: 16px;
}
.devis-section > label:last-child,
.devis-section > .devis-row:last-child { margin-bottom: 0; }

.radio-group, .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.option-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  font-weight: 400 !important;
  font-size: 14px !important;
}
.option-item input { width: auto; padding: 0; }

.doc-list-title {
  font-size: 15px;
  color: var(--navy);
  margin: 20px 0 10px;
}
.stats-resume {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.stat-tuile {
  flex: 1 1 140px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
}
.stat-tuile span {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
}
.stat-tuile small {
  color: var(--text-light);
  font-size: 13px;
}
.doc-list {
  list-style: none;
  color: var(--text-light);
  font-size: 14px;
}
.doc-list li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
}
.doc-list li::before {
  content: "☐";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.certify-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400 !important;
  font-size: 14px !important;
}
.certify-row input { margin-top: 3px; width: auto; }

/* Espace apporteur d'affaires */
.acces-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  text-align: left;
  margin-top: 24px;
}
.form-message { font-size: 14px; margin: 4px 0 0; }
.form-message.error { color: #b3261e; }
.form-message.success { color: #1e7a34; }

.prospects-title { font-size: 22px; margin: 48px 0 16px; text-align: left; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
.prospects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}
.prospects-table th, .prospects-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.prospects-table th { color: var(--navy); font-weight: 700; }

.statut-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text);
}
.statut-nouveau { background: #e0edff; color: #0f2a4a; }
.statut-contacte { background: #fff3cd; color: #7a5b00; }
.statut-en_cours { background: #ffe4c4; color: #8a4b00; }
.statut-signe { background: #d3f3dc; color: #1e7a34; }
.statut-sans_suite { background: #f1f1f1; color: #6b7280; }

.demande-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  text-align: left;
}
.creer-compte-form {
  margin-top: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.creer-compte-form label { flex: 1 1 160px; }
.creer-compte-form button { flex: 0 0 auto; }

/* Modal (devis Auto / Habitation) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 74, 0.65);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}
.modal-overlay.is-open { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: 12px;
  max-width: 960px;
  width: 100%;
  padding: 44px 36px 48px;
  position: relative;
  margin: auto 0;
}
.modal-box .devis-inner { text-align: center; }
.modal-box h2 { font-size: 26px; margin-bottom: 12px; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}
.modal-close:hover { background: var(--bg); }
body.modal-open-body { overflow: hidden; }

/* Footer */
.site-footer {
  background: var(--navy-dark);
  color: #9ca3af;
  text-align: center;
  padding: 28px 0;
  font-size: 14px;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--white); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-weight: 600;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 800px) {
  nav { display: none; }
  .hero h1 { font-size: 30px; }
  .acces-columns { grid-template-columns: 1fr; }
  .creer-compte-form { flex-direction: column; align-items: stretch; }
  .cards { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .apropos-inner, .contact-inner { grid-template-columns: 1fr; }
  .apropos-photo { width: 160px; margin: 0 auto; }
  .devis-row { grid-template-columns: 1fr; }
}
@media (min-width: 801px) and (max-width: 1050px) {
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
