/*--------------------------------------------------------------
# Site : surcouche du template BizPage (thème crédit)
# Finitions : focus visibles, retour au clic, transitions ciblées,
# formulaires, hiérarchie typographique.
--------------------------------------------------------------*/
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --accent-strong: #08613f;
  --accent-soft: color-mix(in srgb, var(--accent-color), transparent 90%);
  --danger-color: #c62828;
  --radius: 8px;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 65%);
}

/* Les transitions « all 0.3s » du template sont remplacées par des propriétés précises */
a {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.header {
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

body {
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  letter-spacing: -0.015em;
  line-height: 1.2;
  /* Raleway utilise des chiffres elzéviriens par défaut */
  font-variant-numeric: lining-nums;
}

.tabular, .amount {
  font-variant-numeric: tabular-nums;
}

.text-break-any {
  overflow-wrap: anywhere;
}

/* Accessibilité ------------------------------------------------ */
.skip-link {
  position: absolute;
  left: 12px;
  top: 0;
  transform: translateY(-150%); /* relatif à sa taille : reste caché même à 200 % de zoom */
  z-index: 100000;
  background: var(--accent-color);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(12px);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.dark-background :focus-visible,
.header :focus-visible {
  outline-color: #5fd6a2;
}

/* Retour visuel au clic (scale 0.97, 160 ms, ease-out) */
.btn-accent,
.btn-outline-light-pill,
.btn-header-cta,
.hero .btn-get-started,
.call-to-action .cta-btn,
.blog-posts .read-more a,
.scroll-top {
  transition: transform 160ms var(--ease-out), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.btn-accent:active,
.btn-outline-light-pill:active,
.btn-header-cta:active,
.hero .btn-get-started:active,
.call-to-action .cta-btn:active,
.blog-posts .read-more a:active,
.scroll-top:active {
  transform: scale(0.97);
}

/* Bouton principal */
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-color);
  color: #fff;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 28px;
  border: 0;
  border-radius: 50px;
  cursor: pointer;
  min-height: 48px;
}

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

.btn-accent:disabled {
  opacity: 0.7;
  cursor: progress;
}

.btn-outline-light-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #fff;
  font-family: var(--heading-font);
  font-weight: 600;
  min-height: 48px;
}

.btn-outline-light-pill:hover {
  background: #fff;
  color: #111;
}

/* Indicateur de chargement sur un bouton */
.is-loading {
  position: relative;
  color: transparent !important;
}

.is-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* En-tête ------------------------------------------------------ */
.header {
  padding: 14px 0;
}

.header .logo .sitename {
  font-family: var(--heading-font);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  border-left: 4px solid #5fd6a2;
  padding-left: 10px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 42vw;
  overflow-wrap: break-word;
}

@media (max-width: 575px) {
  /* Le bouton « Kredit anfragen » est masqué : le logo dispose de presque toute la largeur */
  .header .logo .sitename {
    font-size: 22px;
    max-width: calc(100vw - 96px);
  }
}

.page-title .breadcrumbs a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}

.page-title .breadcrumbs a:hover {
  color: #fff;
}

.btn-header-cta {
  align-items: center;
  margin-left: 22px;
  padding: 9px 20px;
  border-radius: 50px;
  background: var(--accent-color);
  color: #fff;
  font-family: var(--nav-font);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-header-cta:hover {
  background: var(--accent-strong);
  color: #fff;
}

.mobile-nav-toggle {
  background: none;
  border: 0;
  padding: 6px;
}

@media (max-width: 1199px) {
  .btn-header-cta {
    margin-left: 0;
    margin-right: 8px;
  }
}

/* Le menu mobile ne doit pas animer « all » */
@media (max-width: 1199px) {
  .navmenu a, .navmenu a:focus, .navmenu ul, .mobile-nav-active .navmenu {
    transition: color 0.2s ease, background-color 0.2s ease;
  }
}

@media (min-width: 1200px) {
  .navmenu .dropdown ul {
    transition: opacity 0.18s var(--ease-out), visibility 0.18s, top 0.18s var(--ease-out);
  }

  .navmenu .dropdown:focus-within > ul {
    opacity: 1;
    top: 100%;
    visibility: visible;
  }
}

/* Bandeau de titre --------------------------------------------- */
.page-title {
  padding: 150px 0 64px;
}

.page-title h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  overflow-wrap: anywhere;
}

.page-title .page-lead {
  max-width: 680px;
  margin: 0 auto 18px;
  font-size: 1.075rem;
  opacity: 0.9;
}

/* Hero (image fixe, sans carrousel) ---------------------------- */
.hero-static {
  position: relative;
  min-height: min(100vh, 860px);
  min-height: min(100svh, 860px);
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.hero-static .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-static::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6, 6, 6, 0.86) 0%, rgba(6, 6, 6, 0.65) 55%, rgba(6, 6, 6, 0.35) 100%);
  z-index: 1;
}

.hero-static .container {
  position: relative;
  z-index: 2;
}

.hero-static .eyebrow {
  display: inline-block;
  font-family: var(--nav-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5fd6a2;
  margin-bottom: 14px;
}

.hero-static h1 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  max-width: 760px;
}

.hero-static .lead {
  max-width: 600px;
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-static .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-static .hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-static .hero-trust i {
  color: #5fd6a2;
  margin-right: 6px;
}

/* Cartes de services ------------------------------------------- */
.services .service-item {
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .services .service-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  }
}

.services .service-item .title {
  overflow-wrap: anywhere;
}

.services .service-item .more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-color);
}

.featured-services .service-item .title {
  font-size: 19px;
}

/* À propos / listes à coches ----------------------------------- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.check-list li {
  display: flex;
  gap: 10px;
  padding-bottom: 10px;
}

.check-list i {
  color: var(--accent-color);
  font-size: 1.2rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.about .about-img {
  border-radius: 12px;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Chiffres clés */
.stats .stats-item span {
  font-variant-numeric: tabular-nums;
}

/* Étapes « So funktioniert's » ------------------------------- */
.steps .step {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: var(--radius);
  padding: 28px;
  height: 100%;
}

.steps .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-color);
  font-weight: 700;
  font-family: var(--heading-font);
  margin-bottom: 16px;
}

.steps h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.steps p {
  margin: 0;
}

/* Bandeau d'action : l'image fixe du template est conservée */
.call-to-action .cta-btn {
  border-radius: 50px;
}

.call-to-action .cta-btn:hover {
  border-color: var(--accent-color);
}

/* Avis clients sans photo ------------------------------------- */
.testimonials .testimonial-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-color);
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.5rem;
}

/* FAQ (bouton accessible au lieu d'un h3 cliquable) ----------- */
.faq .faq-container .faq-item {
  padding: 0;
  border-radius: var(--radius);
}

.faq .faq-question {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: none;
  border: 0;
  text-align: left;
  color: var(--heading-color);
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq .faq-question:hover {
  color: var(--accent-color);
}

.faq .faq-question i {
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-out);
}

.faq .faq-container .faq-item .faq-content {
  padding: 0 20px;
  transition: grid-template-rows 0.25s var(--ease-out), opacity 0.2s ease, visibility 0.25s;
}

.faq .faq-container .faq-active .faq-content {
  padding: 0 20px 18px;
}

.faq .faq-active .faq-question {
  color: var(--accent-color);
}

.faq .faq-active .faq-question i {
  transform: rotate(90deg);
}

/* Formulaires --------------------------------------------------- */
.form-card {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
}

@media (max-width: 575px) {
  .form-card {
    padding: 20px 16px;
  }
}

.form-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.form-card-title .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-color);
  font-size: 0.95rem;
}

.site-form .form-label {
  font-weight: 500;
  color: var(--heading-color);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.site-form .req {
  color: var(--danger-color);
  margin-left: 2px;
}

.site-form .form-control,
.site-form .form-select {
  min-height: 48px;
  font-size: 1rem; /* 16px : évite le zoom automatique sur iOS */
  border-radius: var(--radius);
  border-color: color-mix(in srgb, var(--default-color), transparent 75%);
  color: var(--heading-color);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.site-form textarea.form-control {
  min-height: 120px;
}

.site-form .form-control:focus,
.site-form .form-select:focus {
  border-color: var(--accent-color);
  box-shadow: var(--focus-ring);
}

.site-form .form-control.is-invalid,
.site-form .form-select.is-invalid {
  border-color: var(--danger-color);
  background-image: none;
  padding-right: 0.75rem;
}

.site-form .form-control.is-invalid:focus,
.site-form .form-select.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.18);
}

.site-form .invalid-feedback {
  color: var(--danger-color);
  font-size: 0.875rem;
}

.site-form .form-text {
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
}

.site-form .input-group-text {
  border-radius: 0 var(--radius) var(--radius) 0;
  background: color-mix(in srgb, var(--default-color), transparent 94%);
  border-color: color-mix(in srgb, var(--default-color), transparent 75%);
}

.site-form .input-group .form-control {
  border-radius: var(--radius) 0 0 var(--radius);
}

.site-form .form-check-input {
  width: 1.25em;
  height: 1.25em;
  margin-top: 0.15em;
  flex-shrink: 0;
}

.site-form .form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.site-form .form-check-input:focus {
  box-shadow: var(--focus-ring);
  border-color: var(--accent-color);
}

.site-form .form-check {
  display: flex;
  gap: 10px;
  padding-left: 0;
}

.site-form .form-check .form-check-input {
  margin-left: 0;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Résumé d'erreurs (alerte) */
.form-alert {
  display: flex;
  gap: 12px;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  background: #fdecea;
  color: #8a1c1c;
  border: 1px solid #f5c2c0;
}

.form-alert i {
  font-size: 1.25rem;
  line-height: 1.3;
  flex-shrink: 0;
}

.form-alert ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* Récapitulatif mensualité (formulaire de demande) */
.estimate {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  padding: 14px 18px;
  margin-top: 18px;
  color: var(--heading-color);
}

.estimate strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
}

.estimate small {
  flex-basis: 100%;
  color: color-mix(in srgb, var(--default-color), transparent 15%);
}

/* Barre latérale du formulaire */
.aside-card {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.aside-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

@media (min-width: 992px) {
  .sticky-aside {
    position: sticky;
    top: 100px;
  }
}

/* Contact ------------------------------------------------------- */
.contact .info-item {
  padding: 20px 10px;
  text-align: center;
}

.contact .info-item p {
  overflow-wrap: anywhere;
}

.contact .info-item a {
  color: var(--default-color);
}

.contact .info-item a:hover {
  color: var(--accent-color);
}

/* Services : liste latérale ------------------------------------ */
.service-details .services-list a {
  line-height: 1.3;
}

.service-details .service-block {
  scroll-margin-top: 100px;
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.service-details .service-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.service-details .service-block .service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-color);
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.service-details ul li {
  align-items: flex-start;
}

.service-details ul i {
  line-height: 1.3;
  flex-shrink: 0;
}

.services-img {
  border-radius: 12px;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Blog ------------------------------------------------------------ */
.blog-posts article {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-posts .post-img img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.blog-posts .title {
  overflow-wrap: anywhere;
}

.blog-posts .content {
  flex-grow: 1;
}

.blog-posts .read-more a {
  border-radius: 50px;
}

.blog-details .article {
  border-radius: var(--radius);
  overflow: hidden;
}

.blog-details .content {
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 72ch;
}

.recent-posts-widget .post-item img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.recent-posts-widget .post-item h4 {
  line-height: 1.35;
}

.widgets-container {
  border-radius: var(--radius);
}

/* Page de remerciement / pages légales --------------------------- */
.thanks-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.thanks-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-color);
  font-size: 2.4rem;
  margin-bottom: 20px;
}

.thanks-ref {
  display: inline-block;
  margin: 8px 0 20px;
  padding: 6px 14px;
  border-radius: 50px;
  background: color-mix(in srgb, var(--default-color), transparent 93%);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--heading-color);
}

.legal-content {
  max-width: 820px;
}

.legal-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 32px;
}

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 22px;
}

/* Pied de page ------------------------------------------------- */
.footer .footer-claim {
  margin-bottom: 18px;
  max-width: 340px;
}

.footer address {
  font-style: normal;
  line-height: 1.6;
}

.footer .footer-links ul li {
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
}

.footer .footer-links ul i {
  line-height: 1.5;
}

.footer .footer-links ul a {
  line-height: 1.4;
}

.footer .footer-hours li {
  color: color-mix(in srgb, var(--default-color), transparent 30%);
}

.footer .footer-links ul a:hover {
  color: #5fd6a2;
}

.footer .footer-about .logo span {
  overflow-wrap: anywhere;
}

/* Liens secondaires (« Zum Ratgeber »…) : couleur du site au lieu du bleu Bootstrap */
.btn-link {
  color: var(--accent-color);
  text-underline-offset: 3px;
}

.btn-link:hover {
  color: var(--accent-strong);
}

/* Bannière de consentement ----------------------------------- */
.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100001;
  max-width: 560px;
  margin-left: auto;
  background: #fff;
  color: #333;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  padding: 20px;
  font-size: 0.925rem;
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner p {
  margin-bottom: 14px;
}

.consent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Les deux choix ont le même poids visuel (exigence TDDDG) */
.btn-consent {
  flex: 1 1 140px;
  min-height: 44px;
  border-radius: 50px;
  border: 2px solid var(--accent-color);
  background: #fff;
  color: var(--accent-color);
  font-weight: 600;
  transition: transform 160ms var(--ease-out), background-color 0.2s ease, color 0.2s ease;
}

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

.btn-consent:active {
  transform: scale(0.97);
}

/*--------------------------------------------------------------
# Animations (validées à l'étape 1)
# Propriétés : transform et opacity uniquement. Courbe : --ease-out.
--------------------------------------------------------------*/

/* 3. Accueil : entrée orchestrée du texte de l'image principale (une fois par visite).
   Remplace les keyframes du template (fadeInDown 1s depuis -100 %). */
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.hero-static .container > * {
  animation: hero-in 360ms var(--ease-out) both;
}

.hero-static .container > :nth-child(2) { animation-delay: 40ms; }
.hero-static .container > :nth-child(3) { animation-delay: 80ms; }
.hero-static .container > :nth-child(n+4) { animation-delay: 120ms; }

/* 4. Grilles de cartes : cascade de 50 ms (délais posés par main.js), une seule fois. */
.js [data-reveal] > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}

.js [data-reveal].is-in > * {
  opacity: 1;
  transform: none;
}

/* 1. Message d'erreur sous un champ : fondu + 4 px vers le bas. */
.site-form .invalid-feedback.d-block {
  opacity: 1;
  transform: none;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}

@starting-style {
  .site-form .invalid-feedback.d-block {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* 2. Encadré « Beispielrate » : apparaît une fois, le chiffre ne s'anime pas ensuite. */
.estimate:not([hidden]) {
  transform-origin: top center;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}

@starting-style {
  .estimate:not([hidden]) {
    opacity: 0;
    transform: scale(0.98);
  }
}

/* 5. Page de remerciement : le cercle s'installe, puis la coche se trace. */
@keyframes thanks-pop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
}

@keyframes thanks-draw {
  from {
    stroke-dashoffset: 1;
  }
}

.thanks-icon {
  animation: thanks-pop 300ms var(--ease-out) both;
}

.thanks-check {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: thanks-draw 350ms var(--ease-out) 200ms both;
}

/* 6. Bannière cookies : entre et sort par le bas. */
.consent-banner {
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}

@starting-style {
  .consent-banner {
    opacity: 0;
    transform: translateY(16px);
  }
}

.consent-banner.is-leaving {
  opacity: 0;
  transform: translateY(16px);
  transition-duration: 200ms;
}

/* 7. Menu mobile : fond assombri en fondu, panneau qui grandit depuis le bouton ☰. */
@media (max-width: 1199px) {
  .mobile-nav-active .navmenu {
    transition: background-color 200ms var(--ease-out);
  }

  .mobile-nav-active .navmenu > ul {
    transform-origin: top right;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  }

  @starting-style {
    .mobile-nav-active .navmenu {
      background-color: rgba(33, 37, 41, 0);
    }

    .mobile-nav-active .navmenu > ul {
      opacity: 0;
      transform: scale(0.97);
    }
  }
}

/* Bouton « haut de page » : la visibilité suit le fondu (le template coupait net à la sortie). */
.scroll-top {
  transition: transform 160ms var(--ease-out), background-color 0.2s ease, opacity 0.2s ease, visibility 0.2s;
}

/* Animations réduites : plus de déplacement ni de changement d'échelle, seulement des fondus courts. */
@media (prefers-reduced-motion: reduce) {
  @keyframes hero-in-reduced {
    from { opacity: 0; }
  }

  .hero-static .container > * {
    animation: hero-in-reduced 200ms ease both;
    animation-delay: 0ms !important;
  }

  .js [data-reveal] > * {
    transform: none;
    transition: opacity 200ms ease;
    transition-delay: 0ms !important;
  }

  .site-form .invalid-feedback.d-block,
  .estimate:not([hidden]),
  .consent-banner,
  .consent-banner.is-leaving,
  .mobile-nav-active .navmenu > ul {
    transform: none;
    transition: opacity 150ms ease;
  }

  @starting-style {
    .site-form .invalid-feedback.d-block,
    .estimate:not([hidden]),
    .consent-banner,
    .mobile-nav-active .navmenu > ul {
      transform: none;
    }
  }

  .thanks-icon {
    animation: hero-in-reduced 200ms ease both;
  }

  .thanks-check {
    animation: none;
  }
}

/* Effets de survol uniquement sur appareils avec souris */
@media (hover: none) {
  .services .service-item:hover {
    border-color: color-mix(in srgb, var(--default-color), transparent 85%);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }

  .btn-accent:active,
  .btn-outline-light-pill:active,
  .btn-header-cta:active,
  .hero .btn-get-started:active,
  .call-to-action .cta-btn:active,
  .blog-posts .read-more a:active,
  .scroll-top:active {
    transform: none;
  }
}
