/* ==========================================================================
   Logi'Gest — feuille de style principale
   Palette dérivée du logo (teal) + accent terracotta.
   Conçue pour une lecture confortable : corps 18px, contrastes AA, cibles 48px+.
   ========================================================================== */

:root {
  /* Marque */
  --brand:        #0a6473;
  --brand-dark:   #064751;
  --brand-darker: #03343c;
  --brand-tint:   #e7f1f3;
  --brand-tint-2: #d3e6e9;

  /* Accent (appels à l'action) */
  --accent:       #bf4a1e;
  --accent-dark:  #9c3a14;
  --accent-tint:  #fceee7;

  /* Neutres */
  --ink:      #14262b;
  --ink-soft: #45585e;
  --line:     #dbe4e6;
  --paper:    #ffffff;
  --cream:    #fbf8f4;
  --cream-2:  #f4efe8;

  /* Divers */
  --radius:    14px;
  --radius-lg: 24px;
  --shadow:    0 1px 2px rgba(20,38,43,.05), 0 8px 24px rgba(20,38,43,.06);
  --shadow-lg: 0 2px 4px rgba(20,38,43,.06), 0 18px 48px rgba(20,38,43,.10);
  --wrap:      1140px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

/* --------------------------------------------------------- Base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;      /* 18px */
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-dark); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--brand-darker);
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lead { font-size: clamp(1.15rem, 2.2vw, 1.375rem); line-height: 1.6; color: var(--ink-soft); }

strong { font-weight: 650; color: var(--ink); }

hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand-darker); color: #fff; padding: 1rem 1.5rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------- Layout */

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
section.tight { padding: clamp(2.5rem, 5vw, 3.5rem) 0; }

.bg-cream { background: var(--cream); }
.bg-tint  { background: var(--brand-tint); }
.bg-deep  { background: var(--brand-darker); color: #eaf3f4; }
.bg-deep h1, .bg-deep h2, .bg-deep h3 { color: #fff; }
.bg-deep p, .bg-deep li { color: #cfe2e5; }
.bg-deep a { color: #fff; }

.section-head { max-width: 720px; margin-bottom: 2.75rem; }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .85rem;
}
.bg-deep .eyebrow { color: #79c5d2; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 56px; padding: .85rem 1.6rem;
  font: inherit; font-weight: 650; font-size: 1.0625rem;
  border: 2px solid transparent; border-radius: 999px;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }

.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-dark); color: #fff; }

.btn--ghost { background: transparent; color: var(--brand-dark); border-color: var(--brand-tint-2); }
.btn--ghost:hover { background: var(--brand-tint); color: var(--brand-dark); border-color: var(--brand); }

.bg-deep .btn--ghost, .cta-band .btn--ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.bg-deep .btn--ghost:hover, .cta-band .btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

.btn--lg { min-height: 62px; font-size: 1.125rem; padding: 1rem 2rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }

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

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

.header-inner {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 78px;
}

.logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.logo img { height: 34px; width: auto; }

.nav-toggle {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--brand-tint); border: 1px solid var(--brand-tint-2); color: var(--brand-dark);
  font: inherit; font-weight: 650; font-size: 1rem;
  min-height: 48px; padding: 0 1rem; border-radius: 999px; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; text-decoration: none; font-weight: 550;
  color: var(--ink); padding: .55rem .1rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent-dark); }
.site-nav a[aria-current="page"] { font-weight: 700; }

.header-cta { display: none; }

/* Mobile : menu déroulant */
@media (max-width: 1149px) {
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: .5rem 0 1.5rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a { padding: .95rem .25rem; font-size: 1.125rem; }
  .site-nav .nav-phone {
    margin-top: 1rem; border-top: 0 !important;
  }
  .site-nav .nav-phone a {
    background: var(--accent); color: #fff; border-radius: 999px;
    text-align: center; font-weight: 700; padding: 1rem;
  }
}

@media (min-width: 1150px) {
  .nav-toggle { display: none; }
  .site-nav { margin-left: auto; }
  .site-nav ul { display: flex; align-items: center; gap: 1.4rem; white-space: nowrap; }
  .site-nav .nav-phone { display: none; }
  .header-cta {
    display: inline-flex; align-items: center; gap: .55rem;
    background: var(--accent); color: #fff; text-decoration: none;
    font-weight: 700; border-radius: 999px; padding: .7rem 1.35rem; min-height: 50px;
    white-space: nowrap;
  }
  .header-cta:hover { background: var(--accent-dark); color: #fff; }
  .header-cta svg { width: 18px; height: 18px; }
}

/* --------------------------------------------------------- Hero */

.hero { background: linear-gradient(180deg, var(--cream) 0%, #fff 100%); padding-top: clamp(2.5rem, 6vw, 4.5rem); }

.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 4rem; }
}

.hero h1 { margin-bottom: .35em; }
.hero .lead { margin-bottom: 1.75rem; }

.hero-media { position: relative; }
.hero-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}
.hero-badge {
  position: absolute; left: -.75rem; bottom: 1.75rem;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.25rem;
  max-width: 260px;
  font-size: .9375rem; line-height: 1.45;
}
.hero-badge strong { display: block; font-size: 1.5rem; font-family: var(--serif); color: var(--brand-dark); line-height: 1.1; margin-bottom: .2rem; }

/* Bandeau de confiance */
.trustbar { background: var(--brand-darker); color: #cfe2e5; padding: 1.1rem 0; font-size: .9375rem; }
.trustbar ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: center; text-align: center;
}
.trustbar li { display: flex; align-items: center; gap: .55rem; }
.trustbar svg { width: 18px; height: 18px; flex-shrink: 0; color: #79c5d2; }

/* --------------------------------------------------------- Grilles & cartes */

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

@media (min-width: 680px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
}

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: 1.0625rem; }

.card--soft { background: var(--cream); border-color: transparent; }
.bg-cream .card { background: #fff; }

.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--brand-tint); color: var(--brand-dark);
  display: grid; place-items: center; margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }

/* Chiffres clés */
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.25rem; text-align: center;
}
.stat b {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.05; color: var(--brand);
  letter-spacing: -.02em; margin-bottom: .35rem;
}
.stat span { display: block; font-size: .9375rem; line-height: 1.45; color: var(--ink-soft); }
.bg-deep .stat { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.bg-deep .stat b { color: #7fd0dd; }
.bg-deep .stat span { color: #cfe2e5; }

/* --------------------------------------------------------- Étapes */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 640px)  { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1150px) { .steps { grid-template-columns: repeat(5, 1fr); gap: 1rem; } }

.steps li {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.6rem 1.4rem;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600;
  margin-bottom: .9rem;
}
.steps h3 { font-family: var(--sans); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; margin-bottom: .35rem; }
.steps p { font-size: .9688rem; color: var(--ink-soft); line-height: 1.6; }

/* --------------------------------------------------------- Avant / après */

.ba-grid { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .ba-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; } }

.ba-item { }
.ba-item figure { margin: 0; }
.ba-item img {
  border-radius: var(--radius-lg); width: 100%;
  aspect-ratio: 3 / 4; object-fit: cover;
  border: 1px solid var(--line);
}
.ba-tag {
  display: inline-block; margin-bottom: .75rem;
  font-size: .8125rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: .35rem .85rem; border-radius: 999px;
}
.ba-tag--before { background: var(--cream-2); color: var(--ink-soft); }
.ba-tag--after  { background: var(--brand); color: #fff; }

.ba-notes { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .6rem; }
.ba-notes li { display: flex; gap: .7rem; align-items: flex-start; font-size: 1.0625rem; }
.ba-notes svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: .2rem; color: var(--brand); }

/* --------------------------------------------------------- Portrait / à propos */

.about-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 860px) { .about-grid { grid-template-columns: .8fr 1.2fr; gap: 3.5rem; } }
.about-grid img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; object-position: center 20%; }

/* --------------------------------------------------------- Tableau */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 1.0625rem; }
caption { text-align: left; font-size: .9375rem; color: var(--ink-soft); padding-bottom: .75rem; }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--brand-tint); color: var(--brand-darker); font-weight: 700; font-size: .9688rem; }
thead th:first-child { border-radius: 10px 0 0 0; }
thead th:last-child  { border-radius: 0 10px 0 0; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --------------------------------------------------------- FAQ */

.faq { display: grid; gap: .75rem; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 1.4rem;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0;
  font-weight: 650; font-size: 1.125rem; color: var(--brand-darker);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .25rem; top: 1.6rem;
  width: 12px; height: 12px;
  border-right: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.9rem; }
.faq details > div { padding-bottom: 1.4rem; color: var(--ink-soft); }
.faq details > div > *:first-child { margin-top: 0; }

/* --------------------------------------------------------- Formulaire */

.form-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}

.field { margin-bottom: 1.35rem; }
.field label, .fieldset-legend {
  display: block; font-weight: 650; margin-bottom: .45rem; color: var(--brand-darker);
}
.field .hint { display: block; font-weight: 400; font-size: .9375rem; color: var(--ink-soft); margin-top: -.2rem; margin-bottom: .5rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%; font: inherit; font-size: 1.0625rem; color: var(--ink);
  padding: .85rem 1rem; min-height: 56px;
  background: #fff; border: 2px solid var(--line); border-radius: 12px;
  transition: border-color .15s ease;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a6473' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 20px;
  padding-right: 3rem;
}

fieldset { border: 0; margin: 0 0 1.35rem; padding: 0; }

.choice-list { display: grid; gap: .6rem; }
.choice {
  display: flex; align-items: flex-start; gap: .8rem;
  border: 2px solid var(--line); border-radius: 12px; padding: .9rem 1rem;
  cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.choice:hover { border-color: var(--brand-tint-2); background: var(--cream); }
.choice input { width: 22px; height: 22px; margin: .2rem 0 0; accent-color: var(--brand); flex-shrink: 0; }
.choice span { font-weight: 500; }
.choice small { display: block; color: var(--ink-soft); font-weight: 400; font-size: .9375rem; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }

.consent { display: flex; gap: .8rem; align-items: flex-start; font-size: .9688rem; color: var(--ink-soft); line-height: 1.55; }
.consent input { width: 22px; height: 22px; margin: .15rem 0 0; accent-color: var(--brand); flex-shrink: 0; }

.form-note { font-size: .9375rem; color: var(--ink-soft); margin-top: 1rem; }

/* Honeypot anti-spam */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* --------------------------------------------------------- Simulateur */

.sim { background: var(--cream); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem); }
.sim-result {
  margin-top: 1.75rem; padding: 1.6rem; border-radius: var(--radius);
  background: #fff; border: 2px solid var(--line);
}
.sim-result[data-state="ok"]    { border-color: var(--brand); background: var(--brand-tint); }
.sim-result[data-state="ko"]    { border-color: #d9b38c; background: #fdf6ec; }
.sim-result h3 { margin-bottom: .5rem; }
.sim-result .amount {
  font-family: var(--serif); font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 600;
  color: var(--brand-dark); line-height: 1.1; display: block; margin: .5rem 0;
}

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

.callout {
  border-left: 5px solid var(--brand);
  background: var(--brand-tint); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.6rem; margin: 2rem 0;
}
.callout--warn { border-left-color: #c98a2e; background: #fdf6ec; }
.callout h4 { margin-bottom: .4rem; color: var(--brand-darker); }
.callout p:last-child { margin-bottom: 0; }

.checklist { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: .8rem; }
.checklist li { display: flex; gap: .8rem; align-items: flex-start; }
.checklist svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: .15rem; color: var(--brand); }

/* --------------------------------------------------------- Bandeau CTA */

.cta-band { background: var(--brand-darker); color: #fff; }
.cta-band .wrap { text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfe2e5; max-width: 620px; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; margin-top: 2rem; }

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

.site-footer { background: var(--cream); border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; font-size: 1rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; } }
.site-footer h4 { color: var(--brand-darker); margin-bottom: .9rem; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent-dark); text-decoration: underline; }
.site-footer .logo img { height: 30px; margin-bottom: 1rem; }
.site-footer p { color: var(--ink-soft); font-size: .9688rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: .9063rem; color: var(--ink-soft);
}

/* --------------------------------------------------------- Page interne */

.page-head { background: var(--brand-tint); padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2.5rem, 6vw, 3.5rem); }
.page-head p.lead { color: var(--brand-dark); }

.breadcrumb { font-size: .9375rem; color: var(--ink-soft); margin-bottom: 1rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.breadcrumb li + li::before { content: "›"; margin-right: .5rem; color: var(--brand); }
.breadcrumb a { color: var(--ink-soft); }

.prose h2 { margin-top: 2.75rem; }
.prose h3 { margin-top: 2rem; }
.prose > *:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: .5rem; }

/* Liste de communes (SEO local) */
.commune-list { columns: 2; column-gap: 2rem; list-style: none; margin: 0; padding: 0; font-size: 1rem; }
@media (min-width: 720px) { .commune-list { columns: 3; } }
@media (min-width: 1000px) { .commune-list { columns: 4; } }
.commune-list li { break-inside: avoid; padding: .3rem 0; color: var(--ink-soft); }

@media print {
  .site-header, .site-footer, .cta-band, .nav-toggle { display: none; }
  body { font-size: 11pt; }
}
