:root {
  --bg: #FAFAFA;
  --surface: #F5F3FF;
  --surface2: #EDE9FF;
  --border: #CCCBD1;
  --accent: #7B1FE4;
  --accent2: #A121CA;
  --green: #1e6e4e;
  --red: #7B1FE4;
  --text: #1A192E;
  --muted: #6D6B7B;
  --card: #ffffff;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  background-image: radial-gradient(ellipse at 20% 0%, rgba(27,58,92,0.06) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 100%, rgba(200,57,43,0.04) 0%, transparent 60%);
}

/* HEADER */
header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247,243,236,0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.logo span { color: var(--accent); }

.year-toggle {
  display: flex;
  gap: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem;
}

.year-btn {
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  transition: all 0.2s;
}

.year-btn.active {
  background: var(--accent);
  color: white;
}

/* HERO */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin-bottom: 0.7rem;
  letter-spacing: -1px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent2);
}

.hero p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* AD ZONES */
.ad-zone {
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  gap: 0.25rem;
}

.ad-zone .ad-size { font-size: 0.75rem; font-weight: 600; opacity: 0.4; }

.ad-leaderboard { max-width: 960px; margin: 0 auto 1.5rem; padding: 0 1.5rem; }
.ad-leaderboard .ad-zone { width: 100%; height: 90px; }

.ad-banner { max-width: 960px; margin: 2rem auto 0; padding: 0 1.5rem; }
.ad-banner .ad-zone { width: 100%; height: 90px; }

/* MAIN */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 700px) {
  .container { grid-template-columns: 1fr; }
}

/* PANELS */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.6rem;
}

.panel-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--accent);
  border-radius: 2px;
  display: inline-block;
}

/* FORM */
.field { margin-bottom: 1.1rem; }

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

select, input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.2s;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237880a0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select:focus, input:focus {
  outline: none;
  border-color: var(--accent);
}

input[type="number"]::-webkit-inner-spin-button { opacity: 0.5; }

/* VEHICLE SELECTOR */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.v-btn {
  padding: 0.6rem 0.3rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.v-btn .v-icon { font-size: 1.3rem; display: block; margin-bottom: 0.2rem; }
.v-btn:hover { border-color: var(--accent); color: var(--ink); }
.v-btn.active { border-color: var(--accent); background: rgba(27,58,92,0.1); color: var(--accent); }

/* TRIPS TABLE */
.trips-header {
  display: grid;
  grid-template-columns: 1fr 100px 36px;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  padding: 0 0.2rem;
}

.trips-header span {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.trip-row {
  display: grid;
  grid-template-columns: 1fr 100px 36px;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  align-items: center;
}

.trip-row input {
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
}

.btn-del {
  width: 36px; height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-del:hover { border-color: var(--red); color: var(--red); }

.btn-add {
  width: 100%;
  padding: 0.5rem;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  margin-top: 0.3rem;
  transition: all 0.2s;
}
.btn-add:hover { border-color: var(--accent); color: var(--accent); }

/* RESULT PANEL */
.result-sticky { position: sticky; top: 5rem; }

.result-hero {
  text-align: center;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.4rem;
}

.result-label {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.result-amount {
  font-family: 'DM Mono', monospace;
  font-size: 3rem;
  font-weight: 500;
  color: var(--green);
  letter-spacing: -2px;
  line-height: 1;
  transition: all 0.3s;
}

.result-amount .currency {
  font-size: 1.5rem;
  vertical-align: super;
  margin-right: 0.1rem;
  color: var(--muted);
}

.result-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* BREAKDOWN */
.breakdown { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.2rem; }

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: var(--surface);
  border-radius: 7px;
  font-size: 0.83rem;
}

.breakdown-row .br-label { color: var(--muted); }
.breakdown-row .br-val {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  color: var(--ink);
}

.breakdown-row.total {
  background: rgba(30,110,78,0.08);
  border: 1px solid rgba(30,110,78,0.2);
}
.breakdown-row.total .br-label { color: var(--green); font-weight: 500; }
.breakdown-row.total .br-val { color: var(--green); font-size: 1rem; }

/* TAUX BADGE */
.taux-info {
  background: rgba(27,58,92,0.08);
  border: 1px solid rgba(27,58,92,0.2);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.78rem;
  color: #5a8fd4;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

/* BUTTONS */
.btn-primary {
  width: 100%;
  padding: 0.85rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  margin-bottom: 0.5rem;
}

.btn-primary:hover { background: #3d74c4; transform: translateY(-1px); }

.btn-secondary {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: #1b3a5c; color: var(--accent2); }

/* BAREME TABLE */
.bareme-toggle {
  width: 100%;
  padding: 0.6rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.2s;
}
.bareme-toggle:hover { color: var(--ink); border-color: var(--muted); }

.bareme-table {
  display: none;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.bareme-table.show { display: block; }

.bt-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0;
}

.bt-row.header {
  background: var(--surface);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.bt-cell {
  padding: 0.5rem 0.6rem;
  font-size: 0.75rem;
  font-family: 'DM Mono', monospace;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.bt-cell:last-child { border-right: none; }
.bt-row:last-child .bt-cell { border-bottom: none; }
.bt-row.header .bt-cell { font-family: 'DM Sans', sans-serif; }

/* FAQ */
.faq-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
}

.faq-inner { max-width: 960px; margin: 0 auto; }

.faq-inner h2 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

@media (max-width: 680px) { .faq-grid { grid-template-columns: 1fr; } }

.faq-item {
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: var(--card);
}

.faq-item[open] { border-color: var(--accent); }

.faq-item summary {
  padding: 0.9rem 1rem;
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
}

.faq-item summary::after { content: '+'; color: var(--accent); font-size: 1.1rem; flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p {
  padding: 0.7rem 1rem 0.9rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pop { animation: pop 0.3s ease; }
