/* Calculateur de tarif */

/* ── 1. Base de la page ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --calc-cream: #FBF7F0;
    --calc-warm: #F0E8DA;
    --calc-terracotta: #a8472a;
    --terracotta-light: #e8845f;
    --dark: #1E1812;
    --calc-mid: #7A6B5E;
    --calc-light: #b8a598;
    --green: #4a7c59;
    --green-light: #e8f2eb;
    --border: #E8DDD0;
  }

  body {
    background: var(--calc-cream);
    color: var(--dark);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-x: hidden;
  }

  /* Texture de fond */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 20% 20%, #f0e6d8 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, #e8ddd3 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  .container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    flex: 1;
  }

  body.calculateur-page .container > header {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeDown 0.6s ease both;
  }

  .logo-paw {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
    animation: wiggle 3s ease-in-out infinite;
  }

  @keyframes wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
  }

  h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.5px;
    line-height: 1.1;
  }

  h1 em {
    font-style: italic;
    color: var(--calc-terracotta);
  }

  .subtitle {
    margin-top: 8px;
    color: var(--calc-mid);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
  }

  /* Carte */
  .card {
    background: white;
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 4px 40px rgba(30, 24, 18, 0.08), 0 1px 4px rgba(30, 24, 18, 0.06);
    animation: fadeUp 0.6s ease 0.1s both;
  }

  @keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Intitulés de section */
  .section-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--calc-mid);
    margin-bottom: 16px;
    margin-top: 28px;
  }

  .section-label:first-child { margin-top: 0; }

  /* Groupes de champs */
  .field {
    margin-bottom: 20px;
  }

  label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--calc-mid);
    margin-bottom: 8px;
  }

  label span.hint {
    font-weight: 300;
    color: var(--calc-mid);
    font-size: 0.8rem;
  }

  /* Sélecteur de nombre */
  .stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    width: fit-content;
    background: var(--calc-cream);
  }

  .stepper button {
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    color: var(--calc-terracotta);
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
  }

  .stepper button:hover { background: var(--calc-warm); }
  .stepper button:active { background: var(--border); }

  .stepper .val {
    min-width: 56px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark);
    border-left: 1.5px solid var(--border);
    border-right: 1.5px solid var(--border);
    height: 44px;
    line-height: 44px;
    user-select: none;
  }

  /* Cases à cocher */
  .toggle-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    font-size: 0.88rem;
    color: var(--calc-mid);
    background: var(--calc-cream);
  }

  .toggle input { display: none; }

  .toggle .dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
    transition: all 0.2s;
    flex-shrink: 0;
  }

  .toggle.active {
    border-color: var(--calc-terracotta);
    background: #fdf2ed;
    color: var(--dark);
  }

  .toggle.active .dot {
    background: var(--calc-terracotta);
    border-color: var(--calc-terracotta);
  }

  /* Champ des kilomètres */
  .km-input {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 0 16px;
    background: var(--calc-cream);
    width: fit-content;
  }

  .km-input input {
    border: none;
    background: none;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark);
    width: 70px;
    height: 44px;
    outline: none;
    text-align: center;
  }

  .km-input input::-webkit-inner-spin-button { -webkit-appearance: none; }

  .km-label {
    font-size: 0.85rem;
    color: var(--calc-mid);
  }

  /* Séparateur */
  .divider {
    height: 1px;
    background: var(--border);
    margin: 28px 0;
  }

  .reserver {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 15px 24px;
    border-radius: 12px;
    background: var(--calc-terracotta);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
  }

  .reserver:hover { background: #8b3921; }

  /* Panneau du résultat */
  .result {
    background: var(--calc-warm);
    border-radius: 16px;
    padding: 28px;
    color: var(--dark);
    animation: fadeUp 0.4s ease both;
  }

  .result-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0;
    color: #4A3728;
    font-weight: 700;
    margin-bottom: 20px;
  }

  .result-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }

  .result-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.88rem;
    color: #4A3728;
  }

  .result-line .label { flex: 1; }

  .result-line .amount {
    font-weight: 400;
    color: #4A3728;
    /* Chiffres alignés */
    font-variant-numeric: var(--chiffres, lining-nums) tabular-nums;
  }

  .result-line.discount .amount { color: #3f6b4d; }
  .result-line.extra .amount { color: var(--calc-terracotta); }

  .result-total {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
  }

  .result-total .label {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    color: #4A3728;
  }

  .result-total .amount {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--dark);
    font-weight: 700;
  }

  .result-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .breakdown-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(30, 24, 18, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    animation: fadeUp 0.45s ease both;
  }

  .breakdown-item:nth-child(2) { animation-delay: 0.08s; }

  .breakdown-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(30, 24, 18, 0.08);
    border-color: var(--calc-terracotta);
  }

  .breakdown-item .b-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--calc-mid);
    margin-bottom: 6px;
  }

  .breakdown-item .b-amount {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dark);
    /* Chiffres alignés */
    font-variant-numeric: var(--chiffres, lining-nums) tabular-nums;
  }

  .breakdown-item.highlight { background: #fff; }
  .breakdown-item.highlight .b-amount { color: var(--calc-terracotta); }

  /* État vide */
  .empty-state {
    text-align: center;
    padding: 20px 0;
    color: var(--calc-mid);
    font-size: 0.9rem;
  }

  .empty-state .icon { font-size: 2rem; margin-bottom: 8px; }

  .badge-cumul {
    display: inline-block;
    background: var(--green-light);
    color: var(--green);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 6px;
  }

/* ── 2. Titres ── */
h1, .hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 700;
}
.hero-title em {
  color: #A8472A;
  font-style: italic;
}

/* ── 3. Mise en page tarifs ── */
body {
  margin:0;
  padding:0;
}
.tarifs-layout {
  display:block;
}

/* ── 4. Résultat et pied de page ── */
/* Animation d'apparition */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
body > *:not(script):not(style):not(link):not(meta):not(title) {
  animation: fadeUp .7s ease both;
}
body > *:nth-child(2) { animation-delay: .03s; }
body > *:nth-child(3) { animation-delay: .06s; }
body > *:nth-child(4) { animation-delay: .09s; }
body > *:nth-child(5) { animation-delay: .12s; }
body > *:nth-child(6) { animation-delay: .15s; }

/* Barre du haut */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
}
body {
  background: var(--calc-cream, #FBF7F0);
  color: var(--N, #1A1A1A);
  overflow-x: hidden;
}
.topbar {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--deep, #1E1812);
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.topbar a {
  color: var(--calc-light, #D4BEA8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.topbar a:hover {
  color: var(--peach, #F2CDB0);
}
.topbar .sep {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.15);
}
.topbar a:focus-visible {
  outline: 2px solid rgba(242,205,176,0.8);
  outline-offset: 2px;
}
@media (max-width: 768px) {
  .topbar {
    padding: 12px 20px;
    gap: 12px 14px;
  }
  .topbar-links {
    gap: 12px;
  }
  }

/* Titres */
body h1,
body h2,
body h3,
body .hero-title,
body .section-title,
body .acc-question,
body .cgv-title,
body.carte-page .zone-header h2,
body.calculateur-page h1,
body .tarifs-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--N, #1A1A1A);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
body .hero-title,
body .tarifs-hero h1,
body .cgv-title,
body.carte-page .zone-header h2,
body.calculateur-page h1 {
  font-size: clamp(52px, 7vw, 88px);
}
body h2,
body .section-title,
body .acc-question {
  font-size: clamp(22px, 2.3vw, 30px);
}
body h3 {
  font-size: clamp(18px, 1.8vw, 24px);
}
body .hero-title em,
body .tarifs-hero h1 em,
body .cgv-title em,
body.carte-page .zone-header h2 em,
body.calculateur-page h1 em {
  color: var(--T, #A8472A);
  font-style: italic;
  font-weight: 400;
}
body .hero-sub,
body .tarifs-hero-sub,
body .subtitle,
body .cgv-header p,
body.carte-page .zone-desc,
body.calculateur-page .subtitle {
  font-family: 'DM Sans', sans-serif;
  color: var(--muted, #7A6B5E);
  line-height: 1.8;
}
body .section-label,
body .hero-eyebrow,
body .cta-eyebrow {
  font-family: 'DM Sans', sans-serif;
  color: var(--T, #A8472A);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Page tarifs */
body.tarifs-page {
  background: var(--calc-cream, #FBF7F0);
}
body.tarifs-page .tarifs-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 52px 40px 16px;
}
body.tarifs-page .tarifs-hero h1 {
  margin: 0 0 12px;
}
body.tarifs-page .tarifs-hero-sub {
  max-width: 760px;
  font-size: 16px;
  margin-bottom: 18px;
}
body.tarifs-page .tarifs-hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
body.tarifs-page .tarifs-hero-cta .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
body.tarifs-page .tarifs-hero-cta .btn-secondary {
  display: none;
}
body.tarifs-page .tarifs-summary {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px 18px;
}
body.tarifs-page .tarifs-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
body.tarifs-page .tarifs-summary-item {
  background: #fff;
  border: 1px solid var(--calc-warm, #F0E8DA);
  border-radius: 18px;
  padding: 16px 18px;
  color: var(--calc-mid, #4A3728);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
body.tarifs-page .tarifs-summary-item strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  line-height: 1.1;
  color: var(--N, #1A1A1A);
  letter-spacing: -1px;
  margin-bottom: 6px;
}
body.tarifs-page .tarifs-bg {
  background: var(--calc-cream, #FBF7F0);
}
body.tarifs-page .tarifs-bg > .section > h2,
body.tarifs-page .tarifs-bg .section-label {
  display: none;
}
body.tarifs-page .tarifs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}
body.tarifs-page .tarif-left-col,
body.tarifs-page .tarif-right-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
body.tarifs-page .tarif-main,
body.tarifs-page .tarif-info-card,
body.tarifs-page .tarif-promo {
  background: #fff;
  border-color: var(--calc-warm, #F0E8DA);
  border-radius: 22px;
}
body.tarifs-page .tarif-header,
body.tarifs-page .tarif-info-header {
  background: var(--calc-terracotta, #C8603A);
}
body.tarifs-page .tarif-header h3,
body.tarifs-page .tarif-info-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}
body.tarifs-page .tarif-header p,
body.tarifs-page .tarif-info-header p {
  color: rgba(255,255,255,0.88);
}
body.tarifs-page .tarif-row-label,
body.tarifs-page .tarif-info-line,
body.tarifs-page .tarif-promo-body {
  color: var(--calc-mid, #4A3728);
}
body.tarifs-page .tarif-row-price {
  color: var(--calc-terracotta, #C8603A);
  font-weight: 700;
}
body.tarifs-page .badge-amount,
body.tarifs-page .tarif-promo strong,
body.tarifs-page .tarif-info-block-title {
  color: var(--sage, #6E8E7C);
  font-weight: 700;
}
body.tarifs-page .tarif-tva,
body.tarifs-page .tarif-promo-note {
  color: var(--sand, #B89B80);
  font-style: italic;
}
body.tarifs-page .tarif-promo-badge {
  background: rgba(110,142,124,0.08);
  border-color: rgba(110,142,124,0.18);
}
body.tarifs-page .tarif-info-blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 18px;
}
body.tarifs-page .tarif-info-block {
  border: 1px solid var(--calc-warm, #F0E8DA);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  border-bottom: none;
}
body.tarifs-page .tarif-info-block:last-child {
  border-bottom: 1px solid var(--calc-warm, #F0E8DA);
}
body.tarifs-page .tarif-info-cta {
  display: none;
}
body.tarifs-page .tarif-right-wrapper {
  gap: 0;
}
body.tarifs-page .tarif-info-lines {
  display: grid;
  gap: 10px;
}
body.tarifs-page .tarif-info-line em,
body.tarifs-page .tarif-promo-note em {
  color: var(--muted, #7A6B5E);
}
body.tarifs-page .tarifs-summary + .tarifs-bg {
  margin-top: 10px;
}
@media (max-width: 1024px) {
  body.tarifs-page .tarifs-summary-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  body.tarifs-page .tarifs-hero {
    padding: 38px 24px 12px;
  }
  body.tarifs-page .tarifs-summary {
    padding: 0 24px 16px;
  }
}

/* Pages autonomes */
body.standalone-page,
body.calculateur-page,
body.cgv-page,
body.carte-page {
  background: var(--calc-cream, #FBF7F0);
  color: var(--deep, #1E1812);
}
body.standalone-page,
body.calculateur-page,
body.cgv-page,
body.carte-page {
  margin: 0;
  padding: 0;
  display: block;
}
body.standalone-page .topbar,
body.calculateur-page .topbar,
body.cgv-page .topbar,
body.carte-page .topbar {
  position: sticky;
  top: 0;
}
body.calculateur-page .container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 20px 80px;
  position: relative;
  z-index: 1;
}
body.calculateur-page .container > header {
  text-align: center;
  margin-bottom: 48px;
}
body.cgv-page .cgv-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
body.cgv-page .cgv-header {
  text-align: center;
}
body.cgv-page .cgv-brand {
  margin-left: auto;
  margin-right: auto;
}
body.cgv-page .brand-rule {
  margin-left: auto;
  margin-right: auto;
}
body.carte-page .zone-section {
  width: 100%;
  background: var(--calc-cream, #FBF7F0);
  padding: 0 0 80px;
  overflow: hidden;
}
body.carte-page .zone-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 44px;
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 820px) {
  body.carte-page .zone-header {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 24px 40px;
  }
}

@media(max-width:768px){
}

/* Pied de page */
body.calculateur-page { display: flex; flex-direction: column; min-height: 100vh; }
body.calculateur-page .container { flex: 1; }
