/* Services Section Modernisée */
.services-modern {
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
}

.services-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("static/images/photoAccueil.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: blur(8px) brightness(0.4);
    transform: scale(1.1);
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(14, 90, 167, 0.9) 0%,
        rgba(10, 63, 120, 0.8) 50%,
        rgba(230, 57, 70, 0.7) 100%
    );
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.el-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.el-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.el-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.el-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 15%;
    animation-delay: 1s;
}

.services-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Header */
.services-header {
    text-align: center;
    margin-bottom: 6rem;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: white;
}

.title-word {
    display: inline-block;
    margin-right: 0.5rem;
}

.title-word.accent {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Service Cards */
.service-card {
    height: 400px;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.service-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-front {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    justify-content: center;
}

.card-back {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: rotateY(180deg);
    justify-content: space-between;
}

/* Card Front Styles */
.card-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 2rem;
}

.icon-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    opacity: 0.1;
    animation: pulse 2s ease-in-out infinite;
}

.card-icon-wrapper i {
    font-size: 2.5rem;
    color: var(--primary);
    position: relative;
    z-index: 2;
}

.card-front h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

.card-front p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.card-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.service-card:hover .card-cta {
    transform: translateX(5px);
}

/* Card Back Styles */
.back-content {
    width: 100%;
}

.back-content h4 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.back-content ul {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.back-content li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.back-content li::before {
    content: '✓';
    color: var(--accent);
    font-weight: bold;
}

.btn-card {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.btn-card:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Card Individual Colors */
.card-1 .card-front .card-icon-wrapper i { color: var(--primary); }
.card-2 .card-front .card-icon-wrapper i { color: var(--secondary); }
.card-3 .card-front .card-icon-wrapper i { color: var(--accent); }
.card-4 .card-front .card-icon-wrapper i { color: #8e44ad; }

.card-1 .card-back { background: linear-gradient(135deg, var(--primary), #1b74d6); }
.card-2 .card-back { background: linear-gradient(135deg, var(--secondary), #c1121f); }
.card-3 .card-back { background: linear-gradient(135deg, var(--accent), #ffd700); }
.card-4 .card-back { background: linear-gradient(135deg, #8e44ad, #9b59b6); }

/* CTA Section */
.services-cta {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cta-text h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 700;
}

.cta-text p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(14, 90, 167, 0.3);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(14, 90, 167, 0.4);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-modern {
        padding: 4rem 0;
    }

    .services-container {
        padding: 0 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        height: 350px;
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .card-front,
    .card-back {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .services-cta {
        padding: 2rem 1.5rem;
    }
}