/* ============================================
   UX IMPROVEMENTS — SicherZahlbank
   Accessibilité, polish, wizard, focus
   ============================================ */

:root {
    --sz-primary: #f1bf30;
    --sz-primary-dark: #d6a316;
    --sz-text: #0e2a47;
    --sz-text-muted: #6c7a8a;
    --sz-bg: #ffffff;
    --sz-bg-soft: #f7f9fc;
    --sz-border: #e3e8ef;
    --sz-success: #16a34a;
    --sz-danger: #dc2626;
    --sz-warning: #f59e0b;
    --sz-shadow-sm: 0 1px 2px rgba(14, 42, 71, 0.04);
    --sz-shadow-md: 0 4px 12px rgba(14, 42, 71, 0.08);
    --sz-shadow-lg: 0 12px 32px rgba(14, 42, 71, 0.12);
    --sz-radius: 10px;
    --sz-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Skip link (accessibilité) === */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--sz-text);
    color: #fff;
    padding: 12px 20px;
    z-index: 9999;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 var(--sz-radius) 0;
    transition: top var(--sz-transition);
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--sz-primary);
    outline-offset: 2px;
    color: #fff;
}

/* === Focus visible global === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--sz-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* === Hide outline only on mouse, keep for keyboard === */
:focus:not(:focus-visible) {
    outline: none;
}

/* === Active page indicator dans le menu === */
.main-menu__list li.is-active > a {
    color: var(--sz-primary);
    position: relative;
}
.main-menu__list li.is-active > a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--sz-primary);
    border-radius: 2px;
}

/* === Service cards améliorées === */
.service-card--enhanced {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform var(--sz-transition), box-shadow var(--sz-transition);
    border-radius: var(--sz-radius);
    overflow: hidden;
    background: var(--sz-bg);
}
.service-card--enhanced:hover {
    transform: translateY(-6px);
    box-shadow: var(--sz-shadow-lg);
}
.service-card--enhanced .service-one__image img {
    transition: transform 600ms ease;
    width: 100%;
    height: 240px;
    object-fit: cover;
}
.service-card--enhanced:hover .service-one__image img {
    transform: scale(1.05);
}
.service-card__cta {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: var(--sz-text) !important;
    font-weight: 600;
    text-decoration: none;
    transition: gap var(--sz-transition), color var(--sz-transition);
}
.service-card__cta:hover {
    color: var(--sz-primary-dark) !important;
    gap: 14px;
}
.service-card__cta i {
    transition: transform var(--sz-transition);
}
.service-card__cta:hover i {
    transform: translateX(4px);
}

/* === Wizard pour le formulaire apply === */
.apply-wizard {
    max-width: 920px;
    margin: 0 auto;
}

.wizard-progress {
    margin-bottom: 40px;
    padding: 24px;
    background: var(--sz-bg-soft);
    border-radius: var(--sz-radius);
    border: 1px solid var(--sz-border);
}
.wizard-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--sz-text-muted);
}
.wizard-progress__current {
    font-weight: 700;
    color: var(--sz-text);
    font-size: 16px;
}
.wizard-progress__bar {
    height: 8px;
    background: var(--sz-border);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.wizard-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sz-primary) 0%, var(--sz-primary-dark) 100%);
    border-radius: 999px;
    transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 25%;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    list-style: none;
    padding: 0;
    counter-reset: step;
    position: relative;
}
.wizard-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--sz-border);
    z-index: 0;
}
.wizard-steps__item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    counter-increment: step;
}
.wizard-steps__circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sz-bg);
    border: 2px solid var(--sz-border);
    color: var(--sz-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
    transition: all var(--sz-transition);
}
.wizard-steps__circle::before {
    content: counter(step);
}
.wizard-steps__label {
    display: block;
    font-size: 12px;
    color: var(--sz-text-muted);
    font-weight: 500;
}
.wizard-steps__item.is-active .wizard-steps__circle {
    background: var(--sz-primary);
    border-color: var(--sz-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(241, 191, 48, 0.2);
}
.wizard-steps__item.is-active .wizard-steps__label {
    color: var(--sz-text);
    font-weight: 600;
}
.wizard-steps__item.is-completed .wizard-steps__circle {
    background: var(--sz-success);
    border-color: var(--sz-success);
    color: #fff;
}
.wizard-steps__item.is-completed .wizard-steps__circle::before {
    content: '\2713';
    font-size: 18px;
}

.wizard-step {
    display: none;
    animation: fadeInStep 350ms ease;
}
.wizard-step.is-active {
    display: block;
}
@keyframes fadeInStep {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--sz-border);
}
.wizard-nav__spacer {
    flex: 1;
}
.wizard-btn {
    padding: 14px 28px;
    border-radius: var(--sz-radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all var(--sz-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
}
.wizard-btn--primary {
    background: var(--sz-primary);
    color: var(--sz-text);
}
.wizard-btn--primary:hover {
    background: var(--sz-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--sz-shadow-md);
    color: var(--sz-text);
}
.wizard-btn--ghost {
    background: var(--sz-bg);
    color: var(--sz-text);
    border: 1px solid var(--sz-border);
}
.wizard-btn--ghost:hover {
    background: var(--sz-bg-soft);
    color: var(--sz-text);
}
.wizard-btn--success {
    background: var(--sz-success);
    color: #fff;
}
.wizard-btn--success:hover {
    background: #128140;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--sz-shadow-md);
}
.wizard-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* === Form input améliorations === */
.contact-one__form-input {
    transition: border-color var(--sz-transition), box-shadow var(--sz-transition);
}
.contact-one__form-input:focus {
    border-color: var(--sz-primary) !important;
    box-shadow: 0 0 0 4px rgba(241, 191, 48, 0.15) !important;
    outline: none !important;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--sz-text);
    font-size: 14px;
}
.form-group .text-danger {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-top: 6px;
}
.form-group .text-danger::before {
    content: '\26A0';
    font-size: 14px;
}

/* === Floating label hint === */
.form-hint {
    display: block;
    font-size: 12px;
    color: var(--sz-text-muted);
    margin-top: 4px;
}

/* === Alerts polish === */
.alert {
    border-radius: var(--sz-radius) !important;
    padding: 16px 20px !important;
    border: 1px solid transparent !important;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.alert ul {
    margin: 4px 0 0 0;
    padding-left: 20px;
}

/* === Topbar email/phone clickable === */
.topbar__right a {
    transition: color var(--sz-transition);
}
.topbar__right a:hover {
    color: var(--sz-primary);
}

/* === Footer static contact (non-link) === */
.footer-widget__contact-static {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* === Blog card hover === */
.blog-card {
    transition: transform var(--sz-transition), box-shadow var(--sz-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sz-shadow-lg);
}
.blog-card__image {
    overflow: hidden;
}
.blog-card__image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 600ms ease;
}
.blog-card:hover .blog-card__image img {
    transform: scale(1.05);
}

/* === Image lazy loading: avoid jumping === */
img[loading="lazy"] {
    background: var(--sz-bg-soft);
}

/* === Wizard summary review screen === */
.wizard-review {
    background: var(--sz-bg-soft);
    border-radius: var(--sz-radius);
    padding: 24px;
    margin-bottom: 24px;
}
.wizard-review h4 {
    margin-bottom: 16px;
    color: var(--sz-text);
}
.wizard-review__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 24px;
}
.wizard-review__item {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-bottom: 1px solid var(--sz-border);
}
.wizard-review__label {
    font-size: 12px;
    color: var(--sz-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wizard-review__value {
    font-size: 15px;
    color: var(--sz-text);
    font-weight: 600;
    margin-top: 2px;
    word-break: break-word;
}
.wizard-review__value.is-empty {
    color: var(--sz-danger);
    font-weight: 400;
    font-style: italic;
}

/* === Estimated payment box (in wizard) === */
.wizard-estimate {
    background: linear-gradient(135deg, var(--sz-text) 0%, #1a3a5c 100%);
    color: #fff;
    border-radius: var(--sz-radius);
    padding: 20px 24px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.wizard-estimate__label {
    font-size: 13px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wizard-estimate__value {
    font-size: 28px;
    font-weight: 700;
    color: var(--sz-primary);
    margin-top: 4px;
}
.wizard-estimate__small {
    font-size: 12px;
    opacity: 0.7;
    display: block;
    margin-top: 4px;
}

/* === Responsive adjustments === */
@media (max-width: 767px) {
    .wizard-steps__label {
        display: none;
    }
    .wizard-progress {
        padding: 16px;
        margin-bottom: 24px;
    }
    .wizard-nav {
        flex-direction: column-reverse;
    }
    .wizard-btn {
        width: 100%;
        justify-content: center;
    }
    .wizard-estimate {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === Wizard summary value spacing === */
.success-page .card {
    border-radius: var(--sz-radius);
    border: 1px solid var(--sz-border);
    box-shadow: var(--sz-shadow-sm);
    overflow: hidden;
}

/* === Page header overlay (lisibilité texte sur image) === */
.page-header {
    position: relative;
}
.page-header__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.page-header__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(14, 42, 71, 0.78) 0%,
        rgba(14, 42, 71, 0.55) 50%,
        rgba(14, 42, 71, 0.65) 100%
    );
}
.page-header .container {
    position: relative;
    z-index: 1;
}
.page-header h2,
.page-header .thm-breadcrumb,
.page-header .thm-breadcrumb a,
.page-header .thm-breadcrumb span {
    color: #fff !important;
}
.page-header .thm-breadcrumb a:hover {
    color: var(--sz-primary) !important;
}

/* === Bandeau réassurance page Apply === */
.apply-trust {
    background: linear-gradient(180deg, var(--sz-bg) 0%, var(--sz-bg-soft) 100%);
    padding: 32px 0;
    border-bottom: 1px solid var(--sz-border);
}
.apply-trust__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.apply-trust__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--sz-bg);
    border: 1px solid var(--sz-border);
    border-radius: var(--sz-radius);
    box-shadow: var(--sz-shadow-sm);
    transition: transform var(--sz-transition), box-shadow var(--sz-transition);
}
.apply-trust__item:hover {
    transform: translateY(-2px);
    box-shadow: var(--sz-shadow-md);
}
.apply-trust__item i {
    font-size: 28px;
    color: var(--sz-primary);
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(241, 191, 48, 0.1);
    border-radius: 10px;
}
.apply-trust__item div {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.apply-trust__item strong {
    font-size: 16px;
    color: var(--sz-text);
    font-weight: 700;
}
.apply-trust__item span {
    font-size: 12px;
    color: var(--sz-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

@media (max-width: 575px) {
    .apply-trust {
        padding: 20px 0;
    }
    .apply-trust__row {
        gap: 12px;
    }
    .apply-trust__item {
        padding: 12px 14px;
    }
}

/* === About page images === */
.about-three__image {
    position: relative;
    overflow: hidden;
    border-radius: var(--sz-radius);
    box-shadow: var(--sz-shadow-md);
    height: 100%;
    background: var(--sz-bg-soft);
}
.about-three__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 800ms ease;
}
.about-three__image:hover img {
    transform: scale(1.04);
}
.about-image--portrait img {
    aspect-ratio: 3 / 4;
    min-height: 400px;
}
.about-image--landscape img {
    aspect-ratio: 16 / 9;
    min-height: 400px;
}
.about-three__image-text {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--sz-primary);
    color: var(--sz-text);
    padding: 14px 20px;
    border-radius: var(--sz-radius);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--sz-shadow-md);
    max-width: calc(100% - 40px);
}
.about-three__image-text i {
    font-size: 22px;
    color: var(--sz-text);
}
.about-three__image-text span {
    line-height: 1.3;
}

@media (max-width: 991px) {
    .about-image--portrait,
    .about-image--landscape {
        margin-bottom: 24px;
    }
    .about-image--portrait img,
    .about-image--landscape img {
        min-height: 280px;
    }
}

/* === Video section overlay === */
.video-two {
    position: relative;
}
.video-two__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.video-two__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14, 42, 71, 0.7) 0%, rgba(14, 42, 71, 0.4) 100%);
}
.video-two .container {
    position: relative;
    z-index: 1;
}
.video-two .video-one__btn {
    transition: transform var(--sz-transition);
}
.video-two .video-one__btn:hover {
    transform: scale(1.1);
}

/* === Team cards polish === */
.team-one__card {
    border-radius: var(--sz-radius);
    overflow: hidden;
    transition: transform var(--sz-transition), box-shadow var(--sz-transition);
}
.team-one__card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sz-shadow-lg);
}
.team-one__image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform 600ms ease;
}
.team-one__card:hover .team-one__image img {
    transform: scale(1.05);
}

/* === About intro (refonte) === */
.about-intro {
    position: relative;
    padding: 100px 0 90px;
    overflow: hidden;
}
.about-intro__shape {
    position: absolute;
    top: -120px;
    right: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(31, 111, 235, 0.10), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.about-intro .container {
    position: relative;
    z-index: 1;
}

.about-intro__media {
    position: relative;
    padding: 30px 30px 30px 0;
}
.about-intro__media::before {
    content: "";
    position: absolute;
    top: 60px;
    right: 0;
    bottom: 0;
    left: 60px;
    background: linear-gradient(135deg, var(--sz-primary, #1f6feb), #4f46e5);
    opacity: 0.08;
    border-radius: 24px;
    z-index: 0;
}
.about-intro__image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 460px;
    max-height: 540px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    transition: transform 600ms ease;
}
.about-intro__media:hover .about-intro__image {
    transform: translate(-4px, -4px);
}
.about-intro__badge {
    position: absolute;
    bottom: 26px;
    left: -24px;
    background: var(--sz-primary, #1f6feb);
    color: #fff;
    padding: 14px 22px;
    border-radius: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 28px rgba(31, 111, 235, 0.32);
    z-index: 2;
}
.about-intro__badge i {
    font-size: 22px;
}
.about-intro__stat {
    position: absolute;
    background: #fff;
    border-radius: 14px;
    padding: 16px 22px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
    z-index: 2;
    min-width: 140px;
    text-align: center;
}
.about-intro__stat--top {
    top: 6px;
    right: 0;
}
.about-intro__stat--bottom {
    bottom: 90px;
    right: -10px;
}
.about-intro__stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--sz-primary, #1f6feb);
    line-height: 1;
}
.about-intro__stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6b7280;
    margin-top: 4px;
}

.about-intro__content {
    padding-left: 16px;
}
.about-intro__lead {
    font-size: 16px;
    line-height: 1.75;
    color: #4b5563;
    margin-bottom: 28px;
}
.about-intro__pillars {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 32px;
}
.about-intro__pillar {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.about-intro__pillar:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 111, 235, 0.25);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.about-intro__pillar-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(31, 111, 235, 0.12), rgba(79, 70, 229, 0.12));
    color: var(--sz-primary, #1f6feb);
    font-size: 18px;
}
.about-intro__pillar h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}
.about-intro__pillar p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #6b7280;
}

.about-intro__cta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.about-intro__cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #111827;
    font-weight: 600;
    text-decoration: none;
    transition: color 200ms ease;
}
.about-intro__cta-link:hover {
    color: var(--sz-primary, #1f6feb);
}
.about-intro__cta-link i {
    color: var(--sz-primary, #1f6feb);
    font-size: 18px;
}

@media (max-width: 991px) {
    .about-intro {
        padding: 70px 0 60px;
    }
    .about-intro__content {
        padding-left: 0;
        margin-top: 50px;
    }
    .about-intro__media {
        padding: 20px 20px 20px 0;
    }
    .about-intro__image {
        min-height: 360px;
    }
    .about-intro__stat--top {
        top: 0;
        right: 10px;
    }
    .about-intro__stat--bottom {
        bottom: 60px;
        right: 0;
    }
}
@media (max-width: 575px) {
    .about-intro {
        padding: 50px 0 40px;
    }
    .about-intro__media {
        padding: 0;
    }
    .about-intro__media::before {
        display: none;
    }
    .about-intro__image {
        min-height: 260px;
    }
    .about-intro__badge {
        bottom: -16px;
        left: 50%;
        transform: translateX(-50%);
    }
    .about-intro__stat {
        position: static;
        margin-top: 14px;
        display: inline-block;
        min-width: auto;
    }
    .about-intro__stat--top,
    .about-intro__stat--bottom {
        top: auto;
        bottom: auto;
        right: auto;
    }
    .about-intro__cta {
        gap: 16px;
    }
    .about-intro__pillar {
        padding: 14px;
    }
}
