:root {
  --bg: #f6f3ee;
  --bg-soft: #fbf9f6;
  --panel: #ffffff;
  --ink: #141310;
  --muted: #6d6a64;
  --line: rgba(20, 19, 16, 0.12);
  --accent: #1f7a8c;
  --accent-strong: #165a66;
  --accent-soft: rgba(31, 122, 140, 0.12);
  --coral: #f25c54;
  --shadow: 0 18px 50px rgba(22, 24, 32, 0.12);
}

[data-theme="dark"] {
  --bg: #0f1117;
  --bg-soft: #161820;
  --panel: #1c1e28;
  --ink: #e8e6e0;
  --muted: #888580;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #3ba5bc;
  --accent-strong: #5cc4d8;
  --accent-soft: rgba(59, 165, 188, 0.14);
  --coral: #f47068;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 165, 188, 0.1), transparent 40%),
    radial-gradient(circle at 85% 8%, rgba(244, 112, 104, 0.12), transparent 42%),
    radial-gradient(circle at 50% 90%, rgba(59, 165, 188, 0.08), transparent 45%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

[data-theme="dark"] .site-header,
[data-theme="dark"] .panel-sidebar,
[data-theme="dark"] .glass-card,
[data-theme="dark"] .menu-card {
  background: var(--panel);
  border-color: var(--line);
}

[data-theme="dark"] .avatar-button,
[data-theme="dark"] .theme-toggle {
  background: var(--panel);
  border-color: var(--line);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(31, 122, 140, 0.12), transparent 40%),
    radial-gradient(circle at 85% 8%, rgba(242, 92, 84, 0.16), transparent 42%),
    radial-gradient(circle at 50% 90%, rgba(31, 122, 140, 0.12), transparent 45%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 19, 16, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 19, 16, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.18;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  background: rgba(251, 249, 246, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand strong,
.button,
.site-nav a,
.site-nav button {
  font-weight: 700;
}

.brand strong {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--coral));
  box-shadow: 0 12px 26px rgba(31, 122, 140, 0.24);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.site-nav form {
  margin: 0;
}

.nav-link {
  position: relative;
  color: var(--muted);
  transition: color 200ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.avatar-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.avatar-button svg {
  width: 22px;
  height: 22px;
  fill: var(--accent-strong);
}

.profile-menu {
  position: relative;
}

.profile-menu summary {
  list-style: none;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.menu-card {
  position: absolute;
  right: 0;
  top: calc(100% + 0.75rem);
  min-width: 200px;
  padding: 0.9rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.5rem;
  animation: fadeDown 220ms ease;
}

.menu-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.menu-link {
  padding: 0.45rem 0.4rem;
  border-radius: 10px;
  border: none;
  text-align: left;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.menu-link:hover {
  background: var(--accent-soft);
}

.button {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--coral));
  color: #fff;
  box-shadow: 0 14px 30px rgba(31, 122, 140, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 10%, rgba(255, 255, 255, 0.4), transparent 60%);
  transform: translateX(-100%);
  transition: transform 600ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(31, 122, 140, 0.3);
}

.button:hover::after {
  transform: translateX(100%);
}

.button-outline {
  background: #fff;
  color: var(--accent-strong);
  border-color: var(--accent-soft);
  box-shadow: none;
}

.button-full {
  width: 100%;
}

.hero,
.section {
  padding: 4.5rem 0;
  position: relative;
}

.hero-fresh::after {
  content: "";
  position: absolute;
  right: 8%;
  top: 12%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(31, 122, 140, 0.18), transparent 60%);
  animation: orbit 12s ease-in-out infinite;
}

.hero-grid,
.auth-layout,
.dashboard-grid,
.cards-grid,
.process-grid,
.catalogue-head,
.panel-grid {
  display: grid;
  gap: 1.5rem;
}

.hero-grid,
.dashboard-grid {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}

.hero h1,
.auth-copy h1,
.dashboard-hero h1,
.catalogue-head h1,
.panel-head h1 {
  margin: 0 0 1rem;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 0.95;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--accent-strong);
}

.lead,
.section-copy,
.form-note,
.site-footer p,
.muted {
  font-size: 1.02rem;
  line-height: 1.75;
}

.muted {
  color: var(--muted);
}

.hero-tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
}

.hero-tags span {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-card,
.info-card,
.form-card,
.profile-card,
.panel-form,
.vehicle-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
}

.mini-title {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.check-list {
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.check-list li {
  border-top: 1px solid var(--line);
  padding: 0.75rem 0;
}

.check-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card h3 {
  margin-top: 0;
}

.process-section {
  background: rgba(255, 255, 255, 0.6);
}

.process-grid {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
}

.process-steps {
  display: grid;
  gap: 1rem;
}

.step-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  box-shadow: var(--shadow);
}

.step-card span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--coral));
}

.form-page {
  min-height: calc(100vh - 160px);
  display: grid;
  align-items: center;
  padding: 2rem 0 4rem;
}

.auth-layout {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
}

.register-layout {
  align-items: start;
}

.glass-card {
  background: rgba(255, 255, 255, 0.9);
}

.stack-form {
  display: grid;
  gap: 1rem;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus {
  outline: none;
  border-color: rgba(31, 122, 140, 0.6);
  box-shadow: 0 0 0 4px rgba(31, 122, 140, 0.12);
  transform: translateY(-1px);
}

.form-note a {
  color: var(--accent-strong);
}

.flash {
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.flash-success {
  background: rgba(31, 122, 140, 0.12);
  border-color: rgba(31, 122, 140, 0.2);
  color: var(--accent-strong);
}

.flash-error {
  background: rgba(242, 92, 84, 0.12);
  border-color: rgba(242, 92, 84, 0.2);
  color: #c34840;
}

.dashboard-hero {
  min-height: calc(100vh - 140px);
  display: grid;
  align-items: center;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}

.profile-item:first-child {
  border-top: none;
  padding-top: 0;
}

.catalogue-head {
  grid-template-columns: 1fr auto;
  align-items: center;
}

/* ── Panel layout ──────────────────────────────────────── */
.panel-page {
  display: flex;
  min-height: 100vh;
  padding-top: 68px;
}

.panel-sidebar {
  position: fixed;
  left: 0;
  top: 68px;
  width: 210px;
  height: calc(100vh - 68px);
  background: #ffffff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1.75rem 0.85rem 1.25rem;
  gap: 0.2rem;
  z-index: 20;
  box-shadow: 4px 0 18px rgba(20,19,16,0.05);
}

.panel-title {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0 0.6rem;
  margin-bottom: 0.6rem;
}

.panel-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 150ms ease, color 150ms ease;
  white-space: nowrap;
}

.panel-link svg {
  flex-shrink: 0;
  transition: stroke 150ms ease;
}

.panel-link:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.panel-link.is-active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 700;
}

.panel-link-muted {
  color: #aaa;
  font-size: 0.85rem;
}

.panel-link-muted:hover {
  color: var(--coral);
  background: rgba(242,92,84,0.08);
}

.panel-sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.panel-body {
  margin-left: 210px;
  flex: 1;
  padding: 2.5rem 2rem 4rem;
  max-width: calc(100% - 210px);
}

.panel-content {
  display: grid;
  gap: 1.5rem;
  max-width: 860px;
}

.panel-content-centered {
  max-width: 660px;
  margin: 0 auto;
}

/* ── Paste zone Ctrl+V ─────────────────────────────────── */
.paste-field {
  display: grid;
  gap: 0.4rem;
}

.paste-label {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}

.paste-zone {
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: var(--accent-soft);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
  overflow: hidden;
  position: relative;
}

.paste-zone:focus,
.paste-zone:hover {
  border-color: var(--accent);
  background: rgba(31, 122, 140, 0.1);
}

.paste-zone.drag-over {
  border-color: var(--accent-strong);
  background: rgba(31, 122, 140, 0.18);
}

.paste-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-strong);
  text-align: center;
  padding: 1rem;
}

.paste-placeholder p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.paste-placeholder span {
  display: inline-block;
  background: var(--accent-soft);
  border: 1px solid rgba(31,122,140,0.3);
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-strong);
  font-family: monospace;
}

.paste-preview {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 240px;
  padding: 0.5rem;
}

.paste-zone.has-image .paste-placeholder {
  display: none;
}

.paste-zone.is-loading .paste-placeholder {
  opacity: 0.3;
  pointer-events: none;
}

.paste-loading-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: rgba(246, 243, 238, 0.85);
  border-radius: inherit;
  z-index: 3;
  backdrop-filter: blur(2px);
}

.paste-zone.has-error {
  border-color: rgba(242, 92, 84, 0.55);
  background: rgba(242, 92, 84, 0.08);
}

.paste-error-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: var(--coral);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  border-radius: inherit;
  z-index: 3;
}

.paste-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--accent-soft);
  border-top-color: var(--accent-strong);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden-file {
  display: none;
}

/* ── Bouton X pour supprimer la photo ─────────────────── */
.paste-clear {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
  z-index: 2;
}

.paste-clear:hover {
  background: rgba(0, 0, 0, 0.7);
}

.paste-zone.has-image .paste-clear {
  display: flex;
}

/* ── Bouton dark/light mode ───────────────────────────── */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: background 150ms ease, color 150ms ease;
}

.theme-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Lune visible par défaut (mode clair), soleil caché */
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }

/* En mode sombre : soleil visible, lune cachée */
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  justify-items: center;
}

.vehicle-photo {
  width: 100%;
  height: 230px;
  border-radius: 18px;
  background: transparent;
  background-image: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
  color: var(--accent-strong);
  font-weight: 600;
  border: none;
}

.vehicle-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.3rem;
  border-radius: 16px;
}

.vehicle-card h3 {
  margin: 0;
}

.vehicle-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.price-main {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.price-sub {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.vehicle-meta {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

/* ── Cartes catalogue (style premium) ───────────────────── */
.catalogue-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 360px;
}

.catalogue-card .vehicle-media {
  position: relative;
}

.catalogue-card .vehicle-photo {
  aspect-ratio: 1 / 1;
  height: auto;
  background:
    radial-gradient(circle at 20% 20%, rgba(31, 122, 140, 0.16), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(242, 92, 84, 0.14), transparent 55%),
    #ffffff;
}

.catalogue-card .vehicle-photo img {
  object-fit: contain;
  padding: 0.4rem;
}

/* badges/favoris retirés */

.vehicle-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.vehicle-sub {
  color: var(--muted);
  font-size: 0.85rem;
}

.vehicle-meta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.vehicle-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.vehicle-meta-row svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-strong);
  fill: none;
  stroke-width: 2;
}

.vehicle-subprices {
  color: var(--muted);
  font-size: 0.85rem;
}

.vehicle-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.vehicle-price-row .discount-old {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.95rem;
}

.vehicle-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--coral);
}

.vehicle-cta {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.card-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(242, 92, 84, 0.2);
}

.card-btn-outline {
  background: transparent;
  color: var(--accent-strong);
  border-color: rgba(31, 122, 140, 0.35);
}

.card-btn-outline:hover {
  box-shadow: 0 12px 30px rgba(31, 122, 140, 0.2);
}

/* ── Detail vehicule ───────────────────────────────────── */
.detail-shell {
  display: grid;
  gap: 2rem;
}

.detail-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.detail-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
}

.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.8rem;
}

.detail-info h1 {
  margin: 0.2rem 0 0.6rem;
}

.detail-prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.detail-prices div {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.detail-prices span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.detail-prices strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--accent-strong);
  font-size: 1.1rem;
}

.detail-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 1rem;
  color: var(--muted);
}

.detail-cta {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.detail-contact {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.detail-contact h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .detail-card {
    grid-template-columns: 1fr;
  }

  .detail-prices {
    grid-template-columns: 1fr;
  }
}

/* ── Boutons carte catalogue ─────────────────────────────── */
.vehicle-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.card-action-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(31, 122, 140, 0.25);
}

.card-action-discount:hover {
  background: rgba(242, 92, 84, 0.08);
  color: var(--coral);
  border-color: rgba(242, 92, 84, 0.25);
}

/* ── Modales ─────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2rem 2rem 2rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
  animation: fadeUp 220ms ease;
}

.modal-box-sm {
  max-width: 360px;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 140ms ease;
}

.modal-close:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.modal-title {
  margin: 0.25rem 0 1.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
}

/* ── Calculatrice remise ─────────────────────────────────── */
.discount-preview {
  min-height: 2rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 0.95rem;
  color: var(--ink);
}

.discount-old {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.88rem;
}

.discount-badge {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  border-radius: 6px;
  padding: 0.05rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.25rem;
}

.discount-line {
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-discount {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Zone paste modale (compacte) ───────────────────────── */
.paste-zone-sm {
  min-height: 90px;
}

.paste-zone-sm .paste-placeholder p {
  font-size: 0.8rem;
}

.empty-state {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 18px;
  background: var(--accent-soft);
}

.panel-head {
  margin-bottom: 2rem;
}

.panel-grid {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
}

.panel-list h3 {
  margin-top: 0;
}

.compact-grid {
  grid-template-columns: 1fr;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.8rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.animate-rise {
  animation: fadeUp 720ms ease both;
}

.animate-slide {
  animation: slideIn 780ms ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes orbit {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-14px) scale(1.04);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .auth-layout,
  .dashboard-grid,
  .cards-grid,
  .process-grid,
  .catalogue-head {
    grid-template-columns: 1fr;
  }

  .panel-sidebar {
    position: fixed;
    width: 60px;
    padding: 1.5rem 0.4rem;
    overflow: hidden;
  }

  .panel-link span,
  .panel-title {
    display: none;
  }

  .panel-link {
    justify-content: center;
    padding: 0.7rem;
  }

  .panel-body {
    margin-left: 60px;
    max-width: calc(100% - 60px);
    padding: 1.5rem 1rem 3rem;
  }

  .vehicle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-columns {
    grid-template-columns: 1fr;
  }

  .profile-item {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .site-nav,
  .hero-actions,
  .footer-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    display: grid;
  }

  .vehicle-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .section {
    padding: 3rem 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}