/*--------------------------------------------------------------
# Compléments au template « Company » (site de crédit)
# Mêmes variables, mêmes polices, mêmes composants : on étend, on ne redessine pas.
--------------------------------------------------------------*/

:root {
  --accent-light: #3ddc5a;          /* accent lisible sur fond sombre */
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 55%);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* ease-out marqué (Emil Kowalski) */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --error-color: #b42318;
}

/* ---------- Accessibilité ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 10000;
  padding: 8px 14px;
  background: var(--heading-color);
  color: #fff;
  border-radius: 4px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); color: #fff; }

:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}
.dark-background :focus-visible { outline-color: var(--accent-light); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--accent-color);
  box-shadow: var(--focus-ring);
}
main:focus { outline: none; }

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}
.link-button:hover { color: var(--accent-light); text-decoration: underline; }

/* ---------- En-tête / pied ---------- */
.header .logo .sitename {
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--heading-color);
  font-family: var(--heading-font);
}
.btn-getstarted {
  background: var(--accent-color);
  color: var(--contrast-color);
  font-family: var(--nav-font);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 4px;
  margin-left: 24px;
}
.btn-getstarted:hover, .btn-getstarted:focus-visible { color: var(--contrast-color); background: color-mix(in srgb, var(--accent-color), #000 15%); }
.mobile-nav-toggle { background: none; border: 0; padding: 0; }

.footer h2.h4 {
  font-size: 16px;
  font-weight: bold;
  position: relative;
  padding-bottom: 12px;
  color: var(--heading-color);
}
.footer a:hover, .footer .footer-links ul a:hover { color: var(--accent-light); }
.footer address p { margin-bottom: 0; }
.footer .footer-links p { color: color-mix(in srgb, var(--default-color), transparent 20%); font-size: 14px; }
.footer-contact a { color: inherit; }

/* ---------- Boutons ---------- */
.btn-accent {
  background: var(--accent-color);
  border: 1px solid var(--accent-color);
  color: var(--contrast-color);
  font-weight: 500;
}
.btn-accent:hover, .btn-accent:focus-visible {
  background: color-mix(in srgb, var(--accent-color), #000 15%);
  border-color: color-mix(in srgb, var(--accent-color), #000 15%);
  color: var(--contrast-color);
}
.btn-cta {
  background: #fff;
  color: var(--accent-color);
  font-weight: 600;
  padding: 12px 34px;
  border-radius: 4px;
}
.btn-cta:hover { background: #f1f1f1; color: color-mix(in srgb, var(--accent-color), #000 20%); }
.hero .btn-get-started { background: var(--accent-color); }
.hero .btn-get-started.btn-ghost { background: transparent; border-color: #fff; }
.hero .btn-get-started.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Simulateur ---------- */
.calc-form {
  background: var(--surface-color);
  padding: 32px;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 6px;
}
.calc-form .form-label { font-weight: 600; color: var(--heading-color); }
.form-range::-webkit-slider-thumb { background: var(--accent-color); }
.form-range::-moz-range-thumb { background: var(--accent-color); }
.calc-result {
  background: #111;
  color: #fff;
  padding: 32px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}
.calc-label { margin: 0; color: rgba(255, 255, 255, 0.75); font-size: 15px; }
.calc-monthly {
  font-family: var(--heading-font);
  font-size: clamp(34px, 6vw, 46px);
  font-weight: 800;
  margin: 4px 0 18px;
  color: #fff;
}
.calc-details { margin: 0 0 22px; }
.calc-details div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.calc-details dt { font-weight: 400; color: rgba(255, 255, 255, 0.75); }
.calc-details dd { margin: 0; font-weight: 600; }
.calc-note { font-size: 12.5px; color: rgba(255, 255, 255, 0.7); margin: 14px 0 0; }
.calc-result .btn-light { margin-top: auto; font-weight: 600; color: #111; }
.js .calc-submit { display: none; }

/* ---------- Cartes / étapes / valeurs ---------- */
.services .service-item h3 { color: var(--heading-color); }
.process-item, .value-item {
  flex-direction: column;
  align-items: flex-start !important;
  padding: 28px 24px !important;
  gap: 10px;
  position: relative;
}
.process-item i, .value-item i { color: var(--accent-color); padding: 0 !important; line-height: 1 !important; }
.process-item h3, .value-item h3 { line-height: 1.3 !important; font-size: 18px !important; }
.process-item p, .value-item p { margin: 0; font-size: 14.5px; }
.step-no {
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--heading-font);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: color-mix(in srgb, var(--default-color), transparent 88%);
}
.service-icon-box {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent-color), transparent 92%);
  border-radius: 6px;
}
.service-icon-box i { font-size: 96px; color: var(--accent-color); }
.service-details ul { list-style: none; padding: 0; margin: 18px 0 22px; }
.service-details ul li { padding: 5px 0; display: flex; align-items: center; gap: 8px; }
.service-details ul i { color: var(--accent-color); font-size: 20px; }

.testimonial-initials {
  width: 90px;
  height: 90px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: var(--accent-color);
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  font-family: var(--heading-font);
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 880px; }
.faq-item {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 6px;
  margin-bottom: 14px;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--heading-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover span { color: var(--accent-color); }
.faq-item[open] summary span { color: var(--accent-color); }
.faq-content { padding: 0 22px 18px; }
.faq-content p { margin: 0; }

/* ---------- CTA ---------- */
.cta { padding: 50px 0; }
.cta h2 { color: #fff; margin-bottom: 6px; }

/* ---------- Formulaires ---------- */
.app-form {
  background: var(--surface-color);
  padding: 32px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  border-radius: 6px;
}
@media (max-width: 575px) {
  .app-form, .calc-form, .calc-result, .contact .info { padding: 22px 16px; }
}
.form-section { border: 0; padding: 0; margin: 0 0 30px; }
.form-section legend {
  font-family: var(--heading-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-badge {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  font-size: 15px;
  align-items: center;
  justify-content: center;
}
.form-label { font-weight: 500; color: var(--heading-color); }
.req { color: var(--error-color); }
.opt { color: color-mix(in srgb, var(--default-color), transparent 35%); font-weight: 400; font-size: 0.9em; }
.form-text { color: color-mix(in srgb, var(--default-color), transparent 25%); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.invalid-feedback { color: var(--error-color); font-size: 0.875rem; }
.form-control.is-invalid, .form-select.is-invalid, .form-check-input.is-invalid { border-color: var(--error-color); }
.form-check-input:checked { background-color: var(--accent-color); border-color: var(--accent-color); }

.error-summary {
  border: 2px solid var(--error-color);
  background: #fff5f4;
  color: #5c120c;
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 22px;
}
.error-summary h2 { color: var(--error-color); }
.error-summary a { color: #7a1b13; text-decoration: underline; }
.error-summary:focus { outline: 3px solid var(--error-color); outline-offset: 2px; }

.form-aside { position: sticky; top: 100px; }
.loan-form .info, .contact .info {
  background-color: var(--surface-color);
  padding: 32px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}
.loan-form .info-item + .info-item { padding-top: 18px; margin-top: 18px; border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%); }
.loan-form .info-item i { font-size: 24px; color: var(--accent-color); margin-right: 18px; }
.loan-form .info-item p { margin: 0; font-size: 14px; }
.contact .info p a { color: inherit; }
.contact { padding-top: 60px; }

.btn-submit { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
}
.btn-submit.is-loading .btn-spinner { display: inline-block; }

/* ---------- Remerciement / 404 / textes légaux ---------- */
.thanks-card {
  max-width: 640px;
  background: var(--surface-color);
  padding: 44px 32px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  border-radius: 6px;
}
.thanks-icon { font-size: 64px; color: var(--accent-color); line-height: 1; margin-bottom: 12px; }
.thanks-ref {
  font-family: var(--heading-font);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--heading-color);
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
  display: inline-block;
  padding: 6px 18px;
  border-radius: 4px;
}
.thanks-steps { max-width: 440px; margin: 0 auto; }
.error-code { font-family: var(--heading-font); font-size: 96px; font-weight: 800; color: var(--accent-color); line-height: 1; margin-bottom: 8px; }

.legal-text { max-width: 880px; }
.legal-text h2 { font-size: 22px; margin-top: 32px; }
.legal-list dt { font-weight: 600; color: var(--heading-color); }
.legal-list dd { margin-bottom: 10px; }

.blog-details .content h2 { margin-top: 28px; }
.article-cta { margin-top: 32px; padding: 22px; background: color-mix(in srgb, var(--accent-color), transparent 93%); border-radius: 6px; }
.blog-posts .post-title { font-size: 20px; }

/* ---------- Bandeau cookies ---------- */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #111;
  color: #fff;
  padding: 18px 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}
.consent-banner h2 { color: #fff; }
.consent-banner p { font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.consent-banner a { color: var(--accent-light); }
.consent-inner { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/*==============================================================
# Animations (7) — uniquement transform / opacity, durées courtes,
# jamais « transition: all », désactivées si prefers-reduced-motion.
==============================================================*/

/* 1. Apparition au scroll : AOS (template), réglé dans main.js (durée 500 ms, une seule fois). */

/* 2. Boutons : léger soulèvement au survol, enfoncement au clic. */
.btn-accent, .btn-cta, .btn-getstarted, .hero .btn-get-started, .btn-outline-dark, .calc-result .btn-light {
  transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-accent:hover, .btn-cta:hover, .btn-getstarted:hover, .hero .btn-get-started:hover, .btn-outline-dark:hover, .calc-result .btn-light:hover { transform: translateY(-1px); }
}
.btn-accent:active, .btn-cta:active, .btn-getstarted:active, .hero .btn-get-started:active, .btn-outline-dark:active, .calc-result .btn-light:active { transform: scale(0.97); }

/* 3. Cartes : élévation au survol (service, étapes, valeurs, articles). */
.services .service-item, .process-item, .value-item, .blog-posts article {
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .services .service-item:hover, .process-item:hover, .value-item:hover, .blog-posts article:hover { transform: translateY(-4px); }
}

/* 4. FAQ : rotation du chevron et fondu du contenu à l'ouverture. */
.faq-toggle { transition: transform 200ms var(--ease-out); flex-shrink: 0; }
.faq-item[open] .faq-toggle { transform: rotate(180deg); }
.faq-item[open] .faq-content { animation: fade-slide-in 220ms var(--ease-out); }

/* 5. Simulateur : la mensualité « pulse » brièvement quand elle change. */
.calc-monthly.is-updated { animation: value-pop 160ms var(--ease-out); }

/* 6. Formulaires : messages d'erreur et résumé apparaissent en glissant ; spinner d'envoi. */
.invalid-feedback.d-block, .error-summary:not([hidden]) { animation: fade-slide-in 200ms var(--ease-out); }
.btn-submit.is-loading .btn-spinner { animation: spin 700ms linear infinite; }
.btn-submit.is-loading .btn-label { opacity: 0.8; }

/* 7. Bandeau cookies : entrée par le bas. */
.consent-banner:not([hidden]) { animation: slide-up 280ms var(--ease-out); }

@keyframes fade-slide-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes value-pop { from { transform: scale(0.98); } to { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn-submit.is-loading .btn-spinner { animation: none; border-top-color: rgba(255,255,255,0.45); }
  [data-aos] { opacity: 1 !important; transform: none !important; }
}
