/* ===================
   Variables
=================== */
:root {
    /* Couleurs en mode clair */
    --primary-color: #640CFD;
    --secondary-color: #007AFF;
    --accent-color: #E61515;
    --surface-color: #FFFFFF;
    --background-color: #F9FBFB;
    --neutral-color: #E5E7EB;
    --text-color: #000000;
    --text-secondary-color: #3A506B;

    /* Marges et dimensions */
    --padding: 1rem;
    --border-radius: 20px;
    --transition: all 0.3s ease;

    /* Fonts */
    --title-font: 'Space Grotesk', sans-serif;
    --body-font: 'Albert Sans', sans-serif;

    /* Responsive variables */
    --container-width: 1200px;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #640CFD;
        --secondary-color: #007AFF;
        --accent-color: #E61515;
        --surface-color: #1B1F3B;
        --background-color: #0F131B;
        --neutral-color: #3A506B;
        --text-color: #FFFFFF;
        --text-secondary-color: #F9FBFB;
    }
}

/* Classe pour forcer le mode sombre lorsque l'utilisateur le sélectionne manuellement */
.dark-mode {
    --primary-color: #640CFD;
    --secondary-color: #007AFF;
    --accent-color: #E61515;
    --surface-color: #1B1F3B;
    --background-color: #0F131B;
    --neutral-color: #3A506B;
    --text-color: #FFFFFF;
    --text-secondary-color: #F9FBFB;
}

/* ===================
   Reset
=================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    font-family: var(--body-font);
    border: none;
    background: none;
}

/* ===================
   Layout
=================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--padding);
}

section {
    padding: 4rem 0;
}

/* ===================
   Typography
=================== */
.main-title {
    font-family: var(--title-font);
    font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.section-title {
    font-family: var(--title-font);
    font-size: clamp(1.75rem, 3vw + 0.5rem, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-color);
}

.sub-title {
    font-family: var(--body-font);
    font-size: clamp(1.25rem, 2vw + 0.5rem, 2rem);
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-secondary-color);
}

.section-description {
    font-family: var(--body-font);
    font-size: clamp(1rem, 1vw + 0.5rem, 1.5rem);
    color: var(--text-secondary-color);
    text-align: center;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.primary-color {
    color: var(--primary-color);
}

/* ===================
   Components
=================== */
.badge {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #FFFFFF;
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: table;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: bold;
    transition: var(--transition);
    gap: 0.5rem;
    border: 1px solid var(--neutral-color);
}

.btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.btn-light {
    background-color: var(--surface-color);
    color: var(--text-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #FFFFFF !important;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #5000d6;
    transform: translateY(-3px);
    border-color: #5000d6;
}

.dark-mode .btn-light img,
.dark-mode .navbar img,
.dark-mode .footer-logo img {
    filter: brightness(0) invert(1);
}

.icon-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background-color: rgba(100, 12, 253, 0.1);
    border: 1px solid var(--neutral-color);
}

.icon-container .icon {
    width: 30px;
    height: 30px;
    filter: brightness(0) saturate(100%) invert(14%) sepia(92%) saturate(6903%) hue-rotate(268deg) brightness(99%) contrast(111%);
}

.btn .store-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.dark-mode .btn-light .store-icon {
    fill: #FFFFFF;
    /* Icônes blanches en mode sombre */
}

/* ===================
   Header
=================== */
.hero {
    position: relative;
    padding: 120px 0 3rem;
    overflow: hidden;
    background-color: var(--background-color);
}

.logo-container {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    max-width: 180px;
    margin: 0 auto;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.main-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-description {
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    color: var(--text-secondary-color);
}

.app-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ===================
   Engagement Section
=================== */
.engagement-section {
    padding-top: 6rem;
}

.engagement-section .section-title,
.problems-section .section-title,
.solution-section .section-title,
.showcase-section .section-title,
.layout-section .section-title,
.communication-section .section-title,
.financial-section .section-title,
.summary-section .section-title,
.contact-section .section-title {
    font-family: var(--title-font);
}

.engagement-section h3,
.problems-section h3,
.solution-section h3,
.showcase-section h3,
.layout-section h3,
.communication-section h3,
.financial-section h3,
.summary-section h3 {
    font-family: var(--title-font);
}

.engagement-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.engagement-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
    color: var(--text-color);
    border: 1px solid var(--neutral-color);
}

.engagement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.engagement-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

.engagement-card.highlight {
    border: 1px solid var(--secondary-color);
}

.engagement-card.highlight .icon-container {
    background-color: rgba(2, 178, 253, 0.1);
}

.engagement-card.highlight .icon-container img {
    filter: invert(48%) sepia(85%) saturate(2619%) hue-rotate(181deg) brightness(102%) contrast(101%);
}

.engagement-cards-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ===================
   Problems Section
=================== */
.problems-section {
    padding-top: 6rem;
}

.problems-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.problem-card {
    flex: 0 0 auto;
    width: 300px;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    scroll-snap-align: start;
    transition: var(--transition);
    color: var(--text-color);
    border: 1px solid var(--neutral-color);
}

.problem-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.problem-card .icon-container {
    background-color: rgba(0, 122, 255, 0.1);
}

.problem-card .icon-container img {
    filter: brightness(0) saturate(100%) invert(39%) sepia(95%) saturate(1954%) hue-rotate(199deg) brightness(102%) contrast(107%);
}

.problem-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-color);
}

.problem-card p {
    color: var(--text-secondary-color);
}

/* ===================
   Solution Section
=================== */
.solution-section {
    padding-top: 6rem;
}

.app-screenshots-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0 2rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 3rem;
}

.app-screenshots-slider img {
    height: 500px;
    flex: 0 0 auto;
    scroll-snap-align: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.app-screenshots-slider img:hover {
    transform: scale(1.02);
}

.solution-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.feature-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: none;
}

.feature-card .icon-container {
    background-color: rgba(2, 178, 253, 0.1);
    flex-shrink: 0;
}

.feature-card .icon-container img {
    filter: invert(48%) sepia(85%) saturate(2619%) hue-rotate(181deg) brightness(102%) contrast(101%);
}

.feature-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--text-color);
}

.feature-content p {
    color: var(--text-secondary-color);
}

/* ===================
   Showcase Section
=================== */
.showcase-section {
    padding-top: 6rem;
}

.showcase-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 3rem;
}

.showcase-image {
    text-align: center;
}

.phone-mockup {
    max-height: 600px;
    margin: 0 auto;
}

.showcase-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.communication-features .feature-card,
.showcase-features .feature-card {
    border: none;
    padding: 0.5rem;
}

/* ===================
   Layout Section
=================== */
.layout-section {
    padding-top: 6rem;
}

.layout-screenshots-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.screenshot-container {
    flex: 0 0 auto;
    text-align: center;
    scroll-snap-align: center;
}

.screenshot-container img {
    height: 500px;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.screenshot-container img:hover {
    transform: scale(1.02);
}

.screenshot-container p {
    font-weight: bold;
}

/* ===================
   Communication Section
=================== */
.communication-section {
    padding-top: 6rem;
}

.communication-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-top: 3rem;
}

.communication-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.communication-image {
    text-align: center;
    position: relative;
}

.phone-in-hand {
    max-width: 120%;
    margin-left: -20%;
}

/* ===================
   Financial Section
=================== */
.financial-section {
    padding-top: 6rem;
}

.financial-features-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.financial-feature {
    flex: 0 0 auto;
    width: 300px;
    text-align: center;
    scroll-snap-align: center;
}

.feature-image {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feature-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.financial-feature h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* ===================
   Summary Section
=================== */
.summary-section {
    padding-top: 6rem;
}

.summary-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.summary-feature {
    text-align: center;
    border: none;
    padding: 1rem;
}

.summary-feature .icon-container {
    background-color: rgba(83, 67, 255, 0.1);
    margin: 0 auto 1rem;
}

.summary-feature .icon-container img {
    filter: invert(34%) sepia(39%) saturate(4944%) hue-rotate(236deg) brightness(100%) contrast(109%);
}

.summary-feature h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--text-color);
}

.summary-feature p {
    color: var(--text-secondary-color);
}

.banners {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.banner-image {
    width: 100%;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.banner-image:hover {
    transform: scale(1.02);
}

/* ===================
   Contact Section
=================== */
.contact-section {
    padding-top: 4rem;
    padding-bottom: 6rem;
    text-align: center;
}

.contact-button {
    background-color: var(--secondary-color);
    color: #FFFFFF;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--neutral-color);
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    background-color: #0062cc;
}

/* ===================
   Footer
=================== */
footer {
    background-color: var(--surface-color);
    padding: 3rem 0;
    position: relative;
    color: var(--text-color);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo img {
    max-width: 80px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    position: relative;
    font-weight: 500;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.footer-links a:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--surface-color);
    color: var(--primary-color);
    font-size: 1.25rem;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.social-links a:hover {
    transform: translateY(-3px);
    background-color: var(--primary-color);
    color: var(--surface-color);
    box-shadow: 0 5px 15px rgba(83, 67, 255, 0.3);
}

.copyright {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary-color);
}

/* ===================
   Responsive
=================== */
@media (max-width: 1200px) {
    :root {
        --padding: 2rem;
    }

    .summary-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {

    .solution-features,
    .showcase-content,
    .communication-content {
        grid-template-columns: 1fr;
    }

    .engagement-grid {
        grid-template-columns: 1fr;
    }

    .showcase-features {
        grid-template-columns: 1fr;
        margin-top: 2rem;
    }

    .showcase-image {
        order: -1;
    }

    .communication-image {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-buttons {
        flex-direction: column;
        align-items: center;
    }

    .summary-features {
        grid-template-columns: 1fr;
    }

    .app-screenshots-slider img,
    .screenshot-container img {
        height: 400px;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    :root {
        --padding: 1rem;
    }

    .app-screenshots-slider img,
    .screenshot-container img {
        height: 300px;
    }

    .app-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* Amélioration de l'accessibilité avec focus visible */
:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===================
   Navigation
=================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--surface-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-links li a {
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    color: var(--text-color);
}

.nav-links li a:hover {
    color: var(--primary-color);
}

.nav-links li a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-cta {
    margin-left: 1rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    width: 30px;
    cursor: pointer;
}

.nav-toggle span {
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    margin-bottom: 5px;
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 992px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        flex-direction: column;
        background-color: var(--surface-color);
        transition: var(--transition);
        padding: 2rem;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-cta {
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* ===================
   Back to top button
=================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #FFFFFF;
    /* Texte toujours blanc */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(83, 67, 255, 0.3);
    border: 1px solid var(--neutral-color);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #5000d6;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(83, 67, 255, 0.4);
}

@media (max-width: 576px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* ===================
   Dark Mode Toggle
=================== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--surface-color);
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 99;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--neutral-color);
}

.theme-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Dans le mode sombre, l'icône du soleil doit toujours être jaune */
.dark-mode .theme-toggle .fa-sun {
    color: #FFC107;
}

/* En mode clair, l'icône de la lune doit être bleu foncé */
.theme-toggle .fa-moon {
    color: #1B1F3B;
}

@media (max-width: 576px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
        bottom: 20px;
        left: 20px;
    }
}

/* Styles spécifiques pour le bouton Télécharger en mode sombre */
.nav-cta .btn-primary {
    color: #FFFFFF !important; /* Texte toujours blanc */
}

/* S'assurer que les icônes du bouton Télécharger sont toujours visibles */
.nav-cta .btn-primary i,
.nav-cta .btn-primary svg {
    fill: #FFFFFF !important;
    color: #FFFFFF !important;
}