/* Lastrail — feuille de style globale */

:root {
  --ink: #1d2833;
  --ink-soft: #4a5a68;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --line: #dde4ec;
  --primary: #16385c;
  --primary-deep: #0e2740;
  --primary-soft: #eaf1f9;
  --action: #1d5c96;
  --action-hover: #17497a;
  --vert: #1a7f4e;
  --vert-soft: #e7f5ee;
  --rouge: #b83227;
  --rouge-soft: #fbeae8;
  --warn-bg: #fff7e0;
  --warn-line: #e6c96a;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 40, 60, 0.07);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.25; color: var(--primary-deep); }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.45rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
p { margin-bottom: 0.9rem; }
a { color: var(--action); }
ul, ol { margin: 0 0 1rem 1.3rem; }

/* ---------- En-tête ---------- */

.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary-deep);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
}

.logo svg { display: block; }

.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.site-nav > a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav > a:hover { color: var(--primary-deep); }
.site-nav > a.active { color: var(--primary-deep); font-weight: 700; }
.site-nav > a.btn-primary, .site-nav > a.btn-primary:hover { color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1.3rem;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--primary-deep);
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-hover); }
.btn-secondary { background: var(--panel); color: var(--action); border-color: var(--action); }
.btn-secondary:hover { background: var(--primary-soft); }
.btn-light { background: #fff; color: var(--primary-deep); }
.btn-light:hover { background: #e8eef5; }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Héros ---------- */

.hero {
  background: linear-gradient(150deg, var(--primary-deep) 0%, var(--primary) 65%, #1c4a77 100%);
  color: #fff;
  padding: 64px 0 56px;
}

.hero h1 { color: #fff; max-width: 640px; margin-bottom: 0.7rem; }
.hero p.lead { font-size: 1.15rem; color: #cddcec; max-width: 620px; margin-bottom: 1.6rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Bandeau d'indépendance ---------- */

.independence-banner {
  background: var(--primary-soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 10px 0;
  text-align: center;
}

/* ---------- Sections & cartes ---------- */

.section { padding: 48px 0; }
.section.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-intro { max-width: 680px; color: var(--ink-soft); margin-bottom: 1.6rem; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 10px;
}

/* Cartes tarifaires vert / rouge */

.price-card { position: relative; overflow: hidden; }
.price-card.vert { border-top: 4px solid var(--vert); }
.price-card.rouge { border-top: 4px solid var(--rouge); }
.price-card .price { font-size: 2rem; font-weight: 800; color: var(--primary-deep); }
.price-card .price span { font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); }
.price-card ul { list-style: none; margin: 12px 0 0; }
.price-card li { padding: 5px 0 5px 24px; position: relative; font-size: 0.95rem; }
.price-card li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; }
.price-card.vert li::before { color: var(--vert); }
.price-card.rouge li::before { color: var(--rouge); }

.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.badge.vert { background: var(--vert-soft); color: var(--vert); }
.badge.rouge { background: var(--rouge-soft); color: var(--rouge); }

/* ---------- Encadrés ---------- */

.notice {
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.92rem;
  margin: 1.2rem 0;
}
.notice.legal { background: var(--primary-soft); border: 1px solid var(--line); color: var(--ink-soft); }
.notice.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: #6b5416; }

.config-warning {
  display: none;
  background: var(--warn-bg);
  border: 1px dashed var(--warn-line);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.92rem;
  color: #6b5416;
  margin: 1rem 0;
}
.config-warning.visible { display: block; }

/* ---------- Intégrations Airtable ---------- */

.embed-wrap { margin-top: 1.2rem; }
.embed-wrap iframe {
  width: 100%;
  height: 620px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  display: none;
}
.embed-wrap iframe.visible { display: block; }

.embed-placeholder {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 60px 24px;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- Formulaires ---------- */

.form-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 760px;
}

.form-row { margin-bottom: 18px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 5px; }
label .optional { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
.hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--action);
  outline-offset: 1px;
  border-color: var(--action);
}

textarea { min-height: 120px; resize: vertical; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 16px;
}
.checkbox-grid label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.95rem;
}
.checkbox-grid input { width: auto; }

fieldset { border: none; margin-bottom: 18px; }
fieldset legend { font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; }

/* Choix d'urgence en cartes radio */

.urgence-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.urgence-choice label {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  font-weight: 400;
  display: block;
}
.urgence-choice input { margin-right: 8px; }
.urgence-choice label:has(input:checked) { border-color: var(--action); background: var(--primary-soft); }
.urgence-choice .uc-title { font-weight: 700; display: block; margin-bottom: 4px; }
.urgence-choice .uc-title.vert { color: var(--vert); }
.urgence-choice .uc-title.rouge { color: var(--rouge); }
.urgence-choice small { color: var(--ink-soft); }

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Pages de confirmation ---------- */

.confirm-wrap { max-width: 620px; margin: 70px auto; text-align: center; padding: 0 20px; }
.confirm-wrap .icon { font-size: 3rem; margin-bottom: 12px; }
.confirm-wrap h1 { font-size: 1.6rem; margin-bottom: 0.7rem; }
.confirm-wrap p { color: var(--ink-soft); }

/* ---------- Pages légales ---------- */

.legal-page { max-width: 780px; }
.legal-page h2 { margin-top: 2rem; }
.placeholder { background: var(--warn-bg); padding: 0 4px; border-radius: 4px; }

/* ---------- Pied de page ---------- */

.site-footer {
  background: var(--primary-deep);
  color: #b9c9d9;
  padding: 36px 0 28px;
  margin-top: 56px;
  font-size: 0.88rem;
}

.site-footer .footer-disclaimer {
  max-width: 760px;
  margin-bottom: 1.2rem;
  color: #cddcec;
}

.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-links a { color: #dce8f3; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-copy { color: #8fa5ba; }

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .grid-3, .grid-2, .form-grid-2, .urgence-choice { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.65rem; }

  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
  }
  .site-nav.open { display: flex; }
}
