/* ==========================================================================
   DZ Car Noleggio Auto — « Road-trip nel Salento, noleggio solare »
   Pietra leccese + bianco calce, turchese Adriatico, asfalto, giallo di
   segnaletica. Hero plein écran porté par la route, pilule de verre flottante,
   cartes sticky-stacking, parallaxe. Signature : la STRADA (route verticale à
   ligne médiane pointillée où une voiturette descend avec le scroll) + bornes
   kilométriques (pietre miliari) numérotées devant chaque étape.
   Aucune classe custom : ids, classes Bootstrap, pseudo-éléments.
   ========================================================================== */

:root {
  --d-asfalto: #23262b;
  --d-asfalto-2: #34383f;
  --d-turchese: #0a7e8c;
  --d-turchese-d: #076470;
  --d-turchese-l: #8fd8df;
  --d-mare: #d9f1f2;
  --d-pietra: #eadfc8;
  --d-pietra-d: #d8c7a5;
  --d-calce: #fbf8f1;
  --d-giallo: #f2c230;
  --d-ulivo: #6b774a;
  --d-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --d-body: 'Urbanist', 'Segoe UI', Helvetica, Arial, sans-serif;
  --d-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --d-shadow: 0 1px 2px rgba(35, 38, 43, 0.06), 0 18px 40px -18px rgba(35, 38, 43, 0.28);

  --bs-body-font-family: var(--d-body);
  --bs-body-color: var(--d-asfalto);
  --bs-body-bg: var(--d-calce);
  --bs-emphasis-color: var(--d-asfalto);
  --bs-primary: var(--d-turchese);
  --bs-primary-rgb: 10, 126, 140;
  --bs-warning: var(--d-giallo);
  --bs-warning-rgb: 242, 194, 48;
  --bs-link-color: var(--d-turchese-d);
  --bs-link-color-rgb: 7, 100, 112;
  --bs-link-hover-color: var(--d-asfalto);
  --bs-link-hover-color-rgb: 35, 38, 43;
  --bs-border-radius: 1rem;
  --bs-border-radius-lg: 1.5rem;
  --bs-focus-ring-color: rgba(10, 126, 140, 0.4);
}

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  background: var(--d-calce);
  font-size: 1.1rem;
  line-height: 1.7;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .display-1 {
  font-family: var(--d-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
h6 {
  font-family: var(--d-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--d-turchese-d);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
/* tratteggio di segnaletica devant les surtitres */
h6::before {
  content: '';
  width: 46px; height: 4px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--d-giallo) 0 12px, transparent 12px 19px);
}

::selection { background: var(--d-giallo); color: var(--d-asfalto); }
a, button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--d-turchese) !important; outline-offset: 3px; border-radius: 6px; }

/* ---------- Boutons pilule ---------- */
.btn {
  --bs-btn-font-weight: 700;
  --bs-btn-padding-x: 1.4rem;
  --bs-btn-padding-y: 0.7rem;
  transition: transform 0.35s var(--d-ease), box-shadow 0.35s var(--d-ease), background-color 0.2s, color 0.2s;
}
.btn-lg { --bs-btn-padding-x: 1.9rem; --bs-btn-padding-y: 0.95rem; --bs-btn-font-size: 1.1rem; }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn .bi { display: inline-block; transition: transform 0.35s var(--d-ease); }
.btn:hover .bi-arrow-right, .btn:hover .bi-arrow-down-right { transform: translateX(4px); }
.btn-primary {
  --bs-btn-bg: var(--d-turchese); --bs-btn-border-color: var(--d-turchese);
  --bs-btn-hover-bg: var(--d-turchese-d); --bs-btn-hover-border-color: var(--d-turchese-d);
  --bs-btn-active-bg: var(--d-asfalto); --bs-btn-active-border-color: var(--d-asfalto);
  box-shadow: 0 12px 26px -12px rgba(10, 126, 140, 0.75);
}
.btn-primary:hover { box-shadow: 0 18px 32px -12px rgba(10, 126, 140, 0.85); }
.btn-warning {
  --bs-btn-bg: var(--d-giallo); --bs-btn-border-color: var(--d-giallo); --bs-btn-color: var(--d-asfalto);
  --bs-btn-hover-bg: #ffd24d; --bs-btn-hover-border-color: #ffd24d; --bs-btn-hover-color: var(--d-asfalto);
  --bs-btn-active-bg: #fff; --bs-btn-active-color: var(--d-asfalto);
  box-shadow: 0 14px 30px -12px rgba(242, 194, 48, 0.8);
}
.btn-outline-dark {
  --bs-btn-color: var(--d-asfalto); --bs-btn-border-color: var(--d-asfalto); --bs-btn-border-width: 2px;
  --bs-btn-hover-bg: var(--d-asfalto); --bs-btn-hover-border-color: var(--d-asfalto);
}
.btn-link { --bs-btn-color: var(--d-turchese-d); --bs-btn-hover-color: var(--d-asfalto); text-decoration: none; font-weight: 700; }
.btn-link:hover { transform: none; }

/* ---------- Pilule de verre flottante ---------- */
#pilota { pointer-events: none; z-index: 1040; }
#pilota .navbar {
  pointer-events: auto;
  max-width: 1180px;
  border-radius: 999px;
  background: rgba(251, 248, 241, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 34px -14px rgba(35, 38, 43, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
#pilota .navbar-brand, #contatti [data-wm] { color: var(--d-asfalto); }
[data-wm] > .bi {
  width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--d-asfalto); color: var(--d-giallo); font-size: 1.3rem;
  box-shadow: inset 0 -4px 0 var(--d-turchese);
}
[data-wm] strong { font-family: var(--d-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
[data-wm] small { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--d-turchese-d); margin-top: 0.2rem; }
#pilota .nav-link {
  font-weight: 700;
  color: var(--d-asfalto);
  position: relative;
}
#pilota .nav-link::after {
  content: '';
  position: absolute; left: 50%; right: 50%; bottom: 4px;
  height: 3px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--d-giallo) 0 7px, transparent 7px 11px);
  transition: left 0.35s var(--d-ease), right 0.35s var(--d-ease);
}
#pilota .nav-link:hover::after { left: 1rem; right: 1rem; }
#pilota .navbar-toggler:focus { box-shadow: none; }
@media (max-width: 991.98px) {
  #pilota .navbar { border-radius: 1.6rem; }
  #pilota .navbar-collapse { padding: 0.5rem 0.25rem 0.75rem; }
}

/* ---------- Signature : la strada verticale ---------- */
#strada {
  left: 26px; top: 18vh; bottom: 10vh;
  width: 14px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(180deg, var(--d-giallo) 0 10px, transparent 10px 20px) center / 2px 100% no-repeat,
    var(--d-asfalto);
  box-shadow: 0 0 0 3px var(--d-calce), 0 0 0 4px var(--d-pietra-d);
  z-index: 1030;
  opacity: 0.92;
}
#strada > div { background: linear-gradient(180deg, rgba(10, 126, 140, 0.0), rgba(10, 126, 140, 0.55)); border-radius: 8px; }
#strada > span {
  left: 50%;
  width: 38px; height: 38px;
  margin-left: -19px;
  border-radius: 50%;
  background: var(--d-turchese);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 0 0 4px var(--d-calce), 0 10px 20px -6px rgba(10, 126, 140, 0.7);
}

/* ---------- HERO plein écran ---------- */
#partenza { height: 100svh; min-height: 640px; max-height: 1100px; background: var(--d-mare); }
#partenza img { object-position: 50% 62%; }
#partenza > div:last-child {
  background: linear-gradient(180deg, rgba(251, 248, 241, 0.88) 0%, rgba(251, 248, 241, 0.55) 32%, rgba(251, 248, 241, 0) 58%),
    linear-gradient(0deg, rgba(35, 38, 43, 0.35) 0%, rgba(35, 38, 43, 0) 25%);
}
#partenza h1 {
  font-size: clamp(2.4rem, 5.6vw, 5.2rem);
  font-weight: 800;
  line-height: 1.02;
  max-width: 15ch;
}
#partenza h6 { color: var(--d-turchese-d); }
#partenza .bi-chevron-double-down { color: #fff; animation: d-bob 2s var(--d-ease) infinite; display: inline-block; text-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); }
/* bande d'asphalte qui « sort » du hero */
#partenza::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 22px;
  background:
    repeating-linear-gradient(90deg, var(--d-giallo) 0 34px, transparent 34px 60px) center / 100% 3px no-repeat,
    var(--d-asfalto);
  z-index: 2;
}

/* ---------- Bornes kilométriques (compteur CSS) ---------- */
main { counter-reset: tappa; overflow-x: clip; }
#chi-siamo, #servizi, #perche { counter-increment: tappa; }
#chi-siamo::before, #servizi::before, #perche::before {
  content: counter(tappa, decimal-leading-zero);
  position: absolute; top: 2.2rem; right: clamp(1rem, 4vw, 3.5rem);
  width: 62px; height: 78px;
  display: flex; align-items: center; justify-content: center;
  padding-top: 0.7rem;
  font-family: var(--d-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--d-asfalto);
  background:
    linear-gradient(var(--d-turchese), var(--d-turchese)) top / 100% 14px no-repeat,
    linear-gradient(180deg, #fff, var(--d-pietra));
  border-radius: 31px 31px 8px 8px;
  box-shadow: var(--d-shadow);
  z-index: 1;
}

/* ---------- CHI SIAMO ---------- */
#chi-siamo { background: var(--d-calce); }
#chi-siamo p[id] {
  font-family: var(--d-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.5vw, 2.15rem);
  line-height: 1.38;
  letter-spacing: -0.02em;
}
#chi-siamo .lead { font-size: 1.3rem; font-weight: 600; color: var(--d-turchese-d); }
#chi-siamo .ratio {
  border-radius: 2rem 2rem 2rem 7rem;
  overflow: hidden;
  box-shadow: var(--d-shadow);
}
#chi-siamo .col-lg-6:first-child { position: relative; }
#chi-siamo .col-lg-6:first-child::after {
  /* muretto a secco : bloc de pierre derrière l'image */
  content: '';
  position: absolute; left: -1.25rem; bottom: -1.25rem;
  width: 55%; height: 55%;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5) 0 2px, transparent 3px) 0 0 / 18px 18px,
    var(--d-pietra);
  z-index: -1;
}
#chi-siamo .row.g-4 { position: relative; z-index: 0; }

/* ---------- SERVIZI (sticky-stacking) ---------- */
#servizi {
  background:
    radial-gradient(1200px 500px at 110% 0%, rgba(143, 216, 223, 0.35), transparent 60%),
    var(--d-pietra);
  border-radius: 3rem 3rem 0 0;
}
#servizi h2 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); }
#servizi .sticky-lg-top { top: 130px; }
@media (min-width: 992px) { #servizi::before { top: auto; bottom: 3rem; right: auto; left: clamp(4rem, 8vw, 8rem); } }
#tappe .card {
  --bs-card-bg: #fff;
  border-radius: 1.75rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 28px 60px -28px rgba(35, 38, 43, 0.45);
  min-height: 300px;
}
#tappe .col-md-5 { min-height: 220px; }
#tappe .col-md-5 img { transition: transform 0.9s var(--d-ease); }
#tappe .card:hover .col-md-5 img { transform: scale(1.06); }
#tappe .card-title { font-size: clamp(1.3rem, 2vw, 1.7rem); }
#tappe .card-text { color: #555b63; }
#tappe .card::before {
  /* ligne de route en haut de chaque carte */
  content: '';
  position: absolute; left: 0; right: 0; top: 0; height: 6px; z-index: 2;
  background: repeating-linear-gradient(90deg, var(--d-giallo) 0 22px, var(--d-asfalto) 22px 36px);
}
#tappe > div:nth-child(2) .card::before { background: repeating-linear-gradient(90deg, var(--d-turchese-l) 0 22px, var(--d-turchese) 22px 36px); }

/* ---------- PERCHÉ (cartelli stradali) ---------- */
#perche { background: var(--d-pietra); }
#perche h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
#perche [data-sign] {
  width: 132px; height: 132px;
  font-size: 2.8rem;
  background: var(--d-turchese);
  color: #fff;
  border: 8px solid #fff;
  box-shadow: 0 0 0 3px var(--d-turchese), var(--d-shadow);
  transition: transform 0.6s var(--d-ease);
}
#perche [data-sign='1'] { background: var(--d-giallo); color: var(--d-asfalto); box-shadow: 0 0 0 3px var(--d-giallo), var(--d-shadow); border-radius: 22% !important; transform: rotate(45deg); }
#perche [data-sign='1'] .bi { transform: rotate(-45deg); }
#perche [data-sign='2'] { background: var(--d-asfalto); box-shadow: 0 0 0 3px var(--d-asfalto), var(--d-shadow); }
#perche li:hover [data-sign] { transform: translateY(-8px) rotate(-6deg); }
#perche li:hover [data-sign='1'] { transform: translateY(-8px) rotate(39deg); }
#perche h4 { font-size: 1.15rem; letter-spacing: 0.06em; }

/* ---------- TESTIMONIANZE ---------- */
#testimonianze { background: var(--d-pietra); }
#testimonianze .container { position: relative; padding-block: 4.5rem !important; }
#testimonianze .container::before {
  content: '\201C';
  position: absolute; left: 50%; top: -1.2rem; transform: translateX(-50%);
  font-family: var(--d-display);
  font-size: 9rem; line-height: 1;
  color: var(--d-turchese-l);
  opacity: 0.6;
}
#testimonianze h3 { position: relative; font-size: clamp(1.5rem, 3vw, 2.5rem); }

/* ---------- CTA (asfalto) ---------- */
#arrivo {
  background:
    repeating-linear-gradient(90deg, var(--d-giallo) 0 46px, transparent 46px 82px) 0 50% / 100% 4px no-repeat,
    var(--d-asfalto);
  color: #fff;
  border-radius: 3rem 3rem 0 0;
  margin-top: -3rem;
}
#arrivo .container { position: relative; z-index: 1; }
#arrivo .row { background: var(--d-asfalto); border-radius: 2rem; padding-inline: 1rem; }
#arrivo h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 3.1rem); }

/* ---------- Bloc SEO ---------- */
main > section.order-last { background: var(--d-asfalto); color: rgba(255, 255, 255, 0.55); }

/* ---------- FOOTER ---------- */
#contatti { background: #1b1d21; color: rgba(255, 255, 255, 0.78); }
#contatti [data-wm] { background: var(--d-calce); border-radius: 1.2rem; padding: 0.6rem 1rem 0.6rem 0.6rem; }
#contatti [data-wm] .bi { color: var(--d-giallo); }
#contatti h4 { color: #fff; font-size: 1.05rem; }
#contatti a { color: rgba(255, 255, 255, 0.86); text-decoration: none; transition: color 0.2s; }
#contatti a:hover { color: var(--d-giallo); }
#contatti .bi { color: var(--d-turchese-l); }
#contatti hr { border-color: rgba(255, 255, 255, 0.25); opacity: 1; }

/* ---------- Chat WhatsApp ---------- */
#chat { left: 20px; bottom: 20px; z-index: 1050; animation: d-pop 0.6s var(--d-ease); }
#chat .btn-success { width: 60px; height: 60px; font-size: 1.8rem; --bs-btn-bg: #25d366; --bs-btn-border-color: #25d366; box-shadow: 0 12px 26px -10px rgba(37, 211, 102, 0.8); }
#chat > a:last-child { color: var(--d-asfalto); font-weight: 600; line-height: 1.35; animation: d-pop 0.6s var(--d-ease); }
@media (min-width: 1200px) { #chat { left: 64px; } }

/* ---------- 404 ---------- */
#vuoto { min-height: 80vh; justify-content: center; background: var(--d-pietra); padding-top: 8rem; }
#vuoto .display-1 { font-size: clamp(5rem, 18vw, 12rem); color: var(--d-turchese); }

/* ---------- Animations ---------- */
@keyframes d-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes d-pop { from { opacity: 0; transform: translateY(16px) scale(0.9); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  #chi-siamo::before, #servizi::before, #perche::before { top: 1rem; transform: scale(0.8); }
  #servizi { border-radius: 2rem 2rem 0 0; }
  #arrivo { border-radius: 2rem 2rem 0 0; }
  #chi-siamo .col-lg-6:first-child::after { left: -0.5rem; bottom: -0.75rem; }
}
@media (max-width: 575.98px) {
  [data-wm] > .bi { width: 38px; height: 38px; } [data-wm] strong { font-size: 1.05rem; }
  #partenza { min-height: 600px; }
  #perche [data-sign] { width: 112px; height: 112px; font-size: 2.3rem; }
  #chi-siamo::before, #servizi::before, #perche::before { display: none; }
}
@media (min-width: 1200px) {
  /* laisse respirer la strada à gauche */
  main > *:not(#partenza), #contatti { padding-left: 40px; }
}

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