/* ==============================
   application-mobile.css
   ============================== */

/* ── Navbar forcée en clair sur hero vidéo ── */
.aw-hero-active .navbar-nav .nav-link,
.aw-hero-active .navbar-brand,
.aw-hero-active .navbar-toggler {
    color: rgba(255,255,255,.85) !important;
}
.aw-hero-active .navbar-nav .nav-link:hover {
    color: #fff !important;
}

@media (max-width: 767px) {
    [data-bs-theme="light"] .aw-hero-active .navbar-nav .nav-link,
    [data-bs-theme="light"] .aw-hero-active .navbar-brand,
    [data-bs-theme="light"] .aw-hero-active .navbar-toggler {
        color: rgba(28, 28, 28, 0.85) !important;
    }
    [data-bs-theme="light"] .aw-hero-active .navbar-nav .nav-link:hover {
        color: rgba(28, 28, 28, 0.85) !important;
    }
}

/* ── Animations scroll ── */
.am-lazy {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .6s ease, transform .6s ease;
}
.am-lazy.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Badge section ── */
.am-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6366f1;
    background: rgba(99,102,241,.1);
    border: 1px solid rgba(99,102,241,.25);
    border-radius: 50px;
    padding: .3rem .85rem;
    margin-bottom: 1rem;
}

/* ── Hero vidéo ── */
.am-hero {
    position: sticky;
    top: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 0;
}
.am-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.am-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 25, 0.55);
    z-index: 1;
}
.am-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 140px 0 80px;
}
.am-hero-title {
    font-size: clamp(1.85rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
}
.am-hero-title span {
    color: #a78bfa;
}
.am-hero-sub {
    font-size: clamp(.95rem, 2vw, 1.15rem);
    color: rgba(255,255,255,.7);
    max-width: 540px;
    line-height: 1.75;
}

@media (max-width: 767px) {
    .am-hero { min-height: 100dvh; }
    .am-hero-content { padding: 110px 0 60px; }
}

/* ── Fix sticky hero scroll overlap ── */
html, body {
    overflow-x: hidden;
}

/* ── Fond initial page pour éviter flash au chargement ── */
[data-bs-theme="light"] body {
    background-color: #0a0819;
}
[data-bs-theme="light"] .page-wrapper {
    background-color: #0a0819;
}

.page-wrapper {
    overflow: visible;
}

/* ── Scroll overlap + glassmorphism ── */
.am-content-wrapper {
    position: relative;
    z-index: 10;
    margin-top: -60px;
    border-radius: 2rem 2rem 0 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: clip;
}
[data-bs-theme="dark"] .am-content-wrapper {
    background: rgba(10, 8, 30, 0.85);
    border-top: 1px solid rgba(99,102,241,.15);
}
[data-bs-theme="light"] .am-content-wrapper {
    background: rgba(255,255,255,.85);
    border-top: 1px solid rgba(99,102,241,.12);
}

/* ── Animation apparition douce ── */
.am-content-wrapper {
    opacity: 0;
    transform: translateY(40px);
    animation: am-reveal .9s cubic-bezier(.22,1,.36,1) .2s forwards;
}
@keyframes am-reveal {
    from {
        opacity: 0;
        transform: translateY(40px);
        background: transparent;
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Scroll indicator languette ── */
.am-scroll-hint-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    overflow: hidden;
    border-radius: 2rem 2rem 0 0;
    z-index: 20;
}
.am-scroll-hint-line {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #a78bfa, #6366f1, transparent);
    animation: am-scroll-hint 4s ease-in-out infinite;
}
@keyframes am-scroll-hint {
    0%   { left: -40%; opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

@media (max-width: 767px) {
    .am-scroll-hint-line {
        width: 25%;
        animation: am-scroll-hint-mobile 4s linear infinite;
    }
    @keyframes am-scroll-hint-mobile {
        0%   { left: -25%; opacity: 0; }
        20%  { left: 5%; opacity: 1; }
        80%  { left: 70%; opacity: 1; }
        100% { left: 125%; opacity: 0; }
    }
}

.am-content-wrapper::after {
    display: none;
}

/* ── Sections services ── */
.am-service-wrap {
    position: relative;
    padding: 60px 0 70px;
}
.am-service-wrap::before {
    display: none;
}
.am-service-wrap + .am-service-wrap {
    border-top: 1px solid rgba(99,102,241,.07);
}

/* ── Image avec glow ── */
.am-img-wrap {
    position: relative;
}
.am-img {
    border-radius: 1.25rem;
    width: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    transition: transform .4s ease, box-shadow .4s ease;
}
.am-img:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(99,102,241,.2);
}
[data-bs-theme="dark"] .am-img {
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
[data-bs-theme="light"] .am-img {
    box-shadow: 0 12px 40px rgba(0,0,0,.1);
}
.am-img-glow {
    position: absolute;
    bottom: -24px;
    left: 10%;
    width: 80%;
    height: 60px;
    background: rgba(99,102,241,.3);
    filter: blur(32px);
    border-radius: 50%;
    z-index: 0;
    transition: opacity .4s ease;
}
.am-img-wrap:hover .am-img-glow {
    opacity: .7;
}
[data-bs-theme="light"] .am-img-glow {
    background: rgba(99,102,241,.15);
}

/* ── Glow alterné ── */
.am-service-wrap:nth-child(even) .am-img-glow {
    background: rgba(99,102,241,.2);
}
.am-service-wrap:nth-child(odd) .am-img-glow {
    background: rgba(167,139,250,.2);
}

/* ── Tags ── */
.am-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 1.25rem;
}
.am-tag {
    font-size: .72rem;
    font-weight: 600;
    padding: .22rem .7rem;
    border-radius: 50px;
    background: rgba(99,102,241,.1);
    color: #6366f1;
    border: 1px solid rgba(99,102,241,.2);
}

/* ── Mini-cards 2x2 ── */
.am-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: 1.5rem;
}
.am-grid-card {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    border-radius: .85rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(99,102,241,.12);
    transition: border-color .25s, box-shadow .25s;
}
.am-grid-card:hover {
    border-color: rgba(99,102,241,.35);
    box-shadow: 0 4px 16px rgba(99,102,241,.08);
}
[data-bs-theme="dark"] .am-grid-card {
    background: rgba(255,255,255,.04);
}
[data-bs-theme="light"] .am-grid-card {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.am-grid-icon {
    width: 36px;
    height: 36px;
    border-radius: .6rem;
    background: rgba(99,102,241,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 1rem;
    flex-shrink: 0;
}
.am-grid-card h3 {
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: .15rem;
    line-height: 1.3;
}
.am-grid-card p {
    font-size: .75rem;
    opacity: .65;
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 575px) {
    .am-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Secteurs ── */
.am-sectors {
    padding: 60px 0 70px;
    border-top: 1px solid rgba(99,102,241,.07);
}
.am-sectors-tabs {
    border-bottom: 2px solid rgba(99,102,241,.12);
    gap: .15rem;
}
.am-sectors-tabs .nav-link {
    font-size: .82rem;
    font-weight: 600;
    opacity: .5;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: .6rem .9rem;
    margin-bottom: -2px;
    color: inherit;
    transition: opacity .2s, border-color .2s, color .2s;
    white-space: nowrap;
}
.am-sectors-tabs .nav-link:hover {
    opacity: .8;
}
.am-sectors-tabs .nav-link.active {
    opacity: 1;
    color: #6366f1;
    border-bottom-color: #6366f1;
    background: transparent;
}
.am-sectors-content {
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(99,102,241,.1);
}
[data-bs-theme="dark"] .am-sectors-content {
    background: rgba(255,255,255,.03);
}
[data-bs-theme="light"] .am-sectors-content {
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,.05);
}
.am-sectors-img {
    border-radius: .85rem;
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}
[data-bs-theme="dark"] .am-sectors-img {
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
[data-bs-theme="light"] .am-sectors-img {
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

@media (max-width: 767px) {
    .am-sectors { padding: 40px 0 50px; }
    .am-sectors-content { padding: 1.5rem 1rem; }
    .am-sectors-img { max-height: 200px; }
}

/* ── FAQ ── */
.am-faq {
    padding: 60px 0 70px;
    border-top: 1px solid rgba(99,102,241,.07);
}
.am-faq-sticky {
    position: sticky;
    top: 100px;
}
.am-faq-accordion .am-faq-item {
    border: 1px solid rgba(99,102,241,.12) !important;
    border-radius: .85rem !important;
    overflow: hidden;
    transition: border-color .3s, box-shadow .3s;
}
.am-faq-accordion .am-faq-item:has(.accordion-button:not(.collapsed)) {
    border-color: rgba(99,102,241,.4) !important;
    box-shadow: 0 6px 24px rgba(99,102,241,.08);
}
[data-bs-theme="dark"] .am-faq-item {
    background: rgba(255,255,255,.04);
}
[data-bs-theme="light"] .am-faq-item {
    background: #fff;
}
.am-faq-btn {
    font-size: .95rem;
    font-weight: 600;
    padding: 1.1rem 1.25rem;
    background: transparent !important;
    color: inherit !important;
}
.am-faq-btn:not(.collapsed) {
    color: #6366f1 !important;
}
.am-faq-btn::after {
    filter: invert(40%) sepia(80%) saturate(500%) hue-rotate(210deg);
}
.am-faq-body {
    font-size: .88rem;
    line-height: 1.75;
    opacity: .75;
    padding: 0 1.25rem 1.25rem;
}

@media (max-width: 767px) {
    .am-faq { padding: 40px 0 50px; }
    .am-faq-sticky { position: relative; top: 0; }
}

/* ── Responsive global ── */
@media (max-width: 767px) {
    .am-content-wrapper {
        margin-top: -40px;
        border-radius: 1.25rem 1.25rem 0 0;
    }
    .am-service-wrap { padding: 40px 0 50px; }
    .am-service-wrap::before { display: none; }
    .am-img-glow { display: none; }
    .am-img:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .am-lazy { opacity: 1; transform: none; transition: none; }
}


/* ── CTA Final ── */
.cta-final {
    position: relative;
    border-radius: 1.5rem;
    padding: 4rem 3rem;
    background: linear-gradient(135deg, rgba(99,102,241,.15) 0%, rgba(99,102,241,.04) 100%);
    border: 1px solid rgba(99,102,241,.25);
    overflow: hidden;
}
.cta-final-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,.18) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}
.cta-final-badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #6366f1;
    background: rgba(99,102,241,.1);
    border: 1px solid rgba(99,102,241,.25);
    border-radius: 50px;
    padding: .3rem .9rem;
}
.cta-final-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
}
.cta-final-sub {
    font-size: 1rem;
    opacity: .72;
    max-width: 480px;
}
.cta-final-box {
    background: rgba(99,102,241,.06);
    border: 1px solid rgba(99,102,241,.15);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.cta-final-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .92rem;
    font-weight: 500;
}
.cta-final-item i {
    color: #6366f1;
    font-size: 1.1rem;
    flex-shrink: 0;
}
@media (max-width: 767px) {
    .cta-final {
        padding: 2.5rem 1.5rem;
    }
    .cta-final-glow {
        width: 250px;
        height: 250px;
        top: -60px;
        right: -60px;
    }
    .cta-final-sub {
        max-width: 100%;
    }
}