/* Styles améliorés pour KM Invest */

/* Variables pour les couleurs */
:root {
    --primary-blue: #1a73e8;
    --secondary-blue: #4285f4;
    --light-blue: #e8f0fe;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

/* En-tête amélioré */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--transition-speed) ease;
}

header.scrolled {
    padding: 1rem 5%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-blue);
    transition: transform var(--transition-speed) ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    max-height: 50px;
    transition: all var(--transition-speed) ease;
}

header.scrolled .logo img {
    max-height: 40px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-blue);
    transition: width var(--transition-speed) ease;
}

nav ul li a:hover {
    color: var(--primary-blue);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Section héro améliorée */
#hero {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    padding: 8rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,224C672,213,768,171,864,149.3C960,128,1056,128,1152,149.3C1248,171,1344,213,1392,234.7L1440,256L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: center bottom;
    opacity: 0.6;
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 1s ease-out;
}

#hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.3s;
    animation-fill-mode: both;
}

.cta-button {
    display: inline-block;
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: fadeInUp 1s ease-out 0.6s;
    animation-fill-mode: both;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
    z-index: -1;
}

.cta-button:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.cta-button:hover::before {
    left: 100%;
}

/* Sections principales améliorées */
section {
    padding: 6rem 5%;
    position: relative;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--primary-blue);
    position: relative;
    padding-bottom: 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
}

/* Sections B2B et B2C améliorées */
.section-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    z-index: -1;
    transition: height var(--transition-speed) ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.feature-card:hover::before {
    height: 10px;
}

.feature-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-icon img {
    width: 60px;
    height: 60px;
    transition: transform var(--transition-speed) ease;
}

.feature-card:hover .feature-icon img {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
    text-align: center;
}

.feature-card p {
    color: var(--medium-gray);
    flex-grow: 1;
}

#b2b {
    background-color: var(--light-blue);
    position: relative;
    overflow: hidden;
}

#b2b::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(66, 133, 244, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

#b2c {
    background-color: var(--light-gray);
    position: relative;
    overflow: hidden;
}

#b2c::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(66, 133, 244, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

/* Témoignages améliorés */
.testimonial {
    background-color: var(--white);
    border-radius: 10px;
    padding: 2.5rem;
    margin: 4rem auto;
    max-width: 800px;
    box-shadow: var(--box-shadow);
    position: relative;
    transition: all var(--transition-speed) ease;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -30px;
    left: 20px;
    font-size: 6rem;
    color: var(--primary-blue);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.testimonial blockquote {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.testimonial cite {
    display: block;
    text-align: right;
    font-weight: bold;
    color: var(--medium-gray);
}

.testimonial.testimonial-hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Section à propos améliorée */
#about {
    background-color: var(--white);
}

.value-props {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.value-prop {
    padding: 2rem;
    border-radius: 10px;
    background-color: var(--light-gray);
    transition: all var(--transition-speed) ease;
}

.value-prop:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.value-prop h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
    position: relative;
    padding-left: 1.5rem;
}

.value-prop h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-color: var(--primary-blue);
    border-radius: 50%;
}

.about-company {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-company h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
}

.about-company p {
    font-size: 1.1rem;
    color: var(--medium-gray);
}

/* Section contact améliorée */
#contact {
    background-color: var(--light-gray);
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(66, 133, 244, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

#contact::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(66, 133, 244, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

#contact p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

/* Pied de page amélioré */
footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    max-width: 180px;
    margin-bottom: 1rem;
}

.footer-logo p {
    font-style: italic;
    color: var(--light-gray);
}

.footer-links h4, .footer-legal h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4::after, .footer-legal h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-blue);
}

.footer-links ul, .footer-legal ul {
    list-style: none;
}

.footer-links ul li, .footer-legal ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a, .footer-legal ul li a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
    position: relative;
    padding-left: 1rem;
}

.footer-links ul li a::before, .footer-legal ul li a::before {
    content: '›';
    position: absolute;
    left: 0;
    transition: transform var(--transition-speed) ease;
}

.footer-links ul li a:hover, .footer-legal ul li a:hover {
    color: var(--white);
}

.footer-links ul li a:hover::before, .footer-legal ul li a:hover::before {
    transform: translateX(3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--light-gray);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Classes d'animation JS */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.feature-icon img.pulse {
    animation: pulse 0.5s ease-in-out;
}

.cta-button.pulse {
    animation: pulse 0.5s ease-in-out;
}

section.section-focus {
    animation: sectionFocus 1.5s ease-out;
}

@keyframes sectionFocus {
    0% { background-color: rgba(66, 133, 244, 0); }
    50% { background-color: rgba(66, 133, 244, 0.1); }
    100% { background-color: rgba(66, 133, 244, 0); }
}

.form-group.input-focus label {
    color: var(--primary-blue);
    font-weight: bold;
}

.submit-button.button-hover {
    background-color: var(--secondary-blue);
}

section.highlight {
    animation: highlightSection 2s ease-out;
}

@keyframes highlightSection {
    0% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(26, 115, 232, 0); }
    100% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0); }
}

#contact-form.form-success {
    animation: formSuccess 0.5s ease-out;
    border: 2px solid #28a745;
}

@keyframes formSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

#contact-form.form-error {
    animation: shake 0.5s ease-in-out;
    border: 2px solid #dc3545;
}

/* Styles pour les messages d'info */
.form-message.info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

/* Responsive amélioré */
@media (max-width: 992px) {
    #hero h1 {
        font-size: 2.5rem;
    }
    
    .section-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 0.8rem 0.5rem;
    }
    
    #hero {
        padding: 5rem 5%;
    }
    
    #hero h1 {
        font-size: 2rem;
    }
    
    #hero p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 4rem 5%;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 2rem;
        /* Désactiver l'animation de translation sur mobile si elle pose problème */
        /* transform: none !important; */
    }
    
    .feature-card:hover {
        /* transform: none; */ /* Optionnel: désactiver le hover sur mobile */
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    #hero h1 {
        font-size: 1.8rem;
    }
    
    .cta-button {
        padding: 0.8rem 1.8rem;
    }
    
    section h2 {
        font-size: 1.8rem;
    }
    
    .testimonial {
        padding: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}
